2006-04-23 16:14:18 -07:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
|
|
|
|
#include "Sidebar.h"
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_DYNAMIC_CLASS(Sidebar, wxPanel)
|
|
|
|
|
|
2006-06-11 00:03:59 -07:00
|
|
|
Sidebar::Sidebar(wxWindow* sidebarContainer, wxWindow* WXUNUSED(bottomBarContainer))
|
2006-05-03 19:44:03 -07:00
|
|
|
: wxPanel(sidebarContainer), m_BottomBar(NULL), m_AlreadyDisplayed(false)
|
2006-04-23 16:14:18 -07:00
|
|
|
{
|
|
|
|
|
m_MainSizer = new wxBoxSizer(wxVERTICAL);
|
|
|
|
|
SetSizer(m_MainSizer);
|
|
|
|
|
}
|
|
|
|
|
|
2006-05-03 19:44:03 -07:00
|
|
|
void Sidebar::OnSwitchAway()
|
2006-04-23 16:14:18 -07:00
|
|
|
{
|
2006-05-03 19:44:03 -07:00
|
|
|
if (m_BottomBar)
|
|
|
|
|
m_BottomBar->Show(false);
|
2006-04-23 16:14:18 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Sidebar::OnSwitchTo()
|
|
|
|
|
{
|
2006-05-03 19:44:03 -07:00
|
|
|
if (! m_AlreadyDisplayed)
|
|
|
|
|
{
|
|
|
|
|
m_AlreadyDisplayed = true;
|
|
|
|
|
OnFirstDisplay();
|
|
|
|
|
}
|
2006-04-23 16:14:18 -07:00
|
|
|
|
2006-05-03 19:44:03 -07:00
|
|
|
if (m_BottomBar)
|
|
|
|
|
m_BottomBar->Show(true);
|
2006-04-23 16:14:18 -07:00
|
|
|
}
|