ALBA
|
#include <albaGUIDynamicVP.h>
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 () |
albaObserver * | GetListener () |
void | SetListener (albaObserver *Listener) |
const char * | GetName () |
void | SetName (const char *szNewName) |
const SUPPORTED_VP_ENTRY * | GetVPipesList () |
void | SetVPipesList (const SUPPORTED_VP_ENTRY *pList) |
int | GetVPipeIndex () |
void | SetVPipeIndex (int nNewIndex) |
long | GetGUIStyle () |
void | SetGUIStyle (long newtyle) |
albaSceneNode * | GetSceneNode () |
void | SetSceneNode (albaSceneNode *node) |
albaPipe * | GetCurrentVisualPipe () |
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 |
albaObserver * | m_Listener |
const SUPPORTED_VP_ENTRY * | m_VPipes |
int | m_VPipeIndex |
albaPipe * | m_VPipe |
albaSceneNode * | m_SceneNode |
albaString | m_Name |
wxComboBox * | m_ComboVP |
wxPanel * | m_GUI_This |
albaGUIScrolledPanel * | m_GUI_VP |
bool | m_BGUIThisShown |
Additional Inherited Members | |
Public Attributes inherited from albaGUIPanel | |
albaGUIPanel * | m_NextPanel |
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.
Enumerator | |
---|---|
ID_NAME | |
ID_CREATE_VP | |
ID_CLOSE_VP |
Definition at line 55 of file albaGUIDynamicVP.h.
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.
albaGUIDynamicVP::albaGUIDynamicVP | ( | wxWindow * | parent, |
wxWindowID | id, | ||
long | GUIstyle = GS_DEFAULT , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
constructor
|
virtual |
destructor
|
protected |
declare event table macro
|
inline |
Gets the listener that will be notified when any control changes.
Definition at line 144 of file albaGUIDynamicVP.h.
|
inline |
Specifies the listener that will be notified when any control changes.
Definition at line 149 of file albaGUIDynamicVP.h.
|
inline |
Gets the currently associated name with the GUI.
Definition at line 154 of file albaGUIDynamicVP.h.
void albaGUIDynamicVP::SetName | ( | const char * | szNewName | ) |
Sets a new name associated with the GUI.
|
inline |
Gets the current list of visual pipes.
Definition at line 162 of file albaGUIDynamicVP.h.
void albaGUIDynamicVP::SetVPipesList | ( | const SUPPORTED_VP_ENTRY * | pList | ) |
Sets a new list of visual pipes.
|
inline |
Gets the currently selected visual pipe.
Definition at line 170 of file albaGUIDynamicVP.h.
void albaGUIDynamicVP::SetVPipeIndex | ( | int | nNewIndex | ) |
Sets a new visual pipe.
|
inline |
Gets the current style.
Definition at line 178 of file albaGUIDynamicVP.h.
void albaGUIDynamicVP::SetGUIStyle | ( | long | newtyle | ) |
Sets a new style = combination from GUI_STYLE.
|
inline |
Gets the current scene node.
Definition at line 186 of file albaGUIDynamicVP.h.
void albaGUIDynamicVP::SetSceneNode | ( | albaSceneNode * | node | ) |
Sets a new scene node for visual pipes.
N.B. currently constructed visual pipe is recreated, if needed.
|
inline |
Gets the currently constructed visual pipe.
Definition at line 195 of file albaGUIDynamicVP.h.
|
virtual |
process the events sent by subjects
Implements albaObserver.
|
protectedvirtual |
Constructs geometry visual pipe.
|
protectedvirtual |
Destroys geometry visual pipe.
|
protectedvirtual |
Handles the construction of VP.
|
protectedvirtual |
Handles the closing of VP.
|
protectedvirtual |
Notifies the listener, sending the specified notify id and nData as and argument.
|
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).
|
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.
|
protected |
style/mode of the GUI
Definition at line 110 of file albaGUIDynamicVP.h.
|
protected |
Id used for when listener is notified.
Definition at line 111 of file albaGUIDynamicVP.h.
|
protected |
object that is notified when something changes (notified by ID)
Definition at line 112 of file albaGUIDynamicVP.h.
|
protected |
list of currently supported visual pipes, terminated by (NULL, NULL)
Definition at line 114 of file albaGUIDynamicVP.h.
|
protected |
index of the selected visual pipe
Definition at line 116 of file albaGUIDynamicVP.h.
|
protected |
this is the current visual pipe
Definition at line 117 of file albaGUIDynamicVP.h.
|
protected |
reference to the scene node associated with this pipe
Definition at line 118 of file albaGUIDynamicVP.h.
|
protected |
user name associated with this panel
Definition at line 119 of file albaGUIDynamicVP.h.
|
protected |
Definition at line 122 of file albaGUIDynamicVP.h.
|
protected |
Definition at line 124 of file albaGUIDynamicVP.h.
|
protected |
Definition at line 125 of file albaGUIDynamicVP.h.
|
protected |
true, if the GUIThis is shown
Definition at line 128 of file albaGUIDynamicVP.h.