2007-06-05 11:35:05 -07:00
|
|
|
#include "precompiled.h"
|
2006-04-23 16:14:18 -07:00
|
|
|
|
|
|
|
|
#include "Sidebar.h"
|
|
|
|
|
|
2007-06-05 11:16:55 -07:00
|
|
|
Sidebar::Sidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* WXUNUSED(bottomBarContainer))
|
|
|
|
|
: wxPanel(sidebarContainer), m_ScenarioEditor(scenarioEditor), 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
|
|
|
}
|