ALBA
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaViewCompound Class Reference

#include <albaViewCompound.h>

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

Public Types

enum  LAYOUT_CONFIGURATION_ID {
  GRID_LAYOUT = 0 , LAYOUT_1 , LAYOUT_2 , LAYOUT_3 ,
  LAYOUT_CUSTOM
}
 
enum  VIEWCOMPOUND_WIDGET_ID { ID_DEFAULT_CHILD_VIEW = Superclass::ID_LAST , ID_LAYOUT_CHOOSER , ID_LAST }
 
- Public Types inherited from albaView
enum  VIEW_WIDGET_ID { ID_FIRST = MINID , ID_PRINT_INFO , ID_HELP , ID_LAST }
 

Public Member Functions

 albaViewCompound (const wxString &label="View Compound", int num_row=1, int num_col=2)
 
virtual ~albaViewCompound ()
 
 albaTypeMacro (albaViewCompound, albaView)
 
virtual void PlugChildView (albaView *child)
 
virtual void PackageView ()
 
virtual albaViewCopy (albaObserver *Listener, bool lightCopyEnabled=false)
 
virtual void Create ()
 
virtual void CreateGuiView ()
 
virtual void OnEvent (albaEventBase *alba_event)
 
virtual void VmeAdd (albaVME *vme)
 
virtual void VmeRemove (albaVME *vme)
 
virtual void VmeSelect (albaVME *node, bool select)
 
virtual void VmeShow (albaVME *vme, bool show)
 
virtual void VmeUpdateProperty (albaVME *vme, bool fromTag=false)
 
virtual bool IsVmeShowed (albaVME *vme)
 
virtual void CameraReset (albaVME *vme=NULL)
 
virtual void CameraUpdate ()
 
virtual int GetNodeStatus (albaVME *vme)
 
virtual void SetWindowSize (int w, int h)
 
virtual void OnSize (wxSizeEvent &event)
 
virtual void OnLayout ()
 
virtual void SetMouse (albaDeviceButtonsPadMouse *mouse)
 
virtual albaSceneGraphGetSceneGraph ()
 
virtual albaRWIBaseGetRWI ()
 
void GetImage (wxBitmap &bmp, int magnification=1)
 
virtual bool FindPokedVme (albaDevice *device, albaMatrix &point_pose, vtkProp3D *&picked_prop, albaVME *&picked_vme, albaInteractor *&picked_behavior)
 
virtual bool Pick (int x, int y)
 
virtual bool Pick (albaMatrix &m)
 
virtual void GetPickedPosition (double pos[3])
 
virtual albaVMEGetPickedVme ()
 
albaViewGetSubView ()
 
albaViewGetSubView (int idx)
 
int GetSubViewIndex ()
 
int GetNumberOfSubView ()
 
virtual void MaximizeSubView (int subview_id=0, bool maximize=true)
 
bool IsSubViewMaximized ()
 
virtual void OptionsUpdate ()
 
virtual void SetBackgroundColor (wxColor color)
 
void SetSubViewBackgroundColor (int subView, wxColor color)
 
wxColor GetSubViewBackgroundColor (int subView)
 
int GetLayoutConfiguration () const
 
virtual void SetLayoutConfiguration (int layoutConfiguration)
 
- Public Member Functions inherited from albaView
 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)
 

Protected Member Functions

virtual albaGUICreateGui ()
 
virtual void LayoutSubView (int width, int height)
 
- Protected Member Functions inherited from albaView
bool FindPickedVme (vtkAssemblyPath *ap=NULL)
 
virtual albaGUICreateGui ()
 

Protected Attributes

int m_ViewRowNum
 
int m_ViewColNum
 
int m_NumOfPluggedChildren
 
int m_NumOfChildView
 
int m_LayoutConfiguration
 
int m_DefauldChildView
 
int m_SubViewMaximized
 
int m_LinkSubView
 
wxSize m_Size
 
albaGUIm_GuiView
 
wxWindow * m_GuiViewWindow
 
albaDeviceButtonsPadMousem_Mouse
 
std::vector< albaView * > m_ChildViewList
 
std::vector< albaView * > m_PluggedChildViewList
 
- Protected Attributes inherited from albaView
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)
 
- Public Attributes inherited from albaView
int m_Mult
 
int m_Id
 
bool m_Plugged
 
albaViewm_Next
 

Detailed Description

albaViewCompound is the base class for Compound 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)

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

Definition at line 50 of file albaViewCompound.h.

Member Enumeration Documentation

◆ LAYOUT_CONFIGURATION_ID

Enumerator
GRID_LAYOUT 
LAYOUT_1 
LAYOUT_2 
LAYOUT_3 
LAYOUT_CUSTOM 

Definition at line 58 of file albaViewCompound.h.

