[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]

Fluent UI Status Bar

Fluent UI Introduction

sd-fluentui-add-statusbar-button
sd-fluentui-add-statusbar-edit
sd-fluentui-add-statusbar-combobox
sd-fluentui-add-statusbar-separator
sd-fluentui-destroy-statusbar-control
sd-fluentui-show-statusbar-control
sd-fluentui-statusbar-control-exists-p
sd-fluentui-recalc-statusbar-layout

Utilities

Function Index Top of Page

Introduction

As already mentioned in the Fluent UI Introduction the status bar is part of the Fluent UI. In Creo Elements/Direct Modeling there exist two different instances of the status bar: One for base modeler along with all applications and modules and one which is available in Creo Elements/Direct Annotation. This means that for Creo Elements/Direct Annotation all status bar controls must be defined in parallel to everything which is done for Creo Elements/Direct Modeling and the other applications and modules. It also means that for any creation of a status bar element it must be specified, in which of the two status bar instances it should be created.

To define the contents of the status bar available commands need to be defined. Read more about the concept of available commands. Every control action is defined via a single available command. The command definition comes along with a title label, description, icon and enable status. All these informations are used to define a status bar control but can be overwritten. This way for instance a label can be changed compared to the existing title in the available command.

Note: To make use of the available commands the available commands files must be loaded before the status bar contents are defined. Otherwise the available commands are unknown and the control action will be empty. Read more on loading customization files here.

In addition to a control's enable state the selected item of range controls and the edit text of edit controls is controlled via properties of available commands. There are some utility functions that allow to modify these properties if you want for example set the selected item of a range control.

Function Index Top of Page

SD-FLUENTUI-ADD-STATUSBAR-BUTTON  [function]

(sd-fluentui-add-statusbar-button :annotationRibbon annotationRibbon
                                  :name name
                                  :availCmd availCmd
                                  :label label
                                  :image image
                                  :description description
                                  :position position)
Description:
Adds a new button to the status bar.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Adds the button to the Modeling or Annotation status bar. Read here for more information.
:name {STRING}
Name of the button that can be referenced by a call to sd-fluentui-destroy-statusbar-control.
:availCmd {List of three STRINGs}
If an available command is given then it must be an existing command and can be specified via a list of "Application" "Group" "Command". Read more about the definition of available commands here.
If an available command is specified, almost all other options are derived from it. But more options, such as a label, can be specified to override the command's properties.
:label {STRING}
Button label string. If not specified, label from availCmd is used.
:image {STRING}
Image file name. If not given, image from availCmd is used.
:description {STRING}
A descriptive text of the button action or menu contents. If not specified, the description from the availCmd is used.
:position {KEYWORD [:end]}
Specify the position where to insert the button. This can be either:
  • :beginning - Insert the button at the beginning of the ribbon.
  • :end - Insert the button at the end of the ribbon.

Return Value:
t - success
nil - failure

Example:
(sd-fluentui-add-statusbar-button 
  :availCmd '("SolidDesigner" "Part and Assy" "Copy Part/Assy")
  )

Function Index Top of Page

SD-FLUENTUI-ADD-STATUSBAR-EDIT  [function]

(sd-fluentui-add-statusbar-edit :annotationRibbon annotationRibbon
                                :name name
                                :availCmd availCmd
                                :label label
                                :description description
                                :position position
                                :readOnly readOnly)
Description:
Adds a new edit control to the status bar.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Adds the control to the Modeling or Annotation status bar. Read here for more information.
:name {STRING}
Name of the edit control that can be referenced by a call to sd-fluentui-destroy-statusbar-control.
:availCmd {List of three STRINGs}
If an available command is given then it must be an existing command and can be specified via a list of "Application" "Group" "Command". Read more about the definition of available commands here.
If an available command is specified, almost all other options are derived from it. But more options, such as a label, can be specified to override the command's properties.
:label {STRING}
Edit control label string. If not specified, label from availCmd is used.
:description {STRING}
A descriptive text of the edit control contents. If not specified, the description from the availCmd is used.
:position {KEYWORD [:end]}
Specify the position where to insert the edit control. This can be either:
  • :beginning - Insert the control at the beginning of the ribbon.
  • :end - Insert the control at the end of the ribbon.
:readOnly {BOOLEAN [nil]}
When t the contents of the edit control cannot be modified by the user.

Return Value:
t - success
nil - failure
Note:
Use sd-fluentui-set-edit-text to set the contents of an edit control. When the user modifies the contents of the edit control, the action of the associated command is executed together with the contents of the edit control. In the example mentioned below the action of the command is to process the string "current_part". When the user types in "/p2" as a path specification into the edit control, the string "current_part "/p2"" is processed by the command system.
Also the function sd-fluentui-get-edit-text can be used to inquire the current contents of an edit control.

