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

#include <albaGUISashPanel.h>

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

Public Member Functions

 albaGUISashPanel (wxWindow *parent, wxWindowID id=-1, wxDirection side=wxRIGHT, int defaultsize=100, wxString menu_string="", bool sizable=true)
 
virtual ~albaGUISashPanel ()
 
bool Put (wxWindow *win)
 
virtual bool Show (bool show)
 
wxWindow * GetCurrGui ()
 

Protected Member Functions

virtual void OnHide (wxCommandEvent &event)
 

Protected Attributes

wxWindow * m_CurrentGui
 
wxMenuBar * m_MenuBar
 
wxFrame * m_Frame
 

Detailed Description

albaGUISashPanel is a wxSashLayoutWindow, that is a user-resizable panel docked on one side of the frame window.

In the constructor you specify the docking-side and the initial width/height. albaGUISashPanel answer to the HIDE message (and hide itself) that may be sent from a albaGUINamedPanel with a CloseButton.

To use sashes you have to place an OnSashDrag event-handler in the frame-window; I can't figure out why I can't handle that message in this class itself.

In the future may be possible to make this window dockable. (convertible to a floating window and viceversa )

albaGUISashPanel add a menu_item to the "View" menu, allowing the user to show/hide the sash; menu_string is the text showed in the menu item - if you specify an empty string the menu item will not be created.

\tech albaGUISash create a menu item called "View" (it must be present) albaGUISash must be put only on one frame - it find the menu calling frame->GetMenuBar() albaGUISash manage by itself the Show - so it can set in sync mode the checkbutton on men - do not matter to manage the UpdateUI albaGUISash::Show needs to call frame::Layout into the frame, and do it by firing a message with id = ID_LAYOUT If albaGUISash receive the message HIDE_SASH, it call directly Show, a menu event can be send anyway.

From Logic point of view:

1) To use the sash must be used an ID that remain in MENU_START MENU_END - sash create the menu-item with the own id 2) Logic must take the Sash's pointer, to call sash->Show responding to men event 3) Create the menu before the sash 4) Create the "View" menu

Definition at line 56 of file albaGUISashPanel.h.

Constructor & Destructor Documentation

◆ albaGUISashPanel()

albaGUISashPanel::albaGUISashPanel ( wxWindow *  parent,
wxWindowID  id = -1,
wxDirection  side = wxRIGHT,
int  defaultsize = 100,
wxString  menu_string = "",
bool  sizable = true 
)

◆ ~albaGUISashPanel()

virtual albaGUISashPanel::~albaGUISashPanel ( )
virtual

Member Function Documentation

◆ Put()

bool albaGUISashPanel::Put ( wxWindow *  win)

Put the panel on the panel stack removing the previous panel.

◆ Show()

virtual bool albaGUISashPanel::Show ( bool  show)
virtual

Show/Hide the Sash panel.

◆ GetCurrGui()

wxWindow * albaGUISashPanel::GetCurrGui ( )
inline

Definition at line 72 of file albaGUISashPanel.h.

References m_CurrentGui.

◆ OnHide()

virtual void albaGUISashPanel::OnHide ( wxCommandEvent &  event)
protectedvirtual

Member Data Documentation

◆ m_CurrentGui

wxWindow* albaGUISashPanel::m_CurrentGui
protected

Definition at line 75 of file albaGUISashPanel.h.

Referenced by GetCurrGui().

◆ m_MenuBar

wxMenuBar* albaGUISashPanel::m_MenuBar
protected

Definition at line 76 of file albaGUISashPanel.h.

◆ m_Frame

wxFrame* albaGUISashPanel::m_Frame
protected

Definition at line 77 of file albaGUISashPanel.h.


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