Ember
Loading...
Searching...
No Matches
ProjectManagerDialog.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <vector>
5#include <wx/listctrl.h>
6#include <wx/splitter.h>
7#include <wx/wx.h>
8
9// Forward declarations
10namespace EmberCore {
12}
13
23class ProjectManagerDialog : public wxDialog {
24 public:
25 explicit ProjectManagerDialog(wxWindow *parent);
27
31 wxString GetSelectedProjectPath() const { return m_selectedPath; }
32
36 bool HasSelectedProject() const { return !m_selectedPath.IsEmpty(); }
37
38 private:
39 // UI Creation methods
40 void CreateLayout();
41
42 // Event handlers
43 void OnProjectSelected(wxListEvent &event);
44 void OnProjectActivated(wxListEvent &event);
45 void OnOpen(wxCommandEvent &event);
46 void OnBrowse(wxCommandEvent &event);
47 void OnNewProject(wxCommandEvent &event);
48 void OnRemoveFromRecent(wxCommandEvent &event);
49 void OnClearRecent(wxCommandEvent &event);
50 void OnCancel(wxCommandEvent &event);
51
52 // Helper methods
53 void LoadRecentProjects();
54 void UpdateProjectDetails(const wxString &projectPath);
56 void UpdateButtonStates();
57
58 private:
59 // Recent projects list
60 wxListCtrl *m_projectList;
61
62 // Details panel
63 wxStaticText *m_projectNameLabel;
64 wxStaticText *m_projectDescLabel;
65 wxStaticText *m_projectPathLabel;
66 wxStaticText *m_fileCountLabel;
67 wxStaticText *m_lastModifiedLabel;
68
69 // Buttons
70 wxButton *m_openBtn;
71 wxButton *m_browseBtn;
72 wxButton *m_newProjectBtn;
73 wxButton *m_removeBtn;
74 wxButton *m_clearBtn;
75 wxButton *m_cancelBtn;
76
77 // Selected project path
79
81
82 // Control IDs
84};
Represents a BehaviorTree project containing multiple XML resources.
void OnClearRecent(wxCommandEvent &event)
wxStaticText * m_projectPathLabel
void OnProjectSelected(wxListEvent &event)
wxStaticText * m_projectDescLabel
wxStaticText * m_lastModifiedLabel
void OnOpen(wxCommandEvent &event)
void UpdateProjectDetails(const wxString &projectPath)
void OnProjectActivated(wxListEvent &event)
wxString GetSelectedProjectPath() const
Get the selected project path (after dialog is closed with OK)
wxStaticText * m_projectNameLabel
bool HasSelectedProject() const
Check if a project was selected.
void OnBrowse(wxCommandEvent &event)
wxStaticText * m_fileCountLabel
ProjectManagerDialog(wxWindow *parent)
void OnCancel(wxCommandEvent &event)
void OnRemoveFromRecent(wxCommandEvent &event)
void OnNewProject(wxCommandEvent &event)
Main types header for EmberCore.