Changeset main,84


Ignore:
Timestamp:
01/18/2008 09:25:03 PM (18 years ago)
Author:
David Owen <dsowen@…>
branch-nick:
tui
revision id:
dsowen@fugue88.ws-20080118212503-b91qub445w8qrw4h
Message:
  • Added checkbox and data-bound checkbox (db-checkbox) widgets.
  • CREATE-WIDGET for more flexible widget creation.
Location:
main
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/tui.asd

    r70 r84  
    2323                                     "output"
    2424                                     "window")
    25                         :components ((:file "generic")
     25                        :components ((:file "checkbox" :depends-on ("generic"))
     26                                     (:file "db-checkbox"
     27                                      :depends-on ("checkbox"))
     28                                     (:file "generic")
    2629                                     (:file "label"
    2730                                      :depends-on ("generic"))
     
    3134                                      :depends-on ("generic" "textbox"))
    3235                                     (:file "package"
    33                                       :depends-on ("label"
     36                                      :depends-on ("checkbox"
     37                                                   "db-checkbox"
     38                                                   "label"
    3439                                                   "textbox"
    3540                                                   "numberbox"))))
  • main/widget/generic.lisp

    r63 r84  
    22  (:use #:cl)
    33  (:export #:text #:widget #:parent-window #:column #:row #:inactive-background
    4            #:active-background #:scroll #:insertion-point #:destroy #:draw
    5            #:activate))
     4           #:active-background #:scroll #:insertion-point #:create-widget
     5           #:destroy #:draw #:activate))
    66
    77(in-package #:tui-widget-generic)
     
    2626   (row :type (integer 0) :initarg :row)
    2727   ;; TODO: initform for bg-color
    28    (inactive-background :initarg :inactive-background)
    29    (active-background :initarg :active-background)))
     28   (inactive-background :initform '(#\Nul 0) :initarg :inactive-background)
     29   (active-background :initform '(#\Nul 0) :initarg :active-background)))
    3030
    3131(defclass scroll ()
     
    3939
    4040
     41(defgeneric create-widget (type parent y x &key &allow-other-keys))
     42
    4143(defgeneric destroy (widget))
    4244
  • main/widget/package.lisp

    r40 r84  
    22  (:use #:cl #:tui-widget-generic #:tui-widget-label #:tui-widget-textbox
    33        #:tui-widget-numberbox)
    4   (:export #:text #:widget #:scroll #:insertion-point #:destroy #:activate
     4  (:export #:text #:widget #:scroll #:insertion-point #:create-widget #:destroy
     5           #:activate
     6           #:checkbox #:checked #:listener
     7           #:db-checkbox
    58           #:label #:create-label
    69           #:textbox #:create-textbox
Note: See TracChangeset for help on using the changeset viewer.