MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlStylePaletteOp.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_STYLE_PALETTE_OP_H
14#define ML_STYLE_PALETTE_OP_H
15
16
19
20// ML-includes
21
22#include "mlModuleIncludes.h"
23#include "mlTreeNode.h"
24
25
26#include "mlBaseInit.h"
27#include "mlStylePalette.h"
28
29
31
32
33// Module class StylePaletteOp
34
35//----------------------------------------------------------------------------------
38//----------------------------------------------------------------------------------
40{
41public:
44
46 ~StylePaletteOp() override;
47
48
51
53 void activateAttachments() override;
54
55
56protected:
59
62
65
68
71
74
75
76private:
77 // --- Fields ---
78
80 BaseField* _fldOutStylePalette;
82 BaseField* _fldInStylePalette;
83
85 ColorField** _fldColors;
87 EnumField** _fldLineStyles;
89 IntField** _fldLineWidths;
91 EnumField** _fldMarkerTypes;
93 IntField** _fldMarkerSizes;
95 BoolField** _fldAntiAlias;
97 StringField** _fldNames;
98
100 IntField* _fldCurrentStyleIndex;
102 ColorField* _fldCurrentColor;
104 EnumField* _fldCurrentLineStyle;
106 IntField* _fldCurrentLineWidth;
108 EnumField* _fldCurrentMarkerType;
110 IntField* _fldCurrentMarkerSize;
112 BoolField* _fldCurrentAntiAlias;
114 StringField* _fldCurrentName;
115
117 IntField* _fldReservedEntries;
118
120 NotifyField* _fldColorDefaults;
122 NotifyField* _fldDump;
123
125 StylePalette _palette;
126
129};
130
131
133
134
135#endif // __mlStylePaletteOp_H
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:813
Field to encapsulate a boolean value.
Definition mlFields.h:56
Field to encapsulate a vector of three float values representing an (RGB) color with all properties o...
Definition mlFields.h:1547
Field to encapsulate an enumerated value.
Definition mlFields.h:185
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:123
Base class for an image processing module of the ML.
Definition mlModule.h:150
Field without value for notifications.
Definition mlFields.h:687
Field to encapsulate a string value.
Definition mlFields.h:634
Defines the StylePalette operator for providing a collection of colors, line styles and marker types.
StylePaletteOp()
Constructor.
void updateCurrentStyle()
Update current style fields.
void updatePalette()
Update palette styles from fields.
~StylePaletteOp() override
Destructor.
void deleteFields()
Delete field arrays.
void createFields()
Create fields.
void updateStyles()
Update style fields.
void handleNotification(Field *field) override
Handle field changes.
void activateAttachments() override
Update status after restore.
MLssize_t fieldIndex(Field *field, Field **fieldArray, MLssize_t nEntries)
Return index of field in fieldArray, or -1 if not found.
Base object class StylePalette for providing a collection of colors, line styles and marker types.
#define ML_MODULE_CLASS_HEADER(className)
Similar to ML_CLASS_HEADER for the usage of derived classes from Module.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition mlBaseInit.h:22
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
SSIZE_T MLssize_t
The signed ML size type that is a signed 32-bit size_t on 32-bit platforms and 64-bit one on 64-bit p...
Definition mlTypeDefs.h:563