Example:
(sd-fluentui-add-statusbar-edit 
  :availCmd '("SolidDesigner" "Part and Assy" "Set Active Part")
  )

Function Index Top of Page

SD-FLUENTUI-ADD-STATUSBAR-COMBOBOX  [function]

(sd-fluentui-add-statusbar-combobox :annotationRibbon annotationRibbon
                                    :name name
                                    :availCmd availCmd
                                    :label label
                                    :description description
                                    :position position)
Description:
Adds a new combobox control to the status bar.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Adds the control to the Modeling or Annotation status bar. Read here for more information.
:name {STRING}
Name of the control that can be referenced by a call to sd-fluentui-destroy-statusbar-control.
:availCmd {List of three STRINGs}
If an available command is given then it must be an existing command and can be specified via a list of "Application" "Group" "Command". Read more about the definition of available commands here.
If an available command is specified, almost all other options are derived from it. But more options, such as a label, can be specified to override the command's properties.
:label {STRING}
Combobox control label string. If not specified, label from availCmd is used.
:description {STRING}
A descriptive text of the combobox contents. If not specified, the description from the availCmd is used.
:position {KEYWORD [:end]}
Specify the position where to insert the combobox control. This can be either:
  • :beginning - Insert the control at the beginning of the ribbon.
  • :end - Insert the control at the end of the ribbon.

Return Value:
t - success
nil - failure
Note:
The items which are displayed when the combobox is expanded, are specified via the :range option of the available command associated with the control.
Use sd-fluentui-set-combobox-selected-item to select one of the items in the combobox. When the user selects an item of the combobox control, the action of the selected item is executed as specified in the :range option of the associated command.

Example:
(sd-fluentui-add-statusbar-edit :name "PRESELECT"
  :availCmd '("SolidDesigner" "Select" "Preselection")
  )

Function Index Top of Page

SD-FLUENTUI-ADD-STATUSBAR-SEPARATOR  [function]

(sd-fluentui-add-statusbar-separator :annotationRibbon annotationRibbon)
Description:
Adds a separator to the status bar.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Adds the button to the Modeling or Annotation status bar. Read here for more information.

Return Value:
t - success
nil - failure

Example:
(sd-fluentui-add-statusbar-separator) 

Function Index Top of Page

SD-FLUENTUI-DESTROY-STATUSBAR-CONTROL  [function]

(sd-fluentui-destroy-statusbar-control :annotationRibbon annotationRibbon
                                       :name name)
Description:
Destroys a status bar control.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Destroys the control from the Modeling or Annotation status bar. Read here for more information.
:name {STRING}
Name of the control.

Return Value:
t - success
nil - failure

Example:
(sd-fluentui-destroy-statusbar-control :name "PRESELECT")

Function Index Top of Page

SD-FLUENTUI-SHOW-STATUSBAR-CONTROL  [function]

(sd-fluentui-show-statusbar-control :annotationRibbon annotationRibbon
                                    :name name
                                    :show show)
Description:
Shows or hides a status bar control.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Shows or hides the control in the Modeling or Annotation status bar. Read here for more information.
:name {STRING}
Name of the control.
:show {BOOLEAN [t]}
Specifies if the control is to be shown or hidden.

Return Value:
t - success
nil - failure

Example:
(sd-fluentui-show-statusbar-control :name "PRESELECT" :show nil)

Function Index Top of Page

SD-FLUENTUI-STATUSBAR-CONTROL-EXISTS-P  [function]

(sd-fluentui-statusbar-control-exists-p :annotationRibbon annotationRibbon
                                        :name name)
Description:
Inquires the existence of a statusbar control.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Inquires the existence of the control from the Modeling or Annotation status bar. Read here for more information.
:name {STRING}
Name of the control.

Return Value:
t - the control exists
nil - the control does NOT exist

Example:
(unless (sd-fluentui-statusbar-control-exists-p :name "PRESELECT")
  ...
  )

Function Index Top of Page

SD-FLUENTUI-RECALC-STATUSBAR-LAYOUT  [function]

(sd-fluentui-recalc-statusbar-layout :annotationRibbon annotationRibbon)
Description:
Updates the status bar layout. To ensure a good performance when adding components to the status bar the status bar layout is not updated automatically. So, it is good practise to call sd-fluentui-recalc-statusbar-layout when the status bar modification is finished.

Parameters:
:annotationRibbon {BOOLEAN [nil]}
Updates the layout of the Modeling or Annotation status bar. Read here for more information.

Return Value:
t - success
nil - failure

Example:
(sd-fluentui-recalc-statusbar-layout)
[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2019 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved