3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>qooxdoo » Demo</title>
5 <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
7 <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
9 <script type="text/javascript" src="../../script/qx.js"></script>
12 <script type="text/javascript" src="../../script/layout.js"></script>
14 <div id="demoDescription">
15 <p>Native Windows. Could be understood as an enhanced window.open with some additional options like to create modal windows.</p>
18 <script type="text/javascript">
19 qx.core.Init.getInstance().defineMain(function()
21 var w1 = new qx.client.NativeWindow("http://www.google.com");
23 w1.setDimension(600, 400);
26 w1.addEventListener("load", function(e) {
27 this.debug("Content loaded: " + this.isLoaded());
30 w1.addEventListener("close", function(e) {
31 this.debug("Window closed: " + this.isClosed());
37 var d = qx.ui.core.ClientDocument.getInstance();
39 var btn1 = new qx.ui.form.Button("Open Native Window", "icon/16/appearance.png");
45 addEventListener("click", function() { w1.open(); } );
54 var l = new qx.ui.layout.VerticalBoxLayout;
55 l.setLocation(20, 96);
60 var fs1 = new qx.ui.groupbox.GroupBox("Initial Settings");
61 fs1.setHeight("auto");
65 var chk1 = new qx.ui.form.CheckBox("Resizeable");
66 chk1.setLocation(0, 0);
67 chk1.setChecked(true);
68 chk1.addEventListener("changeChecked", function(e) {
69 w1.setResizeable(e.getData());
72 var chk2 = new qx.ui.form.CheckBox("Show Statusbar");
73 chk2.setLocation(0, 20);
74 chk2.setChecked(false);
75 chk2.addEventListener("changeChecked", function(e) {
76 w1.setShowStatusbar(e.getData());
79 var chk3 = new qx.ui.form.CheckBox("Show Menubar");
80 chk3.setLocation(0, 40);
81 chk3.setChecked(false);
82 chk3.addEventListener("changeChecked", function(e) {
83 w1.setShowMenubar(e.getData());
86 var chk4 = new qx.ui.form.CheckBox("Show Location");
87 chk4.setLocation(0, 60);
88 chk4.setChecked(false);
89 chk4.addEventListener("changeChecked", function(e) {
90 w1.setShowLocation(e.getData());
93 var chk5 = new qx.ui.form.CheckBox("Show Toolbar");
94 chk5.setLocation(0, 80);
95 chk5.setChecked(false);
96 chk5.addEventListener("changeChecked", function(e) {
97 w1.setShowToolbar(e.getData());
100 var chk6 = new qx.ui.form.CheckBox("Allow Scrollbars");
101 chk6.setLocation(0, 100);
102 chk6.setChecked(true);
103 chk6.addEventListener("changeChecked", function(e) {
104 w1.setAllowScrollbars(e.getData());
107 var chk7 = new qx.ui.form.CheckBox("Modal");
108 chk7.setLocation(0, 120);
109 chk7.setChecked(false);
110 chk7.addEventListener("changeChecked", function(e) {
111 w1.setModal(e.getData());
114 var chk8 = new qx.ui.form.CheckBox("Dependent");
115 chk8.setLocation(0, 140);
116 chk8.setChecked(true);
117 chk8.addEventListener("changeChecked", function(e) {
118 w1.setDependent(e.getData());
121 fs1.add(chk1, chk2, chk3, chk4, chk5, chk6, chk7, chk8);
130 var fs2 = new qx.ui.groupbox.GroupBox("Runtime Settings");
131 fs2.setHeight("auto");
136 var tf1 = new qx.ui.form.TextField("http://www.google.com");
137 tf1.setLocation(0, 2);
140 var btn1 = new qx.ui.form.Button("Set Url", "icon/16/button-ok.png");
141 btn1.setLocation(155, 0);
142 btn1.addEventListener("click", function() {
143 w1.setUrl(tf1.getValue());
149 var tf2 = new qx.ui.form.TextField("600");
150 tf2.setLocation(0, 42);
153 var btn2 = new qx.ui.form.Button("Set Width", "icon/16/button-ok.png");
154 btn2.setLocation(55, 40);
155 btn2.addEventListener("click", function() {
156 w1.setWidth(parseInt(tf2.getValue()));
162 var tf3 = new qx.ui.form.TextField("400");
163 tf3.setLocation(0, 72);
166 var btn3 = new qx.ui.form.Button("Set Height", "icon/16/button-ok.png");
167 btn3.setLocation(55, 70);
168 btn3.addEventListener("click", function() {
169 w1.setHeight(parseInt(tf3.getValue()));
174 var btn4 = new qx.ui.form.Button("Center to screen", "icon/16/paint.png");
175 btn4.setLocation(0, 110);
176 btn4.addEventListener("click", function() {
180 var btn5 = new qx.ui.form.Button("Center to screen area", "icon/16/paint.png");
181 btn5.setLocation(0, 140);
182 btn5.addEventListener("click", function() {
183 w1.centerToScreenArea()
186 var btn6 = new qx.ui.form.Button("Center to opener", "icon/16/paint.png");
187 btn6.setLocation(0, 170);
188 btn6.addEventListener("click", function() {
194 fs2.add(tf1, btn1, tf2, btn2, tf3, btn3, btn4, btn5, btn6);