◆ VIEWCOMPOUND_WIDGET_ID

IDs for the GUI.

Enumerator
ID_DEFAULT_CHILD_VIEW 
ID_LAYOUT_CHOOSER 
ID_LAST 

Definition at line 118 of file albaViewCompound.h.

Constructor & Destructor Documentation

◆ albaViewCompound()

albaViewCompound::albaViewCompound ( const wxString &  label = "View Compound",
int  num_row = 1,
int  num_col = 2 
)

◆ ~albaViewCompound()

virtual albaViewCompound::~albaViewCompound ( )
virtual

Member Function Documentation

◆ albaTypeMacro()

albaViewCompound::albaTypeMacro ( albaViewCompound  ,
albaView   
)

◆ PlugChildView()

virtual void albaViewCompound::PlugChildView ( albaView child)
virtual

Plug the child view into the compound view.

If the number of child view is less then row x col, the last plugged view will fill the remaining holes.

◆ PackageView()

virtual void albaViewCompound::PackageView ( )
inlinevirtual

Redefine this method to package the compounded view.

Definition at line 74 of file albaViewCompound.h.

◆ Copy()

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

Reimplemented from albaView.

◆ Create()

virtual void albaViewCompound::Create ( )
virtual

Create the plugged sub-view and call virtual method CreateGuiView()

Reimplemented from albaView.

◆ CreateGuiView()

virtual void albaViewCompound::CreateGuiView ( )
virtual

Create the GUI on the bottom of the compounded view.

◆ OnEvent()

virtual void albaViewCompound::OnEvent ( albaEventBase e)
virtual

process the events sent by subjects

Reimplemented from albaView.

◆ VmeAdd()

virtual void albaViewCompound::VmeAdd ( albaVME vme)
virtual

Add VME into plugged sub-views.

Reimplemented from albaView.

◆ VmeRemove()

virtual void albaViewCompound::VmeRemove ( albaVME vme)
virtual

Remove VME into plugged sub-views.

Reimplemented from albaView.

◆ VmeSelect()

virtual void albaViewCompound::VmeSelect ( albaVME node,
bool  select 
)
virtual

Reimplemented from albaView.

◆ VmeShow()

virtual void albaViewCompound::VmeShow ( albaVME vme,
bool  show 
)
virtual

Show/Hide VMEs into plugged sub-views.

Reimplemented from albaView.

◆ VmeUpdateProperty()

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

Reimplemented from albaView.

◆ IsVmeShowed()

virtual bool albaViewCompound::IsVmeShowed ( albaVME vme)
virtual

Reimplemented from albaView.

◆ CameraReset()

virtual void albaViewCompound::CameraReset ( albaVME vme = NULL)
virtual

Reimplemented from albaView.

◆ CameraUpdate()

virtual void albaViewCompound::CameraUpdate ( )
virtual

Reimplemented from albaView.

◆ GetNodeStatus()

virtual int albaViewCompound::GetNodeStatus ( albaVME vme)
virtual

return the status of the node within this view.

es: NON_VISIBLE,VISIBLE_ON, ... having albaViewCompound::GetNodeStatus allow albaGUICheckTree to not know about albaSceneGraph

Reimplemented from albaView.

◆ SetWindowSize()

virtual void albaViewCompound::SetWindowSize ( int  w,
int  h 
)
virtual

Set the vtk RenderWindow size.

Used only for Linux (not necessary for Windows)

Reimplemented from albaView.

◆ OnSize()

virtual void albaViewCompound::OnSize ( wxSizeEvent &  event)
virtual

On size event.

Reimplemented from albaView.

◆ OnLayout()

virtual void albaViewCompound::OnLayout ( )
virtual

Set the size of the windowing double slider according to the size of the view.

◆ SetMouse()

virtual void albaViewCompound::SetMouse ( albaDeviceButtonsPadMouse mouse)
virtual

Reimplemented from albaView.

◆ GetSceneGraph()

virtual albaSceneGraph * albaViewCompound::GetSceneGraph ( )
virtual

Reimplemented from albaView.

◆ GetRWI()

virtual albaRWIBase * albaViewCompound::GetRWI ( )
virtual

Reimplemented from albaView.

◆ GetImage()

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

Return a pointer to the image of all sub-views.

Reimplemented from albaView.

◆ FindPokedVme()

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

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 from albaView.

◆ Pick() [1/2]

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

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

Reimplemented from albaView.

◆ Pick() [2/2]

virtual bool albaViewCompound::Pick ( albaMatrix m)
virtual

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

Reimplemented from albaView.

◆ GetPickedPosition()

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

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

Reimplemented from albaView.

◆ GetPickedVme()

virtual albaVME * albaViewCompound::GetPickedVme ( )
virtual

Return the picked VME during the Pick method.

