ALBA
albaGUINamedPanel.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUINamedPanel
5 Authors: Silvano Imboden
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaGUINamedPanel_H__
17#define __albaGUINamedPanel_H__
18//----------------------------------------------------------------------------
19// Include:
20//----------------------------------------------------------------------------
21#include "albaGUILab.h"
22#include "albaGUIPanel.h"
23#include "albaDefines.h"
24
35class ALBA_EXPORT albaGUINamedPanel: public albaGUIPanel
36{
37public:
39 albaGUINamedPanel (wxWindow* parent,wxWindowID id = -1,bool CloseButton = false,bool HideTitle = false);
42
44 void Add(wxWindow* window,int option = 0, int flag = wxEXPAND, int border = 0) {window->Reparent(this); m_Sizer->Add(window,option,flag,border);};
45
47 void Add(wxSizer* sizer, int option = 0, int flag = wxEXPAND, int border = 0) {m_Sizer->Add(sizer, option,flag,border);};
48
50 bool Remove(wxWindow* window) {return m_Sizer->Detach(window);};
51
53 bool Remove(wxSizer* sizer ) {return m_Sizer->Detach(sizer);};
54
56 void SetTitle(wxString label) {if(m_Label) m_Label->SetLabel(label);};
57
59 void SetTitleColor(wxColour *color = NULL);
60
62 wxBoxSizer * GetTopSizer() { return m_TopSizer; }
63
65 wxPanel * GetTopPanel() { return m_Top; }
66
67protected:
68 wxPanel *m_Top;
70 wxBoxSizer *m_Sizer;
71 wxBoxSizer *m_TopSizer;
73 wxColour m_Color;
74
76 DECLARE_EVENT_TABLE()
77};
78#endif
albaGUILab is a Label that notify user-click using the normal wxEvents.
Definition: albaGUILab.h:30
Class Name: albaGUINamedPanel.
bool Remove(wxWindow *window)
Remove a widget from the panel.
albaGUINamedPanel * m_NextPanel
wxBoxSizer * GetTopSizer()
Returns TopSizer.
albaGUILab * m_Label
wxBoxSizer * m_Sizer
void Add(wxSizer *sizer, int option=0, int flag=wxEXPAND, int border=0)
Add a sizer to the panel.
void SetTitleColor(wxColour *color=NULL)
Change the background color of the title.
albaGUINamedPanel(wxWindow *parent, wxWindowID id=-1, bool CloseButton=false, bool HideTitle=false)
constructor.
void Add(wxWindow *window, int option=0, int flag=wxEXPAND, int border=0)
Add a widget to the panel.
wxPanel * GetTopPanel()
Returns Top Panel.
void SetTitle(wxString label)
Set the text shown on the title-bar.
virtual ~albaGUINamedPanel()
destructor.
bool Remove(wxSizer *sizer)
Remove a sizer from the panel.
wxBoxSizer * m_TopSizer
class name: albaGUIPanel Inherits directly from wxPanel and adds the pointer to the next panel
Definition: albaGUIPanel.h:27