1
/*=========================================================================
3
Program: Ionization FRont Interactive Tool (IFRIT)
7
Copyright (c) 2002-2006 Nick Gnedin
10
This file may be distributed and/or modified under the terms of the
11
GNU General Public License version 2 as published by the Free Software
12
Foundation and appearing in the file LICENSE.GPL included in the
13
packaging of this file.
15
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
16
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
19
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
=========================================================================*/
33
#include "isolidviewsubject.h"
40
class iMarker : public iSolidViewSubject
43
friend class iControlModule;
47
IOBJECT_DECLARE_SELF(iMarker,iSolidViewSubject);
49
static iMarker* New(iViewModule *vm);
51
static const iObjectType& Type();
53
IOBJECT_DECLARE_GETSET2(Type,int);
54
//virtual void SetType(int m);
55
//int GetType() const;
57
IOBJECT_DECLARE_GETSET1(CaptionText,const iString&);
58
//virtual void SetCaptionText(const iString &s);
59
//inline iString GetCaptionText() const { return mCaptionText; }
61
IOBJECT_DECLARE_GETSET1(InteractiveMove,bool);
62
//virtual void SetInteractiveMove(bool s);
63
//inline bool GetInteractiveMoveShow() const { return mInteractiveMove; }
65
IOBJECT_DECLARE_GETSET2(Scaled,bool);
66
//virtual void SetScaled(bool s);
67
//bool GetScaled() const;
69
IOBJECT_DECLARE_GETSET(CaptionPosition,mCapPos,const float*);
70
//virtual void SetCaptionPosition(const float *x);
71
//inline const float* GetCaptionPosition() const { return mCapPos; }
73
IOBJECT_DECLARE_GET(ColorAutomatic,mColorAuto,bool);
74
//inline bool isColorAutomatic() const { return mColorAuto; }
76
virtual void SetTextColor(iColor c, bool withAuto = true);
77
IOBJECT_DECLARE_GET(TextColor,mTextColor,iColor);
78
//inline iColor GetTextColor() const { return mTextColor; }
80
IOBJECT_DECLARE_GETSET1(Transform,const float*);
81
//virtual void SetTransform(const float *x);
82
//inline const float* GetTransform() const { return mTransform; }
84
IOBJECT_DECLARE_GETSET_DISTANCE(Size,mSize);
85
//virtual void SetSize(const iDistance &s);
86
//inline const iDistance& GetSize() const { return mSize; }
87
virtual void SetSize(double s);
89
IOBJECT_DECLARE_GETSET_POSITION(Position,mPosition);
90
//virtual void SetPosition(const iPosition &p);
91
//inline const iPosition& GetPosition() const { return mPosition; }
93
const iString GetTypeAsString() const;
94
static const iObjectKey& KeyTypeAsString();
96
virtual void SetFontScale(int s);
98
void AttachViewSubject(iViewSubject *);
99
void DetachViewSubject(iViewSubject *);
101
inline iPointGlyph* GetMarkerObject() const { return mObject; }
102
inline iCaption* GetMarkerCaption() const { return mCaption; }
104
void Move(const iPosition& p);
107
virtual bool IsDataPresent() const { return true; }
111
ISOLIDVIEWSUBJECT_DECLARE_INHERITED_KEYS;
112
ISOLIDVIEWSUBJECT_DECLARE_INHERITED_MEMBERS;
116
iMarker(iViewModule *vm);
117
virtual void ConfigureBody(){}
119
virtual void FinishInitialization();
124
iPointGlyph *mObject;
128
float mCapPos[2], mTransform[6];
130
iString mCaptionText;
131
bool mColorAuto, mInteractiveMove;
133
iSearchableArray<iViewSubject*> mAttachedObjects;