#| User Interface Construction Toolkit Example: Vertical Tabs

User Interface Construction Toolkit Example: Vertical Tabs

Note: This is an example file showing concepts of the Integration Kit. The code itself is not supported and will never be supported. |# ;; Example demonstrates that the width of the tab pages is the same in ;; case the vertical tabs have a fixed width or a variable width, because ;; the fixed width has been set to 8 grid units which is also the assumed ;; width for variable width vertical tabs. (in-package :test) (use-package :oli) ;;----- Example 1: Fixed width vertical tabs ---------------------------------- (sd-create-dialog-shell "UICT-VERT-TABS-1" :title "UICT: Fixed width vertical tabs" :bottomLine :none :closeAction '(sd-hide-dialog-shell "UICT-VERT-TABS-1") :okAction nil :cancelAction nil :margin 0) (sd-append-grid-area "UICT-VERT-TABS-1-GA" "UICT-VERT-TABS-1-AA" :margin 5 :cellSize (sd-get-default-grid-size) :spacing 1 :width 405 :height 285) (sd-create-pushbutton-control "UICT-VERT-TABS-1-DEFAULT-PB" "UICT-VERT-TABS-1-GA" :title "Set to Default" :x 0 :y 21 :width 12 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-1-COPY-FROM-PB" "UICT-VERT-TABS-1-GA" :title "Copy from ..." :x 12 :y 21 :width 12 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-1-COPY-TO-PB" "UICT-VERT-TABS-1-GA" :title "Copy to ..." :x 24 :y 21 :width 12 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-1-CLOSE-PB" "UICT-VERT-TABS-1-GA" :title "Close" :x 18 :y 23 :width 8 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-1-HELP-PB" "UICT-VERT-TABS-1-GA" :title "Help" :x 26 :y 23 :width 8 :height 2) (sd-create-togglebutton-control "UICT-VERT-TABS-1-PIN-TB" "UICT-VERT-TABS-1-GA" :x 34 :y 23 :width 2 :height 2 :title "Pin" :image "PinUpC-Image" :selectedImage "PinDownC-Image" :indicator :none) ;;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (defun tabXSelected (x) (format t "~%Tab ~S selected!" x)) (sd-create-tab-control "UICT-VERT-TABS-1-TC" "UICT-VERT-TABS-1-GA" :x 0 :y 0 :width 36 :height 20 :verticalTabs t :verticalTabSize 8 ;; fixed width: 8 grid units :tabChangedAction #'tabXSelected) (sd-insert-tab-control-page "UICT-VERT-TABS-1-PAGE-1-PA" "UICT-VERT-TABS-1-TC" :tabTitle "Page 1" :cellSize (sd-get-default-grid-size) :spacing 2 :margin 5) (sd-create-pushbutton-control "UICT-VERT-TABS-1-PAGE-1-PB" "UICT-VERT-TABS-1-PAGE-1-PA-TAB-GA" :x 0 :y 0 :width 8 :height 2 :title "Push") (sd-insert-tab-control-page "UICT-VERT-TABS-1-PAGE-2-PA" "UICT-VERT-TABS-1-TC" :tabTitle "Page Two" :cellSize (sd-get-default-grid-size) :spacing 2 :margin 5) (sd-create-togglebutton-control "UICT-VERT-TABS-1-PAGE-2-TB" "UICT-VERT-TABS-1-PAGE-2-PA-TAB-GA" :x 2 :y 2 :width 8 :height 2 :title "Toggle" :indicator :check) (sd-insert-tab-control-page "UICT-VERT-TABS-1-PAGE-3-PA" "UICT-VERT-TABS-1-TC" :tabTitle "Page three with long title" :cellSize (sd-get-default-grid-size) :spacing 2 :margin 5) (sd-create-togglebutton-control "UICT-VERT-TABS-1-PAGE-3-TB" "UICT-VERT-TABS-1-PAGE-3-PA-TAB-GA" :x 4 :y 4 :width 10 :height 2 :title "Radio" :indicator :radio) (sd-show-dialog-shell "UICT-VERT-TABS-1" :position '("No-Reference" :upperleft_client 0 0)) ;;----- Example 2: Variable width vertical tabs ------------------------------- (sd-create-dialog-shell "UICT-VERT-TABS-2" :title "UICT: Variable width vertical tabs" :bottomLine :none :closeAction '(sd-hide-dialog-shell "UICT-VERT-TABS-2") :okAction nil :cancelAction nil :margin 0) (sd-append-grid-area "UICT-VERT-TABS-2-GA" "UICT-VERT-TABS-2-AA" :margin 5 :cellSize (sd-get-default-grid-size) :spacing 1 :width 405 :height 285) (sd-create-pushbutton-control "UICT-VERT-TABS-2-DEFAULT-PB" "UICT-VERT-TABS-2-GA" :title "Set to Default" :x 0 :y 21 :width 12 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-2-COPY-FROM-PB" "UICT-VERT-TABS-2-GA" :title "Copy from ..." :x 12 :y 21 :width 12 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-2-COPY-TO-PB" "UICT-VERT-TABS-2-GA" :title "Copy to ..." :x 24 :y 21 :width 12 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-2-CLOSE-PB" "UICT-VERT-TABS-2-GA" :title "Close" :x 18 :y 23 :width 8 :height 2) (sd-create-pushbutton-control "UICT-VERT-TABS-2-HELP-PB" "UICT-VERT-TABS-2-GA" :title "Help" :x 26 :y 23 :width 8 :height 2) (sd-create-togglebutton-control "UICT-VERT-TABS-2-PIN-TB" "UICT-VERT-TABS-2-GA" :x 34 :y 23 :width 2 :height 2 :title "Pin" :image "PinUpC-Image" :selectedImage "PinDownC-Image" :indicator :none) ;;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (defun tabYSelected (y) (format t "~%Tab ~S selected!" y)) (sd-create-tab-control "UICT-VERT-TABS-2-TC" "UICT-VERT-TABS-2-GA" :x 0 :y 0 :width 36 :height 20 :verticalTabs t :verticalTabSize '(:stretch ("UICT-VERT-TABS-2-GA") ;; base grid area to make the whole ;; dialog shell resize :move ("UICT-VERT-TABS-2-CLOSE-PB" ;; maintain size, change x coordinates "UICT-VERT-TABS-2-HELP-PB" "UICT-VERT-TABS-2-PIN-TB") :spread (("UICT-VERT-TABS-2-DEFAULT-PB" ;; maintain relative positions "UICT-VERT-TABS-2-COPY-FROM-PB" "UICT-VERT-TABS-2-COPY-TO-PB"))) :tabChangedAction #'tabYSelected) (sd-insert-tab-control-page "UICT-VERT-TABS-2-PAGE-1-PA" "UICT-VERT-TABS-2-TC" :tabTitle "Page 1" :cellSize (sd-get-default-grid-size) :spacing 2 :margin 5) (sd-create-pushbutton-control "UICT-VERT-TABS-2-PAGE-1-PB" "UICT-VERT-TABS-2-PAGE-1-PA-TAB-GA" :x 0 :y 0 :width 8 :height 2 :title "Push") (sd-insert-tab-control-page "UICT-VERT-TABS-2-PAGE-2-PA" "UICT-VERT-TABS-2-TC" :tabTitle "Page Two" :cellSize (sd-get-default-grid-size) :spacing 2 :margin 5) (sd-create-togglebutton-control "UICT-VERT-TABS-2-PAGE-2-TB" "UICT-VERT-TABS-2-PAGE-2-PA-TAB-GA" :x 2 :y 2 :width 8 :height 2 :title "Toggle" :indicator :check) (sd-insert-tab-control-page "UICT-VERT-TABS-2-PAGE-3-PA" "UICT-VERT-TABS-2-TC" :tabTitle "Page three with long title" :cellSize (sd-get-default-grid-size) :spacing 2 :margin 5) (sd-create-togglebutton-control "UICT-VERT-TABS-2-PAGE-3-TB" "UICT-VERT-TABS-2-PAGE-3-PA-TAB-GA" :x 4 :y 4 :width 10 :height 2 :title "Radio" :indicator :radio) (sd-show-dialog-shell "UICT-VERT-TABS-2" :position '("No-Reference" :upperright_client 0 0)) ;