MeVisLab Toolbox Reference
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
30
32
33
34// Module class StylePaletteOp
35
36//----------------------------------------------------------------------------------
39//----------------------------------------------------------------------------------
41{
42public:
43
46
48 ~StylePaletteOp () override;
49
50
52 void handleNotification (Field *field) override;
53
55 void activateAttachments () override;
56
57
58protected:
59
61 void createFields ();
62
64 void deleteFields ();
65
67 void updateStyles ();
68
71
74
77
78
79private:
80
81 // --- Fields ---
82
84 BaseField *_fldOutStylePalette;
86 BaseField* _fldInStylePalette;
87
89 ColorField **_fldColors;
91 EnumField **_fldLineStyles;
93 IntField **_fldLineWidths;
95 EnumField **_fldMarkerTypes;
97 IntField **_fldMarkerSizes;
99 BoolField **_fldAntiAlias;
101 StringField **_fldNames;
102
104 IntField *_fldCurrentStyleIndex;
106 ColorField *_fldCurrentColor;
108 EnumField *_fldCurrentLineStyle;
110 IntField *_fldCurrentLineWidth;
112 EnumField *_fldCurrentMarkerType;
114 IntField *_fldCurrentMarkerSize;
116 BoolField *_fldCurrentAntiAlias;
118 StringField *_fldCurrentName;
119
121 IntField *_fldReservedEntries;
122
124 NotifyField *_fldColorDefaults;
126 NotifyField *_fldMonoDefaults;
128 NotifyField *_fldDump;
129
131 StylePalette _palette;
132
135
136};
137
138
139
141
142
143#endif // __mlStylePaletteOp_H
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Field to encapsulate a boolean value.
Definition mlFields.h:58
Field to encapsulate a vector of 3 float values representing an (rgb) color with all properties of Ve...
Definition mlFields.h:1441
Field to encapsulate an enumerated value.
Definition mlFields.h:195
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:126
Base class for an image processing module of the ML.
Definition mlModule.h:151
Field without value for notifications.
Definition mlFields.h:659
Field to encapsulate a string value.
Definition mlFields.h:610
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)
Like 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 which is a signed 32 bit size_t on 32 bit platforms and 64 bit one on 64 bit ...
Definition mlTypeDefs.h:566