ALBA
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
albaView Class Referenceabstract

#include <albaView.h>

Inheritance diagram for albaView:
Inheritance graph
[legend]
Collaboration diagram for albaView:
Collaboration graph
[legend]

Public Types

enum  VIEW_WIDGET_ID { ID_FIRST = MINID , ID_PRINT_INFO , ID_HELP , ID_LAST }
 

Public Member Functions

 albaView (const wxString &label="View")
 
virtual ~albaView ()
 
 albaAbstractTypeMacro (albaView, albaObject)
 
virtual void SetListener (albaObserver *Listener)
 
virtual void OnEvent (albaEventBase *alba_event)
 
virtual albaViewCopy (albaObserver *Listener, bool lightCopyEnabled=false)
 
virtual void Create ()
 
virtual void VmeAdd (albaVME *vme)
 
virtual void VmeRemove (albaVME *vme)
 
virtual void VmeSelect (albaVME *vme, bool select)
 
virtual void VmeShow (albaVME *vme, bool show)
 
virtual void VmeUpdateProperty (albaVME *vme, bool fromTag=false)
 
virtual bool IsVmeShowed (albaVME *vme)
 
virtual void VmeCreatePipe (albaVME *vme)
 
virtual void VmeDeletePipe (albaVME *vme)
 
virtual void CameraReset (albaVME *node=NULL)
 
virtual void CameraUpdate ()
 
virtual void SetMouse (albaDeviceButtonsPadMouse *mouse)
 
virtual albaRWIBaseGetRWI ()
 
virtual albaSceneGraphGetSceneGraph ()
 
virtual void GetImage (wxBitmap &bmp, int magnification=1)
 
virtual void OptionsUpdate ()
 
virtual bool FindPokedVme (albaDevice *device, albaMatrix &point_pose, vtkProp3D *&picked_prop, albaVME *&picked_vme, albaInteractor *&picked_behavior)
 
virtual int GetNodeStatus (albaVME *vme)
 
virtual albaPipeGetNodePipe (albaVME *vme)
 
wxString GetLabel ()
 
wxString GetName ()
 
void SetLabel (wxString label)
 
void SetName (wxString name)
 
virtual wxWindow * GetWindow ()
 
virtual wxFrame * GetFrame ()
 
virtual albaGUIGetGui ()
 
void DeleteGui ()
 
virtual void SetFrame (wxFrame *f)
 
virtual void OnSize (wxSizeEvent &size_event)
 
virtual void SetWindowSize (int w, int h)
 
virtual bool Pick (int x, int y)
 
virtual bool Pick (albaMatrix &m)
 
virtual void GetPickedPosition (double pos[3])
 
virtual albaVMEGetPickedVme ()
 
virtual vtkProp3D * GetPickedProp ()
 
virtual int GetNumberOfVisibleVME ()
 
virtual void Print (std::ostream &os, const int tabs=0)
 
virtual const char * GetHTMLText ()
 
vtkCellPicker * GetPicker2D ()
 
virtual char ** GetIcon ()
 
virtual wxColor GetBackgroundColor ()
 
virtual void SetBackgroundColor (wxColor color)=0
 
bool GetCanSpin () const
 
void SetCanSpin (bool canSpin)
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 
- Public Member Functions inherited from albaObject
 albaObject ()
 
virtual ~albaObject ()
 
virtual void Delete ()
 
virtual const char * GetTypeName () const
 
virtual bool IsA (const char *type_name) const
 
virtual bool IsA (const albaTypeID &type_id) const
 
virtual albaObjectNewObjectInstance () const =0
 
virtual const albaTypeIDGetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 

Public Attributes

int m_Mult
 
int m_Id
 
bool m_Plugged
 
albaViewm_Next
 

Protected Member Functions

bool FindPickedVme (vtkAssemblyPath *ap=NULL)
 
virtual albaGUICreateGui ()
 

Protected Attributes

albaObserverm_Listener
 
wxString m_Label
 
wxString m_Name
 
wxWindow * m_Win
 
wxFrame * m_Frame
 
albaGUIm_Gui
 
albaGUIHolderm_Guih
 
vtkCellPicker * m_Picker2D
 
vtkALBARayCast3DPicker * m_Picker3D
 
albaVMEm_PickedVME
 
vtkProp3D * m_PickedProp
 
double m_PickedPosition [3]
 
int m_NumberOfVisibleVme
 
wxPrintData * m_PrintData
 
albaString m_HTMLText
 
wxColor m_BackgroundColor
 
bool m_LightCopyEnabled
 
bool m_CanSpin
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 

Additional Inherited Members

- Static Public Member Functions inherited from albaObject
static const char * GetStaticTypeName ()
 
