3832 lines
No EOL
422 KiB
HTML
3832 lines
No EOL
422 KiB
HTML
<!DOCTYPE HTML PUBLIC "4.01 Transitional"><META http-equiv="Content-Type" content="text/html; charset=utf-8" /><html><title>guiserver.lsp</title><body><pre>
|
|
<font color='#555555'>;; <font color='#308080'>@module</font> guiserver.lsp</font>
|
|
<font color='#555555'>;; <font color='#308080'>@description</font> Functions for programming GUIs and 2D graphics.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.40 use text-field as a password field with additional parameter</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.41 bug fixes for gs:listen and gs:check-event</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.42 new table UI</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.43 bug fix in new table UI action parameters</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.44 fixes in newlisp-edit.lsp</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.50 doc fixes</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.51 return value for gs:export</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.52 fix in run-shell for Java 7 update 21</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.53 doc fixes</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.60 new table functions, new naming gs:table-show-row-number</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.61 more options for gs:scroll-pane added by FdB</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.62 doc corrections</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.63 make deprecated gs:table-set-row-number work</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.70 default comm port with Guiserver are now 64001 and 64002</font>
|
|
<font color='#555555'>;; <font color='#308080'>@version</font> 1.71 references to /usr/ changed to /usr/local/</font>
|
|
<font color='#555555'>;; <font color='#308080'>@author</font> LM, 2008, 2009, 2010, 2015, Unya 2012, FdB 2013, LM 2015</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; This module has been tested on MacOS X 10.5 (Leopard) and Windows XP, both with the</font>
|
|
<font color='#555555'>;; Standard SUN Java RE v.1.5 (runtime environment) which came pre-installed on</font>
|
|
<font color='#555555'>;; those platforms. On Linux the installation of the original Sun Java Runtime </font>
|
|
<font color='#555555'>;; Environment is required the preinstalled GNU Java is not compatible. After</font>
|
|
<font color='#555555'>;; installation a soft-link has to be made from the original java executable to</font>
|
|
<font color='#555555'>;; '/usr/bin/java'.</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; On Windows the MIDI sound features require a soundbank file to</font>
|
|
<font color='#555555'>;; be installed. See the description for 'gs:play-note' for details.</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>What is newLISP-GS</h2></font>
|
|
<font color='#555555'>;; 'guiserver.lsp' is a module for interfacing to 'guiserver.jar'</font>
|
|
<font color='#555555'>;; a Java server application for generating GUIs (graphical user interfaces)</font>
|
|
<font color='#555555'>;; and 2D graphics for newLISP applications. The 'guiserver.lsp', module</font>
|
|
<font color='#555555'>;; implements a newLISP API much smaller and more abstract than the APIs of the </font>
|
|
<font color='#555555'>;; Java Swing libraries which it interfaces with. Because of this, GUI applications</font>
|
|
<font color='#555555'>;; can be built much faster than when using the original Java APIs.</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>Usage</h2></font>
|
|
<font color='#555555'>;; At the beginning of the program file, include a 'load' statement for the module:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (load "/usr/local/share/newlisp/guiserver.lsp")</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; or on MS Windows:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (load "c:/Program Files/newlisp/guiserver.lsp")</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; 'guiserver.lsp' expects the server 'guiserver.jar' to be</font>
|
|
<font color='#555555'>;; in the directoey specified in the environment variable NEWLISPDIR.</font>
|
|
<font color='#555555'>;; When newLISP starts up and this variable is not set yet, it sets it</font>
|
|
<font color='#555555'>;; to a default value of '/usr/local/share/newlisp' on MacOS X and Unix OSs, and </font>
|
|
<font color='#555555'>;; to 'C:\Program Files\newlisp' or whatever it finds in the 'PROGRAMFILES'</font>
|
|
<font color='#555555'>;; environment variable on MS Windows systems and adding '/newlisp' to it.</font>
|
|
<font color='#555555'>;; This can be overwritten by specifying system wide setting for the environment </font>
|
|
<font color='#555555'>;; variable <tt>NEWLISPDIR</tt>, which normally is set to '%PROGRAMFILES%/newlisp' </font>
|
|
<font color='#555555'>;; on MS Windows. When using the MS Windows binary installer 'NEWLISPDIR' is written </font>
|
|
<font color='#555555'>;; to the registry automatically and gets into effect after rebooting.</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>Architecture of a newLISP GUI application</h2></font>
|
|
<font color='#555555'>;; A GUI application in newLISP is composed of four parts:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <blockquote></font>
|
|
<font color='#555555'>;; <b>initialization</b> - this means starting the newLISP-GS 'guiserver.jar' and initializing </font>
|
|
<font color='#555555'>;; communications with it. Only one function call is required to do this.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <b>building widgets</b> - in this step windows, buttons, text fields etc., and</font>
|
|
<font color='#555555'>;; all visual aspects of the GUI are described. newLISP newLISP-GS offers a wide range</font>
|
|
<font color='#555555'>;; of different control widgets.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <b>defining event actions</b> - in this step all the functions are defined to</font>
|
|
<font color='#555555'>;; react to events coming from the GUI as a consequence of button pushes, keystrokes,</font>
|
|
<font color='#555555'>;; mouse-movements etc.. These event actions send many commands back to the GUI</font>
|
|
<font color='#555555'>;; to change information for the user, popup dialogs etc..</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <b>listening for events</b> - the newLISP program sits in a loop waiting for</font>
|
|
<font color='#555555'>;; events and dispatching them to the defined event actions. Only one function call</font>
|
|
<font color='#555555'>;; is required for this step.</font>
|
|
<font color='#555555'>;; </blockquote></font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>Example</h2></font>
|
|
<font color='#555555'>;; The following example application shows all the essential elements of a newLISP GUI</font>
|
|
<font color='#555555'>;; application:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; #!/usr/bin/newlisp</font>
|
|
<font color='#555555'>;; ; button-demo.lsp - demonstrate the button control</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; ; initialization</font>
|
|
<font color='#555555'>;; (load (append (env "NEWLISPDIR") "/guiserver.lsp")) </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (gs:init) </font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; ; describe the GUI</font>
|
|
<font color='#555555'>;; (gs:frame 'ButtonDemo 100 100 400 300 "Button demo")</font>
|
|
<font color='#555555'>;; (gs:set-resizable 'ButtonDemo nil)</font>
|
|
<font color='#555555'>;; (gs:panel 'ColorPanel 360 200)</font>
|
|
<font color='#555555'>;; (gs:set-color 'ColorPanel (random) (random) (random))</font>
|
|
<font color='#555555'>;; (gs:button 'aButton 'abutton-action "color")</font>
|
|
<font color='#555555'>;; (gs:set-flow-layout 'ButtonDemo "center" 2 15)</font>
|
|
<font color='#555555'>;; (gs:add-to 'ButtonDemo 'ColorPanel 'aButton)</font>
|
|
<font color='#555555'>;; (gs:set-visible 'ButtonDemo true)</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; ; define actions</font>
|
|
<font color='#555555'>;; (define (abutton-action id)</font>
|
|
<font color='#555555'>;; (gs:set-color 'ColorPanel (random) (random) (random)))</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; ; listen for incoming action requests and dispatch</font>
|
|
<font color='#555555'>;; (gs:listen)</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; ; eof </font>
|
|
|
|
<font color='#555555'>;; <br></font>
|
|
<font color='#555555'>;; <h2>Application start</h2></font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; ./button-demo ; on MacOS X and Unix</font>
|
|
<font color='#555555'>;; newlisp button-demo ; on MS Windows</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; By default guiserver.jar uses the ports 64001 and 64002, but this setting can be overwritten </font>
|
|
<font color='#555555'>;; either by supplying a port number parameter to the 'gs:init' function or by overwriting the</font>
|
|
<font color='#555555'>;; port number from the command-line. newLISP-GS will then use the port number supplied and the number</font>
|
|
<font color='#555555'>;; following it:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; ./button-demo 10001 ; on MacOS X and Unix</font>
|
|
<font color='#555555'>;; newlisp button-demo 10001 ; on MS Windows</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; newLISP-GS 'guiserver.jar' will now use the ports '64001' and '60002'.</font>
|
|
<font color='#555555'>;; Ports under <tt>1024</tt> should not be used, as many of them are already in use by other</font>
|
|
<font color='#555555'>;; OS services and need administrator privileges to use them.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; A second method to start a newLISP-GS application starts the 'guiserver.jar' first, which then</font>
|
|
<font color='#555555'>;; starts the newLISP application:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; java -jar /usr/local/share/newlisp/guiserver.jar 64001 /usr/home/aUser/MyApplication.lsp</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; A different port number can be used. Port numbers below 1024 need administrator</font>
|
|
<font color='#555555'>;; permissions. Optionally a splash screen can be specified as the last parameter:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; java -jar /usr/local/share/newlisp/guiserver.jar 64001 /home/apps/myapp.lsp /local/newLISP128.png</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; The example specifies an image inside 'guiserver.jar'. Any other image path on the local file system</font>
|
|
<font color='#555555'>;; can be used.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; On MS Windows similar methods can be used replacing the appropriate file paths, but on MS Windows Java jar files</font>
|
|
<font color='#555555'>;; can also be treated as executables and executed directly without calling Java explicitly. By default</font>
|
|
<font color='#555555'>;; 'guiserver.jar' and 'guiserver.lsp' are installed in 'c:\Program Files\newlisp\' or any other </font>
|
|
<font color='#555555'>;; directory configured on a MS Windows platform using the 'PROGRAMFILES' environment variable:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; "c:\Program Files\newlisp\guiserver.jar" 64001 c:\myprogs\MyApplication.lsp</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; Quotes are necessary when spaces are present in the argument string. The example assumes that</font>
|
|
<font color='#555555'>;; 'newlisp.exe' is in the path for executables, and it also assumes that the Windows registry has</font>
|
|
<font color='#555555'>;; an association of the <tt>.jar</tt> file extension with the <tt>javaw.exe</tt> executable. This</font>
|
|
<font color='#555555'>;; association is normally present when a java run-time environment (JRE) is installed in Windows.</font>
|
|
<font color='#555555'>;; If this association is not registered, the following method can be used:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; javaw -jar "c:\Program Files\newlisp\guiserver.jar" 64001 c:\myprogs\MyApplication.lsp</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; The quotes are necessary for path-names containing spaces.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <h2>Debugging</h2></font>
|
|
<font color='#555555'>;; <b>Tracing commands to newLISP-GS</b><br><br></font>
|
|
<font color='#555555'>;; For debugging purpose put the following directive at the beginning of your application</font>
|
|
<font color='#555555'>;; or at the place from where to start tracing.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:set-trace true)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; Then start the application from a terminal or command shell window. Now newLISP-GS</font>
|
|
<font color='#555555'>;; will output startup, version and connection messages and a trace for each 'gs:xxs' directive</font>
|
|
<font color='#555555'>;; as it is received by the newLISP-GS dispatcher:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; newLISP-GS v.0.94</font>
|
|
<font color='#555555'>;; listening on 64001</font>
|
|
<font color='#555555'>;; accepted from 0.0.0.0</font>
|
|
<font color='#555555'>;; connecting to 0.0.0.0 64002</font>
|
|
<font color='#555555'>;; retrying to connect</font>
|
|
<font color='#555555'>;; connected</font>
|
|
<font color='#555555'>;; -> frame MAIN:ButtonDemo 100 100 400 300 QnV0dG9uIGRlbW8= nil</font>
|
|
<font color='#555555'>;; -> set-resizable MAIN:ButtonDemo nil</font>
|
|
<font color='#555555'>;; -> panel MAIN:ColorPanel 360 200</font>
|
|
<font color='#555555'>;; -> set-color MAIN:ColorPanel 0 1 0 0.2</font>
|
|
<font color='#555555'>;; -> button MAIN:aButton MAIN:abutton-action Y29sb3I=</font>
|
|
<font color='#555555'>;; -> set-flow-layout MAIN:ButtonDemo center 2 15</font>
|
|
<font color='#555555'>;; -> add-to MAIN:ButtonDemo MAIN:ColorPanel MAIN:aButton </font>
|
|
<font color='#555555'>;; -> set-visible MAIN:ButtonDemo true</font>
|
|
<font color='#555555'>;; -> set-color MAIN:ColorPanel 0.8401877172 0.3943829268 0.7830992238</font>
|
|
<font color='#555555'>;; server shut down</font>
|
|
<font color='#555555'>;; </blockquote></pre></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Text strings for button names, icon paths and other texts are encode in</font>
|
|
<font color='#555555'>;; Base64 strings as the first trace line for MAIN:ButtonDemo shows. To switch</font>
|
|
<font color='#555555'>;; off tracing mode use:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:set-trace nil)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; Even if trace mode is switched off, wrong or missing parameters are still messaged</font>
|
|
<font color='#555555'>;; by newLISP-GS in a small message box. After such an error the application and guiserver</font>
|
|
<font color='#555555'>;; will exit. Unknown commands will be ignored. Functions which are not applicable to</font>
|
|
<font color='#555555'>;; certain widgets will also pop up an error message box. In certain situations a</font>
|
|
<font color='#555555'>;; function will have no effect, e.g. 'gs:set-size' or 'gs:set-color' sometimes do not</font>
|
|
<font color='#555555'>;; have an effect, depending on how a widget is configured or depending on the layout</font>
|
|
<font color='#555555'>;; which hosts the widget. Sometimes the platform look-and-feel overwrites colors.</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>Event handlers</h2></font>
|
|
<font color='#555555'>;; For most widgets, event handlers must be defined. Sometimes an event handler is</font>
|
|
<font color='#555555'>;; not required. In this case specify <tt>'gs:no-action</tt> as the event handler</font>
|
|
<font color='#555555'>;; symbol. When developing programs it is useful to watch the event handler first</font>
|
|
<font color='#555555'>;; before coding for it. This can be done easily by printing out event parameters:</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; (gs:button 'aButton 'abutton-handler "press")</font>
|
|
<font color='#555555'>;; (define (abutton-handler id)</font>
|
|
<font color='#555555'>;; (println id))</font>
|
|
<font color='#555555'>;; </pre></blockquote></font>
|
|
<font color='#555555'>;; Sometimes the same event handler function is attached to several widgets' keyboard</font>
|
|
<font color='#555555'>;; or mouse events. Some of these events receive a greater number of parameters. There</font>
|
|
<font color='#555555'>;; are two easy ways to discover the nature of an event:</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; (define (the-handler)</font>
|
|
<font color='#555555'>;; (doargs (p)</font>
|
|
<font color='#555555'>;; (println "->" p)))</font>
|
|
<font color='#555555'>;; </pre></blockquote></font>
|
|
<font color='#555555'>;; The other method looks at the source of the event as it was transmitted by the newLISP-GS.</font>
|
|
<font color='#555555'>;; This is useful to recognize the data types used in the event:</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; (define (the-handler)</font>
|
|
<font color='#555555'>;; (println gs:event))</font>
|
|
<font color='#555555'>;; </pre></blockquote></font>
|
|
<font color='#555555'>;; All text from text fields are received as base64-encoded strings. E.g. the text: </font>
|
|
<font color='#555555'>;; '"Hello World"' would be received as: '"SGVsbG8gV29ybGQ="':</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; (gs:text-field 'TextField 'textfield-handler)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (define (textfield-handler id text)</font>
|
|
<font color='#555555'>;; (printnl id ": " (base64-dec text)))</font>
|
|
<font color='#555555'>;; </pre></blockquote></font>
|
|
<font color='#555555'>;; When the text "Hello World" is entered in the text field, the following output</font>
|
|
<font color='#555555'>;; would be generated:</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; TextField: "Hello World"</font>
|
|
<font color='#555555'>;; </pre></blockquote></font>
|
|
<font color='#555555'>;; In case the ESC key is pressed in the text field, the event handler would</font>
|
|
<font color='#555555'>;; report 'nil' for the text field. A handler should therefore always check text</font>
|
|
<font color='#555555'>;; for string contents before trying to apply the 'base64-dec' function on it.</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>Mapping or applying 'gs:xxx' functions</h2></font>
|
|
<font color='#555555'>;; Like any newLISP functions, 'gs:xxx' functions can be mapped or applied to lists of </font>
|
|
<font color='#555555'>;; parameters using the newLISP 'map' and 'apply' functions. When doing this, make sure to </font>
|
|
<font color='#555555'>;; map or apply the quoted <tt>'gs:xxx symbol</tt>, so the <tt>gs:xx</tt> functions </font>
|
|
<font color='#555555'>;; get executed under the <tt>gs</tt> context, prefixing symbols in parameter lists</font>
|
|
<font color='#555555'>;; correctly with the context prefix of their origin.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (map 'gs:panel '(first second third fourth)) ; note quoted gs: function</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; <h2>Some shortcuts when writing 'gs:xxx' functions</h2></font>
|
|
<font color='#555555'>;; Due to the nature of transfer between newLISP and the guiserver as text, the following</font>
|
|
<font color='#555555'>;; convenient shortcuts can be taken when writing functions:</font>
|
|
<font color='#555555'>;; <blockquote></font>
|
|
<font color='#555555'>;; <ul></font>
|
|
<font color='#555555'>;; <li>Symbol ids of components can be expressed as strings.</li></font>
|
|
<font color='#555555'>;; <li>Number values can be expressed as strings.</li></font>
|
|
<font color='#555555'>;; <li>Numbers can be expressed as floats or integers.</li></font>
|
|
<font color='#555555'>;; </ul></font>
|
|
<font color='#555555'>;; </blockquote></font>
|
|
<font color='#555555'>;; Here are some examples:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:panel 'ColorPanel 360 200)</font>
|
|
<font color='#555555'>;; ; is the same as</font>
|
|
<font color='#555555'>;; (gs:panel "ColorPanel" 360 200)</font>
|
|
<font color='#555555'>;; ; is the same as</font>
|
|
<font color='#555555'>;; (gs:panel "ColorPanel" "360" "200")</font>
|
|
<font color='#555555'>;; ; is the same as</font>
|
|
<font color='#555555'>;; (gs:panel "ColorPanel" 360.0 "200.00")</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; Although the first form is preferred for clarity and readability, in some cases coding</font>
|
|
<font color='#555555'>;; may be more efficient using the other forms.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Except for the symbols used for action handlers, all symbols are used only by their</font>
|
|
<font color='#555555'>;; face (term) value. This means that reserved symbols of the newLISP programming</font>
|
|
<font color='#555555'>;; language can be used freely in symbol ids for all components, e.g:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:label 'term "Input here") ; term is a reserved name since v10.2.0</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; The usage of the reserved symbol 'term' will not pose a problem.</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>Return values</h2></font>
|
|
<font color='#555555'>;; newLISP-GS is an event driven asynchronous system. Most functions return</font>
|
|
<font color='#555555'>;; right away the number of characters sent out to the server.</font>
|
|
<font color='#555555'>;; In general, return values of 'gs:xxx' functions do not have</font>
|
|
<font color='#555555'>;; any specific meaning and can be discarded. Only the functions 'gs:get-bounds',</font>
|
|
<font color='#555555'>;; 'gs:get-fonts', 'gs:get-font-metrics', 'gs:get-instruments'</font>
|
|
<font color='#555555'>;; 'gs:get-screen', 'gs:get-text' and 'gs:get-version' return meaningful values or</font>
|
|
<font color='#555555'>;; lists of values, which are stored in similar named variables: 'gs:bounds',</font>
|
|
<font color='#555555'>;; 'gs:fonts', 'gs:font-metrics', 'gs:instruments', 'gs:screen', 'gs:text' and</font>
|
|
<font color='#555555'>;; 'gs:version'. These functions will not return right away but block until</font>
|
|
<font color='#555555'>;; the return valuse is sent back from newLISP-GS.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The function 'gs:get-text' can work both ways: event driven or with a return</font>
|
|
<font color='#555555'>;; value depending on the call pattern used.</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <h2>Function overview</h2></font>
|
|
<font color='#555555'>;; <ul></font>
|
|
<font color='#555555'>;; <li><b>Initialization and application setup</b><br></font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:init [<server-port>])</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; The initialization function starts <tt>guiserver.jar</tt> which will listen to the <i>server-port</i></font>
|
|
<font color='#555555'>;; and initiate another connection on <tt>server-port + 1</tt> back to newLISP. If a <server-port></font>
|
|
<font color='#555555'>;; is not supplied <tt>guiserver</tt> will assume <tt>64001</tt> and <tt>64002</tt>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; As the last statement in the application put:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:listen)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; This function listens on <tt>64002</tt> (by default) for event messages from newLISP-GS</font>
|
|
<font color='#555555'>;; and dispatches them to the user-defined action handlers. To avoid newLISP shutting down</font>
|
|
<font color='#555555'>;; when the guiserver shuts down, use:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:listen true)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; Sometimes it is necessary to run other tasks while listening for events. In this case use</font>
|
|
<font color='#555555'>;; 'gs:check-event', which will wait for certain amount of microseconds for an event</font>
|
|
<font color='#555555'>;; to be executed. After the wait-time, it returns. The function is typically used in a loop:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (while (gs:check-event 10000) ; check for 10 milli seconds</font>
|
|
<font color='#555555'>;; (do-myprocess))</font>
|
|
<font color='#555555'>;; (exit)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; The loop will exit when 'gs:check-event' returns 'nil' on communications errors, e.g.</font>
|
|
<font color='#555555'>;; when the window's close button was clicked.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <li><b>Containers</b><br></font>
|
|
<font color='#555555'>;; A <em>container</em> can contain any other container or control widget. Except for the </font>
|
|
<font color='#555555'>;; <tt>menu-bar</tt> and the <tt>split-pane</tt>, containers can have a special layout-manager set </font>
|
|
<font color='#555555'>;; with one of the three layout-manager function commands. By default containers have a flow layout. By</font>
|
|
<font color='#555555'>;; nesting different containers and using different layout-manager settings, complex layouts</font>
|
|
<font color='#555555'>;; can be configured. The function/command <tt>add-to</tt> is used to add components to containers.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:dialog <sym-id> <sym-parent-frame> <str-message> <int-width> <int-height> [<boolean-visible> [<boolean-modal>]])</font>
|
|
<font color='#555555'>;; (gs:frame <sym-id> <int-x> <int-y> <int-width> <int-height> [<str-title> <boolean-visible>])</font>
|
|
<font color='#555555'>;; (gs:menu-bar <sym-frame> [<sym-menu-1> ...]) </font>
|
|
<font color='#555555'>;; (gs:panel <sym-id> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; (gs:scroll-pane <sym-id> <sym-widget> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; (gs:split-pane <sym-id> <str-orientation> [<float-weight> [<float-location> [int-divider-size>]]])</font>
|
|
<font color='#555555'>;; (gs:tabbed-pane <sym-id> <sym-action> <str-orientation> [<sym-widget> <sym-tab-title> ...])</font>
|
|
<font color='#555555'>;; (gs:tool-bar <sym-frame> [<bool-floatable> <int-hgap> <int-vgap>])</font>
|
|
<font color='#555555'>;; (gs:canvas <sym-id>) </font>
|
|
<font color='#555555'>;; (gs:window <sym-id> <int-x> <int-y> <int-width> <int-height>)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>Labels</b><br></font>
|
|
<font color='#555555'>;; Labels can have text or an image or both. A normal text <tt>label</tt> can have an icon</font>
|
|
<font color='#555555'>;; added to it and a <tt>image-label</tt> can have text added to it. Labels don't initiate</font>
|
|
<font color='#555555'>;; actions and can be placed in any container like all button-type widgets - buttons, checkboxes</font>
|
|
<font color='#555555'>;; and menu items. A basic set of icon images is built into <tt>guiserver.jar</tt>,</font>
|
|
<font color='#555555'>;; but user-supplied images and icons in <tt>.jpg</tt>, <tt>.png</tt> and <tt>.gif</tt> formats</font>
|
|
<font color='#555555'>;; can be used.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:label <sym-id> <str-text> [<str-align> [<int-width> <int-height>]])</font>
|
|
<font color='#555555'>;; (gs:image-label <sym-id> <str-icon-path> [<str-align>])</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>Control widgets</b><br></font>
|
|
<font color='#555555'>;; Except for the passive progress bar, all control widgets fire action requests to</font>
|
|
<font color='#555555'>;; the newLISP program. These requests must be served to avoid error messages but can</font>
|
|
<font color='#555555'>;; be defined as empty functions, if an action is not required:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; ; empty action definition</font>
|
|
<font color='#555555'>;; (define (my-button-action) )</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; ; action handler printing the name of the button pressed</font>
|
|
<font color='#555555'>;; (define (my-button-action id) (println id " has been pressed"))</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; All action events calls carry information about the widget, that initiated that the event,</font>
|
|
<font color='#555555'>;; and event parameters like keystrokes, slider positions etc..</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:button <sym-id> <sym-action> [<str-text> [<int-width> <int-height>]])</font>
|
|
<font color='#555555'>;; (gs:check-box <sym-id> <sym-action> [<str-text> [<bool-selected>]])</font>
|
|
<font color='#555555'>;; (gs:combo-box <sym-id> <sym-action> [<str-item-1> ...])</font>
|
|
<font color='#555555'>;; (gs:combo-box <sym-id> <sym-action> [<list-str-items>])</font>
|
|
<font color='#555555'>;; (gs:image-button <sym-id> <sym-action> <str-icon-path> [<str-down-icon-path> [<int-width> <int-height>]])</font>
|
|
<font color='#555555'>;; (gs:list-box <sym-id> <sym-action> [<str-item-1> ...])</font>
|
|
<font color='#555555'>;; (gs:list-box <sym-id> <sym-action> [<list-str-items>])</font>
|
|
<font color='#555555'>;; (gs:menu <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; (gs:menu-popup <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; (gs:menu-item <sym-id> <sym-action> <str-text>)</font>
|
|
<font color='#555555'>;; (gs:menu-item-check <sym-id> <sym-action> <str-text> [<bool-selected>])</font>
|
|
<font color='#555555'>;; (gs:progress-bar <sym-id> <int-min> <in-max> <int-initial-value>)</font>
|
|
<font color='#555555'>;; (gs:radio-button <sym-id> <sym-action> [<str-text> [<bool-selected>]])</font>
|
|
<font color='#555555'>;; (gs:slider <sym-id> <sym-action> <str-orientation> <int-min> <int-max> <int-initial-value>)</font>
|
|
<font color='#555555'>;; (gs:text-area <sym-id> <sym-action> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; (gs:text-field <sym-id> <sym-action> <int-columns>[<str-echo-char>])</font>
|
|
<font color='#555555'>;; (gs:text-pane <sym-id> <sym-action> <str-style> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; (gs:toggle-button <sym-id> <sym-action> [<str-text> <bool-selected>])</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; For all button widgets, and the check box and menu-item widgets, icons can be set using </font>
|
|
<font color='#555555'>;; the 'gs:set-icon' and 'gs:set-pressed-icon' functions.</font>
|
|
<font color='#555555'>;; </li><br></font>
|
|
<font color='#555555'>;; <li><b>Placing components in containers</b><br></font>
|
|
<font color='#555555'>;; For the flow and grid layouts the components are added in the sequence they are listed.</font>
|
|
<font color='#555555'>;; The grid-layout fills the grid row by row starting with the left most column. </font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:add-to <sym-container> <sym-component> [<sym-component ...])</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; For the border layout an orientation parameter is specified as either <tt>"north"</tt>,</font>
|
|
<font color='#555555'>;; <tt>"west"</tt>, <tt>"center"</tt>, <tt>"east"</tt> or <tt>"south"</tt>.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:add-to <sym-container> [<sym-component> <str-orientation> ...])</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>Summary of commands</b><br></font>
|
|
<font color='#555555'>;; Most of the commands set special attributes of containers or control widgets. </font>
|
|
<font color='#555555'>;; Not all functions can be applied to all containers and control widgets. A wrong</font>
|
|
<font color='#555555'>;; application will either pop up an error message box or do nothing.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Some functions will work on certain widgets only in certain situations. For example</font>
|
|
<font color='#555555'>;; <tt>set-size</tt> will work not on components in a grid layout but on components</font>
|
|
<font color='#555555'>;; in a flow layout. Some widgets have a preset background color which cannot be changed</font>
|
|
<font color='#555555'>;; or is overwritten by the current 'gs:look-and-feel' settings.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:add-list-item <sym-list-combo> <str-text> [<str-text> ...])</font>
|
|
<font color='#555555'>;; (gs:add-separator <sym-menu-tool-bar>)</font>
|
|
<font color='#555555'>;; (gs:add-to <sym-container> <sym-component> [<sym-component ...])</font>
|
|
<font color='#555555'>;; (gs:add-to <sym-container> <sym-component> <str-orientation> [<sym-component> <str-orientation> ...])</font>
|
|
<font color='#555555'>;; (gs:append-text <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; (gs:check-event <int-microseconds>)</font>
|
|
<font color='#555555'>;; (gs:clear-list <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:clear-text <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:copy-text <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:cut-text <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:destroy-shell <sym-text-area>)</font>
|
|
<font color='#555555'>;; (gs:disable <sym-id-1> [<sym-id-2> ...])</font>
|
|
<font color='#555555'>;; (gs:dispose <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:dispose-splash)</font>
|
|
<font color='#555555'>;; (gs:enable <sym-id-1> [<sym-id-2> ...])</font>
|
|
<font color='#555555'>;; (gs:eval-shell <sym-text-area> <str-commmand>)</font>
|
|
<font color='#555555'>;; (gs:find-text <sym-id> <str-text> <sym-action> [<str-direction>]])</font>
|
|
<font color='#555555'>;; (gs:frame-closed <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:get-fonts)</font>
|
|
<font color='#555555'>;; (gs:get-bounds <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:get-font-metrics <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; (gs:get-screen)</font>
|
|
<font color='#555555'>;; (gs:get-selected-text <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:get-text <sym-id> [<sym-action>])</font>
|
|
<font color='#555555'>;; (gs:get-text-position <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:get-version);</font>
|
|
<font color='#555555'>;; (gs:goto-text <sym-id> <sym-row> <sym-column>)</font>
|
|
<font color='#555555'>;; (gs:insert-list-item <sym-list-combo> <str-text> <int-index> [<str-text> <int-index>])</font>
|
|
<font color='#555555'>;; (gs:insert-tab <sym-tabbed-pane> <sym-component> [<str-text> [<int-index> [<str-icon-path>]])</font>
|
|
<font color='#555555'>;; (gs:insert-text <sym-id> <str-text> <int-pos>)</font>
|
|
<font color='#555555'>;; (gs:layout <sym-container>)</font>
|
|
<font color='#555555'>;; (gs:load-text <sym-id> <str-path>)</font>
|
|
<font color='#555555'>;; (gs:no-action)</font>
|
|
<font color='#555555'>;; (gs:paste-text <sym-id> [<str-text>])</font>
|
|
<font color='#555555'>;; (gs:redo-text <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:remove-from <sym-container> <sym-component> [<sym-component> ...])</font>
|
|
<font color='#555555'>;; (gs:remove-list-item <sym-list-combo> <int-index> [<int-index> ...])</font>
|
|
<font color='#555555'>;; (gs:remove-tab <sym-tabbed-pane> <int-index>)</font>
|
|
<font color='#555555'>;; (gs:request-focus <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:run-shell <sym-text-area> <str-commmand> <str-args>)</font>
|
|
<font color='#555555'>;; (gs:select-list-item <sym-id> <str-item> [<boolean-flag>])</font>
|
|
<font color='#555555'>;; (gs:select-text <sym-id> <int-from> [<int-to>])</font>
|
|
<font color='#555555'>;; (gs:set-accelerator <sym-menu-item> <str-keystroke>)</font>
|
|
<font color='#555555'>;; (gs:set-background <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; (gs:set-background <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; (gs:set-bevel-border <sym-panel> <str-type>)</font>
|
|
<font color='#555555'>;; (gs:set-border-layout <sym-container> [<int-hgap> <int-vgap>])</font>
|
|
<font color='#555555'>;; (gs:set-caret <sym-id> <int-offset>)</font>
|
|
<font color='#555555'>;; (gs:set-caret-color <sym-id> <list-rgb>)</font>
|
|
<font color='#555555'>;; (gs:set-caret-color <sym-id> <float-red> <float-green> <float-blue>)</font>
|
|
<font color='#555555'>;; (gs:set-color <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; (gs:set-color <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; (gs:set-cursor <sym-id> <str-shape>)</font>
|
|
<font color='#555555'>;; (gs:set-echo-char <sym-id> <str-echo-char>)</font>
|
|
<font color='#555555'>;; (gs:set-editable <sym-id> <boolean-flag>)</font>
|
|
<font color='#555555'>;; (gs:set-flow-layout <sym-container> [<str-alignment> [<int-hgap> <int-vgap>]])</font>
|
|
<font color='#555555'>;; (gs:set-font <sym-id> <str-family> <int-size> <str-type>)</font>
|
|
<font color='#555555'>;; (gs:set-foreground <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; (gs:set-foreground <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; (gs:set-grid-layout <sym-container> <int-rows> <int-columns> [<int-hgap> <int-vgap>])</font>
|
|
<font color='#555555'>;; (gs:set-icon <sym-id> <str-icon-path> [<int-index>])</font>
|
|
<font color='#555555'>;; (gs:set-look-and-feel <str-look>)</font>
|
|
<font color='#555555'>;; (gs:set-resizable <sym-frame> <boolean-flag>)</font>
|
|
<font color='#555555'>;; (gs:set-pressed-icon <sym-id> <str-icon-path>)</font>
|
|
<font color='#555555'>;; (gs:set-selected <sym-id> <boolean-flag>)</font>
|
|
<font color='#555555'>;; (gs:set-size <sym-id> <int-width> <int-height>)</font>
|
|
<font color='#555555'>;; (gs:set-selection-color <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; (gs:set-syntax <sym-id> <str-type>) </font>
|
|
<font color='#555555'>;; (gs:set-syntax-colors <list-rgb-comments> <list-rgb-keywords> <list-rgb-string> <list-rgb-number> <list-rgb-quoted> <list-rgb-prantheses>)</font>
|
|
<font color='#555555'>;; (gs:set-tab-size <sym-id> <int-size>)</font>
|
|
<font color='#555555'>;; (gs:set-text <sym-id> <str-text> [<int-index>])</font>
|
|
<font color='#555555'>;; (gs:set-titled-border <sym-component> <str-title>)</font>
|
|
<font color='#555555'>;; (gs:set-tool-tip <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; (gs:set-trace <boolean-flag>)</font>
|
|
<font color='#555555'>;; (gs:set-utf8 <boolean-flag>)</font>
|
|
<font color='#555555'>;; (gs:set-value <sym-id> <int-value>)</font>
|
|
<font color='#555555'>;; (gs:set-visible <sym-id> <boolean-visible>)</font>
|
|
<font color='#555555'>;; (gs:undo-text <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:undo-enable <sym-id> <boolean-enabled>)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>The Table UI</b><br></font>
|
|
<font color='#555555'>;; Since version 1.42 Guiserver has a table widget and supporting functions.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:table <sym-id> <sym-action> [<str-column-header-name> ...])</font>
|
|
<font color='#555555'>;; (gs:table-add-column <sym-id> <str-column-header-name> ...)</font>
|
|
<font color='#555555'>;; (gs:table-add-row <sym-id> [<str-columns> ... ])</font>
|
|
<font color='#555555'>;; (gs:table-get <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:table-get-cell <sym-id> <int-row> <int-column>)</font>
|
|
<font color='#555555'>;; (gs:table-get-size <sym-id>)</font>
|
|
<font color='#555555'>;; (gs:table-remove-row <sym-id> <int-row></font>
|
|
<font color='#555555'>;; (gs:table-set-cell <sym-id> <int-row> <int-column> <str-value>)</font>
|
|
<font color='#555555'>;; (gs:table-set-column <sym-id> <int-column-number> <int-width> [<str-justification>])</font>
|
|
<font color='#555555'>;; (gs:table-set-column-name <sym-id> [<str-name1> [<str-name2> ...])</font>
|
|
<font color='#555555'>;; (gs:table-set-row-count <sym-id> <int-count></font>
|
|
<font color='#555555'>;; (gs:table-set-row-number <sym-id> <bool-row-number>) DEPRECATED use gs:table-show-row-number</font>
|
|
<font color='#555555'>;; (gs:table-show-row-number <sym-id> <bool-row-number>)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>Special dialogs</b><br></font>
|
|
<font color='#555555'>;; These are standard dialogs for opening and saving files and for choosing colors.</font>
|
|
<font color='#555555'>;; Each dialog when closed fires an event for which a handler function must be</font>
|
|
<font color='#555555'>;; defined by the newLISP program. </font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:color-dialog <sym-parent-frame> <sym-action> <str-title> <float-red> <float-green> <float-blue>)</font>
|
|
<font color='#555555'>;; (gs:message-dialog <sym-parent-frame> <str-title> <str-message> [<str-type> [<str-icon-path>]])</font>
|
|
<font color='#555555'>;; (gs:confirm-dialog <sym-parent-frame> <sym-action> <str-title> <str-message> [<str-type>])</font>
|
|
<font color='#555555'>;; (gs:open-file-dialog <sym-parent-frame> <sym-action> [<str-directory> [<str-mask> <str-description>]])</font>
|
|
<font color='#555555'>;; (gs:save-file-dialog <sym-parent-frame> <sym-action> [<str-directory> [<str-initial-file> [<str-mask> <str-description>]]])</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>2D Graphics functions</b><br></font>
|
|
<font color='#555555'>;; Every call to a 'gs:draw-xxx' or 'gs:fill-xxx' function will create a new graphics object, which</font>
|
|
<font color='#555555'>;; will persist until destroyed by a call to 'gs:delete-tag'. Graphics objects are animated</font>
|
|
<font color='#555555'>;; using the tag operations 'gs:move-tag', 'gs:rotate-tag', 'gs:scale-tag' and </font>
|
|
<font color='#555555'>;; 'gs:shear-tag' or using 'gs:hide-tag' and 'gs:show-tag'. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Any 'gs:draw-xxx' or 'gs:fill-xxx' will create graphics objects but not force a screen update.</font>
|
|
<font color='#555555'>;; The canvas is automatically redrawn when made visible for the first time using 'gs:set-visible' or</font>
|
|
<font color='#555555'>;; after a call to 'gs:update'. Redrawing is also forced when resizing the window which hosts the canvas</font>
|
|
<font color='#555555'>;; or any action covering and uncovering the canvas. </font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; After all tag operations redrawing is initiated by default, but it can be forced off by specifying </font>
|
|
<font color='#555555'>;; 'nil' as the last parameter in a 'gs:xxx-tag' command. Suppressing immediate redraw is useful to avoid </font>
|
|
<font color='#555555'>;; flicker when a batch of tag operations is performed.</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; Every graphics object (line, shape, text, or image) carries a group tag. Objects are deleted</font>
|
|
<font color='#555555'>;; using 'gs:delete-tag' and will disappear immediately from the canvas. Using 'gs:move-tag'</font>
|
|
<font color='#555555'>;; lines, shapes, text and images can be moved to a different position.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; All positions given in <tt>int x</tt> and <tt>int y</tt> must be given as integers. Values</font>
|
|
<font color='#555555'>;; will not be converted automatically as is the case with newLISP's built-in functions. To</font>
|
|
<font color='#555555'>;; guarantee integer type, values can be casted e.g.: </font>
|
|
<font color='#555555'>;; <pre>(gs:draw-circle 'MyCircle (int x) (int y) (int r))</pre></font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:color-tag <sym-tag> <list-rgb> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:delete-tag <sym-tag>[<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:draw-arc <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-start> <int-angle> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-circle <sym-tag> <int-x> <int-y> <int-radius> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-ellipse <sym-tag> <int-x> <int-y> <int-radius-x> <int-radius-y> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-image <sym-tag> <str-path> <int-x> <int-y> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; (gs:draw-line <sym-tag> <int-x1> <int-y1> <int-x2> <int-y2> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-path <sym-tag> <list-points> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-polygon <sym-tag> <list-points> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-round-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-arc-width> <int-arc-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:draw-text <sym-tag> <str-text> <int-x> <int-y> [<list-rgb> [<float-angle>]])</font>
|
|
<font color='#555555'>;; (gs:export <str-path-file> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; (gs:fill-arc <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-start> <int-angle> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:fill-circle <sym-tag> <int-x> <int-y> <int-radius> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:fill-ellipse <sym-tag> <int-x> <int-y> <int-radius-x> <int-radius-y> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:fill-polygon <sym-tag> <list-points> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:fill-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:fill-round-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-arc-width> <int-arc-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; (gs:hide-tag <sym-tag> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:move-tag <sym-tag> <int-dx> <int-dy> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:reorder-tags <list-tags>)</font>
|
|
<font color='#555555'>;; (gs:rotate-tag <sym-tag> <float theta> <int-x> <int-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:save-text <sym-id> <str-path>)</font>
|
|
<font color='#555555'>;; (gs:scale-tag <sym-tag> <float-x> <float-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:shear-tag <sym-tag> <float-x> <float-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:show-popup <sym-tag> <sym-host> <int-x> <int-y>)</font>
|
|
<font color='#555555'>;; (gs:show-tag <sym-tag> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:set-canvas <sym-tag>)</font>
|
|
<font color='#555555'>;; (gs:set-paint <list-rgb>)</font>
|
|
<font color='#555555'>;; (gs:set-rotation <float-angle>)</font>
|
|
<font color='#555555'>;; (gs:set-scale <int-x> <int-y>)</font>
|
|
<font color='#555555'>;; (gs:set-stroke <float-width> [<str-cap> [<str-join> [<float-miterlimit>]]])</font>
|
|
<font color='#555555'>;; (gs:set-translation <int-x> <int-y>)</font>
|
|
<font color='#555555'>;; (gs:set-anti-aliasing <boolean-flag>)</font>
|
|
<font color='#555555'>;; (gs:translate-tag <sym-tag> <int-x> <int-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; (gs:update)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>Events</b><br></font>
|
|
<font color='#555555'>;; Additionally to the event actions registered when creating a widget,</font>
|
|
<font color='#555555'>;; the canvas, windows and dialogs can fire events as a result of key or mouse</font>
|
|
<font color='#555555'>;; actions or when the position or size of a windows or dialog has changed.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:key-event <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:mouse-clicked <sym-canvas> <sym-action> [<boolean-tags>])</font>
|
|
<font color='#555555'>;; (gs:mouse-dragged <sym-canvas> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:mouse-event <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:mouse-moved <sym-canvas> <sym-action> [<boolean-tags>])</font>
|
|
<font color='#555555'>;; (gs:mouse-pressed <sym-canvas> <sym-action> [<boolean-tags>])</font>
|
|
<font color='#555555'>;; (gs:mouse-released <sym-canvas> <sym-action> [<boolean-tags>])</font>
|
|
<font color='#555555'>;; (gs:mouse-wheel <sym-canvas> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:window-closed <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:window-moved <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; (gs:window-resized <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </li></font>
|
|
<font color='#555555'>;; <li><b>Built-in icons and images</b><br></font>
|
|
<font color='#555555'>;; The 'guiserver.jar' file has the following icons and images built in. Each of</font>
|
|
<font color='#555555'>;; them is prefixed with the path '/local/'. For example '/local/newLISP128.png'</font>
|
|
<font color='#555555'>;; addresses the newLISP logo of size 128x128. To address images outside of</font>
|
|
<font color='#555555'>;; 'guiserver.jar', use a normal file path suitable to your platform. On MS Windows</font>
|
|
<font color='#555555'>;; use forward slashes instead of backslashes.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; Image path</font>
|
|
<font color='#555555'>;; ----------</font>
|
|
<font color='#555555'>;; clear-down32.png</font>
|
|
<font color='#555555'>;; clear32.png</font>
|
|
<font color='#555555'>;; copy-down32.png</font>
|
|
<font color='#555555'>;; copy32.png</font>
|
|
<font color='#555555'>;; cut-down32.png</font>
|
|
<font color='#555555'>;; cut32.png</font>
|
|
<font color='#555555'>;; dotgray16.png</font>
|
|
<font color='#555555'>;; dotgray32.png</font>
|
|
<font color='#555555'>;; dotgreen16.png</font>
|
|
<font color='#555555'>;; dotgreen32.png</font>
|
|
<font color='#555555'>;; dotred16.png</font>
|
|
<font color='#555555'>;; dotred32.png</font>
|
|
<font color='#555555'>;; dotyellow16.png</font>
|
|
<font color='#555555'>;; dotyellow32.png</font>
|
|
<font color='#555555'>;; edit-down32.png</font>
|
|
<font color='#555555'>;; edit32.png</font>
|
|
<font color='#555555'>;; folder-closed-down32.png</font>
|
|
<font color='#555555'>;; folder-closed32.png</font>
|
|
<font color='#555555'>;; folder-opened-down32.png</font>
|
|
<font color='#555555'>;; folder-opened32.png</font>
|
|
<font color='#555555'>;; font-book-down32.png</font>
|
|
<font color='#555555'>;; font-book32.png</font>
|
|
<font color='#555555'>;; green10.png</font>
|
|
<font color='#555555'>;; info-down32.png</font>
|
|
<font color='#555555'>;; info32.png</font>
|
|
<font color='#555555'>;; new-down32.png</font>
|
|
<font color='#555555'>;; new32.png</font>
|
|
<font color='#555555'>;; newLISP-down32.png</font>
|
|
<font color='#555555'>;; newLISP128.png</font>
|
|
<font color='#555555'>;; newLISP16.png</font>
|
|
<font color='#555555'>;; newLISP20.png</font>
|
|
<font color='#555555'>;; newLISP32.png</font>
|
|
<font color='#555555'>;; newLISP64.png</font>
|
|
<font color='#555555'>;; newLISPsplashWin.png</font>
|
|
<font color='#555555'>;; paste-down32.png</font>
|
|
<font color='#555555'>;; paste32.png</font>
|
|
<font color='#555555'>;; pressedbutton32.png</font>
|
|
<font color='#555555'>;; red10.png</font>
|
|
<font color='#555555'>;; restart-down32.png</font>
|
|
<font color='#555555'>;; restart32.png</font>
|
|
<font color='#555555'>;; run-down32.png</font>
|
|
<font color='#555555'>;; run32.png</font>
|
|
<font color='#555555'>;; save-down32.png</font>
|
|
<font color='#555555'>;; save32.png</font>
|
|
<font color='#555555'>;; search-down32.png</font>
|
|
<font color='#555555'>;; search32.png</font>
|
|
<font color='#555555'>;; stop-down32.png</font>
|
|
<font color='#555555'>;; stop32.png</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; <li><b>Predefined colors</b><br></font>
|
|
<font color='#555555'>;; The following colors are predefined:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; Name rgb components</font>
|
|
<font color='#555555'>;; ---- -------------- </font>
|
|
<font color='#555555'>;; gs:black (0.0 0.0 0.0)</font>
|
|
<font color='#555555'>;; gs:blue (0.0 0.0 1.0)</font>
|
|
<font color='#555555'>;; gs:cyan (0.0 1.0 1.0)</font>
|
|
<font color='#555555'>;; gs:darkGray (0.2509804 0.2509804 0.2509804)</font>
|
|
<font color='#555555'>;; gs:gray (0.5019608 0.5019608 0.5019608)</font>
|
|
<font color='#555555'>;; gs:green (0.0 1.0 0.0)</font>
|
|
<font color='#555555'>;; gs:lightGray (0.7529412 0.7529412 0.7529412)</font>
|
|
<font color='#555555'>;; gs:magenta (1.0 0.0 1.0)</font>
|
|
<font color='#555555'>;; gs:orange (1.0 0.78431374 0.0)</font>
|
|
<font color='#555555'>;; gs:pink (1.0 0.6862745 0.6862745)</font>
|
|
<font color='#555555'>;; gs:red (1.0 0.0 0.0)</font>
|
|
<font color='#555555'>;; gs:white (1.0 1.0 1.0)</font>
|
|
<font color='#555555'>;; gs:yellow (1.0 1.0 0.0)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; Colors in newLISP-GS can be specified as three (four with alpha component) single</font>
|
|
<font color='#555555'>;; numbers or as a list of the three RGB values followed by the alpha channel number.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:set-background 'aPanel gs:magenta</font>
|
|
<font color='#555555'>;; (gs:set-background 'aPanel 1.0 0 1</font>
|
|
<font color='#555555'>;; (gs:set-background 'aPanel '(1 0 1)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; All of the above statements will produce the same background color on the <tt>aPanel</tt>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <li><b>Sound and MIDI API</b><br></font>
|
|
<font color='#555555'>;; The newLISP-GS sound API uses the default saundbank and sound hardware installed </font>
|
|
<font color='#555555'>;; on the platform newLISP-GS is running on. On Mac OS X nothing additional needs to be</font>
|
|
<font color='#555555'>;; installed. On MS Windows and some Unix platforms a soundbank file needs to be installed.</font>
|
|
<font color='#555555'>;; Soundbanks for the Java JRE can be obtained at:</font>
|
|
<font color='#555555'>;; <font color='#308080'>@link</font> http://java.sun.com/products/java-media/sound/soundbanks.html http://java.sun.com/products/java-media/sound/soundbanks.html</font>
|
|
<font color='#555555'>;; The demo files shipped with the newLISP-GS installation use the midsize soundbank. Other soundbanks</font>
|
|
<font color='#555555'>;; may require different naming of instruments in the 'gs:midi-patch' statement. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The sound API is capable of playing of mutliple tracks at the same time</font>
|
|
<font color='#555555'>;; depending on the sound hardware installed on a specific platform. Mac OS X platforms</font>
|
|
<font color='#555555'>;; and most MS Windows platforms should be capable of playing 16 instruments (channels) at the</font>
|
|
<font color='#555555'>;; the same time 32 on parallel sounding tracks. newLISP GS supports 128 instruments of the</font>
|
|
<font color='#555555'>;; default soundbank installed.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; On Mac OS X and MS Windows channel 9 is a special channel sounding a different rythm </font>
|
|
<font color='#555555'>;; instrument for all 128 different keys/notes.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Basic capabilities of the sound API are shown in the demo files <tt>midi-demo.lsp</tt></font>
|
|
<font color='#555555'>;; and <tt>midi2-demo.lsp</tt> in the <tt>/usr/local/share/newlisp/guiserver/</tt> or </font>
|
|
<font color='#555555'>;; <tt>c:\Program files\newlisp\guiserver\</tt> directory.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; (gs:add-track <int channel><list-notes>)</font>
|
|
<font color='#555555'>;; (gs:channel-bend <int-channel> <bend>)</font>
|
|
<font color='#555555'>;; (gs:get-instruments)</font>
|
|
<font color='#555555'>;; (gs:instruments)</font>
|
|
<font color='#555555'>;; (gs:midi-bpm <int-bpm> [<int-resolution>])</font>
|
|
<font color='#555555'>;; (gs:midi-close)</font>
|
|
<font color='#555555'>;; (gs:midi-init [<str-file-path>])</font>
|
|
<font color='#555555'>;; (gs:midi-patch <int-instrument> [<int-channel>])</font>
|
|
<font color='#555555'>;; (gs:mute-track <int-track> <bool-on-off>)</font>
|
|
<font color='#555555'>;; (gs:play-note <int-key> [<int-duration> [<int-velocity> [<int-channel> [int-bend]]]])</font>
|
|
<font color='#555555'>;; (gs:play-sequence [<int-start-tick> [<int-loop-count> [<int-start-loop> [<int-end-loop>]]]])</font>
|
|
<font color='#555555'>;; (gs:save-sequence <str-file-path>)</font>
|
|
<font color='#555555'>;; (gs:stop-sequence)</font>
|
|
<font color='#555555'>;; (gs:play-sound <str-file-path>)</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;; </ul></font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>context</font> 'gs<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>; ======================= preset colors</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:black '<font color='#AA0000'>(</font><font color='#665500'>0.0</font> <font color='#665500'>0.0</font> <font color='#665500'>0.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:blue '<font color='#AA0000'>(</font><font color='#665500'>0.0</font> <font color='#665500'>0.0</font> <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:cyan '<font color='#AA0000'>(</font><font color='#665500'>0.0</font> <font color='#665500'>1.0</font> <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:darkGray '<font color='#AA0000'>(</font><font color='#665500'>0.2509804</font> <font color='#665500'>0.2509804</font> <font color='#665500'>0.2509804</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:gray '<font color='#AA0000'>(</font><font color='#665500'>0.5019608</font> <font color='#665500'>0.5019608</font> <font color='#665500'>0.5019608</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:green '<font color='#AA0000'>(</font><font color='#665500'>0.0</font> <font color='#665500'>1.0</font> <font color='#665500'>0.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:lightGray '<font color='#AA0000'>(</font><font color='#665500'>0.7529412</font> <font color='#665500'>0.7529412</font> <font color='#665500'>0.7529412</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:magenta '<font color='#AA0000'>(</font><font color='#665500'>1.0</font> <font color='#665500'>0.0</font> <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:orange '<font color='#AA0000'>(</font><font color='#665500'>1.0</font> <font color='#665500'>0.78431374</font> <font color='#665500'>0.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:pink '<font color='#AA0000'>(</font><font color='#665500'>1.0</font> <font color='#665500'>0.6862745</font> <font color='#665500'>0.6862745</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:red '<font color='#AA0000'>(</font><font color='#665500'>1.0</font> <font color='#665500'>0.0</font> <font color='#665500'>0.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:white '<font color='#AA0000'>(</font><font color='#665500'>1.0</font> <font color='#665500'>1.0</font> <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:yellow '<font color='#AA0000'>(</font><font color='#665500'>1.0</font> <font color='#665500'>1.0</font> <font color='#665500'>0.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>; ====================== utility routines</font>
|
|
|
|
<font color='#555555'>; set server path</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> ostype <font color='#008800'>"Windows"</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>; on some MS Windows systems the jar -> javaw.exe association my be missing, the use the following:</font>
|
|
<font color='#555555'>;(set 'server-path (string "javaw.exe -jar " "'\"" (env "NEWLISPDIR") "/guiserver.jar\"'")) </font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'server-path <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"'\""</font> <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"NEWLISPDIR"</font><font color='#AA0000'>)</font> <font color='#008800'>"/guiserver.jar\"'"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'server-path <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"NEWLISPDIR"</font><font color='#AA0000'>)</font> <font color='#008800'>"/guiserver.jar"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>; Not documented gs:begin-cmd and gs:end-cmd</font>
|
|
<font color='#555555'>; sends graphics ommands in transactions, to be used in:</font>
|
|
<font color='#555555'>;</font>
|
|
<font color='#555555'>; draw-arc, draw-circle, draw-ellipse, draw-image, draw-line, </font>
|
|
<font color='#555555'>; draw-path, draw-polyon, draw-rect, draw-round-rect, draw-text,</font>
|
|
<font color='#555555'>;</font>
|
|
<font color='#555555'>; fill-arc, fill-circle, fill-ellipse, fill-polygon, fill-rect, </font>
|
|
<font color='#555555'>; fill-round-rect, </font>
|
|
<font color='#555555'>;</font>
|
|
<font color='#555555'>; color-tag, delete-tag, hide-tag, move-tag, rotate-tag, scale-tag,</font>
|
|
<font color='#555555'>; shear-tag, translate-tag</font>
|
|
<font color='#555555'>;</font>
|
|
<font color='#555555'>; example:</font>
|
|
<font color='#555555'>; (gs:begin-cmd)</font>
|
|
<font color='#555555'>; ; andy code containing </font>
|
|
<font color='#555555'>; ; gs:draw-xxx, gs:fill-xx, gs:xxx-tag</font>
|
|
<font color='#555555'>; ; comands</font>
|
|
<font color='#555555'>; (gs:end-cmd)</font>
|
|
<font color='#555555'>;</font>
|
|
<font color='#555555'>; The whole command sequence between gs:begin-cmd and gs:end-cmd</font>
|
|
<font color='#555555'>; will be sent at once to the Java guiserver. This way minimizing</font>
|
|
<font color='#555555'>; network overhead. </font>
|
|
<font color='#555555'>; Turns out, the speedup is too small in most of the demos.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:begin-cmd<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'transaction-active <font color='#0000AA'>true</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'transaction-buffer <font color='#008800'>""</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:end-cmd<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out transaction-buffer<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'transaction-buffer <font color='#008800'>""</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'transaction-active <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:send-out str<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> transaction-active
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> transaction-buffer str<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out str<font color='#AA0000'>)</font><font color='#555555'>;</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <br><br><br></font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:add-list-item <sym-list-combo> <str-text> [<str-text> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-list-combo> The name of the combo box or list box to which text entries are added.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text of the entry to be added.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Items are added in the same sequence as they appear in the 'gs:add-list-item' command and added to the</font>
|
|
<font color='#555555'>;; end of the existing list of items.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>add-list-item comp<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"add-list-item "</font> comp <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> item<font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:add-separator <sym-menu-tool-bar>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-menu-tool-bar> The name of the tool bar or menu bar to which a spacer entry is added.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Depending on the OS platform the separator may not be visible and only occupy space before the next </font>
|
|
<font color='#555555'>;; component added to the tool or menu bar.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>add-separator bar<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"add-separator "</font> bar <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:add-track <int-channel> <list-of-notes>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-channel> The channel belonging to this track.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-of-notes> A list of notes. Each note is a list of key duration velocity and bend.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; In case of 'gs:add-track' the duration of a note is given in ticks.</font>
|
|
<font color='#555555'>;; 16 ticks are in a quarter note or <em>beat</em>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; A note is a list of 4 elements: '(<int-key> <int-duration> <int-velocity> [<int-bend>])'. <key></font>
|
|
<font color='#555555'>;; <duration>, <velocity> and <bend> can be given as variables, which will be evaluated by</font>
|
|
<font color='#555555'>;; 'gs:add-track'. The <int-bend> parameter is optional and assumed as <tt>0</tt> if not</font>
|
|
<font color='#555555'>;; present. See the command 'gs:play-note' for more information on the note bend parameter.</font>
|
|
<font color='#555555'>;; The following code is a complete example:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (load (append (env "NEWLISPDIR") "/guiserver.lsp"))</font>
|
|
<font color='#555555'>;; (gs:init)</font>
|
|
<font color='#555555'>;; (gs:midi-init)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (map set '(C C# D D# E F F# G G# A A# B c c# d e f f# g g# a a# b) (sequence 60 82))</font>
|
|
<font color='#555555'>;; (set 'pp 30 'p 40 'm 64 'f 127) ; set velocity/volume</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (gs:midi-patch "Piano" 0)</font>
|
|
<font color='#555555'>;; (gs:midi-patch "Pizzicato Strings" 1)</font>
|
|
<font color='#555555'>;; (gs:midi-patch "Woodblock" 2)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (gs:add-track 0 '( (C 12 m) (C# 4 m) (D 16 m) (c 16 f) (D 16 m)) )</font>
|
|
<font color='#555555'>;; (gs:add-track 1 (dup '(d 4 pp) 16))</font>
|
|
<font color='#555555'>;; (gs:add-track 2 '( (c 4 p) (c 12 p) (c 4 p) (c 12 p) (c 4 p) (c 12 p) (c 4 p) (c 12 p)) )</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (gs:play-sequence)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (sleep 5000)</font>
|
|
<font color='#555555'>;; (gs:midi-close)</font>
|
|
<font color='#555555'>;; (exit)</font>
|
|
|
|
<font color='#555555'>;; The second example shows the usage of pitch-bend in notes:</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (load (append (env "NEWLISPDIR") "/guiserver.lsp"))</font>
|
|
<font color='#555555'>;; (gs:init)</font>
|
|
<font color='#555555'>;; (gs:midi-init)</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; (gs:midi-patch "Piano" 0)</font>
|
|
<font color='#555555'>;; (gs:midi-patch "Gunshot" 1)</font>
|
|
<font color='#555555'>;; (gs:midi-patch "Telephone" 2)</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; (for (n -8192 8191 128) (push (list 64 1 95 n) track0 -1))</font>
|
|
<font color='#555555'>;; (for (n 64 96 2) (push (list n 8 76) track1 -1))</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; (gs:add-track 0 track0)</font>
|
|
<font color='#555555'>;; (gs:add-track 1 track1)</font>
|
|
<font color='#555555'>;; (gs:add-track 2 '((44 128 127)))</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; (gs:play-sequence)</font>
|
|
<font color='#555555'>;; ;(gs:save-sequence "extremeAlarm.mid")</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; (sleep 8000)</font>
|
|
<font color='#555555'>;; (gs:midi-close)</font>
|
|
<font color='#555555'>;; (exit)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>add-track channel notes<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"add-track System "</font> channel <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>local</font> <font color='#AA0000'>(</font>bend<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>n notes<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'bend <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> <font color='#665500'>4</font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> n<font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>eval</font> <font color='#AA0000'>(</font>n <font color='#665500'>3</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>eval</font> <font color='#AA0000'>(</font>n <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>eval</font> <font color='#AA0000'>(</font>n <font color='#665500'>1</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>eval</font> <font color='#AA0000'>(</font>n <font color='#665500'>2</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> bend <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:add-to <sym-container> <sym-component> [<sym-componentl> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-container> The name of the container to which components are added.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-component> One or more symbols of the components to add.</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:add-to <sym-container> <sym-component> <str-orientation> [<sym-component> <str-orientation> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-container> The name of the container to which components are added.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-component> The name of a component to add.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-orientation> The orientation of a component to add in border layout, '"north"', '"west"', '"center"', '"east"' or '"south"'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>add-to id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"add-to "</font> id <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> item <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:append-text <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text field or text area to which text is appended.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text to be appended.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>append-text id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"append-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:button <sym-id> <sym-action> [<str-text> [<int-width> <int-height>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> An optional text for the button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the button.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>button id action text x y<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> x y<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:canvas <sym-id>) </font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the canvas.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; A canvas is a panel for drawing and receiving mouse input events. For most</font>
|
|
<font color='#555555'>;; applications a background color should be specified for the canvas using</font>
|
|
<font color='#555555'>;; 'gs:set-background' or 'gs:set-color' which call the same function internally. The</font>
|
|
<font color='#555555'>;; background forces the canvas to be cleared before redrawing components</font>
|
|
<font color='#555555'>;; which have been moved, rotated, scaled or deleted. In applications where</font>
|
|
<font color='#555555'>;; this is not desired but a background color is still required, the background</font>
|
|
<font color='#555555'>;; color can be specified for the container hosting the canvas. The canvas</font>
|
|
<font color='#555555'>;; background will then appear in the color of the container, but erasing</font>
|
|
<font color='#555555'>;; the canvas before repainting is not enforced.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; A canvas can also be used to host widgets like buttons etc.. In this case</font>
|
|
<font color='#555555'>;; the canvas is treated like a 'gs:panel', with a flow layout by default.</font>
|
|
<font color='#555555'>;; Similar to a panel created with 'gs:panel' other layouts can be set.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When widgets are present on a canvas they appear to be floating over</font>
|
|
<font color='#555555'>;; the drawing. See the file 'textrot-demo.lsp' for an example.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>canvas id parent<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:currentCanvas id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"canvas "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:channel-bend <int-channel> <bend>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-channel> The channel where the pitch bend is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-bend> The channel bend between <tt>0</tt> and <tt>16383</tt>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Numbers upwards of <tt>8192</tt> bend the tone upwards, numbers smaller</font>
|
|
<font color='#555555'>;; than <tt>8192</tt> bend the tone downwards. To switch off channel bend set</font>
|
|
<font color='#555555'>;; the number to the middle posiotion of <tt>8192</tt>. 'gs:channel-bend' can </font>
|
|
<font color='#555555'>;; be used to bring a channel in tune with an external sound source.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>channel-bend channel bend<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"channel-bend System "</font> channel <font color='#008800'>" "</font> bend <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>; @syntax (gs:channel-reverb <int-channel> <reverb>)</font>
|
|
<font color='#555555'>; @param <int-channel> The channel where the reverb is set.</font>
|
|
<font color='#555555'>; @param <int-reverb> The channel reverb between <tt>0</tt> and <tt>127</tt>.</font>
|
|
<font color='#555555'>;</font>
|
|
<font color='#555555'>; Sets the reverberation of the channel for all notes.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>channel-reverb channel reverb<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"channel-reverb System "</font> channel <font color='#008800'>" "</font> reverb <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:check-box <sym-id> <sym-action> [<str-text> [<bool-selected>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the check box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text of the check box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <bool-selected> An optional flag indicating the selection state 'true' or 'nil' (default).</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>check-box id action text selected<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"check-box "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> selected <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"check-box "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:check-event <int-microseconds>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-microseconds> Wait for an event a maximum of <int-microseconds> and execute it.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The function 'gs:check-event' is used as an alternative to 'gs:listen' when the application</font>
|
|
<font color='#555555'>;; is performing some activity while waiting for user input from the GUI. Typically</font>
|
|
<font color='#555555'>;; 'gs:check-event' is used in a loop, which performs some other task and at the same time</font>
|
|
<font color='#555555'>;; checks for events from the GUI part of the application. Like 'gs:listen' the function will </font>
|
|
<font color='#555555'>;; force an exit of the application when communication between the newLISP-GS and the newLISP</font>
|
|
<font color='#555555'>;; application process fails. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (while (gs:check-event 10000) ; check for 10 milliseconds</font>
|
|
<font color='#555555'>;; (do-myprocess)</font>
|
|
<font color='#555555'>;; )</font>
|
|
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>check-event us , event<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>when</font> <font color='#AA0000'>(</font><font color='#0000AA'>net-select</font> in <font color='#008800'>"read"</font> us<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>net-receive</font> in event <font color='#665500'>1000000000</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#555555'>; (println "check-event: " event)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>eval-string</font> event<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>exit</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#0000AA'>true</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:clear-list <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sum-id> The name of the list component in which to clear all entries.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>clear-list id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"clear-list "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:clear-text <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sum-id> The name of the component in which to clear the text.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>clear-text id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"clear-text "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:copy-text <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sum-id> The name of the text component from which to copy the selection to the clipboard.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>copy-text id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"copy-text "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:cut-text <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id-text> The name of the text component from which to cut selected text and place it on the clipboard..</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>cut-text id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"cut-text "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:color-dialog <sym-parent-frame> <sym-action> <str-title> <float-red> <float-green> <float-blue>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-parent-frame> The name symbol of the parent frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the handler to call when leaving the dialog</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-title> The title of the color dialog.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-red> The initial red color component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-green> The initial green color component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-blue> The initial blue color component.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>color-dialog parent action title red green blue<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"color-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> title<font color='#AA0000'>)</font> <font color='#008800'>" "</font> red <font color='#008800'>" "</font> green <font color='#008800'>" "</font> blue <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:color-tag <sym-tag> <list-color> [<boolean-update>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The name tag of the shape(s) to set a new color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-color> The new color as a list of 3 numbers for the rgb components.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>color-tag tag color <font color='#AA0000'>(</font>update <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"color-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> update <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:combo-box <sym-id> <sym-action> [<str-item-1> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the combo box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-item> Zero, one or more text entries in the combo box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:combo-box <sym-id> <sym-action> [<list-str-items>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the combo box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-str-items> Zero, one or more text entries in a list.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>combo-box id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"combo-box "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font><font color='#AA0000'>)</font>
|
|
entries <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>item entries<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> item<font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:confirm-dialog <sym-parent-frame> <sym-action> <str-title> <str-message> [<str-type>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-parent-frame> The symbol name of the parent frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The action to perform when the diaog is closed.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-title> The title of the message box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-message> The message in the message box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-type> The type of the message box.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The type of the message box can be one of: '"yes-no"', '"yes-no-cancel"'</font>
|
|
<font color='#555555'>;; On return of the message box <sym-action> carries one of the responses <tt>0</tt> for the yes-,</font>
|
|
<font color='#555555'>;; <tt>1</tt> for the no- or <tt>2</tt> for the cancel-button.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>confirm-dialog parent action title msg <font color='#AA0000'>(</font>type <font color='#008800'>"plain"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"confirm-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> title<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> msg<font color='#AA0000'>)</font> <font color='#008800'>" "</font> type <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:delete-tag <sym-tag> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group to be deleted.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Deletes all 2D objects (lines, shapes, text, images) tagged with <sym-tag>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Each time a 'gs:draw-xxx' or 'gs:fill-xxx' function is called a graphical</font>
|
|
<font color='#555555'>;; object is created. The tag used during creation is a way to address one</font>
|
|
<font color='#555555'>;; or more of these objects. See the file 'mouse-demo.lsp' for an example.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>delete-tag tag <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"delete-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:destroy-shell <sym-text-area>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-text-area> The name of the text component for which the shell process is destroyed.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>destroy-shell id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"destroy-shell "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:dialog <sym-id> <sym-parent> <str-title> <int-width> <int-height> [<boolean-visible> [<boolean-modal>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the dialog</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-parent> The name of the parent frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-title> The title string of the dialog frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the dialog frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the dialog frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-visible> The optional flag with a value of 'true' or 'nil' for visibility of the dialog.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-modal> The optional flag with a value of 'true' or 'nil' for modality of the dialog.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Initially the dialog should not be visible until all widgets are added to it. </font>
|
|
<font color='#555555'>;; When no flags for visibility and modality are specified, 'nil' is assumed. A modal dialog will</font>
|
|
<font color='#555555'>;; prevent input in the parent window. Components can be added to a dialog using 'gs:add-to'.</font>
|
|
<font color='#555555'>;; Use the 'gs:set-border-layout', 'ga:set-flow-layout' or 'gs:set-grid-layout' to set a specific</font>
|
|
<font color='#555555'>;; layout.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>dialog id parent title width height visible modal<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"dialog "</font> id <font color='#008800'>" "</font> parent <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> title<font color='#AA0000'>)</font> <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> visible <font color='#008800'>" "</font> modal<font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:disable <sym-id-1> [sym-id-2 ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component to disable.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Disabled components are grayed and do not accept input.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>disable<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#008800'>"disable "</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> item <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:dispose <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component to dispose of.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Only objects created with 'gs:dialog', 'gs:frame' or 'gs:window' can be</font>
|
|
<font color='#555555'>;; deleted with 'gs:dispose'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>dispose id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"dispose "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:dispose-splash)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; A splash screen can be specified when starting the newLISP-GS process before newLISP. </font>
|
|
<font color='#555555'>;; The function 'gs:dispose-splash' is used to turn off the splash image after</font>
|
|
<font color='#555555'>;; the newLISP GUI application has started.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; java -jar /usr/share/newlisp/guiserver.jar 64001 program.lsp /local/newLISP128.png</font>
|
|
<font color='#555555'>;; ; or on MS Windows</font>
|
|
<font color='#555555'>;; java -jar "c:\Program Files\newlisp\guiserver.jar" 64001 "newlisp program.lsp" /local/newLISPsplashWin.png</font>
|
|
|
|
<font color='#555555'>;; The example starts newLISP-GS with an application 'program.lsp' and a splash</font>
|
|
<font color='#555555'>;; screen showing the built-in newLISP logos and using port 64001/2. Instead, the full pathname </font>
|
|
<font color='#555555'>;; of a different image file can be specified. Inside 'program.lsp' the function</font>
|
|
<font color='#555555'>;; 'gs:dispose-splash' or a mouse click on the image will turn off the splash screen. </font>
|
|
<font color='#555555'>;; For 'program.lsp' the full pathname may be necessary. On MS Windows quotes are necessary to bracket </font>
|
|
<font color='#555555'>;; arguments to 'guiserver.jar' which contain spaces. </font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>dispose-splash<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#008800'>"dispose-splash System\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-arc <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-start> <int-angle> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-start-angle> The start angle of the arc in 0 to 360 degrees.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-arc-angle> The opening angle of the arc in 0 to 360 degrees.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The resulting arc begins at <int-start-angle> and extends for <int-arc-angle degrees>, </font>
|
|
<font color='#555555'>;; using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock </font>
|
|
<font color='#555555'>;; position. A positive value indicates a counter-clockwise rotation while a negative value </font>
|
|
<font color='#555555'>;; indicates a clockwise rotation.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The center of the arc is the center of the rectangle whose origin is (x, y) and whose size </font>
|
|
<font color='#555555'>;; is specified by the width and height arguments.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The resulting arc covers an area <int-width> pixels wide by <int-height> pixels tall.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-arc id x y width height start angle color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-arc "</font> gs:currentCanvas <font color='#008800'>" "</font> id <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font>
|
|
width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> start <font color='#008800'>" "</font> angle <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-arc "</font> gs:currentCanvas <font color='#008800'>" "</font> id <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font>
|
|
width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> start <font color='#008800'>" "</font> angle <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-circle <sym-tag> <int-x> <int-y> <int-radius> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the circle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the circle center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the circle center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-radius> The radius of the circle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates the outline of a circle. The color numbers must be entered in list form.</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used the current paint specified with 'gs:set-paint' is used.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-circle tag x y radius color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-circle "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-circle "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-ellipse <sym-tag> <int-x> <int-y> <int-radius-x> <int-radius-y> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the ellipse.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the ellipse center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the ellipse center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-radius-x> The radius of the ellipse.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-radius-y> The radius of the ellipse.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates the outline of an ellipse. The color numbers must be enterd in list form.</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used the current paint specified with 'gs:set-paint' is used.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-ellipse tag x y radius-x radius-y color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-ellipse "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius-x <font color='#008800'>" "</font> radius-y <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-ellipse "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius-x <font color='#008800'>" "</font> radius-y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-image <sym-tag> <str-path> <int-x> <int-y> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the image.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-path> The file path-name of the image.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the image top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the image top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width in which to draw the image.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height in which to draw the image.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When <int-width> and <int-height> parameters are specified and they are not</font>
|
|
<font color='#555555'>;; equal to the original size of the image (measured in pixels) the image will</font>
|
|
<font color='#555555'>;; be displayed in either compressed or zoomed form.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-image tag image-path x y width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-image "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> image-path<font color='#AA0000'>)</font> <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-image "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> image-path<font color='#AA0000'>)</font> <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-line <sym-tag> <int-x1> <int-y1> <int-x2> <int-y2> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tage of the line.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x1> The X position of the first point.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y1> The Y position of the first point.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x2> The X position of the second point.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y2> The Y position of the second point.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Draws a line. The color numbers must be entered in list form.</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used the current paint specified with 'gs:set-paint' is used.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-line tag x1 y1 x2 y2 color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-line "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font>
|
|
x1 <font color='#008800'>" "</font> y1 <font color='#008800'>" "</font> x2 <font color='#008800'>" "</font> y2 <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-path <sym-tag> <list-points> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tage group of the path.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-points> The list of x and y coordinates of the points.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Draws a path with the points found in <list-points>. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font> </font>
|
|
<font color='#555555'>;; (gs:draw-path 'P '(1 0 2 2 3 0))</font>
|
|
|
|
<font color='#555555'>;; The example will draw an upwards-pointing triangle without base at the </font>
|
|
<font color='#555555'>;; points '1,0', '2,2' and '3,0' </font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-path tag points color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-path "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>/</font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> points<font color='#AA0000'>)</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>p points<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> p <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-path "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>/</font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> points<font color='#AA0000'>)</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>p points<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> p <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-polygon <sym-tag> <list-points> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the polygon.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-points> The list of x and y coordinates of the points.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Draws a polygon with the points found in <list-points>. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font> </font>
|
|
<font color='#555555'>;; (gs:draw-polygon 'P '(1 0 2 2 3 0))</font>
|
|
|
|
<font color='#555555'>;; The example will draw an upwards-pointing triangle with the points '1,0', '2,2'</font>
|
|
<font color='#555555'>;; and '3,0'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-polygon tag points color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-polygon "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>/</font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> points<font color='#AA0000'>)</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>p points<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> p <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-polygon "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>/</font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> points<font color='#AA0000'>)</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>p points<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> p <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the rectangle..</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates the outline of a rectangle. The color numbers must be entered in list form.</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used the current paint specified with 'gs:set-paint' is used.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-rect tag x y width height color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-round-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-arc-width> <int-arc-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the round rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the rectangle..</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-arc-width> The width of the corner rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-arc-height> The height of the corner rectangle..</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Draws a rectangle shape with round corners. The rounding is defined by the rectangle enclosing</font>
|
|
<font color='#555555'>;; the rounding arc.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-round-rect tag x y width height arcw arch color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-round-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> arcw <font color='#008800'>" "</font> arch <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-round-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> arcw <font color='#008800'>" "</font> arch <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:draw-text <sym-tag> <str-text> <int-x> <int-y> [<list-rgb> [<float-angle>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text to be drawn.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The optonal color for the text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-angle> The optional angle for text in degrees</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used, the current paint specified with 'gs:set-paint' is used.</font>
|
|
<font color='#555555'>;; The optional angle is <tt>0</tt> by default for horizontal text. A value of <tt>90</tt></font>
|
|
<font color='#555555'>;; will rotate the text around the <tt>x</tt>, <tt>y</tt> position downwards clockwise.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>draw-text tag text x y color angle<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> angle
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-text "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> angle <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-text "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"draw-text "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:enable <sym-id-1> [sym-id-2 ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of a component to enable.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Components are enabled by default.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>enable<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"enable "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> item <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:eval-shell <sym-id-text-area> <str-command>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id-text-area> The name of the text area in which to evaluate text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-command> The text to evaluate in the shell.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>eval-shell id command<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"eval-shell "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> command<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:export <str-path-file> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-path-file> The path and file name of the image file to write to.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the image in pixels.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the image in pixels.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If no width and height are specified, the current size of the canvas is assumed.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (gs:export "/usr/home/pictures/mypic.png")</font>
|
|
|
|
<font color='#555555'>;; This will generate a '.png' file exactly as the image seen on the screen.</font>
|
|
<font color='#555555'>;; The color format is RGBA with 8 bit per color and an alpha channel. When</font>
|
|
<font color='#555555'>;; no background color is defined for the canvas, the background will be</font>
|
|
<font color='#555555'>;; transparent.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When specifying width and height, a smaller or bigger portion of the canvas</font>
|
|
<font color='#555555'>;; than seen on the screen is printed to the image.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>export image-path width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>result <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"export "</font> gs:currentCanvas <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> image-path<font color='#AA0000'>)</font> <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"export "</font> gs:currentCanvas <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> image-path<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>number?</font> result<font color='#AA0000'>)</font> <font color='#0000AA'>true</font> <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:fill-arc <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-start> <int-angle> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the arc.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-start-angle> The start angle of the arc in 0 to 360 degrees.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-arc-angle> The opening angle of the arc in 0 to 360 degrees.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The resulting arc begins at <int-start-angle> and extends for <int-arc-angle degrees>, </font>
|
|
<font color='#555555'>;; using the current color. Angles are interpreted such that 0 degrees is at the 3 o'clock </font>
|
|
<font color='#555555'>;; position. A positive value indicates a counter-clockwise rotation while a negative value </font>
|
|
<font color='#555555'>;; indicates a clockwise rotation.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The center of the arc is the center of the rectangle whose origin is (x, y) and whose size </font>
|
|
<font color='#555555'>;; is specified by the width and height arguments.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The resulting arc covers an area <int-width> pixels wide by <int-height> pixels tall.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>fill-arc id x y width height start angle color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-arc "</font> gs:currentCanvas <font color='#008800'>" "</font> id <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font>
|
|
width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> start <font color='#008800'>" "</font> angle <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-arc "</font> gs:currentCanvas <font color='#008800'>" "</font> id <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font>
|
|
width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> start <font color='#008800'>" "</font> angle <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:fill-circle <sym-tag> <int-x> <int-y> <int-radius> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the circle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the circle center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the circle center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-radius> The radius of the circle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates a filled circle. The color numbers must be entered in list form.</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used, the current paint specified with 'gs:set-paint' is used.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>fill-circle tag x y radius color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-circle "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-circle "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:fill-ellipse <sym-tag> <int-x> <int-y> <int-radius-x> <int-radius-y> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the ellipse.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the ellipse center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the ellipse center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-radius-x> The radius of the ellipse.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-radius-y> The radius of the ellipse.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The fill color as a list of 3 numbers for the rgb components.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates a filled ellipse. The color numbers must be entered in list form.</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used, the current paint specified with 'gs:set-paint' is used.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>fill-ellipse tag x y radius-x radius-y color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-ellipse "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius-x <font color='#008800'>" "</font> radius-y <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-ellipse "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> radius-x <font color='#008800'>" "</font> radius-y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:fill-polygon <sym-tag> <list-points> [<list-color>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the polygon.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-points> The list of x and y coordinates of the points.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Draws a polygon with the points found in <list-points> and fills it with</font>
|
|
<font color='#555555'>;; the current color set with 'gs:set-paint' or the optional color</font>
|
|
<font color='#555555'>;; given in <list-color>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font> </font>
|
|
<font color='#555555'>;; (gs:fill-polygon 'P '(1 0 2 2 3 0))</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (gs:fill-polygon 'P '(1 0 2 2 3 0) gs:gray)</font>
|
|
|
|
<font color='#555555'>;; The example will fill an upwards pointing triangle with the points '1,0', '2,2'</font>
|
|
<font color='#555555'>;; and '3,0' and fill it with the current color set with 'gs:set-paint'. The second</font>
|
|
<font color='#555555'>;; example paints a gray triangle regardless of the current color set with</font>
|
|
<font color='#555555'>;; 'gs:set-paint'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>fill-polygon tag points color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-polygon "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>/</font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> points<font color='#AA0000'>)</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>p points<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> p <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-polygon "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>/</font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> points<font color='#AA0000'>)</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>p points<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> p <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:fill-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The fill color as a list of 3 numbers for the rgb components.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates a filled rectangle. The color numbers must be entered in list form.</font>
|
|
<font color='#555555'>;; If no <list-rgb> is used, the current paint specified with 'gs:set-paint' is used.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>fill-rect tag x y width height color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:fill-round-rect <sym-tag> <int-x> <int-y> <int-width> <int-height> <int-arc-width> <int-arc-height> [<list-rgb>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group of the round rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the top left corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the rectangle..</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-arc-width> The width of the corner rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-arc-height> The height of the corner rectangle.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The outline color as a list of 3 numbers for the rgb components.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Paints a rectangle shape with round corners. The rounding is defined by the rectangle enclosing</font>
|
|
<font color='#555555'>;; the rounding arc.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>fill-round-rect tag x y width height arcw arch color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> color
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-round-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> arcw <font color='#008800'>" "</font> arch <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"fill-round-rect "</font> gs:currentCanvas <font color='#008800'>" "</font>
|
|
tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> arcw <font color='#008800'>" "</font> arch <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:find-text <sym-id> <str-text> <sym-action> [<str-direction>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text area or text pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The searching text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> A optional action to peform after find-text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-direction> The optional direction string '"next"' (default) or '"previous"'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The text area or text pane will be searched starting at the current caret position</font>
|
|
<font color='#555555'>;; forward or backwards depending on the optional direction field. After the search</font>
|
|
<font color='#555555'>;; the found text is highlighted. If the optional <sym-action> is specified an event</font>
|
|
<font color='#555555'>;; containing the id of the text area or pane and found position or '-1' will be fired.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>find-text id text action <font color='#AA0000'>(</font>direction <font color='#008800'>"next"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"find-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> action <font color='#008800'>" "</font> direction <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:frame <sym-id> <int-x> <int-y> <int-width> <int-height> [<str-title> <boolean-visible>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the frame window.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X position of the top left window corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y position of the top left windows corner.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the window frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the windows frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-title> The optional title of the window.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-visible> The optional flag with a value of 'true' or 'nil' for the visibility of the window.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Initially the frame should not be visible until all widgets are added to it. </font>
|
|
<font color='#555555'>;; When no flag for visibility is specified 'nil' is assumed. The default layout of a frame behaves</font>
|
|
<font color='#555555'>;; like a grid layout with one cell. Use the 'set-flow-layout', 'set-border-layout' and</font>
|
|
<font color='#555555'>;; 'set-grid-layout' to change the layout.</font>
|
|
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>frame id x y width height text visible<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame "</font> id <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> visible <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame "</font> id <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-bounds <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the component for which to get the list of bounding values.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> The bounding list '(<x> <y> <width> <height>)'</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-bounds id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:bounds <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-bounds "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:bounds<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:bounds
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-fonts)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> A list of family names for fonts on the current system.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The function should be called only once because it may take considerable</font>
|
|
<font color='#555555'>;; time in a system loaded with many fonts. The variable 'gs:fonts' contains</font>
|
|
<font color='#555555'>;; the same list of fonts originally returned by a call to 'gs:get-fonts'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-fonts<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:fonts<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-fonts System\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:fonts<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:fonts <font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#0000AA'>base64-dec</font> gs:fonts<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-font-metrics <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> A list of the two values for width and height in pixels.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The font metrics for the currently set font in <sym-id> are returned as a list</font>
|
|
<font color='#555555'>;; of width and height in pixels when displaying the string in <str-text>.</font>
|
|
<font color='#555555'>;; After the function call the variable 'gs:font-metrics' contains the same list</font>
|
|
<font color='#555555'>;; of values as originally returned by the call to 'gs:get-font-metrics'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-font-metrics id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:font-metrics <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-font-metrics "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:font-metrics<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:font-metrics
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-instruments)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> A list of instrument names in the default MIDI soundbank.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The function should be called only once because it may take considerable</font>
|
|
<font color='#555555'>;; time in a system loaded with a big soundbank. The variable 'gs:instruments' contains</font>
|
|
<font color='#555555'>;; the same list of instruments originally returned by a call to 'gs:get-instruments'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-instruments<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:instruments<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-instruments System\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:instruments<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:instruments <font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#0000AA'>base64-dec</font> gs:instruments<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-screen)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> A list of screen width, height and resolution of the main computer screen.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; After calling the 'gs:get-screen' once the screen parameters are also available</font>
|
|
<font color='#555555'>;; in the variable 'gs:screen'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-screen<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-screen System\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:screen<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:screen
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-selected-text <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component from which to get the selected text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the event handler which will receive the selected text.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-selected-text id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-selected-text "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-text <sym-id> [<sym-action>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component from which to get the text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The optional symbol of the event handler which will receive the text.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If no <sym-action> is specified the function will block until the text is returned. </font>
|
|
<font color='#555555'>;; After return the text is also available in the variable 'gs:text'.</font>
|
|
<font color='#555555'>;; If <sym-action> is specified the function will return immediately and a <sym-action> event </font>
|
|
<font color='#555555'>;; is fired containing the text. </font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-text id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> action
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-text "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:text <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-text "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:text<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-text-position <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text component for which the line and column position is returned.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> A list of line and column position of the text caret.</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-text-position id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:text-position <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-text-position "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:text-position<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:text-position
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:get-version)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> The version of newLISP-GS running.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; After calling the 'gs:get-version' once the version number is also</font>
|
|
<font color='#555555'>;; available in 'gs:version'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>get-version<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"get-version System\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:version<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:version
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:goto-text <sym-id> <int-row> <int-column>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text widget.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-row> The row number where to place the cursor.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-column> The column number where to place the cursor.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>goto-text id row col<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"goto-text "</font> id <font color='#008800'>" "</font> row <font color='#008800'>" "</font> col <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:hide-tag <sym-tag> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag of the group to hide.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>hide-tag tag <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"hide-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:image-button <sym-id> <sym-action> <str-icon-path> [<str-down-icon-path> [<int-width> <int-height>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the image button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-icon-path> The path for an image icon.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-down-icon-path> The path for a pressed down image icon.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the image button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the image button.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>image-button id action icon down-icon x y<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> down-icon
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> x y<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"image-button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> icon<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> down-icon<font color='#AA0000'>)</font> <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"image-button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> icon<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> down-icon<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"image-button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> icon<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:image-label <sym-id> <str-icon-path> [<str-align>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the label.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-ucon-path> A string with the icon file path.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-align> An optional alignment '"left"', '"center"' or '"right"', '"leading"', '"trailing"', '"bottom"' or '"top"'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>image-label id icon align<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> align
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"image-label "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> icon<font color='#AA0000'>)</font> <font color='#008800'>" "</font> align <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"image-label "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> icon<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:init [<int-port> <str-host> [bool-manual]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-port> The optional guiserver server port.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-host> The optional remote host of the guiserver.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>init <font color='#AA0000'>(</font>portIn <font color='#665500'>64001</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>host <font color='#008800'>"127.0.0.1"</font><font color='#AA0000'>)</font> manual<font color='#AA0000'>)</font>
|
|
<font color='#555555'>; check for server portIn and if this was started by java</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>main-args</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'portIn <font color='#AA0000'>(</font><font color='#0000AA'>int</font> <font color='#AA0000'>(</font><font color='#0000AA'>main-args</font> <font color='#665500'>2</font><font color='#AA0000'>)</font> portIn<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>; if guiserver.jar did not start this process then guiserver.jar</font>
|
|
<font color='#555555'>; still has to be started, except when manual parameter is true</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> <font color='#AA0000'>(</font><font color='#0000AA'>main-args</font> <font color='#665500'>3</font><font color='#AA0000'>)</font> <font color='#008800'>"javastart"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> manual<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> ostype <font color='#008800'>"Windows"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>process</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"cmd /c "</font> server-path <font color='#008800'>" "</font> portIn<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>=</font> ostype <font color='#008800'>"OSX"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>process</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"/usr/bin/java -jar "</font> server-path <font color='#008800'>" "</font> portIn<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"JAVA_HOME"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>process</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>env</font> <font color='#008800'>"JAVA_HOME"</font><font color='#AA0000'>)</font> <font color='#008800'>"/bin/java -jar "</font> server-path <font color='#008800'>" "</font> portIn<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>process</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"/usr/bin/java -jar "</font> server-path <font color='#008800'>" "</font> portIn<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'portOut <font color='#AA0000'>(</font><font color='#0000AA'>+</font> portIn <font color='#665500'>1</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'retry <font color='#665500'>0</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'out <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> out<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>></font> retry <font color='#665500'>200</font><font color='#AA0000'>)</font> <font color='#555555'>; try for 20 seconds</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"Could not connect to guiserver.jar"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>when</font> <font color='#AA0000'>(</font><font color='#0000AA'>=</font> ostype <font color='#008800'>"Windows"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>import</font> <font color='#008800'>"user32.dll"</font> <font color='#008800'>"MessageBoxA"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>MessageBoxA <font color='#665500'>0</font> <font color='#008800'>"Could not connect to guiserver.jar"</font> <font color='#008800'>"Problem connecting"</font> <font color='#665500'>1</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>exit</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>inc</font> retry<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'out <font color='#AA0000'>(</font><font color='#0000AA'>net-connect</font> host portIn<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>sleep</font> <font color='#665500'>100</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'listenSock <font color='#AA0000'>(</font><font color='#0000AA'>net-listen</font> portOut<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'in <font color='#AA0000'>(</font><font color='#0000AA'>net-accept</font> listenSock<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-close</font> listenSock<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>gs:set-utf8 <font color='#AA0000'>(</font><font color='#0000AA'>primitive?</font> MAIN:utf8<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:insert-list-item <sym-list-combo> <str-text> <int-index> [<str-text> <int-index>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-list-combo> The name of the combo box or list box from which entries are removed.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text of the list or combo box item to insert.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-index> The index of an entry to add to the list or combo box.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When specifying an index of <tt>0</tt> the first item gets inserted at the beginning. </font>
|
|
<font color='#555555'>;; When specifying an index equal or greater to the number of items in the list, the item </font>
|
|
<font color='#555555'>;; is added at the end.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>insert-list-item comp<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"insert-list-item "</font> comp <font color='#008800'>" "</font><font color='#AA0000'>)</font>
|
|
p <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> p
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> <font color='#AA0000'>(</font><font color='#0000AA'>pop</font> p<font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>pop</font> p<font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:insert-tab <sym-tabbed-pane> <sym-component> [<str-text> [<int-index> [<str-icon-path>]]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tabbed-pane> The name of the tabbed pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-component> The name of the component to insert as a tab.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The optional text on the tab.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-index> The optional index where to insert the new tab.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-icon-path> The file path to an optional icon.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>insert-tab pane comp text idx icon<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> idx
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> icon
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"insert-tab "</font> pane <font color='#008800'>" "</font> comp <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> idx <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> icon<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"insert-tab "</font> pane <font color='#008800'>" "</font> comp <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> idx <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"insert-tab "</font> pane <font color='#008800'>" "</font> comp <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"insert-tab "</font> pane <font color='#008800'>" "</font> comp <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:insert-text <sym-id> <str-text> <int-position>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text to insert.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-position> The offset position where to insert the text.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>insert-text id text position<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>replace</font> <font color='#008800'>"\r"</font> text <font color='#008800'>""</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"insert-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> position <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:key-event <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the component to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; 'gs:key-event' can be used to register a general unspecific key event handler</font>
|
|
<font color='#555555'>;; for any component in the system. Since version 1.05 of newLISP-GS this also</font>
|
|
<font color='#555555'>;; includes text widgets, which already handle key events using their normal event </font>
|
|
<font color='#555555'>;; handler function. With 'gs:key-event' a second handler function can be registered</font>
|
|
<font color='#555555'>;; for text widgets. Both functions will fire on their respective events.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Components respond to the following key event types: '"pressed"', '"released"', '"typed"'.</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (define (key-action id type code modifiers)</font>
|
|
<font color='#555555'>;; (println "id:" id " type:" type " key code:" code " modifiers:" modifiers)</font>
|
|
<font color='#555555'>;; )</font>
|
|
|
|
<font color='#555555'>;; The example shows a handler which prints all key event parameters to the terminal/shell</font>
|
|
<font color='#555555'>;; window where the applicaton was started.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; In order for key events to work, the component for which a key action handler</font>
|
|
<font color='#555555'>;; is registered must have the input focus. Use '"gs:request-focus"' to set the</font>
|
|
<font color='#555555'>;; input focus for the component.</font>
|
|
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:key-event id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"key-event "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:label <sym-id> <str-text> [<str-align> [<int-width> <int-height>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the label.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text to appear on the label.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-align> The optional alignment of the text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the label.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the label.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The following alignment constants can be supplied: '"left"', '"center"', '"right"",</font>
|
|
<font color='#555555'>;; '"leading"', '"trailing"', '"bottom"' and "'top'". By default each label text is</font>
|
|
<font color='#555555'>;; '"center"' aligned.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>label id text align width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> align
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"label "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> align <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"label "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> align <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"label "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:layout <sym-container>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-container> The id of the container to lay out.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Forces the container to lay out its components again, e.g. after a 'gs:add-to' or 'gs:remove-from'</font>
|
|
<font color='#555555'>;; when the container was already visible.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>layout id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"layout "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:load-text <sym-id> <str-path>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the 'gs:text-pane'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-path> The full path name of the file to load.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; 'gs:load-text' will load text into a 'gs:text-pane' directly by specifying</font>
|
|
<font color='#555555'>;; the path name. During loading, CR-LF line terminators are automatically</font>
|
|
<font color='#555555'>;; translated to LF-only line terminators by stripping all CRs from the file. All internal</font>
|
|
<font color='#555555'>;; operations of guiserver on text assume LF as a line terminator.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>load-text id image-path<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"load-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> image-path<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:listen [<boolean-flag>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-flag> Prevent exit on loss of communication.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> Never returns. Exits the application when the guiserver exits, except when <boolean-flag> is 'true'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>listen flag , event<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>net-receive</font> in event <font color='#665500'>1000000000</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "===>" event "<===")</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>eval-string</font> event<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>println</font> <font color='#008800'>"server shut down"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> flag<font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>exit</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:list-box <sym-id> <sym-action> [<str-item-1> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the list box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-item> Zero, one or more text entries in the list box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:list-box <sym-id> <sym-action> [<list-str-items>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the list box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-str-items> Zero, one or more text entries in a list.</font>
|
|
|
|
<font color='#555555'>;; The listbox when clicked with the mouse, or when the [enter] key is</font>
|
|
<font color='#555555'>;; presses, will pass the following parameters to the event handler:</font>
|
|
<font color='#555555'>;; <br><br></font>
|
|
<font color='#555555'>;; <id> - the id string of the list box<br></font>
|
|
<font color='#555555'>;; <index> - the zero offset index of the highlighted listbox entry<br></font>
|
|
<font color='#555555'>;; <item> - the string of the highlighted listbox entry<br></font>
|
|
<font color='#555555'>;; <click-count> - the number of times the mouse has been clicked<br></font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>list-box id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"list-box "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font><font color='#AA0000'>)</font>
|
|
entries <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>item entries<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> item<font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:message-dialog <sym-parent-frame> <str-title> <str-message> [<str-type> [<str-icon-path>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-parent-frame> The symbol name of the parent frame.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-title> The title of the message box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-message> The message in the message box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-type> The type of the message box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-icon-path> The optional path for an icon.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The type of the message box can be one of: '"error"', '"information"', '"warning"', '"question"', '"plain"'.</font>
|
|
<font color='#555555'>;; The function initiating the message-dialog will return when the dialog is closed.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>message-dialog parent title msg <font color='#AA0000'>(</font>type <font color='#008800'>"plain"</font><font color='#AA0000'>)</font> icon<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> icon
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"message-dialog "</font> parent <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> title<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> msg<font color='#AA0000'>)</font> <font color='#008800'>" "</font> type <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> icon<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"message-dialog "</font> parent <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> title<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> msg<font color='#AA0000'>)</font> <font color='#008800'>" "</font> type <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:menu <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the menu.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The title string of the menu.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>menu id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"menu "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:menu-popup <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the menu.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The title string of the menu.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>menu-popup id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"menu-popup "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:menu-bar <sym-frame> [<sym-menu-1> ...]) </font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-frame> The name of the frame hosting the menu bar.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-menu> Zero or more symbol names of menus to be positioned on the menu bar.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>menu-bar aframe<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"menu-bar "</font> aframe <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> item <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:menu-item <sym-id> <sym-action> <str-text>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the menu item.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text to appear for the menu item.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>menu-item id action text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"menu-item "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:menu-item-check <sym-id> <sym-action> <str-text> [<bool-selected>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the menu item.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text to appear for the menu item.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <bool-selected> An optional flag indicating the selection state 'true' or 'nil' (default).</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>menu-item-check id action text selected<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"menu-item-check "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> selected <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:midi-bpm [<int-bpm> [<int-resolution>]]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-bpm> Beats per minute pay speed. Default is 120 BPM.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-resolution> Ticks per beat. Deafult is 16 ticks per beat;</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Sets the speed of playing a notes with with either 'gs:play-note' or playing a </font>
|
|
<font color='#555555'>;; sequence with 'gs:play-sequence' in beats per minute (BPM).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Before using 'gs:midi-bpm' the default speed is set to 120 BPM, which corresponds</font>
|
|
<font color='#555555'>;; to two beats per second, where each beat corresponds to a quarter note of 16 ticks</font>
|
|
<font color='#555555'>;; default resolution.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; While the BPM parameter controls the play-back speed of the sequencer, the</font>
|
|
<font color='#555555'>;; resolution is a parameter of the sequence creation itself and must be set before</font>
|
|
<font color='#555555'>;; the first 'gs:add-track' call.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The preset resolution of 16 ticks per quarter note is the highest which can be set</font>
|
|
<font color='#555555'>;; and should be sufficient for all applications.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>midi-bpm <font color='#AA0000'>(</font>bpm <font color='#665500'>120</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>resolution <font color='#665500'>16</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'resolution <font color='#AA0000'>(</font><font color='#0000AA'>min</font> resolution <font color='#665500'>16</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"midi-bpm System "</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> bpm<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> resolution<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
|
|
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:midi-close)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Shut down the MIDI subsystem.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>midi-close<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"midi-close System\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:midi-init [<str-file-path>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-file-path> The optional file path for a soundbank file.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Initialize the MIDI subsystem. If a soundbank file is specified load it,</font>
|
|
<font color='#555555'>;; else load the built-in synthesizer's default soundbank.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When not using the default soundbank, the function 'gs:get-instruments'</font>
|
|
<font color='#555555'>;; should be used first to find out the correct naming of instruments</font>
|
|
<font color='#555555'>;; for the 'gs:midi-patch' statements. The soundbank used for testing the</font>
|
|
<font color='#555555'>;; demo files 'midi-demo.lsp' and 'midi2-demo.lsp' on Windows is the midsize</font>
|
|
<font color='#555555'>;; soundbank available here:</font>
|
|
<font color='#555555'>;; <font color='#308080'>@link</font> http://java.sun.com/products/java-media/sound/soundbanks.html http://java.sun.com/products/java-media/sound/soundbanks.html</font>
|
|
<font color='#555555'>;; This soundbank has equivalent named instruments to those used in the Mac OS X default JRE installation.</font>
|
|
<font color='#555555'>;; Currently only the first 128 instruments in a soundbank are accessed by newLISP-GS.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>midi-init soundbank<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> soundbank
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"midi-init System "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> soundbank<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"midi-init System\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:midi-patch <str-instrument> [<int-channel>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-instrument> The name of the instrument to attach to a channel.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-channel> The channel for the instrument, default is <tt>0</tt>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; An instrument from the current soundbank is attached to a</font>
|
|
<font color='#555555'>;; specific channel or to channel <tt>0</tt> if no channel is specified.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (gs:midi-patch (find "Electric Grand" gs:instruments) 0)</font>
|
|
|
|
<font color='#555555'>;; In order for the 'gs:instruments' variable to contain a list of instruments,</font>
|
|
<font color='#555555'>;; 'gs:get-instruments' must have been called earlier, i.e. after 'gs:midi-init'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>midi-patch program <font color='#AA0000'>(</font>channel <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"midi-patch System "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> program<font color='#AA0000'>)</font> <font color='#008800'>" "</font> channel <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mouse-clicked <sym-canvas> <sym-action> [<boolean-tags>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-canvas> The id of the canvas to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-tags> A 'true' to indicate checking for tags.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If <boolean-tags> is 'true', the action event will carry a list of</font>
|
|
<font color='#555555'>;; all tags which contained the X,Y coordinates of the mouse.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>mouse-clicked cnvs action flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mouse-clicked "</font> cnvs <font color='#008800'>" "</font> action <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mouse-dragged <sym-canvas> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-canvas> The id of the canvas to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:mouse-dragged cnvs action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mouse-dragged "</font> cnvs <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mouse-event <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the component to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; 'gs:mouse-event' can be used to register a general unspecific mouse event handler</font>
|
|
<font color='#555555'>;; for any component in the system. Components respond to the following types:</font>
|
|
<font color='#555555'>;; '"pressed"', '"released"', '"clicked"',</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (define (mouse-action id type x y button cnt mods)</font>
|
|
<font color='#555555'>;; (println "id:" id " type:" type " x:" x " y:" y " button:" button " count:" cnt " mods:" mods)</font>
|
|
<font color='#555555'>;; )</font>
|
|
|
|
<font color='#555555'>;; The example shows a handler which prints all mouse event parameters to the terminal/shell</font>
|
|
<font color='#555555'>;; window where the applicaton was started.</font>
|
|
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:mouse-event id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mouse-event "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mouse-moved <sym-canvas> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-canvas> The id of the canvas to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-tags> A 'true' to indicate checking for tags.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If <boolean-tags> is 'true', the action event will carry a list of</font>
|
|
<font color='#555555'>;; all tags which contained the X,Y coordinates of the mouse.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:mouse-moved cnvs action flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mouse-moved "</font> cnvs <font color='#008800'>" "</font> action <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mouse-pressed <sym-canvas> <sym-action> [<boolean-tags>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-canvas> The id of the canvas to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-tags> A 'true' to indicate checking for tags.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If <boolean-tags> is 'true', the action event will carry a list of</font>
|
|
<font color='#555555'>;; all tags which contained the X,Y coordinates of the mouse.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:mouse-pressed cnvs action flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mouse-pressed "</font> cnvs <font color='#008800'>" "</font> action <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mouse-released <sym-canvas> <sym-action> [<boolean-tags>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-canvas> The id of the canvas to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-tags> A 'true' to indicate checking for tags.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If <boolean-tags> is 'true', the action event will carry a list of</font>
|
|
<font color='#555555'>;; all tags which contained the X,Y coordinates of the mouse.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:mouse-released cnvs action flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mouse-released "</font> cnvs <font color='#008800'>" "</font> action <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mouse-wheel <sym-canvas> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-canvas> The id of the canvas to register the action handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The symbol of the action handler.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:mouse-wheel cnvs action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mouse-wheel "</font> cnvs <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:move-tag <sym-tag> <int-dx> <int-dy> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag of the group of objects to move.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-dx> The distance to move on the X-axis.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-dy> The distance to move on the Y-axis.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; 'gs:move-tag' is the only tag operation which actually changes the </font>
|
|
<font color='#555555'>;; internal data of a drawn object. All other tag operations like</font>
|
|
<font color='#555555'>;; 'gs:translate-tag', 'gs:scale-tag', 'gs:rotate-tag' and 'gs:shear-tag'</font>
|
|
<font color='#555555'>;; will transform object coordinates only for drawing.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:move-tag tag dx dy <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"move-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font>
|
|
dx <font color='#008800'>" "</font> dy <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:mute-track <int-number> [<boolean-on-off>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-number> The number of the track starting with <tt>0</tt> for the first. Default is <tt>true</tt>.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-on-off> The track will be muted with a value of <tt>true</tt></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Any other value than <tt>true</tt> will unmute the track again. Muting tracks is practical</font>
|
|
<font color='#555555'>;; during music development. The track can only be muted when th sequence has benn started</font>
|
|
<font color='#555555'>;; using 'gs:play-sequence'. To completely mute a track the 'gs:mute-track' statement should</font>
|
|
<font color='#555555'>;; come right after the 'gs:play-sequece' statement. </font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>mute-track number <font color='#AA0000'>(</font>bool <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"mute-track System "</font> number <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>string</font> bool<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:no-action)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Specify as <sym-action> for widgets where no action handler is defined.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>no-action<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:open-file-dialog <sym-parent-frame> <sym-action> [<str-directory> [<str-mask> <str-description>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-parent-frame> The parent frame of the file dialog.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The handler function symbol.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-directory> The initial directory to show.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-mask> An optonal string mask.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-description> An optional mask description.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>open-file-dialog parent action dir mask desc<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> dir
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> mask desc<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"open-file-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> dir<font color='#AA0000'>)</font> <font color='#008800'>" "</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> mask<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> desc<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"open-file-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> dir<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"open-file-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:panel <sym-id> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the panel.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the panel.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the panel.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Panels have a flow layout by default. In a flow layout an unsized button will</font>
|
|
<font color='#555555'>;; assume the natural size necessary to display the text on it.</font>
|
|
<font color='#555555'>;; To change the layout use the 'set-flow-layout' or 'set-grid-layout' functions.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>panel id width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"panel "</font> id <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"panel "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:paste-text <sym-id> [<str-text>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text component in which to paste text.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> An optional text string to paste instead of the clipboard contents.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If the <sym-id> contains selected text, this text gets replaced,</font>
|
|
<font color='#555555'>;; otherwise the text is inserted at the current caret position.</font>
|
|
<font color='#555555'>;; If no text is given in <str-text>, the text is taken from the clipboard.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>paste-text id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"paste-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"paste-text "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:play-note <int-key> [<int-duration> [<int-velocity> [<int-channel> [<int-bend>]]]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-key> The note or midi key <tt>0</tt> to <tt>127</tt>.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-duration> The duration of the note in ticks, default is <tt>16</tt> for one beat or quarter note.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-velocity> The velocity/volume of the note between <tt>0</tt> and <tt>127</tt>, default is <tt>64</tt>.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-channel> The channel through which to play the note from <tt>0</tt> to <tt>15</tt>, default is <tt>0</tt>.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-bend> The optional note bend to tune the note lower or higher from '-8192' to '8191'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Before using 'gs:play-note', 'gs:midi-init' should be used to initialize the MIDI system.</font>
|
|
<font color='#555555'>;; The key of the note increases in half-tone steps. The key 60 corresponds to a Middle-C.</font>
|
|
<font color='#555555'>;; The velocity of the note is usually it's volume and/or brightness, i.e. the speed with which </font>
|
|
<font color='#555555'>;; a key was pressed on an instrument. The channel is <tt>0</tt> by default and assigned to</font>
|
|
<font color='#555555'>;; a Piano instrument unless the function 'gs:midi-patch' has been used to change assignment</font>
|
|
<font color='#555555'>;; to a different instrument.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; On Windows and some Linux or other UNIX no MIDI soundbank files are installed by default. Goto </font>
|
|
<font color='#555555'>;; <font color='#308080'>@link</font> http://java.sun.com/products/java-media/sound/soundbanks.html http://java.sun.com/products/java-media/sound/soundbanks.html</font>
|
|
<font color='#555555'>;; for instructions how to download and install a soundbank. For the demo files 'mide-demo.lsp' and</font>
|
|
<font color='#555555'>;; 'midi2-demo' the midsize quality soundbank was used. On Mac OS X a soundbank is installed by default.</font>
|
|
<font color='#555555'>;; The default for the bend parameer is <tt>0</tt> for no bend. Negative values down to '-8192'</font>
|
|
<font color='#555555'>;; tune the note lower. Positive values up to '8191' tune the note higher. </font>
|
|
<font color='#555555'>;; The following code is a complete example:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; ; load Guiserver</font>
|
|
<font color='#555555'>;; (load (append (env "NEWLISPDIR") "/guiserver.lsp"))</font>
|
|
<font color='#555555'>;; (gs:init)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; ; play a chromatic scale on the default instrument (piano)</font>
|
|
<font color='#555555'>;; ; each note a 16th note of 4 ticks and a moderate volume </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (gs:midi-init)</font>
|
|
<font color='#555555'>;; (gs:midi-patch "Piano" 0)</font>
|
|
<font color='#555555'>;; (for (key 24 95) (gs:play-note key 4 95 0))</font>
|
|
<font color='#555555'>;; (sleep 2000) ; wait until playing has finished</font>
|
|
<font color='#555555'>;; (gs:midi-close)</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#555555'>;; The second example demonstrated usage of the <int-bend> parameter:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; ; play the same note but with different bends below and above the note</font>
|
|
<font color='#555555'>;; (gs:midi-patch "Violin" 0)</font>
|
|
<font color='#555555'>;; (for (bend -2024 2024 128)</font>
|
|
<font color='#555555'>;; (gs:play-note 80 1 95 0 bend))</font>
|
|
|
|
<font color='#555555'>;; To play polyphone music of multiple parallel tracks see the function 'gs:add-track' for</font>
|
|
<font color='#555555'>;; a complete code example.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>play-note key <font color='#AA0000'>(</font>duration <font color='#665500'>4</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>velocity <font color='#665500'>64</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>channel <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>bend <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"play-note System "</font>
|
|
key <font color='#008800'>" "</font> duration <font color='#008800'>" "</font> velocity <font color='#008800'>" "</font> channel <font color='#008800'>" "</font> bend <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:play-sequence [<int-start> [<int-loop-count> [<int-start-loop> [<int-end-loop>]]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-start> The starting point in the sequence in ticks. Default is <tt>0</tt> for the beginning.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-loop-count> The number of repetitions for looping. Default is <tt>0</tt> for no looping.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-start-loop> The start of the loop to play in ticks. Default is <tt>0</tt>.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-end-loop> The end of the loop in ticks. Default is <tt>-1</tt> for the end.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; All parameters are optional. When no parameters are given all tracks in the sequence are</font>
|
|
<font color='#555555'>;; sequenced from start to end with no repetiton (loop count of 0). Note that the start-loop and</font>
|
|
<font color='#555555'>;; end-loop positions refer only to loop played after playing the full track. After the sequence</font>
|
|
<font color='#555555'>;; started playing 'gs:stop-sequence' can be used to stop it at any time. The midi system</font>
|
|
<font color='#555555'>;; should not be closed using 'gs:midi-close' before playing has finished or playing will</font>
|
|
<font color='#555555'>;; be cut off.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; See the function 'gs:add-track' for complete code example.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>play-sequence <font color='#AA0000'>(</font>ticks <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>loop <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>start <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>end <font color='#665500'>-1</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"play-sequence System "</font> ticks <font color='#008800'>" "</font> loop <font color='#008800'>" "</font> start <font color='#008800'>" "</font> end <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:play-sound <str-file-path>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-file-path> The path and file name of the sound file.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; On most OS platforms '.au' and '.wav' sound file formats are supported.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>play-sound file-name<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"play-sound System "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> file-name<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:progress-bar <sym-id> <int-min> <in-max> <int-initial-value>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The symbols of the progress bar.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-min> The minimum value of the slider.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-max> The maximum value of the slider.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-initial-value> The initial value of the slider.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>progress-bar id posmin posmax posinit<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"progress-bar "</font> id <font color='#008800'>" "</font> posmin <font color='#008800'>" "</font> posmax <font color='#008800'>" "</font> posinit <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:radio-button <sym-id> <sym-action> [<str-text> [<bool-selected>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the radio button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The optional text of the radio button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <bool-seected> An optional flag 'true' or 'nil' (default) indicating the initial state of the radio button.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>radio-button id action text selected<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"radio-button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> selected <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"radio-button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:redo-text <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the 'gs:text-pane' where to perform a redo operation.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>redo-text id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"redo-text "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:remove-from <sym-container> <sym-component> [<sym-component> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-container> The container from which to remove a component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-component> One or more optional components to remove.</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>remove-from id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"remove-from "</font> id <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> item <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:remove-list-item <sym-list-combo> <int-index> [<int-index> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-list-combo> The name of the combo box or list box from which entries are removed.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-index> The index of an entry to remove from the list or combo box.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When specifying an index of <tt>0</tt>, the first item gets removed. When specifying an</font>
|
|
<font color='#555555'>;; index equal or greater to the number of items in the list, the item is removed at the end.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>remove-list-item comp<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"remove-list-item "</font> comp <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> item <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:remove-tab <sym-tabbed-pane> [<int-index>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tabbed-pane> The name of the tabbed pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-index> The optional index of the tab to remove. The default is <tt>0</tt> for the first tab.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>remove-tab pane idx<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> idx
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"remove-tab "</font> pane <font color='#008800'>" "</font> idx <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"remove-tab "</font> pane <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:request-focus <sym-id> [<int-tab-index>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to request focus.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-tab-index> The index of a tab for which focus is requested.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>request-focus id idx<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> idx
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"request-focus "</font> id <font color='#008800'>" "</font> idx <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"request-focus "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:reorder-tags <list-tags>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-tags> The list of tag symbols or tag string names in the new order of display.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The re-ordering itself will not repaint the canvas use 'gs:update' to repaint the current </font>
|
|
<font color='#555555'>;; canvas after using 'gs:reorder-tags'. The list of tags can be given as either a list of</font>
|
|
<font color='#555555'>;; tags symbols or name strings. Tags not appearing in <list-tags> will be deleted.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>reorder-tags tags<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"reorder-tags "</font> gs:currentCanvas <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>tag tags<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> tag <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:rotate-tag <sym-tag> <float theta> <int-x> <int-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group to rotate.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-theta> The rotation angle in degrees (0 - 360).</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X-coordinate of the rotation center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y-coordinate of the rotation center.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Like all tag operations, multiple 'gs:rotate-tag' operations are cumulative.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>rotate-tag tag angle x y <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"rotate-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> angle <font color='#008800'>" "</font>
|
|
x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:run-shell <id-text-area> <str-command> <str-args>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <idx-text-area> The id of the text area to wich a shell process will be attached.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-command> The command string to start the shell process.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-args> The arguments of the command (max 8 arguments).</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>run-shell id command arguments<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"run-shell "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> command<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> arguments<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:save-file-dialog <sym-parent-frame> <sym-action> [<str-directory> [<str-initial-file> [<str-mask> <str-description>]]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-parent-frame> The parent frame of the file dialog.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The handler function symbol.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-directory> The initial directory to show.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-file> The initial file name.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-mask> An optional string mask.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-description> An optional mask description.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>save-file-dialog parent action dir file mask desc<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> dir
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> file
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> mask desc<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"save-file-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> dir<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> file<font color='#AA0000'>)</font>
|
|
<font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> mask<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> desc<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"save-file-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> dir<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> file<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"save-file-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> dir<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"save-file-dialog "</font> parent <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:save-sequence <str-file-path>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-file-name> The name of the MIDI file to save to.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Save the contents of a sequence created with 'gs:add-track' to a MIDI file.</font>
|
|
<font color='#555555'>;; The file always should have the extension <tt>.mid</tt>.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Note that all MIDI files created with 'gs:save-sequence' will play back at a fixed</font>
|
|
<font color='#555555'>;; speed of 120 BPM. Therefore, when creating sequences for recording using 'gs:add-track',</font>
|
|
<font color='#555555'>;; they should be timed for a play-back speed of 120 BPM.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; To change the speed for replay from a saved MIDI file the resolution parameter can</font>
|
|
<font color='#555555'>;; be chaged from it's default of 16 tick per beat using the second optional parameter</font>
|
|
<font color='#555555'>;; of 'gs:midi-bpm'. In this case the resolution parameter should be adjusted before</font>
|
|
<font color='#555555'>;; calling 'gs:add-track' the first time.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>save-sequence file-path<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"save-sequence System "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> file-path<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:save-text <sym-id> <str-path>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the 'gs:text-pane'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-path> The full path name of the file to save.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; This function will write text back from a 'gs:text-pane' directly</font>
|
|
<font color='#555555'>;; by specifying a path name only. Line feed characters (ASCII 10)</font>
|
|
<font color='#555555'>;; are used as line terminators. If this behavior is not desired,</font>
|
|
<font color='#555555'>;; as is the case with Windows text files, then 'gs:get-text' should</font>
|
|
<font color='#555555'>;; be used instead. A program can then add CR characters using a </font>
|
|
<font color='#555555'>;; newLISP 'replace', i.e. '(replace "\n" text "\r\n")' before</font>
|
|
<font color='#555555'>;; saving the text to a file.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>save-text id image-path<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"save-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> image-path<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:scale-tag <sym-tag> <float-x> <float-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group to scale.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-x> The X scaling factor.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-y> The Y scaling factor.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; 'gs:scale' scales the object to draw relative to the '0,0' point of</font>
|
|
<font color='#555555'>;; the coordinate system. This means if a object is not at the center it</font>
|
|
<font color='#555555'>;; will not only change in size when scaled but also change the distance</font>
|
|
<font color='#555555'>;; to the center point of the coordinate system, moving away when scaling</font>
|
|
<font color='#555555'>;; up with scale factor bigger '1.0' and moving closer to the center</font>
|
|
<font color='#555555'>;; when scaling down using factors smaller than '1.0'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; This means that objects which will be scaled should be defined in</font>
|
|
<font color='#555555'>;; coordinates relative to their center point. Then a 'gs:translate-tag'</font>
|
|
<font color='#555555'>;; command should be used to place the object to correct place:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (gs:circle 'C 0 0 50)</font>
|
|
<font color='#555555'>;; (gs:gs:translate-tag 'C 200 100)</font>
|
|
<font color='#555555'>;; ...</font>
|
|
<font color='#555555'>;; (gs:scale-tag 'C 1.1 1.1)</font>
|
|
|
|
<font color='#555555'>;; In the example the circle, although defined for '0,0', will be displayed</font>
|
|
<font color='#555555'>;; at the '200,200' position because of the 'gs:translate-tag' statement. When</font>
|
|
<font color='#555555'>;; later scaling the circle will get bigger but stay in place.</font>
|
|
<font color='#555555'>;; Like all tag operations, multiple 'gs:scale-tag' operations are cumulative.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>scale-tag tag sx sy <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"scale-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font>
|
|
sx <font color='#008800'>" "</font> sy <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:select-list-item <sym-id> <str-item> [<boolean-flag>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the list or combo box.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-item> The item to select.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-flag> An optional flag only for list boxes to force scrolling to the selected entry.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; On combo boxes the optional <boolean-flag> has no effect. The selected entry will always</font>
|
|
<font color='#555555'>;; appear as the visible text of the combo box. The flag has either the value 'true' or 'nil'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>select-list-item id item flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"select-list-item "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> item<font color='#AA0000'>)</font> <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:select-text <sym-id> <int-from> [<int-to>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The ame of the text component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-from> Start offset of selection.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-to> Optional end offset of selection.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; If no <int-to> end offset is given, 'gs:select-text' will</font>
|
|
<font color='#555555'>;; select to the end of the text.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>select-text id from to<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> to
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"select-text "</font> id <font color='#008800'>" "</font> from <font color='#008800'>" "</font> to <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"select-text "</font> id <font color='#008800'>" "</font> from <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:scroll-pane <sym-id> <sym-widget> [<int-width> <int-height> <sym-w-col> <sum-w-row> <sym-w-corner>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the scroll pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-widget> The component in the scroll pane to be scrolled.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the scroll pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the scroll pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-col> The optional table widget for a custom column header.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-row> The optional table widget for a custom row header</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-corner> The optional widget component in the upper left corner.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (gs:scroll-pane 'scroll 'data-table 700 600 'col-table 'row-table 'Canvas)</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>scroll-pane id widget width height col-table row-table upper-left-corner <font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> col-table row-table upper-left-corner<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"scroll-pane "</font> id <font color='#008800'>" "</font> widget <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>" "</font> col-table <font color='#008800'>" "</font> row-table <font color='#008800'>" "</font> upper-left-corner <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"scroll-pane "</font> id <font color='#008800'>" "</font> widget <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"scroll-pane "</font> id <font color='#008800'>" "</font> widget <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-accelerator <sym-menu-item> <str-keystroke>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-menu-item> The name of the menu item for which an accelerator key is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-keystroke> A text string identifying the keystroke.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The following rules are used to create keystroke strings:</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Syntax:</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; modifiers* (typedID | pressedReleasedID)</font>
|
|
<font color='#555555'>;; modifiers := shift | control | ctrl | meta | alt | button1 | button2 | button3</font>
|
|
<font color='#555555'>;; typedID := typed typedKey</font>
|
|
<font color='#555555'>;; typedKey := string of length 1 giving Unicode character.</font>
|
|
<font color='#555555'>;; pressedReleasedID := (pressed | released) key</font>
|
|
<font color='#555555'>;; key := KeyEvent key code name, i.e. the name following "VK_".</font>
|
|
<font color='#555555'>;; </pre></blockquote></font>
|
|
<font color='#555555'>;; Examples:</font>
|
|
<font color='#555555'>;; <blockquote><pre></font>
|
|
<font color='#555555'>;; "INSERT"</font>
|
|
<font color='#555555'>;; "control DELETE"</font>
|
|
<font color='#555555'>;; "alt shift X"</font>
|
|
<font color='#555555'>;; "alt shift released X"</font>
|
|
<font color='#555555'>;; "typed a"</font>
|
|
<font color='#555555'>;; </pre></blockquote></font>
|
|
<font color='#555555'>;; Note that the <i>apple</i> key on MacOS X is the 'meta' key.</font>
|
|
<font color='#555555'>;; The 'alt' on MacOS X is the <i>option</i> key.</font>
|
|
<font color='#555555'>;; For letters use uppercase. </font>
|
|
<font color='#555555'>;; Keys are added to the menu item display automatically on all platforms.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-accelerator item key<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-accelerator "</font> item <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> key<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-anti-aliasing <boolean-flag>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-flag> The anti aliasing setting for the current canvas 'true' or 'nil'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The default setting is 'true'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-anti-aliasing flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-anti-aliasing "</font> gs:currentCanvas <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-background <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-red> The red color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-green> The green color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-blue> The blue color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-background <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The rgb color can be given as a list of three numbers.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Note 'set-background' is the same as 'set-color'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-background id red green blue alpha<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> red<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'alpha <font color='#AA0000'>(</font><font color='#0000AA'>or</font> green <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#0000AA'>set</font> '<font color='#AA0000'>(</font>red green blue<font color='#AA0000'>)</font> red<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'alpha <font color='#AA0000'>(</font><font color='#0000AA'>or</font> alpha <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-color "</font> id <font color='#008800'>" "</font> red <font color='#008800'>" "</font> green <font color='#008800'>" "</font> blue <font color='#008800'>" "</font> alpha <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-bevel-border <sym-id> <str-type>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-type> The type of the bevel '"raised"' or '"lowered"'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-bevel-border id type<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-bevel-border "</font> id <font color='#008800'>" "</font> type <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-border-layout <sym-container> [<int-hgap> <int-vgap>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-container> The name of the container for which border layout is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-hgap> The horizontal gap between components in the border layout.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-vgap> The vertical gap between components in the border layout.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Border layout divides the layout into 5 zones labeled '"north"', '"west"',</font>
|
|
<font color='#555555'>;; '"center"', '"east"' and '"south"'. These string constants are used in</font>
|
|
<font color='#555555'>;; the 'gs:add-to' command when adding components to a border layout.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; In a border layout each component will take the maximum size if components</font>
|
|
<font color='#555555'>;; are not sized. If components are sized only some dimensions will be honored.</font>
|
|
<font color='#555555'>;; The '"north"' and '"south"' components will stretch to maximum width and</font>
|
|
<font color='#555555'>;; assume the height given in a size parameter of the component. The '"east"'</font>
|
|
<font color='#555555'>;; and '"west"' components will stretch to the maximum height available assuming</font>
|
|
<font color='#555555'>;; their width specified earlier. The '"center"' component will take the left over</font>
|
|
<font color='#555555'>;; maximum space.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-border-layout container hgap vgap<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> hgap vgap<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-border-layout "</font> container <font color='#008800'>" "</font> hgap <font color='#008800'>" "</font> vgap <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-border-layout "</font> container <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-canvas <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the canvas to switch to.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The canvas in <sym-id> must have been created earlier with a 'gs:canvas' </font>
|
|
<font color='#555555'>;; statement. All graphics operations which do not take a canvas as argument</font>
|
|
<font color='#555555'>;; will automatically refer to this current canvas. If no 'gs:set-canvas' is</font>
|
|
<font color='#555555'>;; used, the current canvas is assumed to be the last one created.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-canvas id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:currentCanvas id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-canvas "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-caret <sym-id> <int-offset>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the cursor caret.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The functions has the same effect as calling 'gs:select-text' with the same </font>
|
|
<font color='#555555'>;; offset for the dot and mark position.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-caret id offset<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-caret "</font> id <font color='#008800'>" "</font> offset <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-caret-color <sym-id> <float-red> <float-green> <float-blue>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-red> The red color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-green> The green color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-blue> The blue color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-caret-color <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The rgb color can be given as a list of three numbers.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-caret-color id red green blue<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> red<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#0000AA'>set</font> '<font color='#AA0000'>(</font>red green blue<font color='#AA0000'>)</font> red<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-caret-color "</font> id <font color='#008800'>" "</font> red <font color='#008800'>" "</font> green <font color='#008800'>" "</font> blue <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-color <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-red> The red color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-green> The green color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-blue> The blue color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-color <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The rgb color can be given as a list of three numbers.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Note that 'set-color' is the same as 'set-background'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> set-color set-background<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-cursor <sym-id> <str-shape>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the frame, dialog or window.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-shape> The string describing the cursor shape.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The cursor shape can be one of the following:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; "default"</font>
|
|
<font color='#555555'>;; "crosshair"</font>
|
|
<font color='#555555'>;; "text"</font>
|
|
<font color='#555555'>;; "wait"</font>
|
|
<font color='#555555'>;; "sw-resize"</font>
|
|
<font color='#555555'>;; "se-resize"</font>
|
|
<font color='#555555'>;; "nw-resize"</font>
|
|
<font color='#555555'>;; "ne-resize"</font>
|
|
<font color='#555555'>;; "n-resize"</font>
|
|
<font color='#555555'>;; "s-resize"</font>
|
|
<font color='#555555'>;; "w-resize"</font>
|
|
<font color='#555555'>;; "e-resize"</font>
|
|
<font color='#555555'>;; "hand"</font>
|
|
<font color='#555555'>;; "move"</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-cursor id shape<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-cursor "</font> id <font color='#008800'>" "</font> shape <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-echo-char <sym-id> [<str-cover-char>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which text is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-cover-char> Cover character for password entry.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (gs:set-echo-char 'TheTextField "*")</font>
|
|
<font color='#555555'>;; (gs:set-echo-char 'TheTextField) ; no echo, behave as normal text field</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-echo-char id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> text <font color='#AA0000'>(</font><font color='#0000AA'>></font> <font color='#AA0000'>(</font><font color='#0000AA'>length</font> text<font color='#AA0000'>)</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-echo-char "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-echo-char "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; If no <str-cover-char> is specyfied or the string in <str-cover-char> is of</font>
|
|
<font color='#555555'>;; 0 length, then the text field behaves as a normal text field.</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-editable <sym-id> <boolean-editable>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text widget.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-editable> The flag 'true' or 'nil' to indicate if this text widget can be edited.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-editable id flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-editable "</font> id <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-flow-layout <sym-container> [<str-alignment> [<int-hgap> <int-vgap>]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-container> The name of the container for which flow layout is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-alignment> The alignment of the flow layout '"left"', '"center"' or '"right"'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-hgap> The horizontal gap between components in the flow layout.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-vgap> The vertical gap between components in the flow layout.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The flow layout lets components appear in their natural or preferred size. The preferred</font>
|
|
<font color='#555555'>;; size of a component is set using the function 'gs:set-size'. Button-type widgets and</font>
|
|
<font color='#555555'>;; combo boxes will take as much space as necessary to show the included text.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-flow-layout id <font color='#AA0000'>(</font>direction <font color='#008800'>"left"</font><font color='#AA0000'>)</font> hGap vGap<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> hGap vGap<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-flow-layout "</font> id <font color='#008800'>" "</font> direction <font color='#008800'>" "</font> hGap <font color='#008800'>" "</font> vGap <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-flow-layout "</font> id <font color='#008800'>" "</font> direction <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-font <sym-id> <str-family> <int-size> <str-type>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the text font.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-familiy> The family of the font, e.g.: '"Monospaced"', '"Serif"', '"Sans Serif"'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-size> The font size in points.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-type> The type of the font, one or more of '"plain"', '"bold"', '"italic"'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; More than the above noted families are available depending on the platform.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-font id family size type<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-font "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> family<font color='#AA0000'>)</font> <font color='#008800'>" "</font> size <font color='#008800'>" "</font> type <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-foreground <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-red> The red color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-green> The green color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-blue> The blue color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-foreground <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The rgb color can be given as a list of three numbers.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The foreground color is the color of the text in a component.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-foreground id red green blue alpha<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> red<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'alpha <font color='#AA0000'>(</font><font color='#0000AA'>or</font> green <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#0000AA'>set</font> '<font color='#AA0000'>(</font>red green blue<font color='#AA0000'>)</font> red<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'alpha <font color='#AA0000'>(</font><font color='#0000AA'>or</font> alpha <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-foreground "</font> id <font color='#008800'>" "</font> red <font color='#008800'>" "</font> green <font color='#008800'>" "</font> blue <font color='#008800'>" "</font> alpha <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-grid-layout <sym-container> <int-rows> <int-columns> [<int-hgap> <int-vgap>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-container> The name of the container for which grid layout is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-rows> The number of rows in the layout grid.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-columns> The number of columns in the layout grid.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-hgap> The horizontal gap between components in the grid layout.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-vgap> The vertical gap between components in the grid layout.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; In a grid layout each component will assume the maximum size the grid cell allows</font>
|
|
<font color='#555555'>;; regardless of sizes preset using 'gs:set-size' Because of this grid layout cells are</font>
|
|
<font color='#555555'>;; frequently filled with panels using 'gs:panel' which have flow layout by default</font>
|
|
<font color='#555555'>;; and allow deliberate sizing of components using 'gs:set-size'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-grid-layout container rows cols hgap vgap<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> hgap vgap<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-grid-layout "</font> container <font color='#008800'>" "</font> rows <font color='#008800'>" "</font> cols <font color='#008800'>" "</font> hgap <font color='#008800'>" "</font> vgap <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-grid-layout "</font> container <font color='#008800'>" "</font> rows <font color='#008800'>" "</font> cols <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-icon <sym-id> <str-icon-path> [<int-index>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of a button or label or menu-item for which to set an icon.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-icon-path> The file path of the icon to be set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-index> If <sym-id> is a tabbed pane <int-index> is the index of the tab.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-icon comp text idx<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> idx
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-icon "</font> comp <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> idx <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-icon "</font> comp <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-look-and-feel <str-look>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-look> The class description string for the look and feel of the application.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The following strings can be tried in <str-look>, but not all will work on a specific</font>
|
|
<font color='#555555'>;; platform. On the Mac the default look-and-feel is built-in to the JVM as the default</font>
|
|
<font color='#555555'>;; style. The '"MacLookAndFeel"' is not available as an explicit flavor here, but may be</font>
|
|
<font color='#555555'>;; on other platforms.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; '"com.sun.java.swing.plaf.motif.MotifLookAndFeel"'<br></font>
|
|
<font color='#555555'>;; '"javax.swing.plaf.metal.MetalLookAndFeel"'<br></font>
|
|
<font color='#555555'>;; '"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"'<br></font>
|
|
<font color='#555555'>;; '"javax.swing.plaf.mac.MacLookAndFeel"'<br></font>
|
|
<font color='#555555'>;; '"com.sun.java.swing.plaf.gtk.GTKLookAndFeel"'</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-look-and-feel look<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-look-and-feel System "</font> look <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-paint <list-rgb>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The current paint used for outlines, text and fill color.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-paint color<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-paint "</font> gs:currentCanvas <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>1</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font>color <font color='#665500'>2</font><font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-pressed-icon <sym-id> <str-icon-path>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the button, image button or toggle button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-icon-path> The file path of the icon or image to be set to the button in pressed state.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; By default a small grey dot is shown on image buttons when in a pressed state.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-pressed-icon comp text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-pressed-icon "</font> comp <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-resizable <sym-frame> <boolean-resizable>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-frame> The name of the frame window.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <bbolean-resizable> The flag 'true' or 'nil' to indicate if a frame can be resized by the user.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-resizable id flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-resizable "</font> id <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#0000AA'>true</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-rotation <float-angle>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-angle> The angle in degrees (0 - 360) of the canvas rotation.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Unlike the 'gs:rotate-tag' operation which is cumulative, 'gs:set-rotation'</font>
|
|
<font color='#555555'>;; will set an absolute rotation value each time it is called.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-rotation angle<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-rotation "</font> gs:currentCanvas <font color='#008800'>" "</font> angle <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-scale <float-x> <float-y>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-x> The X-scale value of the current canvas.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-y> The Y-scale value of the current canvas.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Unlike the 'gs:scale-tag' operation which is cumulative, 'gs:set-scale'</font>
|
|
<font color='#555555'>;; will set an absolute scale value each time it is called.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-scale x y<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-scale "</font> gs:currentCanvas <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-selected <sym-id> <boolean-selected> [<sym-id> <boolean-selected>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the toggle or radio button or check box or menu item.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-selected> A flag of 'true' or 'nil' to indicated the selection state.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; More then one toggle control may be set selected or unselected.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-selected id flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-selected "</font> id <font color='#008800'>" "</font> flag <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>doargs</font> <font color='#AA0000'>(</font>item<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> item <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-selection-color <sym-id> <float-red> <float-green> <float-blue> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the text selection color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-red> The red color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-green> The green color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-blue> The blue color component expressed as a number between 0.0 and 1.0.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-selection-color <sym-id> <list-rgb> [<float-alpha>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which to set the text selection color.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb> The rgb color can be given as a list of three numbers.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-alpha> The transparency of the color expressed as a number between 0.0 (fully transparent)and 1.0 (completely opaque).</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Note 'set-background' is the same as 'set-color'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-selection-color id red green blue alpha<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> red<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>begin</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'alpha <font color='#AA0000'>(</font><font color='#0000AA'>or</font> green <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#0000AA'>set</font> '<font color='#AA0000'>(</font>red green blue<font color='#AA0000'>)</font> red<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'alpha <font color='#AA0000'>(</font><font color='#0000AA'>or</font> alpha <font color='#665500'>1.0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-selection-color "</font> id <font color='#008800'>" "</font> red <font color='#008800'>" "</font> green <font color='#008800'>" "</font> blue <font color='#008800'>" "</font> alpha <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-size <sym-id> <int-width> <int-height>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component of which a preferred size is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The preferred width of the component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The preferred height of the component.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Note that not all layouts allow setting the size of a component. The grid and</font>
|
|
<font color='#555555'>;; border layouts will size the component to its maximum possible in the layout.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-size id width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-size "</font> id <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-stroke <float-width> [<str-cap> [<str-join> [<float-miterlimit>]]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-width> The width for drawing lines and outlines in shapes.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-cap> One of optional '"butt"' (default), '"round"' or '"sqare"'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-join> One of optional '"miter"' (default), '"bevel"' or '"round"'</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; For a <float-width> 0f 0.0 the thinnest possible line width be chosen. </font>
|
|
<font color='#555555'>;; Join is the decoration applied at the intersection of two path segments and at the </font>
|
|
<font color='#555555'>;; intersection of the endpoints.</font>
|
|
<font color='#555555'>;; Cap is the decoration applied to the ends of unclosed subpaths and dash segments.</font>
|
|
<font color='#555555'>;; The <float-miterlimit> should be greater or equal 1.0.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-stroke width cap jn limit<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> cap
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#0000AA'>join</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> limit
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-stroke "</font> gs:currentCanvas <font color='#008800'>" "</font> width <font color='#008800'>" "</font> cap <font color='#008800'>" "</font> jn <font color='#008800'>" "</font> limit <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-stroke "</font> gs:currentCanvas <font color='#008800'>" "</font> width <font color='#008800'>" "</font> cap <font color='#008800'>" "</font> jn <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-stroke "</font> gs:currentCanvas <font color='#008800'>" "</font> width <font color='#008800'>" "</font> cap <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-stroke "</font> gs:currentCanvas <font color='#008800'>" "</font> width <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-syntax <sym-id> <str-type>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text pane for syntax coloring is enabled or disabled.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-type> A string '"lsp"', '"c"', '"cpp"', '"java"' or '"php"' to indicate the </font>
|
|
<font color='#555555'>;; syntax desired, or 'nil' to switch off syntax highlighting.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Colors for syntax highlighting are preselected for a white background, but can be changed using</font>
|
|
<font color='#555555'>;; the following functions: 'gs:set-background', 'gs:set-foreground', 'gs:set-caret', 'gs:set-selection-color'</font>
|
|
<font color='#555555'>;; and 'gs:set-syntax-colors'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-syntax id type<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-syntax "</font> id <font color='#008800'>" "</font> type <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-syntax-colors <list-rgb-comment> <list-rgb-keyword> <list-rgb-string> <list-rgb-number> <list-rgb-quoted> <list-rgb-parentheses>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb-comment> The color for comments.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb-keyword> The color for reserved keywords.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb-string> The color for strings.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb-number> The color for numbers.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb-quoted> The color for the quote and quoted symbols.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <list-rgb-parentheses> The color for parenthesis.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Syntax highlighting colors are given as lists of red, green and blue values between 0.0 and 1.0. </font>
|
|
<font color='#555555'>;; Depending on the syntax colors and the foreground and background colors set for the text pane, </font>
|
|
<font color='#555555'>;; the caret color and color for selected text should also be changed. Only text widgets created </font>
|
|
<font color='#555555'>;; using 'gs:text-pane' feature syntax highlighting.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-syntax-colors comment keyword text number quoted parentheses<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font> components <font color='#AA0000'>(</font><font color='#0000AA'>append</font> comment keyword text number quoted parentheses<font color='#AA0000'>)</font>
|
|
str <font color='#008800'>"set-syntax-colors System "</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>c components<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> str <font color='#AA0000'>(</font><font color='#0000AA'>string</font> c <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> str <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out str<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-tab-size <sym-id> <int-size>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text area component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-size> The tabulator size.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Note that 'gs:set-tab-size' will only work with fixed spaced fonts.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-tab-size id size<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-tab-size "</font> id <font color='#008800'>" "</font> size <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-text <sym-id> <str-text> [<int-index>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the component for which text is set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text to be set in the component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-index> The index for a tab if the <sym-id> is a tabbed pane.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-text id text idx<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>replace</font> <font color='#008800'>"\r"</font> text <font color='#008800'>""</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> idx
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> idx <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-text "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-titled-border <sym-component> <str-title>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-component> The name of the component.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-title> The text in the titled border around the component.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The component is usually a 'panel'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-titled-border id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-titled-border "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-tool-tip <sym-id> <str-text>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the widget for which to supply a tool tip.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The text of the tool tip.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The tool tip text is shown when leaving the mouse over the widget for certain</font>
|
|
<font color='#555555'>;; amount of time.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-tool-tip id text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-tool-tip "</font> id <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-trace <boolean-flag>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-flag> The flag 'true' or 'nil'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-trace flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-trace System "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-translation <int-x> <int-y>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X-translation value of the current canvas.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y-translation value of the current canvas.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Translates the current origin of the current canvas to the point in <int-x> <int-y>.</font>
|
|
<font color='#555555'>;; Unlike the 'gs:translate-tag' operation which is cumulative, 'gs:set-translation'</font>
|
|
<font color='#555555'>;; will set an absolute translation value each time it is called.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-translation x y<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-translation "</font> gs:currentCanvas <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-utf8 <boolean-flag>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean> The flag 'true' or 'nil' to indicate if in UTF-8 mode.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When set in UTF-8 mode, guiserver will convert files to UTF-8 encoding</font>
|
|
<font color='#555555'>;; when loading and saving files. On Mac OS X UTF-8 mode is by default enabled.</font>
|
|
<font color='#555555'>;; On startup guiserver.lsp will detect if newLISP is UTF-8 enabled and</font>
|
|
<font color='#555555'>;; switch the mode in Guiserver accordingly using 'gs:set-utf8'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:set-utf8 flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-utf8 System "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-value <sym-id> <int-value>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of a slider or progress bar for which to set the value.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-value> The integer value of the name to be set.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The value should not be bigger or smaller than the minimum or maximum values set</font>
|
|
<font color='#555555'>;; when creating the slider or progress bar, otherwise the setting will default to either</font>
|
|
<font color='#555555'>;; the minimum or maximum preset value.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-value id value<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-value "</font> id <font color='#008800'>" "</font> value <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:set-visible <sym-id> <boolean-visible>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The component which is hidden or made visible.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-visible> A flag indicating if the component is visible '"true"', '"nil"'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Except for frames and dialog windows, components are visible by default. Normally</font>
|
|
<font color='#555555'>;; frames and dialogs are not set visible before all other components are placed inside.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>set-visible id flag<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"set-visible "</font> id <font color='#008800'>" "</font> flag <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:shear-tag <sym-tag> <int-x> <int-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag group to shear.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-x> The X shearing factor.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-y> The Y shearing factor.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>shear-tag tag sx sy <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"shear-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font>
|
|
sx <font color='#008800'>" "</font> sy <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:show-popup <sym-tag> <sym-host> <int-x> <int-y>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The id of the popup menu.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-host> The host container where to pop up the menu.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X coordinate of the menu popup position.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y coordinate of the menu popup position.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:show-popup id host x y<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"show-popup "</font> id <font color='#008800'>" "</font> host <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:show-tag <sym-tag> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The tag of the group to show.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>show-tag tag <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"show-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:slider <sym-id> <sym-action> <str-orientation> <int-min> <int-max> <int-initial-value>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the slider.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-orientation> The orientation of the slider '"horizontal"' or '"vertical"'</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-min> The minimum value of the slider.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-max> The maximum value of the slider.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-initial-value> The initial value of the slider.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>slider id action orient posmin posmax posinit<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"slider "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> orient <font color='#008800'>" "</font> posmin <font color='#008800'>" "</font> posmax <font color='#008800'>" "</font> posinit <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:split-pane <sym-id> <str-orientation> [<float-weight> [<float-location> [<int-divider-size>]]])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the split-pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-orientation> The orientation '"horizontal"' or '"vertical"'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-weight> The optional weight distribution between '0.0' and '1.0' when re-sizing the window. The default is '0.0'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <float-location> The optional initial divider location between '0.0' and '1.0'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-divider-size> The optional size of the draggable divider in pixels.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>split-pane id orient <font color='#AA0000'>(</font>weight <font color='#665500'>0.0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>pos <font color='#665500'>0.5</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font>dvdr <font color='#665500'>5</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"split-pane "</font> id <font color='#008800'>" "</font> orient <font color='#008800'>" "</font> weight <font color='#008800'>" "</font> pos <font color='#008800'>" "</font> dvdr <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:stop-sequence)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Stops playing tracks, as started with 'gs:play-sequence'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>gs:stop-sequence<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"stop-sequence System\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:tabbed-pane <sym-id> <sym-action> <str-orientation> [<sym-tab> <str-title> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the tabbed pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-orientation> The position of the tabs; either '"top"' (default), '"bottom"','"left"' or '"right"'.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tab> The id symbol name of a tab</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-title> The title of the tab.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>tabbed-pane id action orient<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"tabbed-pane "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> orient <font color='#008800'>" "</font><font color='#AA0000'>)</font>
|
|
t <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> t
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#AA0000'>(</font><font color='#0000AA'>pop</font> t<font color='#AA0000'>)</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> <font color='#AA0000'>(</font><font color='#0000AA'>pop</font> t<font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#008800'>" "</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table <sym-id> <sym-action> [<str-column-header-name> ...])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The handler function symbol when a cell is selected.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-column-header-name> The optional column header name. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates a table with <str-column-header-name> specified column and empty row.</font>
|
|
<font color='#555555'>;; For empty strings specified as column headers, the header will be left empty.</font>
|
|
<font color='#555555'>;; If all header in a table are specified as empty, the table will be created</font>
|
|
<font color='#555555'>;; without a header row. If there are no columns at all, an empty table (0 x 0) </font>
|
|
<font color='#555555'>;; is created. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; When a cell is selected, the function in <sym-action> gets called with the table </font>
|
|
<font color='#555555'>;; id, row, column and cell-contents. See the file 'table-demo.lsp' for an example. </font>
|
|
<font color='#555555'>;; Cells can be edited by either selecting or double clicking a cell.</font>
|
|
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table "</font> id <font color='#008800'>" "</font> action<font color='#AA0000'>)</font>
|
|
columns <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>null?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> '<font color='#AA0000'>(</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>col columns<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> col<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-add-column <sym-id> <str-column-header-name> ...)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-column-header-name> Add column header name(s). </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; More than one <str-column-header-name> can be specified to add more</font>
|
|
<font color='#555555'>;; than one column. A column header can be set empty using and empty string <tt>""</tt>.</font>
|
|
<font color='#555555'>;; When all headers in a table are empty, the</font>
|
|
<font color='#555555'>;; table will be displayed without a header row.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-add-column id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-add-column "</font> id<font color='#AA0000'>)</font>
|
|
columns <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>null?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> '<font color='#AA0000'>(</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>col columns<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> col<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-add-column " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-add-row <sym-id> [<str-columns> ... ])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-add-row <sym-id> ([<str-columns> ...))</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-columns> Add a row with contents in <str-columns></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Add row with each column value. If necessary a scrollbar will appear.</font>
|
|
<font color='#555555'>;; If no contents is defined in <str-columns>, or if contents for less</font>
|
|
<font color='#555555'>;; columns is defined than available, column contents is left empty.</font>
|
|
<font color='#555555'>;; Multiple column content can be specified as either a list</font>
|
|
<font color='#555555'>;; of strings or as additional parameters of 'gs:table-add-row'. </font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-add-row id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-add-row "</font> id<font color='#AA0000'>)</font>
|
|
columns <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>null?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> '<font color='#AA0000'>(</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>col columns<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> col<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-add-row " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-get-cell <sym-id> <int-row> <int-column>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-row> The row of the cell.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-column> The column of the cell.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> cell value. stored in gs:table-cell.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Get the cell contents as a string at sepcifed <int-row> and <int-column>.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-get-cell id row col<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:table-cell <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-get-cell "</font> id
|
|
<font color='#008800'>" "</font> row
|
|
<font color='#008800'>" "</font> col<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-get-cell " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:table-cell<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:table-cell<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-get-size <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> table size list (row-size, column-size)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Get table size, stored in 'gs:table-size'.</font>
|
|
<font color='#555555'>;; Note, that adding columns or row will not automatically update</font>
|
|
<font color='#555555'>;; the 'gs:table-size' variable. Use 'gs:table-get-size' to update</font>
|
|
<font color='#555555'>;; this variable.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-get-size id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:table-size <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-get-size "</font> id<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-get-size " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:table-size<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:table-size
|
|
<font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>; FdB</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-remove-row <sym-id> <int-rownumber>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-row> The row to remove</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; Removes a row See also 'gs:table-set-row-count'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-remove-row id row<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-remove-row "</font> id <font color='#008800'>" "</font> row<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-remove-row " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-set-cell <sym-id> <int-row> <int-column> <str-value>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-row> The row of the cell set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-column> The column of the cell set.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-value> The cell value.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> The previous contents of the cell; also stored in 'gs:table-cell'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Sets a new table cell contents and returns the old cell contents. Row and</font>
|
|
<font color='#555555'>;; column numbering starts with '0' (zero). The cell contents is passed</font>
|
|
<font color='#555555'>;; as a string.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-set-cell id row col value<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:table-cell <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-set-cell "</font> id
|
|
<font color='#008800'>" "</font> row
|
|
<font color='#008800'>" "</font> col
|
|
<font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> value<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-set-cell " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:table-cell<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
gs:table-cell
|
|
<font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-set-column <sym-id> <int-column-number> <int-width> [<str-justification>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-column-number> The column number of align.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The column width.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-justification> The column align property, "left", "center", "right".</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; A table column property is changed, adjusting the column width and alignment of cell</font>
|
|
<font color='#555555'>;; contents. The <str-justification> parameter is optional and alignment is "left"</font>
|
|
<font color='#555555'>;; by default.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-set-column id columnNum width <font color='#AA0000'>(</font>justification <font color='#008800'>"left"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-set-column "</font> id
|
|
<font color='#008800'>" "</font> columnNum
|
|
<font color='#008800'>" "</font> width
|
|
<font color='#008800'>" "</font> justification<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-set-column " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>; FdB</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-set-column-name <sym-id> [<str-columns> ... ])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-set-column-name <sym-id> ([<str-columns> ...))</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-columns> Set column names with contents in <str-columns> </font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; Replaces the column names in the table. If the number of names </font>
|
|
<font color='#555555'>;; is greater than the current number of columns, new columns are added to the end </font>
|
|
<font color='#555555'>;; of each row in the table. If the number of columnnames is less than the current</font>
|
|
<font color='#555555'>;; number of columns, all the extra columns at the end of a row are discarded.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-set-column-name id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-set-column-name "</font> id<font color='#AA0000'>)</font>
|
|
columns <font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>null?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> '<font color='#AA0000'>(</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>list?</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font> <font color='#665500'>0</font><font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>args</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>dolist</font> <font color='#AA0000'>(</font>col columns<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> col<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-set-column-name " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>; FdB</font>
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-set-row-count <sym-id> <int-row-count>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-row> Set the numbers of rows in the table with <int-row-count> </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Sets the number of rows in the table. If the new size is greater than the </font>
|
|
<font color='#555555'>;; current size, new rows are added to the end of the table. If the new size is </font>
|
|
<font color='#555555'>;; less than the current size, all rows at index rownumber and greater are discarded.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-set-row-count id num<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-set-row-count "</font> id <font color='#008800'>" "</font> num<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>" \n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font><font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-get <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@return</font> table cells. stored in 'gs:table-full'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Get full table as a list of row lists.</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; ( ("column0" "column1" ... ) ; 1'st row</font>
|
|
<font color='#555555'>;; ("column0" "column1" ... ) ; 2'nd row</font>
|
|
<font color='#555555'>;; ...</font>
|
|
<font color='#555555'>;; ... )</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The entire table contents is stored as a list of row lists in the </font>
|
|
<font color='#555555'>;; return value of 'gs:table-get', and is also stored in the variable </font>
|
|
<font color='#555555'>;; 'gs:table-full'. </font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-get id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:table-full <font color='#0000AA'>nil</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-get "</font> id<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-get " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>while</font> <font color='#AA0000'>(</font><font color='#0000AA'>not</font> gs:table-full<font color='#AA0000'>)</font> <font color='#AA0000'>(</font>check-event <font color='#665500'>10000</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>; decode base64 cell contents for each row in each cell</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>set</font> 'gs:table-full
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#AA0000'>(</font>lambda <font color='#AA0000'>(</font>x<font color='#AA0000'>)</font> <font color='#AA0000'>(</font><font color='#0000AA'>map</font> <font color='#AA0000'>(</font>lambda <font color='#AA0000'>(</font>s<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>nil?</font> s<font color='#AA0000'>)</font> <font color='#0000AA'>nil</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-dec</font> s<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font> x <font color='#AA0000'>)</font> <font color='#AA0000'>)</font> gs:table-full<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-set-row-number <sym-id> <bool-row-number>) DEPRECATED</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Use 'gs:table-show-row-number'. The old naming is deprecated but will </font>
|
|
<font color='#555555'>;; still work.</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:table-show-row-number <sym-id> <bool-row-number>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the table.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <bool-row-number> 'true' if rows should carry a row number; default 'nil'.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Show or hide the row number headers. The default is hiding row numbers.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>table-show-row-number id boolRowheader<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>let</font> <font color='#AA0000'>(</font>s <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"table-show-row-number "</font> id
|
|
<font color='#008800'>" "</font> boolRowheader<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#555555'>;(println "gs:table-show-row-number " s)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>write-buffer</font> s <font color='#008800'>"\n"</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out s<font color='#AA0000'>)</font> <font color='#AA0000'>)</font> <font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> table-set-row-number table-show-row-number<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:text-area <sym-id> <sym-action> <int-width> <int-height>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <symid> The name of the text area.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the text area..</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the text area.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (gs:text-area 'TheText 'textarea-event 10 8)</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (define (textarea-event id code dot mark) ...)</font>
|
|
|
|
<font color='#555555'>;; 'gs:text-area' transmits the following parameters in its event:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; id - name of the widget </font>
|
|
<font color='#555555'>;; code - key code equals ASCII code. Only for text keys</font>
|
|
<font color='#555555'>;; dot - position of text caret in the text </font>
|
|
<font color='#555555'>;; mark - extended (selection) position of caret </font>
|
|
<font color='#555555'>;; </pre></font>
|
|
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>text-area id action width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"text-area "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"text-area "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:text-field <sym-id> <sym-action> <int-columns> [<str-cover-char>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text field.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-columns> The number of columns in the text field.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-cover-char> Cover character for password entry.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (gs:text-field 'TheTextField 'textfield-event)</font>
|
|
<font color='#555555'>;; (gs:text-field 'PasswordTextField 'textfield-event "*")</font>
|
|
|
|
<font color='#555555'>;; The 'textfield-event' is fired when the enter key is pressed in the</font>
|
|
<font color='#555555'>;; text field. As an alternative the cover character for passwords can be</font>
|
|
<font color='#555555'>;; set with 'gs:set-echo-char'.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>text-field id action columns text<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"text-field "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> columns <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"text-field "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> columns <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:text-pane <sym-id> <sym-action> <str-style> [<int-width> <int-height>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the text pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The key action handler for the html pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-style> The content type of the text pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The optional width of the pane.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The optional height of the pane.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The 'gs:text-pane' is used similar to 'gs:text-area. The following styles</font>
|
|
<font color='#555555'>;; are supported in <sym-style>:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; "text/plain"</font>
|
|
<font color='#555555'>;; "text/html"</font>
|
|
<font color='#555555'>;; </pre></font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The 'gs:text-pane' widget will automatically display scroll bars when</font>
|
|
<font color='#555555'>;; text does not fit in the visible space of the pane. When entering parentheses</font>
|
|
<font color='#555555'>;; they are automatically matched with their opening or closing counterparts, if they exist.</font>
|
|
<font color='#555555'>;; If this is undesired behavior, the simpler 'gs:text-area' control should</font>
|
|
<font color='#555555'>;; be used instead. </font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; On each change of the caret or selection in the text pane</font>
|
|
<font color='#555555'>;; an event is fired containing several parameters about the caret and selection</font>
|
|
<font color='#555555'>;; positions, the last character typed, and the modifier keys used. See the</font>
|
|
<font color='#555555'>;; the file 'newlisp-edit.lsp' for a complex application using all features</font>
|
|
<font color='#555555'>;; available in this widget.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; To make hyperlinks in 'HTML' formatted text clickable, editing must</font>
|
|
<font color='#555555'>;; be disabled using the 'gs:set-editable' function. The functions 'gs:set-font'</font>
|
|
<font color='#555555'>;; and 'gs:append-text' will work only on the 'text/plain' content style.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; <font color='#308080'>@example</font></font>
|
|
<font color='#555555'>;; (gs:text-pane 'TheTextPane 'textpane-event "text/plain")</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; (define (textpane-event id code mods dot mark len undo redo) ...)</font>
|
|
|
|
<font color='#555555'>;; 'gs:text-pane' transmits the following parameters in its event:</font>
|
|
<font color='#555555'>;; <pre></font>
|
|
<font color='#555555'>;; id - name of the widget </font>
|
|
<font color='#555555'>;; code - key code equals ASCII code. Only for text keys </font>
|
|
<font color='#555555'>;; mods - keys pressed together with the previous, like shift, ctrl etc.</font>
|
|
<font color='#555555'>;; dot - position of the text caret in the text </font>
|
|
<font color='#555555'>;; mark - extended (selection) position of the caret </font>
|
|
<font color='#555555'>;; len - length of the text in the textarea </font>
|
|
<font color='#555555'>;; undo - undo enabled/disabled </font>
|
|
<font color='#555555'>;; redo - redo enabled/disabled </font>
|
|
<font color='#555555'>;; </pre></font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>text-pane id action style width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"text-pane "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> style <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"text-pane "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> style <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:toggle-button <sym-id> <sym-action> <str-text> [<bool-selected>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the toggle button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The name of the event handler.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <str-text> The optional text of the toggle button.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <bool-selected> An optional flag 'true' or 'nil' (default) indicating the initial state of the toggle button.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>toggle-button id action text selected<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> text
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"toggle-button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>" "</font> <font color='#AA0000'>(</font><font color='#0000AA'>base64-enc</font> text<font color='#AA0000'>)</font> <font color='#008800'>" "</font> selected <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"toggle-button "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:tool-bar <sym-frame> [<bool-floatable> <int-hgap> <int-vgap>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-frame> The name of the frame hosting the toolbar.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <bool-floatable> The optional flag 'true' or 'nil' to indicate if the toolbar can be detached.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-hgap> The horizontal gap between components on the toolbar.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-vgap> The vertical gap between the components on the toolbar.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>tool-bar aframe floatable width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>if</font> <font color='#AA0000'>(</font><font color='#0000AA'>and</font> width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"tool-bar "</font> aframe <font color='#008800'>" "</font> floatable <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"tool-bar "</font> aframe <font color='#008800'>" "</font> floatable <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:translate-tag <sym-tag> <int-x> <int-y> [<boolean-repaint>])</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-tag> The name tag of the group to translate.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The X-coordinate translation value.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The Y-coordinate translation value.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-repaint> An optional flag to indicate if repainting is required (default is 'true').</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Moves the origin of the coordinate system of all objects tagged with <sym-tag>.</font>
|
|
<font color='#555555'>;; Like all tag operations multiple 'gs:translate-tag' operations are cumulative.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>translate-tag tag x y <font color='#AA0000'>(</font>repaint <font color='#0000AA'>true</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font>send-out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"translate-tag "</font> gs:currentCanvas <font color='#008800'>" "</font> tag <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> repaint <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:undo-text <sym-id>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the 'gs:text-pane' where to perform an undo operation.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>undo-text id<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"undo-text "</font> id <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:undo-enable <sym-id> <boolean-enabled>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The id of the 'gs:text-pane' for which to enabe/disable undo.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <boolean-enabled> 'true' or 'nil' to enable or disable undo. </font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>undo-enable id enabled<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"undo-enable "</font> id <font color='#008800'>" "</font> enabled <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:update)</font>
|
|
<font color='#555555'>;; </font>
|
|
<font color='#555555'>;; Forces a repaint of the current canvas, e.g. after changing the scale or translation of a visible</font>
|
|
<font color='#555555'>;; canvas. This function is rarely used, as most screen updates are performed automatically.</font>
|
|
<font color='#555555'>;; All tag operations can carry an additional parameter to force update after they have been</font>
|
|
<font color='#555555'>;; draw.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>update<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"update "</font> gs:currentCanvas <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:window <sym-id> <int-x> <int-y> <int-width> <int-height>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the invisible window.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-x> The x-coordinate of the screen position.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-y> The y-coordinate of the screen position.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-width> The width of the window.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <int-height> The height of the window.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; Creates a borderless window. Note that a borderless window may treat</font>
|
|
<font color='#555555'>;; some hosted components differently from normal frames and dialogs.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>window id x y width height<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"window "</font> id <font color='#008800'>" "</font> x <font color='#008800'>" "</font> y <font color='#008800'>" "</font> width <font color='#008800'>" "</font> height <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:window-closed <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the frame or dialog.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The action to perform when the frame or dialog closes.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; A window or dialog window can be closed using the system close button in</font>
|
|
<font color='#555555'>;; one of the corners of the window. In this case it is useful to specify</font>
|
|
<font color='#555555'>;; a handler function which is called upon closing.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>frame-closed id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame-closed "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>window-closed id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame-closed "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:window-moved <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the frame or dialog.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The action to perform when the frame or dialog moves.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The event will carry the <sym-id> of the window or dialog and current <tt>X</tt> and <tt>Y</tt></font>
|
|
<font color='#555555'>;; coordinates on the screen.</font>
|
|
<font color='#555555'>;;</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>frame-moved id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame-moved "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>window-moved id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame-moved "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>;; <font color='#308080'>@syntax</font> (gs:window-resized <sym-id> <sym-action>)</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-id> The name of the frame or dialog.</font>
|
|
<font color='#555555'>;; <font color='#308080'>@param</font> <sym-action> The action to perform when the frame or dialog is resized.</font>
|
|
<font color='#555555'>;;</font>
|
|
<font color='#555555'>;; The event will carry the <sym-id> of the window or dialog and current width and</font>
|
|
<font color='#555555'>;; height.</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>frame-resized id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame-resized "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>define</font> <font color='#AA0000'>(</font>window-resized id action<font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>(</font><font color='#0000AA'>net-send</font> out <font color='#AA0000'>(</font><font color='#0000AA'>string</font> <font color='#008800'>"frame-resized "</font> id <font color='#008800'>" "</font> action <font color='#008800'>"\n"</font><font color='#AA0000'>)</font><font color='#AA0000'>)</font>
|
|
<font color='#AA0000'>)</font>
|
|
|
|
|
|
<font color='#555555'>; eof</font>
|
|
|
|
|
|
</pre><center><font face='Arial' size='-3' color='#666666'>syntax highlighting with <a href="http://newlisp.org">newLISP</a> and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a></font></center></body></html> |