Lines Matching refs:UI
13 var UI = { variable
29 UI.addOption($D('noVNC_stylesheet'),sheets[i].title, sheets[i].title);
35 UI.addOption($D('noVNC_logging'),llevels[i], llevels[i]);
39 UI.initSetting('logging', 'warn');
40 WebUtil.init_logging(UI.getSetting('logging'));
42 UI.initSetting('stylesheet', 'default');
45 WebUtil.selectStylesheet(UI.getSetting('stylesheet'));
48 UI.initSetting('host', window.location.hostname);
49 UI.initSetting('port', window.location.port);
50 UI.initSetting('password', '');
51 UI.initSetting('encrypt', (window.location.protocol === "https:"));
52 UI.initSetting('true_color', true);
53 UI.initSetting('cursor', false);
54 UI.initSetting('shared', true);
55 UI.initSetting('view_only', false);
56 UI.initSetting('connectTimeout', 2);
57 UI.initSetting('path', 'websockify');
59 UI.rfb = RFB({'target': $D('noVNC_canvas'),
60 'onUpdateState': UI.updateState,
61 'onClipboard': UI.clipReceive});
62 UI.updateVisualState();
76 UI.setMouseButton();
79 UI.forceSetting('clip', true);
82 UI.initSetting('clip', false);
96 UI.setViewClip();
97 Util.addEvent(window, 'resize', UI.setViewClip);
100 if (UI.rfb_state === 'normal') {
111 UI.toggleConnectPanel();
140 value = UI.getSetting(name);
186 UI.updateSetting(name, val);
193 UI.updateSetting(name, val);
203 if (UI.settingsOpen === true) {
204 UI.settingsApply();
205 UI.closeSettingsMenu();
208 if (UI.connSettingsOpen === true) {
209 UI.toggleConnectPanel();
212 if (UI.clipboardOpen === true) {
215 UI.clipboardOpen = false;
219 UI.clipboardOpen = true;
228 if (UI.settingsOpen === true) {
229 UI.settingsApply();
230 UI.closeSettingsMenu();
233 if (UI.clipboardOpen === true) {
234 UI.toggleClipboardPanel();
238 if (UI.connSettingsOpen === true) {
241 UI.connSettingsOpen = false;
245 UI.connSettingsOpen = true;
256 if (UI.settingsOpen) {
257 UI.settingsApply();
258 UI.closeSettingsMenu();
260 UI.updateSetting('encrypt');
261 UI.updateSetting('true_color');
262 if (UI.rfb.get_display().get_cursor_uri()) {
263 UI.updateSetting('cursor');
265 UI.updateSetting('cursor', false);
268 UI.updateSetting('clip');
269 UI.updateSetting('shared');
270 UI.updateSetting('view_only');
271 UI.updateSetting('connectTimeout');
272 UI.updateSetting('path');
273 UI.updateSetting('stylesheet');
274 UI.updateSetting('logging');
276 UI.openSettingsMenu();
284 if (UI.clipboardOpen === true) {
285 UI.toggleClipboardPanel();
288 if (UI.connSettingsOpen === true) {
289 UI.toggleConnectPanel();
293 UI.settingsOpen = true;
300 UI.settingsOpen = false;
306 UI.saveSetting('encrypt');
307 UI.saveSetting('true_color');
308 if (UI.rfb.get_display().get_cursor_uri()) {
309 UI.saveSetting('cursor');
311 UI.saveSetting('clip');
312 UI.saveSetting('shared');
313 UI.saveSetting('view_only');
314 UI.saveSetting('connectTimeout');
315 UI.saveSetting('path');
316 UI.saveSetting('stylesheet');
317 UI.saveSetting('logging');
320 WebUtil.selectStylesheet(UI.getSetting('stylesheet'));
321 WebUtil.init_logging(UI.getSetting('logging'));
322 UI.setViewClip();
323 UI.setViewDrag(UI.rfb.get_viewportDrag());
330 UI.rfb.sendPassword($D('noVNC_password').value);
333 $D('noVNC_connect_button').onclick = UI.Connect;
335 UI.toggleConnectPanel();
340 UI.rfb.sendCtrlAltDel();
350 if (UI.rfb) {
351 UI.rfb.get_mouse().set_touchButton(num);
372 UI.rfb_state = state;
390 UI.toggleConnectPanel();
393 $D('noVNC_connect_button').onclick = UI.setPassword;
409 UI.updateVisualState();
414 var connected = UI.rfb_state === 'normal' ? true : false;
419 if (UI.rfb && UI.rfb.get_display() &&
420 UI.rfb.get_display().get_cursor_uri()) {
423 UI.updateSetting('cursor', false);
432 UI.setViewClip();
433 UI.setMouseButton(1);
438 UI.setMouseButton();
445 UI.setViewDrag(false);
447 switch (UI.rfb_state) {
475 UI.closeSettingsMenu();
476 UI.toggleConnectPanel();
486 UI.rfb.set_encrypt(UI.getSetting('encrypt'));
487 UI.rfb.set_true_color(UI.getSetting('true_color'));
488 UI.rfb.set_local_cursor(UI.getSetting('cursor'));
489 UI.rfb.set_shared(UI.getSetting('shared'));
490 UI.rfb.set_view_only(UI.getSetting('view_only'));
491 UI.rfb.set_connectTimeout(UI.getSetting('connectTimeout'));
493 UI.rfb.connect(host, port, password, path);
495 setTimeout(UI.setBarPosition, 100);
500 UI.closeSettingsMenu();
501 UI.rfb.disconnect();
504 UI.connSettingsOpen = false;
505 UI.toggleConnectPanel();
509 UI.rfb.get_keyboard().set_focused(false);
510 UI.rfb.get_mouse().set_focused(false);
514 UI.rfb.get_keyboard().set_focused(true);
515 UI.rfb.get_mouse().set_focused(true);
520 UI.rfb.clipboardPasteFrom("");
526 UI.rfb.clipboardPasteFrom(text);
535 if (UI.rfb) {
536 display = UI.rfb.get_display();
545 clip = UI.getSetting('clip');
550 UI.updateSetting('clip', true);
553 UI.updateSetting('clip', false);
558 if (UI.getSetting('clip')) {
572 if (!UI.rfb) { return; }
574 if (UI.rfb_state === 'normal' &&
575 UI.rfb.get_display().get_viewport()) {
583 drag = !UI.rfb.get_viewportDrag();
587 UI.rfb.set_viewportDrag(true);
590 UI.rfb.set_viewportDrag(false);
596 if(UI.keyboardVisible === false) {
598 UI.keyboardVisible = true;
600 } else if(UI.keyboardVisible === true) {
603 UI.keyboardVisible = false;
612 setTimeout(function() { UI.setKeyboard(); },100);
616 UI.keyboardVisible = false;
622 UI.setBarPosition();
628 UI.setBarPosition();