Changeset main,87 for main/form.lisp
- Timestamp:
- 02/23/2008 12:27:43 AM (18 years ago)
- branch-nick:
- tui
- revision id:
- dsowen@fugue88.ws-20080223002743-09u28trz6kvjtdpo
- File:
-
- 1 edited
-
main/form.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
main/form.lisp
r80 r87 41 41 (precision :initarg :precision) 42 42 (inactive-background :initarg :inactive-background) 43 (active-background :initarg :active-background))) 44 45 (defclass checkbox-def (value-widget-def) 46 ((inactive-background :initarg :inactive-background) 43 47 (active-background :initarg :active-background))) 44 48 … … 83 87 :active-background (list ,@active-background))) 84 88 89 (defun make-checkbox-def (row column name &key read-only 90 (inactive-background 91 *default-inactive-widget-background*) 92 (active-background 93 *default-active-widget-background*)) 94 `(make-instance 'checkbox-def 95 :row ,row :column ,column :name ,name :read-only ,read-only 96 :inactive-background (list ,@inactive-background) 97 :active-background (list ,@active-background))) 98 85 99 (defun parse-widget-form (widget-form) 86 100 (destructuring-bind (type &rest args) widget-form … … 88 102 (:label 'make-label-def) 89 103 (:textbox 'make-textbox-def) 90 (:numberbox 'make-numberbox-def)) 104 (:numberbox 'make-numberbox-def) 105 (:checkbox 'make-checkbox-def)) 91 106 args))) 92 107 … … 97 112 * (:label row column text) 98 113 * (:textbox row column name display-width &key data-width read-only) 99 * (:numberbox row column name display-width &key data-width precision read-only)" 114 * (:numberbox row column name display-width &key data-width precision read-only) 115 * (:checkbox row column name)" 100 116 (destructuring-bind (&key ((:inactive-widget-background *default-inactive-widget-background*) '(#\Nul 0)) 101 117 ((:active-widget-background *default-active-widget-background*) '(#\Nul 0))) … … 146 162 :validator validator 147 163 :inactive-background inactive-background 148 :active-background active-background)))))) 164 :active-background active-background))))) 165 (:method ((cbd checkbox-def) form) 166 (with-slots (row column name inactive-background active-background) cbd 167 (with-slots (data window scroll) form 168 (let ((r (make-reflector data name))) 169 (create-widget 'db-checkbox window (- row scroll) column 170 :data r 171 :inactive-background inactive-background 172 :active-background active-background)))))) 149 173 150 174
Note: See TracChangeset
for help on using the changeset viewer.
