Purpose

The module StylePalette defines of a number of appearance settings to be used in the display of curves in a diagram or related objects.

The StylePalette defines twelve styles, numbered 1 to 12, each consisting of a color, a line style and width, a marker type and size, an anti-aliasing flag and a name. A module making use of the style palette definitions can obtain these definitions referenced by their indices. This is especially useful for cases where a number of similar objects have to be displayed (e.g. a number of curves in a diagram) and where their color or style should be chosen automatically from a selection of possible styles.

Usage

To let a module make use of a certain StylePalette, its style palette input has to be connected to the the output of the StylePalette module. Several modules can be connected to the same StylePalette module, thus using the same style definitions.

Only modules with a style palette input field (e.g. SoDiagram2D, SoView2DMarkerEditor) can make use of the StylePalette module.

Windows

Default Panel

../../../Modules/ML/MLBase/mhelp/Images/Screenshots/StylePalette._default.png

Input Fields

If a second StylePalette module is connected this field, its style definitions (including the number of reserved entries) are copied to this module. This is useful if a second Current Style display is needed for a single set of defined styles.

inStylePalette

name: inStylePalette, type: StylePalette(MLBase)

Output Fields

This field gives access to the style palette defined by this module.

outStylePalette

name: outStylePalette, type: StylePalette(MLBase), deprecated name: outputStylePalette

Parameter Fields

Field Index

antiAlias1: Bool currentName: String markerSize4: Integer
antiAlias10: Bool dump: Trigger markerSize5: Integer
antiAlias11: Bool lineStyle1: Enum markerSize6: Integer
antiAlias12: Bool lineStyle10: Enum markerSize7: Integer
antiAlias2: Bool lineStyle11: Enum markerSize8: Integer
antiAlias3: Bool lineStyle12: Enum markerSize9: Integer
antiAlias4: Bool lineStyle2: Enum markerType1: Enum
antiAlias5: Bool lineStyle3: Enum markerType10: Enum
antiAlias6: Bool lineStyle4: Enum markerType11: Enum
antiAlias7: Bool lineStyle5: Enum markerType12: Enum
antiAlias8: Bool lineStyle6: Enum markerType2: Enum
antiAlias9: Bool lineStyle7: Enum markerType3: Enum
Color Defaults: Trigger lineStyle8: Enum markerType4: Enum
color1: Color lineStyle9: Enum markerType5: Enum
color10: Color lineWidth1: Integer markerType6: Enum
color11: Color lineWidth10: Integer markerType7: Enum
color12: Color lineWidth11: Integer markerType8: Enum
color2: Color lineWidth12: Integer markerType9: Enum
color3: Color lineWidth2: Integer Mono Defaults: Trigger
color4: Color lineWidth3: Integer name1: String
color5: Color lineWidth4: Integer name10: String
color6: Color lineWidth5: Integer name11: String
color7: Color lineWidth6: Integer name12: String
color8: Color lineWidth7: Integer name2: String
color9: Color lineWidth8: Integer name3: String
Current Style: Integer lineWidth9: Integer name4: String
currentAntiAlias: Bool markerSize1: Integer name5: String
currentColor: Color markerSize10: Integer name6: String
currentLineStyle: Enum markerSize11: Integer name7: String
currentLineWidth: Integer markerSize12: Integer name8: String
currentMarkerSize: Integer markerSize2: Integer name9: String
currentMarkerType: Enum markerSize3: Integer Reserved Entries: Integer

Visible Fields

Current Style

name: currentStyle, type: Integer, default: 0, minimum: 0, maximum: 12, deprecated name: CurrentStyleIndex

Sets the entry number of an item whose properties are shown in the fields currentAntiAlias, currentColor, currentLineStyle, currentLineWidth, currentMarkerSize, currentMarkerType, currentName, and Current Style.

Reserved Entries

name: reservedEntries, type: Integer, default: 0, minimum: 0, maximum: 12, deprecated name: Reserved

Modules displaying a series of objects typically use automatic style assignment, i.e. the styles are assigned to these objects one by one.

In addition to this automatic assignment, it is sometimes desired to display an object in some fixed style. For these cases, a number of entries from the upper end of the palette can be reserved for non-automatical style assignment, by setting the Reserved Entries field to a number greater than 1. Reserved styles are not used for automatic assignment.

Color Defaults

name: colorDefaults, type: Trigger

If pressed, all styles are reset to their defaults.

Mono Defaults

name: monoDefaults, type: Trigger

If pressed, all colors are set to white.

Hidden Fields

color1

name: color1, type: Color, default: 1 1 0

color2

name: color2, type: Color, default: 1 0 0

color3

name: color3, type: Color, default: 0 0 1

color4

name: color4, type: Color, default: 0 1 0

color5

name: color5, type: Color, default: 1 0.5 0

color6

name: color6, type: Color, default: 1 0 1

color7

name: color7, type: Color, default: 0 1 1

