14 LOG_INFO(
"Panel",
"Created LeftSidePanel with wxAuiToolBar");
42 LOG_INFO(
"Panel",
"*** LeftSidePanel::OnPanelSpecificSetup() called ***");
44 LOG_INFO(
"Panel",
"LeftSidePanel::OnPanelSpecificSetup() completed");
48 LOG_INFO(
"Panel",
"Left panel add tab button clicked - showing tab creation menu");
57 LOG_INFO(
"Panel",
"Adding Properties tab to left panel");
66 LOG_ERROR(
"LeftPanel",
"Cannot apply preferences - notebook is null");
72 if (settings.showTabCloseButtons) {
73 style |= wxAUI_NB_CLOSE_ON_ACTIVE_TAB;
75 style &= ~wxAUI_NB_CLOSE_ON_ACTIVE_TAB;
80 wxString::Format(
"Applied preferences - closeButtons: %d", settings.showTabCloseButtons).ToStdString());
97 if (activeIndex != wxNOT_FOUND && activeIndex <
static_cast<int>(
GetNotebook()->GetPageCount())) {
98 wxString tabDisplayName =
GetNotebook()->GetPageText(activeIndex);
102 for (
const auto &tabType : sidePanelTabs) {
105 LOG_INFO(
"LeftPanel", std::string(
"Saved last active tab: ") + settings.lastActiveTab);
112 settings.lastOpenTabs.clear();
113 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
114 wxString tabDisplayName =
GetNotebook()->GetPageText(i);
118 for (
const auto &tabType : sidePanelTabs) {
125 LOG_INFO(
"LeftPanel", wxString::Format(
"Saved %zu open tabs", settings.lastOpenTabs.size()).ToStdString());
136 if (settings.rememberLastTab && !settings.lastOpenTabs.empty()) {
138 LOG_INFO(
"LeftPanel", wxString::Format(
"Restoring %zu open tabs", settings.lastOpenTabs.size()).ToStdString());
140 for (
const auto &tabTypeStr : settings.lastOpenTabs) {
145 bool alreadyOpen =
false;
146 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
147 if (
GetNotebook()->GetPageText(i) == tabDisplayName) {
156 LOG_INFO(
"LeftPanel", wxString::Format(
"Restored tab: %s", tabDisplayName).ToStdString());
161 wxString targetTabName =
164 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
165 if (
GetNotebook()->GetPageText(i) == targetTabName) {
167 LOG_INFO(
"LeftPanel", wxString::Format(
"Selected active tab: %s", targetTabName).ToStdString());
176 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
177 if (
GetNotebook()->GetPageText(i) == targetTabName) {
179 LOG_INFO(
"LeftPanel", wxString::Format(
"Selected default tab: %s", targetTabName).ToStdString());
BehaviorTreeProjectDialog::OnProjectNameChanged BehaviorTreeProjectDialog::OnRemoveFiles wxEND_EVENT_TABLE() BehaviorTreeProjectDialog
wxBEGIN_EVENT_TABLE(LeftSidePanel, SidePanel) EVT_MENU(ID_ADD_PROPERTIES_TAB
#define LOG_ERROR(category, message)
#define LOG_INFO(category, message)
MainFrame::OnExit EVT_MENU(wxID_ABOUT, MainFrame::OnAbout) EVT_MENU(ID_NewProject
AppPreferences & GetPreferences()
static AppPreferencesManager & GetInstance()
LeftPanelSettings & GetLeftPanelSettings()
static wxString GetTabDisplayName(TabType type)
Get the display name for a tab type.
static std::vector< TabType > GetSidePanelTabTypes()
Get tab types supported by the side panels.
static std::string TabTypeToString(TabType type)
Convert tab type to string identifier (for preferences storage)
static TabType StringToTabType(const std::string &str)
Convert string identifier to tab type.
wxAuiNotebook * GetNotebook() const
Returns the underlying wxAuiNotebook.
Left sidebar panel specialized for left-side functionality.
std::string GetLastActiveTab() const override
void OnAddTabButtonClicked(wxCommandEvent &event) override
const std::vector< std::string > & GetLastOpenTabs() const override
void RestoreState() override
bool GetRememberLastTab() const override
void OnPanelSpecificSetup() override
void ApplyPreferences() override
std::vector< EmberForge::TabType > GetSupportedTabTypes() const override
std::string GetDefaultActiveTab() const override
void SaveState() override
void OnAddPropertiesTab(wxCommandEvent &event)
Main application window for EmberForge.
void RestoreAndEnsureTabs()
void ShowTabCreationMenu()
void CreateAndAddTab(EmberForge::TabType tabType)
TabType
Enumeration of available tab types.
std::vector< EmberCore::String > lastOpenTabs
EmberCore::String defaultActiveTab
EmberCore::String lastActiveTab