35 #ifndef ANA_WINDOW_WINDOW_H 
   36 #define ANA_WINDOW_WINDOW_H 
   70         SAGITTAL_WINDOW = 201,
 
  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;
 
  111     virtual std::string Title() 
const;
 
  114                                  bool temporaryObject = 
false,
 
  121     void SetRefreshFlag();
 
  123     void ResetRefreshFlag();
 
  126     { _lookupChanged = flg; 
if( flg ) SetRefreshFlag(); }
 
  133     bool RefreshFlag() 
const;
 
  135     std::set<AObject*> Objects() 
const;
 
  140     float getTime() 
const;
 
  149     virtual void setTitle( 
const std::string & title );
 
  156     int Group()
 const { 
return _group; }
 
  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; }
 
  210     virtual bool positionFromCursor( 
int x, 
int y, 
Point3df & pos );
 
  220                                 std::set<AObject *> & shown,
 
  221                                 std::set<AObject *> & hidden );
 
  229     virtual void startRecord( 
const std::string & filename );
 
  242     { 
return( _tempObjects ); }
 
  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;
 
Base Anatomist object (abstract)
Abstract base class Anatomist window.
static void setCursorSize(int cursorSize)
bool hasCursor() const
takes both the global and own flags into account
void setWindowGeometry(Geometry *geom)
int _group
Group number, for linked windows.
Referential * _referential
Referentiel.
std::list< carto::shared_ptr< AObject > > _objects
List of the objects contained in the window.
virtual bool needsRedraw() const
returns true if a refresh has been triggered and not performed yet (in subclasses: AWindow always ret...
std::set< AObject * > Objects() const
Get the objects.
virtual void unregisterObservable(Observable *obs)
Called when an observable is destroyed, only called by Observable: don't use this function directly.
virtual void setPosition(const std::vector< float > &position, const Referential *refdep=0)
bool hasObject(AObject *obj) const
bool lookupChanged() const
virtual void startRecord()
void displayTalairach()
Affiche les coordonnees de Talairach qui correspondent a la position du curseur lie (window 2D)
static std::vector< std::string > displayedAnnotations()
bool RefreshFlag() const
Get the refresh flag status.
std::string _title
Title of the window.
virtual void setFullScreen(int state=2)
virtual bool positionFromCursor(int x, int y, Point3df &pos)
Translates mouse position to Anatomist geometry position.
std::set< AObject * > _sobjects
Same but as a set (for fast search)
Referential * getReferential() const
virtual void registerObject(AObject *object, bool temporaryObject=false, int position=-1)
AWindow()
AWindow constructor registers itself in the application.
virtual RecordingState recordingState() const
virtual void stopRecord()
static void setGlobalHasCursor(bool hasCursor)
float getTime() const
Get time position of cursor.
virtual const std::set< unsigned > & typeCount() const
virtual void showToolBars(int state=2)
Shows or hides all tools (menu, toolbars) around the main view area.
static float selectTolerence()
Selection tolerence distance.
static void setSelectTolerence(float tol)
Set the selection tolerence distance.
static int useDefaultCursorColor()
Give the default color cursor flag.
static void recordCbk(void *clientdata)
virtual void selectObject(const std::vector< float > &pos, int modifier)
Selects (highlights) object at a given 4D space position.
virtual SubType subtype() const
virtual void displayClickPoint()
virtual void geometry(int *x, int *y, unsigned *w, unsigned *h)=0
Get position and dimensions of the window.
std::set< AObject * > _tempObjects
virtual void update(const Observable *observable, void *arg)
This method is called whenever the observed object is changed.
virtual void updateWindowGeometry()
adapts geometry to the current contents and referential
Point3df _position
Click position.
void ResetRefreshFlag()
Set the refresh flag off.
static int leftRightDisplay()
virtual std::vector< float > getFullPosition() const
virtual void createTitle()
Creates a new title for the window.
static void setLeftRightDisplay(bool state)
int _id
Window identificator.
virtual void findObjectsAt(const std::vector< float > &pos, std::set< AObject * > &shown, std::set< AObject * > &hidden)
finds objects at given position (internal)
virtual void setTitle(const std::string &title)
virtual void setPosition(const Point3df &position, const Referential *refdep)
Set position of cursor.
void setId(int id)
Set the window identifier.
int hasSelfCursor() const
returns the own flag of the window (see hasGlobalCursor) (tri-state)
virtual Type type() const =0
Get the window type (2D, 3D or control)
virtual void showReferential()
virtual void setTime(float time)
Set time position of cursor.
void setHasCursor(int hasCursor)
virtual AObject * objectAt(const std::vector< float > &pos)
virtual ~AWindow()
Unregisters from the application and other objects.
virtual void recordImages()
static void setLeftRightDisplaySize(int size)
Geometry * windowGeometry() const
virtual void setupWindow()
Sets correct size and lookup of the window.
const std::set< AObject * > & temporaryObjects() const
Geometry * _geometry
Geometry.
void SetRefreshFlag()
Set the refresh flag on.
virtual bool isFullScreen() const
void manageAutoReferential()
automatically set the contained objects referential to the window if it has not been set manually,...
static int leftRightDisplaySize()
virtual bool toolBarsVisible() const
static int hasGlobalCursor()
virtual void unregisterObject(AObject *object)
void setWindowTitle()
Set the title of the window.
virtual Point3df getPosition() const
Get position of cursor.
bool _refresh
Should the window be refreshed?
int id() const
Get the window identifier.
static void setDisplayedAnnotations(const std::vector< std::string > &annotation_list)
bool _lookupChanged
Lookup has changed (title or geometry)
virtual std::set< unsigned > & typeCount()
static void setUseDefaultCursorColor(bool state)
Set the default color cursor flag.
int _instNumber
Number of instance of the window class.
static void setCursorColor(const AimsRGB &cursCol)
Set the color cursor.
virtual void button3clicked(int x, int y)
handles button3 click (menu)
std::vector< float > _timepos
Cursor time + next dimensions.
bool isTemporary(AObject *o) const
virtual std::string Title() const
void setLookupChanged(bool flg=true)
static AimsRGB cursorColor()
Give the color cursor.
virtual void setGeometry(int x, int y, unsigned w, unsigned h)=0
virtual void setReferential(Referential *ref)
virtual const std::string & baseTitle() const
This class can be subclassed to represent an object that the programmer wants to have observed.
A class can implement the Observer interface when it wants to be informed of changes in observable ob...
Referential: marker for transformations, with an associated color.
#define DECLARE_GENERIC_OBJECT_TYPE(T)