What's new? | Help | Directory | Sign in
Google
jslibs
standalone Javascript development environment with general purpose native libraries.
  
  
  
  
    
Search
for
Updated Apr 09, 2008 by soubok
Labels: doc
jswinshell  
jswinshell module

jswinshell module

home > JSLibs > jswinshell -

Description

Static functions

Static properties


jswinshell::Console class

home > JSLibs > jswinshell > Console -

Description

Functions

Properties

Examples

var cons = new Console();
cons.title = 'My console';
cons.Write('Hello world');

jswinshell::Icon class

home > JSLibs > jswinshell > Icon -

Description

Functions

Properties


jswinshell::Systray class

home > JSLibs > jswinshell > Systray -

Description

Functions

Properties

Example: tray.menu = { { text:"enable", checked:true }, { text:"delete", grayed:true }, { separator:true }, exit:"Exit" }

If the value of text, checked, grayed or icon is a function, it is called and the return value is used.
Example: `tray.menu = { { text:"enable", checked:function() { return isChecked } }, ...

Remarks

The following functions are called when you call ProcessEvents() according the events received by the tray icon.

Examples

var s = new Systray();

s.icon = new Icon(new Png(new File('calendar.png').Open(File.RDONLY)).Load());
s.text = "calendar";
s.menu = { exit_cmd:"exit" }

s.onmousedown = function(button) {
 if ( button == 2 )
  s.PopupMenu();
}

s.oncommand = function(id) {
 if ( id == 'exit_cmd' )
  exit = true;
}

while ( !exit ) {
 s.ProcessEvents();
 Sleep(100);
}

Sign in to add a comment