Ember
Loading...
Searching...
No Matches
PreferencesDialog.h
Go to the documentation of this file.
1#pragma once
2
14
15#include <wx/checkbox.h>
16#include <wx/choice.h>
17#include <wx/clrpicker.h>
18#include <wx/scrolwin.h>
19#include <wx/slider.h>
20#include <wx/spinctrl.h>
21#include <wx/splitter.h>
22#include <wx/treectrl.h>
23#include <wx/wx.h>
24
33class PreferencesDialog : public wxDialog {
34 public:
35 explicit PreferencesDialog(wxWindow *parent);
36 ~PreferencesDialog() = default;
37
43 bool SelectSection(const wxString &sectionName);
44
45 private:
46 // UI Creation methods
47 void CreateLayout();
50
51 // Section panel creation methods
52 wxPanel *CreateWindowSettings(wxWindow *parent);
53 wxPanel *CreateMainPanelSettings(wxWindow *parent);
54 wxPanel *CreateBehaviorTreeViewSettings(wxWindow *parent);
55 wxPanel *CreateBottomPanelSettings(wxWindow *parent);
56 wxPanel *CreateFileExplorerTabSettings(wxWindow *parent);
57 wxPanel *CreateLogTabSettings(wxWindow *parent);
58 wxPanel *CreateSidePanelSettings(wxWindow *parent);
59 wxPanel *CreateLeftPanelSettings(wxWindow *parent);
60 wxPanel *CreateRightPanelSettings(wxWindow *parent);
61 wxPanel *CreateTabsSubSettings(wxWindow *parent);
62 wxPanel *CreateSceneHierarchyTabSettings(wxWindow *parent);
63 wxPanel *CreateParserSettings(wxWindow *parent);
64 wxPanel *CreatePerformanceSettings(wxWindow *parent);
65
66 // Event handlers
67 void OnSectionSelected(wxTreeEvent &event);
68 void OnOK(wxCommandEvent &event);
69 void OnCancel(wxCommandEvent &event);
70 void OnApply(wxCommandEvent &event);
71 void OnRestoreDefaults(wxCommandEvent &event);
72 void OnConfigureParser(wxCommandEvent &event);
73 void OnZoomSliderChanged(wxCommandEvent &event);
74 void OnMouseWheelSensitivityChanged(wxCommandEvent &event);
75 void OnPanSensitivityChanged(wxCommandEvent &event);
76 void OnStartPathModeChanged(wxCommandEvent &event);
77 void OnBrowseStartPath(wxCommandEvent &event);
78 void OnPanSmoothnessChanged(wxCommandEvent &event);
79 void OnPanStepSizeChanged(wxCommandEvent &event);
80 void OnMaxWindowUnlimitedChanged(wxCommandEvent &event);
81 void OnMaxScenesUnlimitedChanged(wxCommandEvent &event);
82 void OnBottomPanelHeightEnabledChanged(wxCommandEvent &event);
83 void OnBottomPanelMinHeightEnabledChanged(wxCommandEvent &event);
84 void OnLeftPanelWidthEnabledChanged(wxCommandEvent &event);
85 void OnLeftPanelMinWidthEnabledChanged(wxCommandEvent &event);
86 void OnRightPanelWidthEnabledChanged(wxCommandEvent &event);
87 void OnRightPanelMinWidthEnabledChanged(wxCommandEvent &event);
88 void OnHotkeyCaptureClicked(wxCommandEvent &event);
89 void OnHotkeyTextKeyDown(wxKeyEvent &event);
90 void OnDialogMouseDown(wxMouseEvent &event);
91 void OnSliderMouseWheel(wxMouseEvent &event);
92
93 // Settings management
95 void ApplySettings();
96 void RestoreDefaults();
97 void ShowPanel(wxPanel *panel);
98
99 // UI Components
100 wxSplitterWindow *m_splitter;
101 wxTreeCtrl *m_sectionTree;
102 wxScrolledWindow *m_settingsPanel;
103 wxBoxSizer *m_settingsSizer;
104
105 // Section panels (created once, shown/hidden as needed)
112 wxPanel *m_sidePanelPanel; // Global side panel settings (parent node)
113 wxPanel *m_leftPanelPanel; // Left panel specific settings
114 wxPanel *m_rightPanelPanel; // Right panel specific settings
115 wxPanel *m_tabsSubPanel; // Submenu for Tabs (Scene Hierarchy, etc.)
119
120 // Window Settings Controls
121 wxChoice *m_themeChoice;
122 wxColourPickerCtrl *m_accentColorPicker;
124 // File menu hotkeys
135
136 // View menu hotkeys
141
142 // Settings menu hotkeys
147
148 // Window appearance
149 wxCheckBox *m_showStatusBar;
151 wxCheckBox *m_alwaysOnTop;
152
153 // Window constraints
154 wxSpinCtrl *m_minWindowWidth;
155 wxSpinCtrl *m_minWindowHeight;
156 wxSpinCtrl *m_maxWindowWidth;
157 wxSpinCtrl *m_maxWindowHeight;
162
163 // Main Panel Settings Controls
165 wxStaticText *m_zoomLabel;
166 wxCheckBox *m_showGrid;
167 wxSpinCtrl *m_gridSize;
168 wxColourPickerCtrl *m_gridBackgroundPicker;
169 wxColourPickerCtrl *m_gridLineColorPicker;
170 wxColourPickerCtrl *m_canvasBackgroundPicker;
171 wxColourPickerCtrl *m_connectionLineColorPicker;
173 wxColourPickerCtrl *m_pathHighlightColorPicker;
174 wxColourPickerCtrl *m_idleNodeBgColorPicker;
175 wxColourPickerCtrl *m_idleNodeBorderColorPicker;
176 wxColourPickerCtrl *m_idleNodeTextColorPicker;
181 wxColourPickerCtrl *m_selectedNodeColorPicker;
182 wxColourPickerCtrl *m_hoveredNodeColorPicker;
183 wxColourPickerCtrl *m_selectedNodeTextColorPicker;
184 wxColourPickerCtrl *m_hoveredNodeTextColorPicker;
185 wxColourPickerCtrl *m_selectedNodeInfoColorPicker;
186 wxColourPickerCtrl *m_hoveredNodeInfoColorPicker;
187 wxSpinCtrl *m_maxScenes;
194
195 // Behavior Tree View Settings Controls
196 wxSlider *m_zoomStepSize;
197 wxStaticText *m_zoomStepSizeLabel;
205 wxTextCtrl *m_panKeyTextCtrl;
209 wxStaticText *m_panSmoothnessLabel;
210 wxSlider *m_panStepSize;
211 wxStaticText *m_panStepSizeLabel;
224
225 // Debug Text Settings - Coordinate System Info
228 wxColourPickerCtrl *m_coordinateInfoColorPicker;
230 wxSpinCtrl *m_coordinateInfoX;
231 wxSpinCtrl *m_coordinateInfoY;
232
233 // Debug Text Settings - Selected Node Info
240
241 // Debug Text Settings - Tree Statistics Info
242 wxCheckBox *m_showTreeInfo;
244 wxColourPickerCtrl *m_treeInfoColorPicker;
246 wxSpinCtrl *m_treeInfoX;
247 wxSpinCtrl *m_treeInfoY;
248
249 // Debug Text Settings - FPS Display
250 wxCheckBox *m_showFPS;
251 wxSpinCtrl *m_fpsFontSize;
252 wxColourPickerCtrl *m_fpsColorPicker;
253 wxChoice *m_fpsAnchor;
254 wxSpinCtrl *m_fpsX;
255 wxSpinCtrl *m_fpsY;
256
257 // Debug Text Settings - Controls Help Text
260 wxColourPickerCtrl *m_controlsHelpColorPicker;
262 wxSpinCtrl *m_controlsHelpX;
263 wxSpinCtrl *m_controlsHelpY;
264
265 // Bottom Panel Settings Controls
272 wxCheckBox *m_rememberLastTab;
274
275 // File Explorer Tab General Settings Controls
276 wxCheckBox *m_showBreadcrumb;
277 wxCheckBox *m_showHistory;
279 wxTextCtrl *m_customStartPath;
281
282 // Tree View Settings Controls
286 wxChoice *m_treeItemSize;
287
288 // Grid View Settings Controls
292 wxChoice *m_gridIconSize;
293
294 // Log Tab Settings Controls
297 wxSpinCtrl *m_logMaxEntries;
298 wxChoice *m_logFontSize;
301 wxColourPickerCtrl *m_logTraceColor;
302 wxColourPickerCtrl *m_logInfoColor;
303 wxColourPickerCtrl *m_logWarningColor;
304 wxColourPickerCtrl *m_logErrorColor;
305 wxColourPickerCtrl *m_logCriticalColor;
306
307 // Side Panel Settings Controls (global - currently empty)
308
309 // Left Panel Settings Controls
311 wxSpinCtrl *m_leftPanelWidth;
318
319 // Right Panel Settings Controls
321 wxSpinCtrl *m_rightPanelWidth;
328
329 // Scene Hierarchy Tab Settings Controls
330 // Display
335 wxChoice *m_hierarchyIconSize; // Small (16), Medium (20), Large (24)
337 // NOTE: Color controls removed - GTK controls selection colors
338 // Behavior
344 // Context Menu
349 // Performance
351
352 // Parser Settings Controls
354 wxChoice *m_fileEncoding;
357
358 // Performance Settings Controls
359 wxCheckBox *m_enableVSync;
360 wxChoice *m_fpsLimit;
370
371 // Buttons
372 wxButton *m_okButton;
373 wxButton *m_cancelButton;
374 wxButton *m_applyButton;
376
377 // Mouse capture tracking
379
381
382 // Control IDs
383 enum {
388
389 // Window settings
412
413 // Main panel settings
437
438 // Behavior tree view settings
462
463 // Debug text settings - Coordinate System Info
469
470 // Debug text settings - Selected Node Info
476
477 // Debug text settings - Tree Statistics Info
483
484 // Debug text settings - Controls Help Text
490
491 // Bottom panel settings
494
495 // Tree View IDs
500
501 // Grid View IDs
506
507 // File Explorer General IDs
511
512 // Left panel settings
515
516 // Right panel settings
519
520 // Scene Hierarchy Tab settings
525
526 // Parser settings
530
531 // Performance settings
541 };
542};
wxTextCtrl * m_customStartPath
wxSlider * m_hoveredNodeBgTint
wxCheckBox * m_treeShowHiddenFiles
wxCheckBox * m_rightPanelShowTabCloseButtons
wxButton * m_preferencesHotkeyCaptureButton
void CreateSectionList()
wxPanel * CreateParserSettings(wxWindow *parent)
wxCheckBox * m_allowPanelCollapse
wxCheckBox * m_zoomFollowsCursor
wxSpinCtrl * m_coordinateInfoX
wxColourPickerCtrl * m_coordinateInfoColorPicker
wxChoice * m_startupModeChoice
wxCheckBox * m_rightPanelWidthEnabled
wxCheckBox * m_showPanelCaptions
wxCheckBox * m_leftPanelRememberLastTab
void OnCancel(wxCommandEvent &event)
wxBoxSizer * m_settingsSizer
wxCheckBox * m_logAutoScrollEnabled
wxCheckBox * m_leftPanelWidthEnabled
wxColourPickerCtrl * m_hoveredNodeTextColorPicker
wxColourPickerCtrl * m_treeInfoColorPicker
void OnLeftPanelMinWidthEnabledChanged(wxCommandEvent &event)
wxTextCtrl * m_panUpHotkeyTextCtrl
wxChoice * m_rightPanelStartup
wxPanel * CreateRightPanelSettings(wxWindow *parent)
wxSpinCtrl * m_minWindowHeight
wxColourPickerCtrl * m_logErrorColor
wxButton * m_previousSceneHotkeyCaptureButton
wxSpinCtrl * m_bottomPanelMinHeight
wxChoice * m_selectedNodeInfoAnchor
wxCheckBox * m_enableAntiAliasing
wxCheckBox * m_bottomPanelMinHeightEnabled
wxPanel * CreateLogTabSettings(wxWindow *parent)
void OnPanSensitivityChanged(wxCommandEvent &event)
wxTextCtrl * m_aspectRatioHeight
void OnApply(wxCommandEvent &event)
wxStaticText * m_hoveredNodeBgTintLabel
wxColourPickerCtrl * m_canvasBackgroundPicker
wxCheckBox * m_showTreeInfo
wxCheckBox * m_logEnableGuiColors
wxButton * m_panRightHotkeyCaptureButton
void OnDialogMouseDown(wxMouseEvent &event)
wxSpinCtrl * m_rightPanelMinWidth
wxButton * m_centerOnNodeHotkeyCaptureButton
wxCheckBox * m_autoLoadLastFile
wxTextCtrl * m_preferencesHotkeyTextCtrl
wxButton * m_maximizeHotkeyCaptureButton
wxButton * m_nextSceneHotkeyCaptureButton
wxCheckBox * m_leftPanelMinWidthEnabled
wxColourPickerCtrl * m_controlsHelpColorPicker
wxSpinCtrl * m_controlsHelpFontSize
void OnBrowseStartPath(wxCommandEvent &event)
wxStaticText * m_panSmoothnessLabel
wxCheckBox * m_showControlsHelp
wxCheckBox * m_showSelectedNodeInfo
void OnPanSmoothnessChanged(wxCommandEvent &event)
wxColourPickerCtrl * m_logInfoColor
wxColourPickerCtrl * m_gridBackgroundPicker
wxTextCtrl * m_centerOnNodeHotkeyTextCtrl
void ShowPanel(wxPanel *panel)
wxCheckBox * m_showHistory
wxTextCtrl * m_previousSceneHotkeyTextCtrl
wxStaticText * m_selectedNodeBgTintLabel
wxChoice * m_controlsHelpAnchor
wxColourPickerCtrl * m_logTraceColor
wxColourPickerCtrl * m_idleNodeTextColorPicker
wxButton * m_resetViewHotkeyCaptureButton
wxColourPickerCtrl * m_hoveredNodeColorPicker
wxCheckBox * m_showCoordinateInfo
wxCheckBox * m_maxScenesUnlimited
wxSpinCtrl * m_hierarchyTreeIndentationSize
wxCheckBox * m_hardwareAcceleration
wxSpinCtrl * m_coordinateInfoFontSize
wxColourPickerCtrl * m_idleNodeBorderColorPicker
wxButton * m_newProjectHotkeyCaptureButton
wxCheckBox * m_alwaysOnTop
void OnPanStepSizeChanged(wxCommandEvent &event)
wxButton * m_panLeftHotkeyCaptureButton
void OnMaxScenesUnlimitedChanged(wxCommandEvent &event)
wxSpinCtrl * m_controlsHelpX
wxButton * m_panUpHotkeyCaptureButton
wxButton * m_configureParserButton
PreferencesDialog(wxWindow *parent)
wxCheckBox * m_rightPanelMinWidthEnabled
wxChoice * m_coordinateInfoAnchor
wxSpinCtrl * m_selectedNodeInfoY
wxSpinCtrl * m_maxWindowWidth
wxSpinCtrl * m_selectedNodeInfoX
wxButton * m_panKeyCaptureButton
wxColourPickerCtrl * m_pathHighlightColorPicker
wxTextCtrl * m_parserConfigHotkeyTextCtrl
wxTextCtrl * m_maximizeHotkeyTextCtrl
wxCheckBox * m_leftPanelShowTabCloseButtons
wxCheckBox * m_hierarchyShowDuplicate
wxCheckBox * m_hierarchyShowDelete
wxSpinCtrl * m_selectedNodeInfoFontSize
wxStaticText * m_zoomStepSizeLabel
wxCheckBox * m_hierarchySyncWithCanvas
wxCheckBox * m_enforceAspectRatio
wxStaticText * m_mouseWheelSensitivityLabel
wxCheckBox * m_hierarchyLiveSearch
wxCheckBox * m_treeShowFileExtensions
wxCheckBox * m_enableIdleProcessing
void OnMaxWindowUnlimitedChanged(wxCommandEvent &event)
wxPanel * CreateTabsSubSettings(wxWindow *parent)
void OnStartPathModeChanged(wxCommandEvent &event)
wxCheckBox * m_highlightPathToSelected
wxTextCtrl * m_panDownHotkeyTextCtrl
wxCheckBox * m_showParseWarnings
wxCheckBox * m_bottomPanelHeightEnabled
wxChoice * m_hierarchyIconSize
wxSlider * m_mouseWheelSensitivity
wxButton * m_parserConfigHotkeyCaptureButton
void OnHotkeyTextKeyDown(wxKeyEvent &event)
wxColourPickerCtrl * m_logCriticalColor
void OnHotkeyCaptureClicked(wxCommandEvent &event)
void OnSectionSelected(wxTreeEvent &event)
wxCheckBox * m_hierarchyShowTreeLines
wxColourPickerCtrl * m_hoveredNodeInfoColorPicker
wxCheckBox * m_enableTextAntiAliasing
wxCheckBox * m_enableVSync
wxStaticText * m_panStepSizeLabel
wxSpinCtrl * m_rightPanelWidth
wxButton * m_resetUIHotkeyCaptureButton
wxPanel * m_sceneHierarchyPanel
void OnOK(wxCommandEvent &event)
wxButton * m_openFileHotkeyCaptureButton
wxColourPickerCtrl * m_fpsColorPicker
wxCheckBox * m_logEnableConsoleColors
wxPanel * CreatePerformanceSettings(wxWindow *parent)
wxSlider * m_selectedNodeBgTint
wxTextCtrl * m_panLeftHotkeyTextCtrl
wxButton * m_deleteNodeHotkeyCaptureButton
wxTextCtrl * m_openProjectHotkeyTextCtrl
wxCheckBox * m_hierarchyShowNodeIcons
void OnRightPanelMinWidthEnabledChanged(wxCommandEvent &event)
wxCheckBox * m_hierarchyAutoExpandOnLoad
wxPanel * CreateBehaviorTreeViewSettings(wxWindow *parent)
wxChoice * m_hierarchyDoubleClickAction
wxTextCtrl * m_saveAsHotkeyTextCtrl
wxCheckBox * m_leftPanelAllowCollapse
wxTextCtrl * m_panKeyTextCtrl
wxCheckBox * m_enableDoubleBuffering
~PreferencesDialog()=default
wxCheckBox * m_maxWindowUnlimited
bool SelectSection(const wxString &sectionName)
Select a section in the preferences tree by name.
wxColourPickerCtrl * m_selectedNodeInfoColorPicker
wxPanel * CreateMainPanelSettings(wxWindow *parent)
wxCheckBox * m_enableBackgroundErase
void OnBottomPanelHeightEnabledChanged(wxCommandEvent &event)
wxChoice * m_hierarchyCtrlClickAction
wxPanel * CreateBottomPanelSettings(wxWindow *parent)
wxStaticText * m_panSensitivityLabel
wxSpinCtrl * m_leftPanelMinWidth
wxPanel * CreateSidePanelSettings(wxWindow *parent)
wxCheckBox * m_gridShowFileExtensions
wxPanel * m_behaviorTreeViewPanel
wxColourPickerCtrl * m_accentColorPicker
wxTextCtrl * m_capturingTextCtrl
wxChoice * m_closeConfirmation
wxTextCtrl * m_resetViewHotkeyTextCtrl
wxColourPickerCtrl * m_selectedNodeDebugInfoColorPicker
wxColourPickerCtrl * m_selectedNodeTextColorPicker
wxScrolledWindow * m_settingsPanel
wxButton * m_openProjectHotkeyCaptureButton
wxSpinCtrl * m_coordinateInfoY
void OnLeftPanelWidthEnabledChanged(wxCommandEvent &event)
wxCheckBox * m_showTabCloseButtons
wxTextCtrl * m_resetUIHotkeyTextCtrl
wxCheckBox * m_hierarchyShowSearchBar
wxButton * m_panDownHotkeyCaptureButton
wxColourPickerCtrl * m_selectedNodeColorPicker
wxButton * m_restoreDefaultsButton
wxButton * m_saveAsHotkeyCaptureButton
wxTextCtrl * m_nextSceneHotkeyTextCtrl
wxCheckBox * m_gridShowHiddenFiles
wxSpinCtrl * m_minWindowWidth
wxTextCtrl * m_panRightHotkeyTextCtrl
wxChoice * m_bottomPanelStartup
wxSpinCtrl * m_fpsFontSize
wxTextCtrl * m_saveHotkeyTextCtrl
void OnZoomSliderChanged(wxCommandEvent &event)
void OnBottomPanelMinHeightEnabledChanged(wxCommandEvent &event)
wxSpinCtrl * m_maxWindowHeight
wxSplitterWindow * m_splitter
wxSpinCtrl * m_viewportCullingMargin
wxSpinCtrl * m_controlsHelpY
wxSpinCtrl * m_leftPanelWidth
wxTextCtrl * m_newProjectHotkeyTextCtrl
wxSlider * m_defaultZoomSlider
wxColourPickerCtrl * m_idleNodeBgColorPicker
wxColourPickerCtrl * m_logWarningColor
wxButton * m_saveHotkeyCaptureButton
wxCheckBox * m_showStatusBar
wxTextCtrl * m_aspectRatioWidth
wxPanel * CreateFileExplorerTabSettings(wxWindow *parent)
wxChoice * m_leftPanelStartup
wxTreeCtrl * m_sectionTree
wxTextCtrl * m_openFileHotkeyTextCtrl
wxSpinCtrl * m_hierarchyFontSize
wxCheckBox * m_hierarchyShowRename
void OnConfigureParser(wxCommandEvent &event)
wxCheckBox * m_enableSmoothPanning
wxPanel * CreateSceneHierarchyTabSettings(wxWindow *parent)
wxCheckBox * m_rightPanelAllowCollapse
wxColourPickerCtrl * m_gridLineColorPicker
wxCheckBox * m_hierarchyShowAddChild
wxTextCtrl * m_deleteNodeHotkeyTextCtrl
wxCheckBox * m_rightPanelRememberLastTab
wxStaticText * m_zoomLabel
wxSpinCtrl * m_treeInfoFontSize
wxCheckBox * m_showBreadcrumb
void OnRightPanelWidthEnabledChanged(wxCommandEvent &event)
void OnMouseWheelSensitivityChanged(wxCommandEvent &event)
wxCheckBox * m_rememberLastTab
wxCheckBox * m_hierarchyRememberExpandedNodes
void OnRestoreDefaults(wxCommandEvent &event)
wxCheckBox * m_enableViewportCulling
wxSpinCtrl * m_bottomPanelHeight
wxCheckBox * m_enablePartialRedraws
wxPanel * CreateLeftPanelSettings(wxWindow *parent)
wxSpinCtrl * m_logMaxEntries
wxColourPickerCtrl * m_connectionLineColorPicker
void OnSliderMouseWheel(wxMouseEvent &event)
wxPanel * CreateWindowSettings(wxWindow *parent)
wxChoice * m_logDefaultLevelFilter