14 LOG_INFO(
"Panel",
"Created RightSidePanel with wxAuiToolBar");
42 LOG_INFO(
"Panel",
"*** RightSidePanel::OnPanelSpecificSetup() called ***");
44 LOG_INFO(
"Panel",
"RightSidePanel::OnPanelSpecificSetup() completed");
52 LOG_INFO(
"Panel",
"Right panel add tab button clicked - showing custom menu");
58 LOG_INFO(
"Panel",
"Adding Scene Hierarchy tab to right panel");
63 LOG_INFO(
"Panel",
"Adding Properties tab to right panel");
72 LOG_ERROR(
"RightPanel",
"Cannot apply preferences - notebook is null");
78 if (settings.showTabCloseButtons) {
79 style |= wxAUI_NB_CLOSE_ON_ACTIVE_TAB;
81 style &= ~wxAUI_NB_CLOSE_ON_ACTIVE_TAB;
86 wxString::Format(
"Applied preferences - closeButtons: %d", settings.showTabCloseButtons).ToStdString());
103 if (activeIndex != wxNOT_FOUND && activeIndex <
static_cast<int>(
GetNotebook()->GetPageCount())) {
104 wxString tabDisplayName =
GetNotebook()->GetPageText(activeIndex);
108 for (
const auto &tabType : sidePanelTabs) {
111 LOG_INFO(
"RightPanel", std::string(
"Saved last active tab: ") + settings.lastActiveTab);
118 settings.lastOpenTabs.clear();
119 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
120 wxString tabDisplayName =
GetNotebook()->GetPageText(i);
124 for (
const auto &tabType : sidePanelTabs) {
131 LOG_INFO(
"RightPanel", wxString::Format(
"Saved %zu open tabs", settings.lastOpenTabs.size()).ToStdString());
142 if (settings.rememberLastTab && !settings.lastOpenTabs.empty()) {
144 LOG_INFO(
"RightPanel", wxString::Format(
"Restoring %zu open tabs", settings.lastOpenTabs.size()).ToStdString());
146 for (
const auto &tabTypeStr : settings.lastOpenTabs) {
151 bool alreadyOpen =
false;
152 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
153 if (
GetNotebook()->GetPageText(i) == tabDisplayName) {
162 LOG_INFO(
"RightPanel", wxString::Format(
"Restored tab: %s", tabDisplayName).ToStdString());
167 wxString targetTabName =
170 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
171 if (
GetNotebook()->GetPageText(i) == targetTabName) {
173 LOG_INFO(
"RightPanel", wxString::Format(
"Selected active tab: %s", targetTabName).ToStdString());
182 for (
size_t i = 0; i <
GetNotebook()->GetPageCount(); ++i) {
183 if (
GetNotebook()->GetPageText(i) == targetTabName) {
185 LOG_INFO(
"RightPanel", wxString::Format(
"Selected default tab: %s", targetTabName).ToStdString());
BehaviorTreeProjectDialog::OnProjectNameChanged BehaviorTreeProjectDialog::OnRemoveFiles wxEND_EVENT_TABLE() BehaviorTreeProjectDialog
#define LOG_ERROR(category, message)
#define LOG_INFO(category, message)
MainFrame::OnExit EVT_MENU(wxID_ABOUT, MainFrame::OnAbout) EVT_MENU(ID_NewProject
wxBEGIN_EVENT_TABLE(RightSidePanel, SidePanel) EVT_MENU(ID_ADD_PROPERTIES_TAB
AppPreferences & GetPreferences()
static AppPreferencesManager & GetInstance()
RightPanelSettings & GetRightPanelSettings()
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.
Main application window for EmberForge.
Right sidebar panel specialized for right-side functionality.
std::vector< EmberForge::TabType > GetSupportedTabTypes() const override
void OnAddTabButtonClicked(wxCommandEvent &event) override
void RestoreState() override
Restore state from preferences Virtual to allow derived classes to use their specific settings.
void SaveState() override
Save the current state (last active tab, etc.) Virtual to allow derived classes to use their specific...
const std::vector< std::string > & GetLastOpenTabs() const override
std::string GetDefaultActiveTab() const override
void OnAddSceneHierarchyTab(wxCommandEvent &event)
void ApplyPreferences() override
Apply preferences to the side panel Virtual to allow derived classes to use their specific settings.
void OnPanelSpecificSetup() override
void OnAddPropertiesTab(wxCommandEvent &event)
std::string GetLastActiveTab() const override
bool GetRememberLastTab() const override
virtual ~RightSidePanel()
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.
EmberCore::String lastActiveTab
EmberCore::String defaultActiveTab
std::vector< EmberCore::String > lastOpenTabs