15 LOG_INFO(
"Panel",
"Created LeftSidePanel with wxAuiToolBar");
43 LOG_INFO(
"Panel",
"*** LeftSidePanel::OnPanelSpecificSetup() called ***");
45 LOG_INFO(
"Panel",
"LeftSidePanel::OnPanelSpecificSetup() completed");
49 LOG_INFO(
"Panel",
"Left panel add tab button clicked - showing tab creation menu");
59 LOG_INFO(
"Panel",
"Adding Scene Hierarchy tab to left panel");
64 LOG_INFO(
"Panel",
"Adding Properties tab to left panel");
73 LOG_ERROR(
"LeftPanel",
"Cannot apply preferences - notebook is null");
79 if (settings.showTabCloseButtons) {
80 style |= wxAUI_NB_CLOSE_ON_ACTIVE_TAB;
82 style &= ~wxAUI_NB_CLOSE_ON_ACTIVE_TAB;
87 wxString::Format(
"Applied preferences - closeButtons: %d", settings.showTabCloseButtons).ToStdString());
104 if (activeIndex != wxNOT_FOUND && activeIndex <
static_cast<int>(
GetNotebook()->GetPageCount())) {
105 wxString tabDisplayName =
GetNotebook()->GetPageText(activeIndex);
109 for (
const auto &tabType : sidePanelTabs) {
112 LOG_INFO(
"LeftPanel", std::string(
"Saved last active tab: ") + settings.lastActiveTab);
119 settings.lastOpenTabs.clear();
120 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
121 wxString tabDisplayName =
GetNotebook()->GetPageText(i);
125 for (
const auto &tabType : sidePanelTabs) {
132 LOG_INFO(
"LeftPanel", wxString::Format(
"Saved %zu open tabs", settings.lastOpenTabs.size()).ToStdString());
143 if (settings.rememberLastTab && !settings.lastOpenTabs.empty()) {
145 LOG_INFO(
"LeftPanel", wxString::Format(
"Restoring %zu open tabs", settings.lastOpenTabs.size()).ToStdString());
147 for (
const auto &tabTypeStr : settings.lastOpenTabs) {
152 bool alreadyOpen =
false;
153 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
154 if (
GetNotebook()->GetPageText(i) == tabDisplayName) {
163 LOG_INFO(
"LeftPanel", wxString::Format(
"Restored tab: %s", tabDisplayName).ToStdString());
168 wxString targetTabName =
171 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
172 if (
GetNotebook()->GetPageText(i) == targetTabName) {
174 LOG_INFO(
"LeftPanel", wxString::Format(
"Selected active tab: %s", targetTabName).ToStdString());
183 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
184 if (
GetNotebook()->GetPageText(i) == targetTabName) {
186 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.
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
Restore state from preferences Virtual to allow derived classes to use their specific settings.
void OnAddSceneHierarchyTab(wxCommandEvent &event)
bool GetRememberLastTab() const override
void OnPanelSpecificSetup() override
void ApplyPreferences() override
Apply preferences to the side panel Virtual to allow derived classes to use their specific settings.
std::vector< EmberForge::TabType > GetSupportedTabTypes() const override
std::string GetDefaultActiveTab() const override
void SaveState() override
Save the current state (last active tab, etc.) Virtual to allow derived classes to use their specific...
void OnAddPropertiesTab(wxCommandEvent &event)
Main application window for EmberForge.
Base class for sidebar panels with shared tab management backend.
void RestoreAndEnsureTabs()
EmberForge::CustomAuiNotebook * GetNotebook() const
Get the notebook widget for direct access.
void ShowTabCreationMenu()
void CreateAndAddTab(EmberForge::TabType tabType)
TabType
Enumeration of available tab types.
std::vector< EmberCore::String > lastOpenTabs
EmberCore::String defaultActiveTab
EmberCore::String lastActiveTab