static bool IsStaticType (const char *type_name)
 
static bool IsStaticType (const albaTypeID &type_id)
 
static const albaTypeIDGetStaticTypeId ()
 
static albaObjectSafeDownCast (albaObject *o)
 

Detailed Description

albaView is the base class for Views in alba.

The member function GetNodeStatus(vme) will be called by the albaGUICheckTree in order to update it's icons. (Note that albaGUICheckTree doesn't know about the SceneGraph anymore)

albaView doesn't have a Scenegraph, nor knowledge about VTK /sa albaViewVTK.

albaView can be the base class for composed Views.

Definition at line 78 of file albaView.h.

Member Enumeration Documentation

◆ VIEW_WIDGET_ID

IDs for the GUI.

Enumerator
ID_FIRST 
ID_PRINT_INFO 
ID_HELP 
ID_LAST 

Definition at line 165 of file albaView.h.

Constructor & Destructor Documentation

◆ albaView()

albaView::albaView ( const wxString &  label = "View")

◆ ~albaView()

virtual albaView::~albaView ( )
virtual

Member Function Documentation

◆ albaAbstractTypeMacro()

albaView::albaAbstractTypeMacro ( albaView  ,
albaObject   
)

◆ SetListener()

virtual void albaView::SetListener ( albaObserver Listener)
inlinevirtual

Definition at line 86 of file albaView.h.

◆ OnEvent()

virtual void albaView::OnEvent ( albaEventBase e)
virtual

process the events sent by subjects

Implements albaObserver.

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

◆ Copy()

virtual albaView * albaView::Copy ( albaObserver Listener,
bool  lightCopyEnabled = false 
)
inlinevirtual

Reimplemented in albaViewCompound, albaViewPlot, albaViewVTK, and albaViewHTML.

Definition at line 88 of file albaView.h.

◆ Create()

virtual void albaView::Create ( )
inlinevirtual

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 89 of file albaView.h.

◆ VmeAdd()

virtual void albaView::VmeAdd ( albaVME vme)
inlinevirtual

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 91 of file albaView.h.

◆ VmeRemove()

virtual void albaView::VmeRemove ( albaVME vme)
inlinevirtual

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 92 of file albaView.h.

◆ VmeSelect()

virtual void albaView::VmeSelect ( albaVME vme,
bool  select 
)
inlinevirtual

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 93 of file albaView.h.

◆ VmeShow()

virtual void albaView::VmeShow ( albaVME vme,
bool  show 
)
inlinevirtual

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 94 of file albaView.h.

◆ VmeUpdateProperty()

virtual void albaView::VmeUpdateProperty ( albaVME vme,
bool  fromTag = false 
)
inlinevirtual

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 95 of file albaView.h.

◆ IsVmeShowed()

virtual bool albaView::IsVmeShowed ( albaVME vme)
inlinevirtual

Reimplemented in albaViewCompound.

Definition at line 96 of file albaView.h.

◆ VmeCreatePipe()

virtual void albaView::VmeCreatePipe ( albaVME vme)
inlinevirtual

Reimplemented in albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 98 of file albaView.h.

◆ VmeDeletePipe()

virtual void albaView::VmeDeletePipe ( albaVME vme)
inlinevirtual

Reimplemented in albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 99 of file albaView.h.

◆ CameraReset()

virtual void albaView::CameraReset ( albaVME node = NULL)
inlinevirtual

Reimplemented in albaViewCompound, and albaViewVTK.

Definition at line 101 of file albaView.h.

◆ CameraUpdate()

virtual void albaView::CameraUpdate ( )
inlinevirtual

Reimplemented in albaViewCompound, and albaViewVTK.

Definition at line 102 of file albaView.h.

◆ SetMouse()

virtual void albaView::SetMouse ( albaDeviceButtonsPadMouse mouse)
inlinevirtual

Reimplemented in albaViewCompound, albaViewPlot, and albaViewVTK.

Definition at line 103 of file albaView.h.

◆ GetRWI()

virtual albaRWIBase * albaView::GetRWI ( )
inlinevirtual

Reimplemented in albaViewCompound, and albaViewVTK.

Definition at line 104 of file albaView.h.

◆ GetSceneGraph()

virtual albaSceneGraph * albaView::GetSceneGraph ( )
inlinevirtual

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Definition at line 105 of file albaView.h.

◆ GetImage()

virtual void albaView::GetImage ( wxBitmap &  bmp,
int  magnification = 1 
)
inlinevirtual

Reimplemented in albaViewCompound, and albaViewVTK.

Definition at line 106 of file albaView.h.

◆ OptionsUpdate()

