X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=clnl;a=blobdiff_plain;f=src%2Fmain%2Fmodel.lisp;h=f31b182e385e645913c95b015924eb4a62953c7c;hp=f054d4c62b0d7f144be7d9e9f07dc5c8866c6052;hb=31a8f429b5182d9c4f3eae208ccc8efbdfe8a996;hpb=bb7b48443976f5cea04f5dd1c9bac64659d0a2c7 diff --git a/src/main/model.lisp b/src/main/model.lisp index f054d4c..f31b182 100644 --- a/src/main/model.lisp +++ b/src/main/model.lisp @@ -349,6 +349,38 @@ DESCRIPTION: (switch (list (intern (string-upcase (switch-varname widget)) :keyword) (switch-on widget))))) (model-interface model)))) +(defun buttons (model) + "BUTTONS MODEL => BUTTON-DEFS + + BUTTON-DEFS: BUTTON-DEF* + BUTTON-DEF: (:left LEFT :top TOP :height HEIGHT :width WIDTH :display DISPLAY) + +ARGUMENTS AND VALUES: + + MODEL: A valid model + LEFT: An integer representing the left position + TOP: An integer representing the top position + HEIGHT: An integer representing height + WIDTH: An integer representing width + DISPLAY: A string representing display name + +DESCRIPTION: + + Returns button definitions that get declared in the buttons of the + MODEL. This is used to initialize the interface." + (remove nil + (mapcar + (lambda (widget) + (typecase widget + (button + (list + :left (button-left widget) + :top (button-top widget) + :width (- (button-right widget) (button-left widget)) + :height (- (button-bottom widget) (button-top widget)) + :display (button-display-name widget))))) + (model-interface model)))) + (defun code (model) "CODE MODEL => CODE