Return NULL if VME is not found

Reimplemented from albaView.

◆ GetSubView() [1/2]

albaView * albaViewCompound::GetSubView ( )

Return the sub-view in which the mouse is interacting with.

◆ GetSubView() [2/2]

albaView * albaViewCompound::GetSubView ( int  idx)

Return the sub-view with index idx.

◆ GetSubViewIndex()

int albaViewCompound::GetSubViewIndex ( )

Return the sub-view num index which the mouse is interacting with.

◆ GetNumberOfSubView()

int albaViewCompound::GetNumberOfSubView ( )
inline

Return the number of child view.

Definition at line 174 of file albaViewCompound.h.

◆ MaximizeSubView()

virtual void albaViewCompound::MaximizeSubView ( int  subview_id = 0,
bool  maximize = true 
)
virtual

Let the sub-view to be maximized inside the compounded view.

◆ IsSubViewMaximized()

bool albaViewCompound::IsSubViewMaximized ( )
inline

Return true is one of the plugged view is maximized.

Definition at line 182 of file albaViewCompound.h.

◆ OptionsUpdate()

virtual void albaViewCompound::OptionsUpdate ( )
virtual

Called to update all components that depends on Application Options.

Reimplemented from albaView.

◆ SetBackgroundColor()

virtual void albaViewCompound::SetBackgroundColor ( wxColor  color)
virtual

Implements albaView.

◆ SetSubViewBackgroundColor()

void albaViewCompound::SetSubViewBackgroundColor ( int  subView,
wxColor  color 
)

◆ GetSubViewBackgroundColor()

wxColor albaViewCompound::GetSubViewBackgroundColor ( int  subView)

◆ GetLayoutConfiguration()

int albaViewCompound::GetLayoutConfiguration ( ) const
inline

Returns LayoutConfiguration.

Definition at line 194 of file albaViewCompound.h.

◆ SetLayoutConfiguration()

virtual void albaViewCompound::SetLayoutConfiguration ( int  layoutConfiguration)
virtual

Sets LayoutConfiguration.

◆ CreateGui()

virtual albaGUI * albaViewCompound::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 from albaView.

◆ LayoutSubView()

virtual void albaViewCompound::LayoutSubView ( int  width,
int  height 
)
protectedvirtual

Arrange sub-view into the defined layout configuration.

Member Data Documentation

◆ m_ViewRowNum

int albaViewCompound::m_ViewRowNum
protected

number of rows to divide the compound view

Definition at line 212 of file albaViewCompound.h.

◆ m_ViewColNum

int albaViewCompound::m_ViewColNum
protected

number of cols to divide the compound view

Definition at line 213 of file albaViewCompound.h.

◆ m_NumOfPluggedChildren

int albaViewCompound::m_NumOfPluggedChildren
protected

number of plugged children view

Definition at line 214 of file albaViewCompound.h.

◆ m_NumOfChildView

int albaViewCompound::m_NumOfChildView
protected

number of child view (is equal or greater then m_NumOfPluggedChildren)

Definition at line 215 of file albaViewCompound.h.

◆ m_LayoutConfiguration

int albaViewCompound::m_LayoutConfiguration
protected

Arrange the subviews on different layout configuration.

Definition at line 217 of file albaViewCompound.h.

◆ m_DefauldChildView

int albaViewCompound::m_DefauldChildView
protected

Definition at line 218 of file albaViewCompound.h.

◆ m_SubViewMaximized

int albaViewCompound::m_SubViewMaximized
protected

contain the id of the sub-view to be maximized. -1 means that all sub-views are in normal size

Definition at line 220 of file albaViewCompound.h.

◆ m_LinkSubView

int albaViewCompound::m_LinkSubView
protected

Definition at line 221 of file albaViewCompound.h.

◆ m_Size

wxSize albaViewCompound::m_Size
protected

size of the compound view

Definition at line 223 of file albaViewCompound.h.

◆ m_GuiView

albaGUI* albaViewCompound::m_GuiView
protected

Definition at line 224 of file albaViewCompound.h.

◆ m_GuiViewWindow

wxWindow* albaViewCompound::m_GuiViewWindow
protected

Definition at line 225 of file albaViewCompound.h.

◆ m_Mouse

albaDeviceButtonsPadMouse* albaViewCompound::m_Mouse
protected

Definition at line 226 of file albaViewCompound.h.

◆ m_ChildViewList

std::vector<albaView *> albaViewCompound::m_ChildViewList
protected

Child views vector.

Definition at line 229 of file albaViewCompound.h.

◆ m_PluggedChildViewList

std::vector<albaView *> albaViewCompound::m_PluggedChildViewList
protected

Plugged Child views vector.

Definition at line 230 of file albaViewCompound.h.


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