/[mcclim]/mcclim/dialog.lisp
ViewVC logotype

Diff of /mcclim/dialog.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by tmoore, Tue Jan 11 13:02:19 2005 UTC revision 1.17 by tmoore, Tue Jan 18 10:58:08 2005 UTC
# Line 23  accept-present-default, as described in Line 23  accept-present-default, as described in
23  produced by accept-present-default, as well as the current value of  produced by accept-present-default, as well as the current value of
24  that query, arguments that were passed to accept, etc. are stored in a  that query, arguments that were passed to accept, etc. are stored in a
25  query object. The stream stores all the query objects for this  query object. The stream stores all the query objects for this
26  invocation of accepting-values.  invocation of accepting-values. The record created and returned by
27    accept-present-default must be a subclass of updating-output-record.
 The query output records are presentations with command translators  
 defined that directly change their value (stored in the query object)  
 or select them for further user input, like the default text input.  
28    
29  After the initial output records are drawn, invoke-accepting-values  After the initial output records are drawn, invoke-accepting-values
30  blocks accepting commands.  When a query's value is changed, the body  blocks accepting commands. The state of the dialog state machine is changed
31  of the call to accepting-values is run, with all the values returned  via these commands. The commands currently are:
32  by calls to accept coming from the query objects.  
33    COM-SELECT-QUERY query-id -- calls the method select-query with the
34    corresponding query object and output record object. When select-query returns
35    the "next" field, if any, is selected so the user can move from field to field
36    easily.
37    
38    COM-CHANGE-QUERY query-id value -- This command is used to directly change the
39    value of a query field that does not need to be selected first for input. For
40    example, a user would click directly on a radio button without selecting the
41    gadget first.
42    
43    COM-DESELECT-QUERY -- deselects the currently selected query.
44    
45    COM-QUERY-EXIT -- Exits accepting-values
46    
47    COM-QUERY-ABORT -- Aborts accepting-values
48    
49    These commands are generated in two ways. For query fields that are entirely
50    based on CLIM drawing commands and presentations, these are emitted by
51    presentation translators. There is a presentation type selectable-query that
52    throws com-select-query for the :select gesture. Fields that are based on
53    gadgets have to throw presentations from their callbacks. This can be done
54    using  the method on p. 305 of the Franz CLIM user guide, or by using  the
55    McCLIM function throw-object-ptype.
56    
57    After a command is executed the body of accepting-values is rerun, calling
58    accept-present-default again to update the fields' graphic appearance. [This
59    may be calling these methods too often an may change in the future]. The
60    values returned by the user's calls to accept are come from the query objects.
61    
62    
63    If a query field is selectable than it should implement the method
64    select-query:
65    
66    SELECT-QUERY stream query record -- Make a query field active and do any
67    input. This should change the query object and setf (changedp query). This
68    method might be interrupted at any time if the user selects another field.
69    
70  |#  |#
71    
# Line 292  accept of this query"))) Line 325  accept of this query")))
325    
326  (defgeneric select-query (stream query record)  (defgeneric select-query (stream query record)
327    (:documentation "Does whatever is needed for input (e.g., calls accept) when    (:documentation "Does whatever is needed for input (e.g., calls accept) when
328  a query is selected for input." ))  a query is selected for input. It is responsible for updating the
329      query object when a new value is entered in the query field." ))
330    
331  (defgeneric deselect-query (stream query record)  (defgeneric deselect-query (stream query record)
332    (:documentation "Deselect a query field: turn the cursor off, turn off    (:documentation "Deselect a query field: turn the cursor off, turn off

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.5