virtual void albaView::OptionsUpdate ( )
inlinevirtual

Called to update all components that depends on Application Options.

Reimplemented in albaViewCompound.

Definition at line 109 of file albaView.h.

◆ FindPokedVme()

virtual bool albaView::FindPokedVme ( albaDevice device,
albaMatrix point_pose,
vtkProp3D *&  picked_prop,
albaVME *&  picked_vme,
albaInteractor *&  picked_behavior 
)
inlinevirtual

Find the pocked VME at button down.

As argument the function needs the device which performed the action, and provides as result pointers to piked prop, vme and its behavior if it exists.

Reimplemented in albaViewCompound, and albaViewVTK.

Definition at line 115 of file albaView.h.

◆ GetNodeStatus()

virtual int albaView::GetNodeStatus ( albaVME vme)
inlinevirtual

return the status of the node within this view.

es: NON_VISIBLE,VISIBLE_ON, ...

Reimplemented in albaViewCompound, albaViewPlot, and albaViewVTK.

Definition at line 119 of file albaView.h.

References NODE_NON_VISIBLE.

◆ GetNodePipe()

virtual albaPipe * albaView::GetNodePipe ( albaVME vme)
inlinevirtual

return the current pipe for the specified vme (if any exist at this moment)

Reimplemented in albaViewPlot, and albaViewVTK.

Definition at line 122 of file albaView.h.

◆ GetLabel()

wxString albaView::GetLabel ( )
inline

Definition at line 124 of file albaView.h.

◆ GetName()

wxString albaView::GetName ( )
inline

Definition at line 125 of file albaView.h.

◆ SetLabel()

void albaView::SetLabel ( wxString  label)
inline

Definition at line 126 of file albaView.h.

◆ SetName()

void albaView::SetName ( wxString  name)
inline

Definition at line 127 of file albaView.h.

◆ GetWindow()

virtual wxWindow * albaView::GetWindow ( )
inlinevirtual

Definition at line 129 of file albaView.h.

◆ GetFrame()

virtual wxFrame * albaView::GetFrame ( )
inlinevirtual

Definition at line 130 of file albaView.h.

◆ GetGui()

virtual albaGUI * albaView::GetGui ( )
inlinevirtual

Definition at line 131 of file albaView.h.

◆ DeleteGui()

void albaView::DeleteGui ( )

destroy the Gui

◆ SetFrame()

virtual void albaView::SetFrame ( wxFrame *  f)
inlinevirtual

Definition at line 136 of file albaView.h.

◆ OnSize()

virtual void albaView::OnSize ( wxSizeEvent &  size_event)
inlinevirtual

Reimplemented in albaViewCompound.

Definition at line 138 of file albaView.h.

◆ SetWindowSize()

virtual void albaView::SetWindowSize ( int  w,
int  h 
)
inlinevirtual

Set the vtk RenderWindow size.

Used only for Linux (not necessary for Windows)

Reimplemented in albaViewCompound, and albaViewVTK.

Definition at line 141 of file albaView.h.

◆ Pick() [1/2]

virtual bool albaView::Pick ( int  x,
int  y 
)
virtual

Perform a picking according to the screen position (x,y) and return true on success.

Reimplemented in albaViewCompound, and albaViewVTK.

◆ Pick() [2/2]

virtual bool albaView::Pick ( albaMatrix m)
virtual

Perform a picking according to the absolute matrix given and return true on success.

Reimplemented in albaViewCompound, and albaViewVTK.

◆ GetPickedPosition()

virtual void albaView::GetPickedPosition ( double  pos[3])
virtual

Write into the double array the position picked during Pick method.

Reimplemented in albaViewCompound.

◆ GetPickedVme()

virtual albaVME * albaView::GetPickedVme ( )
inlinevirtual

Return the picked VME during the Pick method.

Return NULL if VME is not found

Reimplemented in albaViewCompound.

Definition at line 153 of file albaView.h.

◆ GetPickedProp()

virtual vtkProp3D * albaView::GetPickedProp ( )
inlinevirtual

Return the corresponding vtkProp3D of the picked VME.

Definition at line 156 of file albaView.h.

◆ GetNumberOfVisibleVME()

virtual int albaView::GetNumberOfVisibleVME ( )
inlinevirtual

Return the number of visible VMEs.

Definition at line 159 of file albaView.h.

◆ Print()

virtual void albaView::Print ( std::ostream &  os,
const int  tabs = 0 
)
virtual

Print a dump of this object into the Log area.

Reimplemented in albaViewVTK.

◆ GetHTMLText()

virtual const char * albaView::GetHTMLText ( )
inlinevirtual

Retrieve html information.

