User Interface Construction Toolkit - Other UI related Utility
Functions
SD-CALCULATE-TEXT-SIZE [function]
(sd-calculate-text-size text :width width
:multiline-edit-p multiline-edit-p)
- Description:
-
Returns the size needed to completely display text. Lines will be
automatically broken between words if a word would extend past the given
width.
- Parameters:
-
- text {STRING} - Text to be analyzed.
- :width {NUMBER} - If given this parameter defines the
maximum available width in pixels. If this parameter is omitted the
lines are only broken at line ending characters.
- :multiline-edit-p {BOOLEAN [nil]]} - Text size depends on
the font used to render a control's contents. The font applied to
editable multiline text controls may differ from the font used for all
other UICT controls. Thus a caller of sd-calculate-text-size
needs to provide this information through this parameter.
- Return Value:
-
- plist - Width and height in pixels needed to fit the
text.
- Example:
-
(let ((sz (sd-calculate-text-size (format nil "Text of two lines") :width 50)))
(sd-set-control-geometry "MY-CONTROL" :height (getf sz :height)))
SD-DUMP-CONTROL-TREE [function]
(sd-dump-control-tree :filename filename
:rootControl root-control)
- Description:
-
Prints the parent - child hierarchy of a control tree starting at
rootControl to a file.
The short name of the control is displayed in angled brackets adjacent
to the full name of the control where a short name is present.
- Parameters:
-
- :filename {STRING} - The filename to write the tree to
- :rootControl {STRING} - Name of a parent control (dialog
shell or (grid) area). If this is not specified then all currently
existing dialogs will be detailed in the output.
- Return Value:
-
- t - success
- nil - failure
- Example:
-
(sd-dump-control-tree :filename "c:/temp/tree.out" :rootControl "MACHINING_SETTINGS-DS")
=>
MACHINING_SETTINGS-DS
MACHINING_SETTINGS-FO
MACH-SETT-OPT-CONT-FO
MACH-SETT-OPT-CONT-KEEP-WP-TB
MACH-SETT-OPT-CONT-KEEP-PROFILE-TB
MACH-SETT-OPT-CONT-KEEP-TOOL-TB
MACH-SETT-OPT-CONT-KEEP-CORE-TB
MACH-SETT-OPT-CONT-CHECK-AND-FIX-TB
MACHINING_SETTINGS-FEEDBACK-SUBTITLE-FR
MACHINING_SETTINGS-FEEDBACK-SUBTITLE-LB
MACH-FEEDBACK-SETT-OPT-CONT-FO
MACH-FEEDBACK-SETT-OPT-CONT-STYLE-TB
MACH-FEEDBACK-SETT-OPT-CONT-STYLE-OM
MACH-FEEDBACK-SETT-OPT-CONT-STYLE-OM-WIRE-PB
MACH-FEEDBACK-SETT-OPT-CONT-STYLE-OM-SHADED-PB
MACH-FEEDBACK-SETT-OPT-CONT-TRANSPARENCY-TB
MACHINING_SETTINGS-BL-FO
MACHINING_SETTINGS-BL-COMPLETE-PB
MACHINING_SETTINGS-BL-CANCEL-PB
MACHINING_SETTINGS-BL-HELP-PB
MACHINING_SETTINGS-BL-PIN-TB
SD-GET-DEFAULT-CONTROL-HEIGHT [function]
(sd-get-default-control-height)
- Description:
-
Returns default control height in pixels.
Note: Don't apply the return value directly to a grid control
whose parent grid area defines a grid that is not equal to nx1 pixel(s).
The value n is a number equal or greater 1.
- Return Value:
-
- number - The current default control height.
- Example:
-
(sd-get-default-control-height)
=> 21
SD-GET-DEFAULT-DIALOG-CLIENT-AREA-WIDTH [function]
(sd-get-default-dialog-client-area-width)
- Description:
-
Returns the default width in pixels of the client area of a dialog shell
created by means of sd-defdialog.
Note: Don't apply the return value directly to a grid control
whose parent grid area defines a grid that is not equal to nx1 pixel(s).
The value n is a number equal or greater 1.
- Return Value:
-
- number - Width of client area.
- Example:
-
(sd-get-default-dialog-client-area-width)
=> 145
SD-GET-DEFAULT-GRID-SIZE [function]
(sd-get-default-grid-size)
- Description:
-
Returns a 2D vector of the default grid size to be used as cell size
when creating a grid area.
See sd-append-grid-area, sd-create-grid-area and
:cellSize for more information.
- Return Value:
-
- 2D vector - The default cell size of a grid area.
- Example:
-
(sd-get-default-grid-size)
=> 11.0,11.0
© 2023 Parametric
Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved |