#| Fluent_UI Note: This is an example file showing concepts of the Integration Kit. The code itself is not supported and will never be supported. |# (in-package :examples) (use-package :oli) ;; ----- Example Tab ---------------------------------------------------------- ;; create a new ribbon tab (oli::sd-fluentui-add-ribbon-tab "EXAMPLETAB" :application "All" :title "Example Tab" ) ;; ----- Example Group 1 ------------------------------------------------------ ;; create a ribbon group in the ribbon tab (oli::sd-fluentui-add-ribbon-group "EXAMPLEGROUP1" :parent "EXAMPLETAB" :title "Example Group1" ) ;; add ribbon buttons to the ribbon group ;; large button (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP1") :largeImage t :availCmd '("SolidDesigner" "Part and Assy" "New Part") ) ;; small button (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP1") :availCmd '("SolidDesigner" "Part and Assy" "Copy Part/Assy") ) ;; overwrite label defined in available command (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP1") :label "Share" :availCmd '("SolidDesigner" "Part and Assy" "Share Part/Assy") ) ;; separator (oli::sd-fluentui-add-ribbon-separator :parent '("EXAMPLETAB" "EXAMPLEGROUP1") ) ;; ribbon button menu (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP1") :image "All/Miscellaneous/more_cmds" :label "Menu Button" :contents `( (:label "Assembly" :availCmd ("SolidDesigner" "Part and Assy" "New Assembly")) (:label "Container" :availCmd ("SolidDesigner" "Part and Assy" "New Container")) )) ;; same button like before, defined as split button ;; -> shown icon is taken from last called command (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP1") :splitButton t :largeImage t :label "Split Button Large" :contents `( (:label "Assembly" :availCmd ("SolidDesigner" "Part and Assy" "New Assembly")) (:label "Container" :availCmd ("SolidDesigner" "Part and Assy" "New Container")) )) (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP1") :splitButton t :label "Split Button Small" :contents `( (:availCmd ("SolidDesigner" "Part and Assy" "Sel Unshare")) (:availCmd ("SolidDesigner" "Part and Assy" "Sel Reshare")) )) ;; contents of menu (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP1") :image "All/Miscellaneous/more_cmds" :label "Menu Contents" :contents `( (:label "Title") (:label "Owner" :availCmd ("SolidDesigner" "Part and Assy" "Modify Part/Assy Owner")) (:label "Rename" :availCmd ("SolidDesigner" "Part and Assy" "Rename Part/Assy")) (:separator t) (:availCmd ("SolidDesigner" "Modify 3D" "Scale")) (:label "Cascading Menu") (:label "WP" :image "SolidDesigner/Workplane/wp_new" :contents ( (:availCmd ("SolidDesigner" "Workplane" "Copy WP")) (:label "Sub Title") (:label "Share" :availCmd ("SolidDesigner" "Workplane" "Share WP")) ) ) ) ) ;; ----- Example Group 2 ------------------------------------------------------ (oli::sd-fluentui-add-ribbon-group "EXAMPLEGROUP2" :parent "EXAMPLETAB" :title "Example Group2" ) ;; create ribbon button with menu (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP2") :name "EXAMPLEBUTTON" :label "Modify Menu" :contents `( (:label "Initial Title") (:label "Initial Command" :availCmd ("SolidDesigner" "Part and Assy" "Modify Part/Assy Owner")) ) ) ;; add separator in the existing ribbon button menu (oli::sd-fluentui-add-ribbon-separator :parent '("EXAMPLETAB" "EXAMPLEGROUP2" "EXAMPLEBUTTON") :label "Added Separator" ) ;; add a ribbon button in the existing ribbon button menu (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP2" "EXAMPLEBUTTON") :label "Added Button Rename" :availCmd '("SolidDesigner" "Part and Assy" "Rename Part/Assy") ) (oli::sd-fluentui-add-ribbon-separator :parent '("EXAMPLETAB" "EXAMPLEGROUP2" "EXAMPLEBUTTON") ) (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP2" "EXAMPLEBUTTON") :label "Added Button Position" :availCmd '("SolidDesigner" "Part and Assy" "Position Dynamic") ) ;; ----- Example Group 3 ------------------------------------------------------ (oli::sd-fluentui-add-ribbon-group "EXAMPLEGROUP3" :parent "EXAMPLETAB" :title "Example Group3" ) ;; large icon, no text (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP3") :largeImage t :label "" :availCmd '("SolidDesigner" "Part and Assy" "New Part") ) ;; small icon, no text (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP3") :label "" :availCmd '("SolidDesigner" "Part and Assy" "New Assembly") ) (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP3") :label "" :availCmd '("SolidDesigner" "Part and Assy" "New Container") ) (oli::sd-fluentui-add-ribbon-button :parent '("EXAMPLETAB" "EXAMPLEGROUP3") :label "" :availCmd '("SolidDesigner" "Workplane" "New WP") ) ;;