+(defun switches (model)
+ "SWITCHES MODEL => SWITCH-DEFS
+
+ SWITCH-DEFS: SWITCH-DEF*
+ SWITCH-DEF: (:left LEFT :top TOP :width WIDTH :var VAR :display DISPLAY :initial-value INITIAL-VALUE)
+
+ARGUMENTS AND VALUES:
+
+ MODEL: A valid model
+ LEFT: An integer representing the left position
+ TOP: An integer representing the top position
+ WIDTH: An integer representing width
+ VAR: A symbole representing variable
+ DISPLAY: A string representing variable name
+ INITIAL-VALUE: The initial value
+
+DESCRIPTION:
+
+ Returns switch definitions that get declared in the switches of the
+ MODEL. This is used to initialize the interface."
+ (remove nil
+ (mapcar
+ (lambda (widget)
+ (typecase widget
+ (switch
+ (list
+ :left (switch-left widget)
+ :top (switch-top widget)
+ :width (- (switch-right widget) (switch-left widget))
+ :var (intern (string-upcase (switch-varname widget)) :keyword)
+ :display (switch-varname widget)
+ :initial-value (switch-on widget) ))))
+ (model-interface model))))
+