Definition at line 174 of file albaView.h.

◆ GetPicker2D()

vtkCellPicker * albaView::GetPicker2D ( )
inline

Return the picker used to pick the in the render window.

Definition at line 177 of file albaView.h.

◆ GetIcon()

virtual char ** albaView::GetIcon ( )
virtual

return an xpm-icon that can be used to represent this view

◆ GetBackgroundColor()

virtual wxColor albaView::GetBackgroundColor ( )
inlinevirtual

Definition at line 182 of file albaView.h.

◆ SetBackgroundColor()

virtual void albaView::SetBackgroundColor ( wxColor  color)
pure virtual

◆ GetCanSpin()

bool albaView::GetCanSpin ( ) const
inline

Returns CanSpin.

Definition at line 187 of file albaView.h.

◆ SetCanSpin()

void albaView::SetCanSpin ( bool  canSpin)
inline

Sets CanSpin.

Definition at line 190 of file albaView.h.

◆ FindPickedVme()

bool albaView::FindPickedVme ( vtkAssemblyPath *  ap = NULL)
protected

Find the VME picked.

◆ CreateGui()

virtual albaGUI * albaView::CreateGui ( )
protectedvirtual

Internally used to create a new instance of the GUI.

This function should be overridden by subclasses to create specialized GUIs. Each subclass should append its own widgets and define the enum of IDs for the widgets as an extension of the superclass enum. The last id value must be defined as "LAST_ID" to allow the subclass to continue the ID enumeration from it. For appending the widgets in the same panel GUI, each CreateGUI() function should first call the superclass' one.

Reimplemented in albaViewCompound, albaViewHTML, albaViewPlot, and albaViewVTK.

Member Data Documentation

◆ m_Listener

albaObserver* albaView::m_Listener
protected

Definition at line 193 of file albaView.h.

◆ m_Label

wxString albaView::m_Label
protected

Definition at line 194 of file albaView.h.

◆ m_Name

wxString albaView::m_Name
protected

Definition at line 195 of file albaView.h.

◆ m_Win

wxWindow* albaView::m_Win
protected

Definition at line 196 of file albaView.h.

◆ m_Frame

wxFrame* albaView::m_Frame
protected

Definition at line 197 of file albaView.h.

◆ m_Gui

albaGUI* albaView::m_Gui
protected

Definition at line 198 of file albaView.h.

◆ m_Guih

albaGUIHolder* albaView::m_Guih
protected

Definition at line 199 of file albaView.h.

◆ m_Picker2D

vtkCellPicker* albaView::m_Picker2D
protected

the picker used to pick the in the render window

Definition at line 201 of file albaView.h.

◆ m_Picker3D

vtkALBARayCast3DPicker* albaView::m_Picker3D
protected

Used to pick in a VTK Render window.

Definition at line 202 of file albaView.h.

◆ m_PickedVME

albaVME* albaView::m_PickedVME
protected

Pointer to the picked vme. It is initialized on picking.

Definition at line 204 of file albaView.h.

◆ m_PickedProp

vtkProp3D* albaView::m_PickedProp
protected

Pointer to the picked vme Prop3D. It is initialized on picking.

Definition at line 205 of file albaView.h.

◆ m_PickedPosition

double albaView::m_PickedPosition[3]
protected

Definition at line 206 of file albaView.h.

◆ m_NumberOfVisibleVme

int albaView::m_NumberOfVisibleVme
protected

perform ResetCamera only for the first vme shown into the view

Definition at line 207 of file albaView.h.

◆ m_PrintData

wxPrintData* albaView::m_PrintData
protected

Definition at line 209 of file albaView.h.

◆ m_HTMLText

albaString albaView::m_HTMLText
protected

Definition at line 210 of file albaView.h.

◆ m_BackgroundColor

wxColor albaView::m_BackgroundColor
protected

Definition at line 212 of file albaView.h.

◆ m_LightCopyEnabled

bool albaView::m_LightCopyEnabled
protected

Definition at line 214 of file albaView.h.

◆ m_CanSpin

bool albaView::m_CanSpin
protected

Definition at line 215 of file albaView.h.

◆ m_Mult

int albaView::m_Mult

Used to store the multiplicity of the view type created (e.g. the 3rd view surface created).

Definition at line 232 of file albaView.h.

◆ m_Id

int albaView::m_Id

Used to store the view type created (e.g. view surface).

Definition at line 233 of file albaView.h.

◆ m_Plugged

bool albaView::m_Plugged

Definition at line 234 of file albaView.h.

◆ m_Next

albaView* albaView::m_Next

Definition at line 235 of file albaView.h.


The documentation for this class was generated from the following file: