DynamicStylePalette¶
-
MLModule
¶ genre Visualization
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLBase
definition MLBase.def see also SoDiagram2D
,SoView2DMarkerEditor
,StylePalette
keywords Curve
,color
,line
,marker
,markerlist
,type
,user
,defined
,index
Purpose¶
The module DynamicStylePalette
provides a StylePalette with a adjustable number of style entries.
All style entries can be edited. The edited styles are persisted on saving the network where the module is in.
Usage¶
The dynamic style palette can be filled by three means:
- Attach an existing
StylePalette
orDynamicStylePalette
to copy the styles. - Use the GUI of the module to add new styles and to adjust their parameters.
- Use the field
stylesString
to set a generated string for all styles.
Details¶
The field stylesString
is the field interface to the internal style palette.
It reflects the styles and their parameters if the styles have been copied by an attached StylePalette or if the styles have been added via the GUI. Also, changing the string itself (interactively or by scripting) changes the output style palette and the list of styles on the module’s GUI.
The format of the styles string is as follows:
- Each style is a list of parameters described below and each style is separated from the next by a comma.
- The list of parameters for one style is:
- colorR colorG colorB lineStyle lineWidth markerType markerSize antiAlias name
- colorR, colorG, colorB: float values in [0,1]
- lineStyle: int in [0,3] (as None, Solid, Dashed, and Dotted)
- lineWidth: int
- markerType: int in [0,7] (as None, Dot, Asterisk, Circle, Square, Triangle, Plus, and Cross)
- markerSize: int
- antiAlias: int, with 0 = false, other = true
- name: string, can contain commas and spaces, but must not contain quotes or escape characters
- colorR colorG colorB lineStyle lineWidth markerType markerSize antiAlias name
Parameter Fields¶
Field Index¶
Auto apply parameters : Bool |
stylesString : String |
Auto read input StylePalette : Bool |
Update From Parameters : Trigger |
Enable Editing : Bool |
|
listViewString : String |
|
Num. Reserved Entries : Integer |
|
Num. Styles : Integer |
|
Read In Style Palette : Trigger |
|
StylePalette is valid : Bool |
Visible Fields¶
Update From Parameters¶
-
name:
updateFromParameters
, type:
Trigger
¶ If pressed, the list on the GUI and the output style palette are recomputed based on the
stylesString
.
Auto read input StylePalette¶
-
name:
autoReadInStylePalette
, type:
Bool
, default:
TRUE
¶ If checked, the
stylesString
and the output style palette are updated if the input StylePalette changes.
Auto apply parameters¶
-
name:
autoApply
, type:
Bool
, default:
TRUE
¶ If checked, the module updates the
stylesString
, the GUI, and the output StylePalette on changing theNum. Styles
.
Read In Style Palette¶
-
name:
readInStylePalette
, type:
Trigger
¶ If pressed, the attached StylePalette is read in anew, leading to an update of the
stylesString
, the GUI, and the output StylePalette.
StylePalette is valid¶
-
name:
stylePaletteValid
, type:
Bool
, persistent:
no
¶ Shows whether the output StylePalette is valid.