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

#include <albaGUIDynamicVP.h>

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

Classes

class  albaPipeRegister
 
struct  SUPPORTED_VP_ENTRY
 

Public Types

enum  PLAYER_WIDGET_ID { ID_NAME = MINID , ID_CREATE_VP , ID_CLOSE_VP }
 
enum  GUI_STYLE {
  GS_DEFAULT = 0 , GS_READONLY_NAME = 1 , GS_NO_NAME = 2 , GS_NO_CREATE_VP = 4 ,
  GS_NO_CLOSE_VP = 8
}
 
typedef struct albaGUIDynamicVP::SUPPORTED_VP_ENTRY SUPPORTED_VP_ENTRY
 

Public Member Functions

 albaGUIDynamicVP (wxWindow *parent, wxWindowID id, long GUIstyle=GS_DEFAULT, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
 
virtual ~albaGUIDynamicVP ()
 
albaObserverGetListener ()
 
void SetListener (albaObserver *Listener)
 
const char * GetName ()
 
void SetName (const char *szNewName)
 
const SUPPORTED_VP_ENTRYGetVPipesList ()
 
void SetVPipesList (const SUPPORTED_VP_ENTRY *pList)
 
int GetVPipeIndex ()
 
void SetVPipeIndex (int nNewIndex)
 
long GetGUIStyle ()
 
void SetGUIStyle (long newtyle)
 
albaSceneNodeGetSceneNode ()
 
void SetSceneNode (albaSceneNode *node)
 
albaPipeGetCurrentVisualPipe ()
 
void OnEvent (albaEventBase *e)
 
- Public Member Functions inherited from albaGUIPanel
 albaGUIPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name="panel")
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 

Protected Member Functions

 DECLARE_EVENT_TABLE ()
 
virtual void CreateVisualPipe (const char *classname)
 
virtual void DestroyVisualPipe ()
 
virtual void OnCreateVP ()
 
virtual void OnCloseVP ()
 
virtual void NotifyListener (long nData)
 
virtual wxSizer * CreateGUI (long style)
 
void OnDeferedDelete (wxEvent &event)
 

Protected Attributes

long m_GuiStyle
 
wxWindowID m_NotifyId
 
albaObserverm_Listener
 
const SUPPORTED_VP_ENTRYm_VPipes
 
int m_VPipeIndex
 
albaPipem_VPipe
 
albaSceneNodem_SceneNode
 
albaString m_Name
 
wxComboBox * m_ComboVP
 
wxPanel * m_GUI_This
 
albaGUIScrolledPanelm_GUI_VP
 
bool m_BGUIThisShown
 

Additional Inherited Members

- Public Attributes inherited from albaGUIPanel
albaGUIPanelm_NextPanel
 

Detailed Description

albaGUIDynamicVP is a wxPanel with a set of widget to handle dynamic construction/destruction of visual pipe according to the user choice.

In its default mode, it displays a GUI with a combobox containing a list of supported visual pipes (passed by the caller) and a close button. At the beginning, no visual pipe is selected. When the user changes the selection, the corresponding visual pipe is constructed and its GUI is placed bellow the widgets of this panel. Similarly, when the user clicks on the close button, the visual pipe is destroyed. After both actions are completed, the listener is notified by albaEvent with ID equal to the specified one (given in ctor) and with ID_CREATE_VP or ID_CLOSE_VP argument (see albaEvent::GetArg). albaGUIDynamicVP can be configured so it does not contain neither close button nor create combo nor any other widget. In such a special mode, the construction of visual pipe is governed by the caller.

Definition at line 52 of file albaGUIDynamicVP.h.

Member Typedef Documentation

◆ SUPPORTED_VP_ENTRY

Member Enumeration Documentation

◆ PLAYER_WIDGET_ID

Enumerator
ID_NAME 
ID_CREATE_VP 
ID_CLOSE_VP 

Definition at line 55 of file albaGUIDynamicVP.h.

◆ GUI_STYLE

Enumerator
GS_DEFAULT 
GS_READONLY_NAME 
GS_NO_NAME 
GS_NO_CREATE_VP 
GS_NO_CLOSE_VP 

Definition at line 62 of file albaGUIDynamicVP.h.

Constructor & Destructor Documentation

◆ albaGUIDynamicVP()

albaGUIDynamicVP::albaGUIDynamicVP ( wxWindow *  parent,
wxWindowID  id,
long  GUIstyle = GS_DEFAULT,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL 
)

constructor

◆ ~albaGUIDynamicVP()

virtual albaGUIDynamicVP::~albaGUIDynamicVP ( )
virtual

destructor

Member Function Documentation

◆ DECLARE_EVENT_TABLE()

albaGUIDynamicVP::DECLARE_EVENT_TABLE ( )
protected

declare event table macro

◆ GetListener()

albaObserver * albaGUIDynamicVP::GetListener ( )
inline

Gets the listener that will be notified when any control changes.

Definition at line 144 of file albaGUIDynamicVP.h.

◆ SetListener()

void albaGUIDynamicVP::SetListener ( albaObserver Listener)
inline

Specifies the listener that will be notified when any control changes.

Definition at line 149 of file albaGUIDynamicVP.h.

◆ GetName()

const char * albaGUIDynamicVP::GetName ( )
inline

Gets the currently associated name with the GUI.

Definition at line 154 of file albaGUIDynamicVP.h.

◆ SetName()

void albaGUIDynamicVP::SetName ( const char *  szNewName)

Sets a new name associated with the GUI.

◆ GetVPipesList()

