35 #ifndef ANA_WINDOW_WINDOW_H 36 #define ANA_WINDOW_WINDOW_H 70 SAGITTAL_WINDOW = 201,
90 void displayTalairach();
91 virtual void iconify();
92 virtual void unIconify();
95 virtual bool close() = 0;
98 virtual void showToolBars(
int state = 2 );
99 virtual bool toolBarsVisible()
const;
100 virtual void setFullScreen(
int state = 2 );
101 virtual bool isFullScreen()
const;
102 virtual void setGeometry(
int x,
int y,
unsigned w,
unsigned h ) = 0;
104 virtual void geometry(
int *x,
int *y,
unsigned *w,
unsigned *h ) = 0;
105 virtual void Refresh();
106 virtual void showReferential();
111 virtual std::string Title()
const;
113 virtual void registerObject(
AObject*
object,
114 bool temporaryObject =
false,
116 virtual void unregisterObject(
AObject*
object );
121 void SetRefreshFlag();
123 void ResetRefreshFlag();
126 { _lookupChanged = flg;
if( flg ) SetRefreshFlag(); }
130 virtual Type type()
const = 0;
133 bool RefreshFlag()
const;
135 std::set<AObject*> Objects()
const;
136 bool hasObject(
AObject * obj )
const;
138 virtual Point3df getPosition()
const;
140 float getTime()
const;
141 virtual std::vector<float> getFullPosition()
const;
143 virtual void setPosition(
const Point3df& position ,
145 virtual void setPosition(
const std::vector<float> & position,
148 virtual void setTime(
float time );
149 virtual void setTitle(
const std::string & title );
153 void setWindowGeometry(
Geometry *geom );
156 int Group()
const {
return _group; }
158 void setHasCursor(
int hasCursor );
160 bool hasCursor()
const;
162 int hasSelfCursor()
const;
166 _leftRightDisplay = state;
170 return _leftRightDisplay;
174 _leftRightDisplaySize = size;
178 return _leftRightDisplaySize;
181 const std::vector<std::string> & annotation_list)
183 _displayedAnnotations = annotation_list;
187 return _displayedAnnotations;
195 { _useDefaultCursorColor = state; }
199 static void setCursorColor(
const AimsRGB & cursCol );
210 virtual bool positionFromCursor(
int x,
int y,
Point3df & pos );
211 virtual AObject* objectAt(
const std::vector<float> & pos );
214 virtual void selectObject(
const std::vector<float> & pos,
217 virtual void button3clicked(
int x,
int y );
219 virtual void findObjectsAt(
const std::vector<float> & pos,
220 std::set<AObject *> & shown,
221 std::set<AObject *> & hidden );
223 virtual void update(
const Observable* observable,
void* arg );
225 static void recordCbk(
void* clientdata );
226 virtual void recordImages();
228 virtual void startRecord();
229 virtual void startRecord(
const std::string & filename );
234 virtual const std::set<unsigned> & typeCount()
const;
235 virtual std::set<unsigned> & typeCount();
236 virtual const std::string & baseTitle()
const;
240 bool isTemporary(
AObject* o )
const;
242 {
return( _tempObjects ); }
249 void setWindowTitle();
250 virtual void unregisterObservable(
Observable* obs );
255 void manageAutoReferential();
295 static bool _leftRightDisplay;
297 static int _leftRightDisplaySize;
299 static std::vector<std::string> _displayedAnnotations;
301 static bool _hasCursor;
303 static int _cursorSize;
305 static bool _useDefaultCursorColor;
309 static float _selectTolerence;
#define DECLARE_GENERIC_OBJECT_TYPE(T)
std::set< AObject * > _tempObjects
virtual bool needsRedraw() const
returns true if a refresh has been triggered and not performed yet (in subclasses: AWindow always ret...
static void setCursorSize(int cursorSize)
Base Anatomist object (abstract)
std::list< carto::shared_ptr< AObject > > _objects
List of the objects contained in the window.
bool _refresh
Should the window be refreshed?
static std::vector< std::string > displayedAnnotations()
A class can implement the Observer interface when it wants to be informed of changes in observable ob...
static void setUseDefaultCursorColor(bool state)
Set the default color cursor flag.
virtual std::string Title() const
static void setLeftRightDisplay(bool state)
Abstract base class Anatomist window.
static float selectTolerence()
Selection tolerence distance.
std::string _title
Title of the window.
This class can be subclassed to represent an object that the programmer wants to have observed...
bool _lookupChanged
Lookup has changed (title or geometry)
int id() const
Get the window identifier.
std::set< AObject * > _sobjects
Same but as a set (for fast search)
Referential * _referential
Referentiel.
virtual SubType subtype() const
const std::set< AObject * > & temporaryObjects() const
static int leftRightDisplaySize()
std::vector< float > _timepos
Cursor time + next dimensions.
int _id
Window identificator.
int _instNumber
Number of instance of the window class.
static int leftRightDisplay()
Point3df _position
Click position.
void ResetRefreshFlag()
Set the refresh flag off.
static int useDefaultCursorColor()
Give the default color cursor flag.
static void setDisplayedAnnotations(const std::vector< std::string > &annotation_list)
bool lookupChanged() const
virtual void setupWindow()
Sets correct size and lookup of the window.
void setLookupChanged(bool flg=true)
static int hasGlobalCursor()
virtual bool positionFromCursor(int x, int y, Point3df &pos)
Translates mouse position to Anatomist geometry position.
virtual void updateWindowGeometry()
adapts geometry to the current contents and referential
Geometry * _geometry
Geometry.
virtual void startRecord()
virtual void stopRecord()
std::set< AObject * > Objects() const
Get the objects.
Referential * getReferential() const
virtual void displayClickPoint()
float getTime() const
Get time position of cursor.
virtual RecordingState recordingState() const
static void setSelectTolerence(float tol)
Set the selection tolerence distance.
static void setGlobalHasCursor(bool hasCursor)
static void setLeftRightDisplaySize(int size)
void setId(int id)
Set the window identifier.
bool RefreshFlag() const
Get the refresh flag status.
Referential: marker for transformations, with an associated color.
void SetRefreshFlag()
Set the refresh flag on.
virtual void createTitle()
Creates a new title for the window.
int _group
Group number, for linked windows.
Geometry * windowGeometry() const
reference_wrapper< T > ref(T &ref)