|
SetupWindow()Create a new window. .run()Set up and display the window. Example
.buttonsGet or set an Returns Array – the names of the buttons. Note that you cannot mutate the return value of this property, you must set it for it to be updated. Example
.htmlPathGet or set a path to the HTML file that will be shown in the window. Can be either absolute or relative. Relative paths are relative to the mixin's directory. Returns String – the path to the HTML file. Example
.htmlSet the source of HTML file that will be shown in the window. Mutually exclusive with Returns String – the path to the HTML file. Example
Basics.titleGet or set the title of the window. Returns String – the title of the window. Example
.frameGet or set the window's frame. Setter is equivalent to Returns Rect – the window's frame. .setFrame(newFrame, shouldAnimate)Set the window's frame. The frame should be an object with the x, y, width and
.center()Center the window on screen. Must be called after run() has been invoked. .maximize()Maximize the window so that it takes up the entire size of the screen. Visibility.close()Permanently close the window. After a window is closed all resources are freed. Use .show()Show the window if it was previously hidden. .hide()Hide the window offscreen but don't close it. .toggleShown()Hides a visible window or show a hidden window. Returns Boolean – whether the window is *now* onscreen. .isVisible()Is this window onscreen? Returns Boolean – whether the window is onscreen. .isKeyWindow()Is this the key window? The key window receives key events. Returns Boolean – whether the window is the key window. .isMainWindow()Is this the main window? Returns Boolean – whether the window is the main window. Minimization.minimize()Minimize the window into the dock. .unminimize()Unminimize the window out of the dock. .isMinimized()Return whether the window is minimized. Returns Boolean – whether the window is minimized. Events.onButtonClickGet or set a callback function that will be called when a button is clicked. Returns Function(String) – a callback function with one argument: the name of the button that was clicked. Example
.onMessageGet or set a callback function that will be called when the client JS sends a message. Returns Function(String or – Array or Object)} a callback function with two arguments: the first is the name of the message, the second is the arguments passed to it Example
.onLoadGet or set a function that will be called in the client context when the page loads. Equivalent to setting an onload attribute. Useful if using default.html to build up the page exclusively in JS. Returns Function – a function that will run in the client JS. Referencing anything in the server JS won't work. Example
Communication.eval(code)Eval some code on the client-side.
Example
.addFunction(code)Add a function to the client-side JS.
Example
.sendMessage(msg, args)Send a message to the window that you can catch with the window.onMessage attribute.
Example
.applyFunction(f, args)Call a named function or a function literal on the client side.
Example
|