const SUPPORTED_VP_ENTRY * albaGUIDynamicVP::GetVPipesList ( )
inline

Gets the current list of visual pipes.

Definition at line 162 of file albaGUIDynamicVP.h.

◆ SetVPipesList()

void albaGUIDynamicVP::SetVPipesList ( const SUPPORTED_VP_ENTRY pList)

Sets a new list of visual pipes.

◆ GetVPipeIndex()

int albaGUIDynamicVP::GetVPipeIndex ( )
inline

Gets the currently selected visual pipe.

Definition at line 170 of file albaGUIDynamicVP.h.

◆ SetVPipeIndex()

void albaGUIDynamicVP::SetVPipeIndex ( int  nNewIndex)

Sets a new visual pipe.

◆ GetGUIStyle()

long albaGUIDynamicVP::GetGUIStyle ( )
inline

Gets the current style.

Definition at line 178 of file albaGUIDynamicVP.h.

◆ SetGUIStyle()

void albaGUIDynamicVP::SetGUIStyle ( long  newtyle)

Sets a new style = combination from GUI_STYLE.

◆ GetSceneNode()

albaSceneNode * albaGUIDynamicVP::GetSceneNode ( )
inline

Gets the current scene node.

Definition at line 186 of file albaGUIDynamicVP.h.

◆ SetSceneNode()

void albaGUIDynamicVP::SetSceneNode ( albaSceneNode node)

Sets a new scene node for visual pipes.

N.B. currently constructed visual pipe is recreated, if needed.

◆ GetCurrentVisualPipe()

albaPipe * albaGUIDynamicVP::GetCurrentVisualPipe ( )
inline

Gets the currently constructed visual pipe.

Definition at line 195 of file albaGUIDynamicVP.h.

◆ OnEvent()

void albaGUIDynamicVP::OnEvent ( albaEventBase e)
virtual

process the events sent by subjects

Implements albaObserver.

◆ CreateVisualPipe()

virtual void albaGUIDynamicVP::CreateVisualPipe ( const char *  classname)
protectedvirtual

Constructs geometry visual pipe.

◆ DestroyVisualPipe()

virtual void albaGUIDynamicVP::DestroyVisualPipe ( )
protectedvirtual

Destroys geometry visual pipe.

◆ OnCreateVP()

virtual void albaGUIDynamicVP::OnCreateVP ( )
protectedvirtual

Handles the construction of VP.

◆ OnCloseVP()

virtual void albaGUIDynamicVP::OnCloseVP ( )
protectedvirtual

Handles the closing of VP.

◆ NotifyListener()

virtual void albaGUIDynamicVP::NotifyListener ( long  nData)
protectedvirtual

Notifies the listener, sending the specified notify id and nData as and argument.


◆ CreateGUI()

virtual wxSizer * albaGUIDynamicVP::CreateGUI ( long  style)
protectedvirtual

Creates GUI (to be added into m_GUI_This) according to the given style.

This routine is called from SetStyle and from the ctor. N.B. when called from ctor the overriden function is not called but this one (C++ feature).

◆ OnDeferedDelete()

void albaGUIDynamicVP::OnDeferedDelete ( wxEvent &  event)
protected

Handles destroying of controls.

Controls cannot be destroyed immediately as they are referenced by wxWidgets event handing core. Its immediate destruction would cause crash.

Member Data Documentation

◆ m_GuiStyle

long albaGUIDynamicVP::m_GuiStyle
protected

style/mode of the GUI

Definition at line 110 of file albaGUIDynamicVP.h.

◆ m_NotifyId

wxWindowID albaGUIDynamicVP::m_NotifyId
protected

Id used for when listener is notified.

Definition at line 111 of file albaGUIDynamicVP.h.

◆ m_Listener

albaObserver* albaGUIDynamicVP::m_Listener
protected

object that is notified when something changes (notified by ID)

Definition at line 112 of file albaGUIDynamicVP.h.

◆ m_VPipes

const SUPPORTED_VP_ENTRY* albaGUIDynamicVP::m_VPipes
protected

list of currently supported visual pipes, terminated by (NULL, NULL)

Definition at line 114 of file albaGUIDynamicVP.h.

◆ m_VPipeIndex

int albaGUIDynamicVP::m_VPipeIndex
protected

index of the selected visual pipe

Definition at line 116 of file albaGUIDynamicVP.h.

◆ m_VPipe

albaPipe* albaGUIDynamicVP::m_VPipe
protected

this is the current visual pipe

Definition at line 117 of file albaGUIDynamicVP.h.

◆ m_SceneNode

albaSceneNode* albaGUIDynamicVP::m_SceneNode
protected

reference to the scene node associated with this pipe

Definition at line 118 of file albaGUIDynamicVP.h.

◆ m_Name

albaString albaGUIDynamicVP::m_Name
protected

user name associated with this panel

Definition at line 119 of file albaGUIDynamicVP.h.

◆ m_ComboVP

wxComboBox* albaGUIDynamicVP::m_ComboVP
protected

Definition at line 122 of file albaGUIDynamicVP.h.

◆ m_GUI_This

wxPanel* albaGUIDynamicVP::m_GUI_This
protected

Definition at line 124 of file albaGUIDynamicVP.h.

◆ m_GUI_VP

albaGUIScrolledPanel* albaGUIDynamicVP::m_GUI_VP
protected

Definition at line 125 of file albaGUIDynamicVP.h.

◆ m_BGUIThisShown

bool albaGUIDynamicVP::m_BGUIThisShown
protected

true, if the GUIThis is shown

Definition at line 128 of file albaGUIDynamicVP.h.


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