|
(sd-create-dialog-shell basename
:title title
:pin pin-flag
:pinType pin-type
:close close-flag
:bottomLine :bottom-line
:closeAction close-action
:okAction ok-action
:cancelAction cancel-action
:helpAction help-action
:margin margin)
(sd-create-dialog-shell "UICT-TEST"
:title "UICT Test"
:bottomLine :help)
(sd-create-resizable-dialog-shell basename
:title title
:closeAction close-action
:margin margin
:spacing spacing
:cellSize cell-size
:width width
:height height)
(sd-create-resizable-dialog-shell "RESIZABLE-DLG-SHELL"
:title "Resizable Dialog Shell"
:width 300
:height 300
:spacing 0
:cellSize 10,11)
(sd-append-area name
parent
:title title
:frame frame-flag
:margin margin)
(sd-append-area "UICT-TEST-1-AA" "UICT-TEST-AA"
:frame t
:title "Area 1"
:margin 5)
(sd-append-grid-area name
parent
:title title
:frame frame-flag
:width width
:height height
:cellSize cell-size
:margin margin
:spacing spacing)
(sd-append-grid-area "UICT-TEST-11-GA" "UICT-TEST-1-AA"
:frame t
:title "Grid Area 11"
:width 120
:height 70
:cellSize 12,12)
(sd-append-newline parent)
(sd-append-grid-area "UICT-TEST-11-GA" "UICT-TEST-1-AA"
:frame t
:title "Grid Area 11"
:width 120
:height 70
:cellSize 12,12)
(sd-append-newline "UICT-TEST-1-AA")
(sd-append-grid-area "UICT-TEST-12-GA" "UICT-TEST-1-AA"
:frame t
:title "Grid Area 12"
:spacing 1
:margin 4
:cellSize 10,12
:width 130
:height 150)
(sd-create-grid-area name
parent
:title title
:frame frame-flag
:x x-coordinate
:y y-coordinate
:width width
:height height
:cellSize cell-size
:margin margin
:spacing spacing)
(sd-create-grid-area "UICT-TEST-21-GA" "UICT-TEST-2-GA"
:title "Grid 21"
:frame t
:x 0
:y 4
:cellSize 9,8
:margin 5
:spacing 2
:width 10
:height 6)
(sd-create-scrolled-grid-area name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:gridWidth grid-width
:gridHeight grid-height
:cellSize cell-size
:margin margin
:spacing spacing)
(sd-create-scrolled-grid-area "UICT-TEST-41-GA" "UICT-TEST-4-GA"
:x 0
:y 11
:width 17
:height 8
:gridWidth 20
:gridHeight 16
:margin 3
:cellSize 12,12
:spacing 2)
(sd-create-resizable-grid-area name parent
:title title
:frame frame-flag
:x x-coordinate
:y y-coordinate
:width width
:height height
:cellSize cell-size
:margin margin
:spacing spacing)
Only a resizable grid area itself can be the parent of a resizable grid area. This implies that only resizable dialog shells can host resizable grid areas in their widget tree.
(sd-create-resizable-grid-area "RESIZABLE-GRID-AREA-RG" "PARENT-RG"
:title "Resizable Grid Area"
:frame t
:margin 5
:spacing 2
:cellSize 12,12
:width 100
:height 50
:x 0
:y 0)
(oli:sd-set-control-binding "RESIZABLE-GRID-AREA-RG" '(:resize-both))
(sd-create-splitter-control name parent
:horizontal horizontal-p
:x x-coordinate
:y y-coordinate
:width width
:height height
:cellSize cell-size
:margin margin
:spacing spacing)
A child control of the panes needs to define a binding relative to its parent in order to adjust its size and position accordingly.
Only a resizable grid area itself can be the parent of a splitter control. This implies that only resizable dialog shells can host splitter controls in their widget tree.
(sd-create-splitter-control
"SPLITTER-CONTROL-SP"
"SPLITTER-DIALOG-RG"
:horizontal t
:margin 0
:x 0
:y 0
:width 400
:height 300
:cellSize 1,1
:spacing 0)
(oli:sd-set-control-binding "SPLITTER-CONTROL-SP" '(:resize-both))
(sd-create-tab-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:verticalTabs vertical-tabs-flag
:verticalTabSize vertical-tab-size
:tabChangedAction tab-changed-action)
'(:move {List of controls to be moved}
:stretch {List of controls to be stretched}
:spread {List of {List of controls that spread}})
Notes:
See the example below for further clarification.
(sd-create-tab-control "UICT-TEST-51-TC" "UICT-TEST-5-GA"
:x 0
:y 0
:width 20
:height 12)
Vertical Tabs Example
(sd-insert-tab-control-page name
parent
:tabTitle tab-title
:title title
:frame frame-flag
:cellSize cell-size
:margin margin
:spacing spacing)
'name'-TAB-GAUse this name as parent for all controls which should become children of this tab control page.
(sd-insert-tab-control-page "UICT-TEST-51-PAGE2" "UICT-TEST-51-TC"
:tabTitle "Page 2 with Frame"
:frame t
:title "Title"
:cellSize 10,10
:spacing 2
:margin 2)
(sd-create-togglebutton-control "UICT-TEST-51-PAGE2-1-TB" "UICT-TEST-51-PAGE2-TAB-GA"
:x 0
:y 0
:width 8
:height 2
:indicator :check
:title "Button 1"
:pushAction ":button1_of_page2")
Vertical Tabs Example
(sd-create-pushbutton-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:pushAction push-action
:title title
:alignment title-alignment
:image image
:disabledImage disabled-image)
(sd-create-pushbutton-control "UICT-TEST-122-PB" "UICT-TEST-12-GA"
:x 10
:y 0
:width 10
:height 2
:title "Test 122"
:pushAction '(format t "~%Test 122 pushed"))
(sd-create-togglebutton-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:indicator indicator-type
:pushAction push-action
:releaseAction release-action
:title title
:alignment title-alignment
:image image
:disabledImage disabled-image
:selectedImage selected-image
:disabledSelectedImage disabled-selected-image)
(sd-create-togglebutton-control "UICT-TEST-111-TB" "UICT-TEST-11-GA"
:title "Toggle 111"
:x 0
:y 0
:width 10
:height 2
:indicator :check
:pushAction '(format t "~%Toggle 111 pushed")
:releaseAction '(format t "~%Toggle 111 released"))
(sd-create-colorbutton-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:displayOnly display-only-flag
:pushAction push-action)
(sd-create-colorbutton-control "UICT-TEST-128-CB" "UICT-TEST-12-GA"
:x 20
:y 0
:width 6
:height 2
:displayOnly t)
(sd-create-separator-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height)
(sd-create-separator-control "UICT-TEST-51-PAGE1-1-SE"
"UICT-TEST-51-PAGE1-TAB-GA"
:x 0
:y 2
:width 18
:height 1)
(sd-create-label-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:title title
:alignment title-alignment
:image image)
(sd-create-label-control "UICT-TEST-112-LB" "UICT-TEST-11-GA"
:title "Label 112"
:x 0
:y 2
:width 8
:height 2
:alignment :left)
(sd-create-text-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:editable editable-flag
:multiline multiline-flag
:autoWrap auto-wrap-flag
:showModified show-modified-flag
:enterAction enter-action
:setFocusAction set-focus-action
:modifyAction modify-action
:killFocusAction kill-focus-action
:range range-list
:autoAdd auto-add-flag
:enterActionAfterRangeSelection
enter-action-after-range-selection-flag
:maxRangeCount max-range-count
:maxVisibleRangeCount max-visible-range-count)
(sd-create-text-control "UICT-TEST-125-TX" "UICT-TEST-12-GA"
:x 0
:y 4
:width 20
:height 5
:editable t
:showModified nil
:autoWrap nil
:multiline t)
(sd-create-range-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:alignment item-alignment
:range range-list
:selectionAction selection-action)
(defun range-test-26-callback (value)
(format t "~%Range UICT-TEST-26-RA callback value: ~S Type: ~S"
value
(type-of value)))
(sd-create-range-control "UICT-TEST-26-RA" "UICT-TEST-2-GA"
:x 10
:y 8
:width 10
:height 2
:alignment :center
:selectionAction 'range-test-26-callback
:range '("A"
(:b :title "Beta")
(0xff :color "#ff0000" :title "Red")
3
("D" :image "Error-Icon")
(5 :title "Fifth item")))
(sd-create-list-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:itemHeight item-height
:alignment item-alignment
:selectionMode selection-mode
:items item-list
:selectionAction selection-action
:doubleClickAction double-click-action)
(sd-create-list-control "UICT-TEST-31-LI" "UICT-TEST-3-GA"
:x 0
:y 0
:width 10
:height 8
:selectionAction '(progn
(format t "~%Single selection callback")
(format t "~% Selected items: ~S"
(sd-get-list-control-selected-items
"UICT-TEST-31-LI")))
:doubleClickAction '(format t "~%Double selection callback")
:selectionMode :multiple
:items '("Item 1" "Item No. 2" 3 4 :item_5 "Item 6"))
(sd-create-display-table-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:logicalTable logical-table
:columns column-keywords
:entryAlignment entry-alignment
:formatFunctions format-functions
:selectionAction selection-action
:applyColumns apply-columns
:keyColumnsApplyToken apply-token
:keyColumnsApplyUnits apply-units
:selectionMode selection-mode
:applyAction apply-action
:doubleClickAction double-click-action
:afterEditAction after-edit-action
:editCellCheckFunction check-function)
(sd-create-logical-table
"Example-Table"
:columns '(:first :second :third :untyped :fifth :sixth)
:columnNames '("String" "Angle" "Length" nil "Mass" "Number")
:keyColumns '(:second :third)
:secured nil
:types '(:string :angle :length nil :mass :number)
:units '(nil :deg :mm nil :kg nil)
:contents '(("Eric" (17.2 :deg) (2 :inch) :test105 (42 :kg) 000)
("Alf" 0.57 22.4 :bla 23.6 111)
("Willie" 1.673 (143.85 :mm) "Eric" 62.3 222)
("Lynn" (33.33 :deg) (0.5 :km) 105 (17.5 :kg) 333)
("Kate" 2.222 (422.2 :mm) 'hugo (23.5 :mg) 444)
("Brian" 3.1415 65.5 15 345.85 555)
("Jake" 1.2354 (15.6 :mm) :foo 42.5 666)
("Raquel" 0.03745 (99.89 :mm) :zip 234.645 777)
("Bill" 0.8765 (126 :mm) :bar 0.42 888)))
(defun example-table-selection-action (table)
(format t "~%Row selected in table ~S." table))
(sd-create-display-table-control "UICT-TEST-41-DT" "UICT-TEST-4-GA"
:x 0
:y 0
:width 27
:height 11
:logicalTable "Example-Table"
:columns '(:first :second :third :fifth :sixth)
:entryAlignment '(:left :right :right :right :left)
:formatFunctions '(nil sd-display-table-format-3-digits nil)
:applyColumns '(:first :third)
:applyAction :default-tokens
:keyColumnsApplyToken :keyValues
:selectionMode :single-row
:selectionAction 'example-table-selection-action)
(sd-create-slider-control name
parent
:x x-coordinate
:y y-coordinate
:width width
:height height
:minValue min-value
:maxValue max-value
:increment increment
:decimalPoints decimal-points
:orientation orientation
:showValue show-value-flag
:minLeftTop min-left-top-flag
:dragAction drag-action
:valueChangedAction change-action)
(sd-create-slider-control "UICT-TEST-34-SL" "UICT-TEST-3-GA"
:x 18
:y 0
:width 4
:height 8
:minValue 0
:maxValue 50
:increment 5
:decimalPoints 0
:orientation :vertical
:showValue t
:minLeftTop t
:dragAction '(format t "~%Slider drag callback")
:valueChangedAction '(format t "~%Slider value changed callback"))
(sd-create-context-menu name
parent
:title title
:contents contents-list)
(:togglebutton :title title
:indicator [either :check (default) or :radio]
:pushAction push-action
:releaseAction release-action)
(:togglebutton :image image
:selectedImage selected-image
:indicator [either :check (default) or :radio]
:pushAction push-action
:releaseAction release-action)
(sd-create-context-menu "UICT-TEST-33-CX" "UICT-TEST-33-PB"
:title "Test Popup"
:contents
'((:pushbutton :title "First Item"
:pushAction (format t "~%Context item 1 pushed"))
(:pushbutton :title "Call Extrude"
:pushAction "extrude")
(:separator)
(:togglebutton :title "Toggle Me"
:indicator :radio
:pushAction (format t "~%Context toggle pushed")
:releaseAction (format t "~%Context toggle released"))
(:submenu :title "Submenu"
:contents ((:pushbutton :title "Rectangle"
:pushAction "rectangle")
(:pushbutton :image "Error-Icon"
:pushAction (sd-display-error "Hi"))
(:submenu :title "Dummy Sub"
:contents ((:pushbutton)
(:separator)
(:togglebutton)))
(:togglebutton :image "Option-Unpinned"
:selectedImage "Option-Pinned"
:pushAction ":on"
:releaseAction ":off")))))
(sd-create-viewport-control name parent
:x x-coordinate
:y y-coordinate
:width width
:height height)
Only a resizable grid area can be the parent of a viewport control. The binding for the viewport control is preset to adjust size and position according to the parent grid area in both directions.
Once the viewport control has been created, the hosted 3D viewport can be accessed using most of the standard Viewport commands and name as name of the viewport. Only the commands to inquire and set window size and visibility are not supported because these propreties are controled by the UI viewport control.
(sd-create-viewport-control "VIEWPORT-CONTROL" "PARENT-RG" :width 100 :height 50 :x 0 :y 0)
|
| © 2026 Parametric
Technology GmbH (a subsidiary of PTC Inc.), All Rights Reserved |