color8

name: color8, type: Color, default: 0.5 1 0.5

color9

name: color9, type: Color, default: 1 0 0.5

color10

name: color10, type: Color, default: 0.5 1 0

color11

name: color11, type: Color, default: 0.5 0 1

color12

name: color12, type: Color, default: 0 1 0.5

lineStyle1

name: lineStyle1, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle2

name: lineStyle2, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle3

name: lineStyle3, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle4

name: lineStyle4, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle5

name: lineStyle5, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle6

name: lineStyle6, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle7

name: lineStyle7, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle8

name: lineStyle8, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle9

name: lineStyle9, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle10

name: lineStyle10, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle11

name: lineStyle11, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineStyle12

name: lineStyle12, type: Enum, default: Solid

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

lineWidth1

name: lineWidth1, type: Integer, default: 1

lineWidth2

name: lineWidth2, type: Integer, default: 1

lineWidth3

name: lineWidth3, type: Integer, default: 1

lineWidth4

name: lineWidth4, type: Integer, default: 1

lineWidth5

name: lineWidth5, type: Integer, default: 1

lineWidth6

name: lineWidth6, type: Integer, default: 1

lineWidth7

name: lineWidth7, type: Integer, default: 1

lineWidth8

name: lineWidth8, type: Integer, default: 1

lineWidth9

name: lineWidth9, type: Integer, default: 1

lineWidth10

name: lineWidth10, type: Integer, default: 1

lineWidth11

name: lineWidth11, type: Integer, default: 1

lineWidth12

name: lineWidth12, type: Integer, default: 1

markerType1

name: markerType1, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType2

name: markerType2, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType3

name: markerType3, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType4

name: markerType4, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType5

name: markerType5, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType6

name: markerType6, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType7

name: markerType7, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType8

name: markerType8, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType9

name: markerType9, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType10

name: markerType10, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType11

name: markerType11, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerType12

name: markerType12, type: Enum, default: None

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

markerSize1

name: markerSize1, type: Integer, default: 4

markerSize2

name: markerSize2, type: Integer, default: 4

markerSize3

name: markerSize3, type: Integer, default: 4

markerSize4

name: markerSize4, type: Integer, default: 4

markerSize5

name: markerSize5, type: Integer, default: 4

markerSize6

name: markerSize6, type: Integer, default: 4

markerSize7

name: markerSize7, type: Integer, default: 4

markerSize8

name: markerSize8, type: Integer, default: 4

markerSize9

name: markerSize9, type: Integer, default: 4

markerSize10

name: markerSize10, type: Integer, default: 4

markerSize11

name: markerSize11, type: Integer, default: 4

markerSize12

name: markerSize12, type: Integer, default: 4

antiAlias1

name: antiAlias1, type: Bool, default: FALSE

antiAlias2

name: antiAlias2, type: Bool, default: FALSE

antiAlias3

name: antiAlias3, type: Bool, default: FALSE

antiAlias4

name: antiAlias4, type: Bool, default: FALSE

antiAlias5

name: antiAlias5, type: Bool, default: FALSE

antiAlias6

name: antiAlias6, type: Bool, default: FALSE

antiAlias7

name: antiAlias7, type: Bool, default: FALSE

antiAlias8

name: antiAlias8, type: Bool, default: FALSE

antiAlias9

name: antiAlias9, type: Bool, default: FALSE

antiAlias10

name: antiAlias10, type: Bool, default: FALSE

antiAlias11

name: antiAlias11, type: Bool, default: FALSE

antiAlias12

name: antiAlias12, type: Bool, default: FALSE

name1

name: name1, type: String

name2

name: name2, type: String

name3

name: name3, type: String

name4

name: name4, type: String

name5

name: name5, type: String

name6

name: name6, type: String

name7

name: name7, type: String

name8

name: name8, type: String

name9

name: name9, type: String

name10

name: name10, type: String

name11

name: name11, type: String

name12

name: name12, type: String

currentColor

name: currentColor, type: Color, default: 1 1 1

Shows the color of the current item.

currentLineStyle

name: currentLineStyle, type: Enum, default: None

Shows the line style of the current item.

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

currentLineWidth

name: currentLineWidth, type: Integer, default: 1

Shows the line width of the current item.

currentMarkerType

name: currentMarkerType, type: Enum, default: None

Shows the marker type of the current item.

Values:

Title Name
None None
Dot Dot
Asterisk Asterisk
Circle Circle
Square Square
Triangle Triangle
Plus Plus
Cross Cross

currentMarkerSize

name: currentMarkerSize, type: Integer, default: 4

Shows the marker size of the current item.

currentAntiAlias

name: currentAntiAlias, type: Bool, default: FALSE

Shows if the current item is diplayed with anti-aliasing.

currentName

name: currentName, type: String

Shows the name of the current item.

dump

name: dump, type: Trigger