diff --git a/README.md b/README.md index cb4352a..1693c10 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,38 @@ A window manager experiment written in Javascript, HTML5 and CSS3. Try it! (http://www.rlamana.es/ventus) +### Create a new window manager + + var wm = new Ventus.WindowManager(); + +### Create a new empty window + + var window = wm.createWindow({ + title: 'A new window', + x: 50, + y: 50, + width: 400, + height: 250 + }); + + window.open(); + +### Create a new window wrapping a DOM Element + +##### Using a query + wm.createWindow.fromQuery('.my-app-content', { + title: 'My App', + width: 330, + height: 400, + x: 670, + y: 60 + }); + +##### Using a reference + wm.createWindow.fromElement(domElement, { + title: 'My App', + width: 500, + height: 500, + x: 0, + y: 0 + });