[q-lang-cvs] qcalc/doc guiexamples4.png, NONE, 1.1 qcalc.xml, 1.23, 1.24
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-12-02 10:33:42
|
Update of /cvsroot/q-lang/qcalc/doc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25882 Modified Files: qcalc.xml Added Files: guiexamples4.png Log Message: update documentation --- NEW FILE: guiexamples4.png --- (This appears to be a binary file; contents omitted.) Index: qcalc.xml =================================================================== RCS file: /cvsroot/q-lang/qcalc/doc/qcalc.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** qcalc.xml 29 Nov 2007 00:36:49 -0000 1.23 --- qcalc.xml 2 Dec 2007 10:33:37 -0000 1.24 *************** *** 476,483 **** </sect1> ! <sect1 id="advancedguiops"><title>Action and Task Buttons</title> <para> ! QCalc also provides two advanced GUI elements to deal with custom actions to be executed in a spreadsheet. </para> --- 476,483 ---- </sect1> ! <sect1 id="advancedguiops"><title>Advanced GUI Elements</title> <para> ! QCalc also provides a number of advanced GUI elements to deal with custom actions to be executed in a spreadsheet. Currently supported are action buttons, task buttons and task windows. We will describe each of these in turn. </para> *************** *** 533,536 **** --- 533,559 ---- </para> + <para> + <literal>public special taskwindow X;</literal> + </para> + + <para> + The task window works pretty much like a task button, minus the toggle button functionality. Instead, it provides an empty parent window inside the task's cell which can be operated directly by the task in the inferior Q process. The id of the parent window is available inside the task with the <literal>task_winid</literal> function: + </para> + + <para> + <literal>public task_winid;</literal> + </para> + + <para> + Moreover, the <literal>index</literal>, <literal>row</literal>, <literal>column</literal> and <literal>task_input</literal> functions work in the same fashion as with task buttons. Messages of the form <literal>(W,H)</literal>, where <literal>W</literal> and <literal>H</literal> are integers denoting the width and height of the task window, are delivered via <literal>task_input</literal> at initialization time and whenever the size of the parent window changes, and quoted <literal>taskwindow</literal> calls are sent when the task window is to be updated due to changes in requisite cells while its task is still up and running. + </para> + + <para> + The initial value of the task window cell is the id of the parent window. It is up to the task to change this value using <literal>setval</literal> when appropriate. It is also up to the task to draw the contents of the window, using either some external program or Q's own GUI and graphics operations. In the simplest case, you can invoke <literal>taskwindow</literal> with a trivial task (e.g., <literal>taskwindow ()</literal>) and use the supplied window id to do the actual drawing elsewhere (e.g., using a task button), or you can provide an expression which takes care of drawing the contents of the cell in the window task itself. An example for the use of task windows can be found in the <filename>mplayer.qcalc</filename> spreadsheet included in the QCalc distribution; see the screenshot below. + <screenshot> + <graphic fileref="guiexamples4.png" align="center"/> + </screenshot> + </para> + </sect1> |