Ember
Loading...
Searching...
No Matches
ProjectManagerDialog Class Reference

Dialog for opening and managing BehaviorTree projects. More...

#include <ProjectManagerDialog.h>

Inheritance diagram for ProjectManagerDialog:
EmberUI::ScalableDialog

Public Member Functions

 ProjectManagerDialog (wxWindow *parent)
 ~ProjectManagerDialog ()
wxString GetSelectedProjectPath () const
 Get the selected project path (after dialog is closed with OK)
bool HasSelectedProject () const
 Check if a project was selected.
Public Member Functions inherited from EmberUI::ScalableDialog
 ScalableDialog (wxWindow *parent, wxWindowID id, const wxString &title, const wxSize &logicalSize=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
 Constructs the dialog with logical size for DPI scaling.
virtual ~ScalableDialog ()=default

Private Types

enum  {
  ID_PROJECT_LIST = 1000 , ID_OPEN , ID_BROWSE , ID_NEW_PROJECT ,
  ID_REMOVE_FROM_RECENT , ID_CLEAR_RECENT
}

Private Member Functions

void CreateLayout ()
void OnProjectSelected (wxListEvent &event)
void OnProjectActivated (wxListEvent &event)
void OnOpen (wxCommandEvent &event)
void OnBrowse (wxCommandEvent &event)
void OnNewProject (wxCommandEvent &event)
void OnRemoveFromRecent (wxCommandEvent &event)
void OnClearRecent (wxCommandEvent &event)
void OnCancel (wxCommandEvent &event)
void LoadRecentProjects ()
void UpdateProjectDetails (const wxString &projectPath)
void ClearProjectDetails ()
void UpdateButtonStates ()
 wxDECLARE_EVENT_TABLE ()

Private Attributes

wxListCtrl * m_projectList
wxStaticText * m_projectNameLabel
wxStaticText * m_projectDescLabel
wxStaticText * m_projectPathLabel
wxStaticText * m_fileCountLabel
wxStaticText * m_lastModifiedLabel
wxButton * m_openBtn
wxButton * m_browseBtn
wxButton * m_newProjectBtn
wxButton * m_removeBtn
wxButton * m_clearBtn
wxButton * m_cancelBtn
wxString m_selectedPath

Additional Inherited Members

Protected Member Functions inherited from EmberUI::ScalableDialog
int Scaled (int px) const
 Scales a logical pixel value to physical pixels.
wxSize Scaled (const wxSize &size) const
 Scales a logical size to physical pixels.
int Margin () const
 Returns the standard margin in physical pixels.
int Spacing () const
 Returns the standard spacing in physical pixels.
int Padding () const
 Returns the standard padding in physical pixels.
wxStaticBoxSizer * CreateGroup (wxWindow *parent, const wxString &title)
 Creates a grouped section with a title.
wxBoxSizer * CreateLabeledRow (wxWindow *parent, const wxString &label, wxWindow *control, int logicalLabelWidth=Layout::LABEL_WIDTH)
 Creates a row with a label and control.

Detailed Description

Dialog for opening and managing BehaviorTree projects.

This dialog provides an interface for:

  • Viewing recent projects
  • Opening projects from file
  • Removing projects from recent list
  • Viewing project details

Definition at line 24 of file ProjectManagerDialog.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_PROJECT_LIST 
ID_OPEN 
ID_BROWSE 
ID_NEW_PROJECT 
ID_REMOVE_FROM_RECENT 
ID_CLEAR_RECENT 

Definition at line 84 of file ProjectManagerDialog.h.

Constructor & Destructor Documentation

◆ ProjectManagerDialog()

ProjectManagerDialog::ProjectManagerDialog ( wxWindow * parent)
explicit

◆ ~ProjectManagerDialog()

ProjectManagerDialog::~ProjectManagerDialog ( )

Definition at line 33 of file ProjectManagerDialog.cpp.

Member Function Documentation

◆ ClearProjectDetails()

void ProjectManagerDialog::ClearProjectDetails ( )
private

Definition at line 259 of file ProjectManagerDialog.cpp.

◆ CreateLayout()

void ProjectManagerDialog::CreateLayout ( )
private

Definition at line 35 of file ProjectManagerDialog.cpp.

◆ GetSelectedProjectPath()

wxString ProjectManagerDialog::GetSelectedProjectPath ( ) const
inline

Get the selected project path (after dialog is closed with OK)

Definition at line 32 of file ProjectManagerDialog.h.

◆ HasSelectedProject()

bool ProjectManagerDialog::HasSelectedProject ( ) const
inline

Check if a project was selected.

Definition at line 37 of file ProjectManagerDialog.h.

◆ LoadRecentProjects()

void ProjectManagerDialog::LoadRecentProjects ( )
private

Definition at line 150 of file ProjectManagerDialog.cpp.

◆ OnBrowse()

void ProjectManagerDialog::OnBrowse ( wxCommandEvent & event)
private

Definition at line 320 of file ProjectManagerDialog.cpp.

◆ OnCancel()

void ProjectManagerDialog::OnCancel ( wxCommandEvent & event)
private

Definition at line 406 of file ProjectManagerDialog.cpp.

◆ OnClearRecent()

void ProjectManagerDialog::OnClearRecent ( wxCommandEvent & event)
private

Definition at line 388 of file ProjectManagerDialog.cpp.

◆ OnNewProject()

void ProjectManagerDialog::OnNewProject ( wxCommandEvent & event)
private

Definition at line 333 of file ProjectManagerDialog.cpp.

◆ OnOpen()

void ProjectManagerDialog::OnOpen ( wxCommandEvent & event)
private

Definition at line 297 of file ProjectManagerDialog.cpp.

◆ OnProjectActivated()

void ProjectManagerDialog::OnProjectActivated ( wxListEvent & event)
private

Definition at line 291 of file ProjectManagerDialog.cpp.

◆ OnProjectSelected()

void ProjectManagerDialog::OnProjectSelected ( wxListEvent & event)
private

Definition at line 276 of file ProjectManagerDialog.cpp.

◆ OnRemoveFromRecent()

void ProjectManagerDialog::OnRemoveFromRecent ( wxCommandEvent & event)
private

Definition at line 374 of file ProjectManagerDialog.cpp.

◆ UpdateButtonStates()

void ProjectManagerDialog::UpdateButtonStates ( )
private

Definition at line 267 of file ProjectManagerDialog.cpp.

◆ UpdateProjectDetails()

void ProjectManagerDialog::UpdateProjectDetails ( const wxString & projectPath)
private

Definition at line 193 of file ProjectManagerDialog.cpp.

◆ wxDECLARE_EVENT_TABLE()

ProjectManagerDialog::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

◆ m_browseBtn

wxButton* ProjectManagerDialog::m_browseBtn
private

Definition at line 72 of file ProjectManagerDialog.h.

◆ m_cancelBtn

wxButton* ProjectManagerDialog::m_cancelBtn
private

Definition at line 76 of file ProjectManagerDialog.h.

◆ m_clearBtn

wxButton* ProjectManagerDialog::m_clearBtn
private

Definition at line 75 of file ProjectManagerDialog.h.

◆ m_fileCountLabel

wxStaticText* ProjectManagerDialog::m_fileCountLabel
private

Definition at line 67 of file ProjectManagerDialog.h.

◆ m_lastModifiedLabel

wxStaticText* ProjectManagerDialog::m_lastModifiedLabel
private

Definition at line 68 of file ProjectManagerDialog.h.

◆ m_newProjectBtn

wxButton* ProjectManagerDialog::m_newProjectBtn
private

Definition at line 73 of file ProjectManagerDialog.h.

◆ m_openBtn

wxButton* ProjectManagerDialog::m_openBtn
private

Definition at line 71 of file ProjectManagerDialog.h.

◆ m_projectDescLabel

wxStaticText* ProjectManagerDialog::m_projectDescLabel
private

Definition at line 65 of file ProjectManagerDialog.h.

◆ m_projectList

wxListCtrl* ProjectManagerDialog::m_projectList
private

Definition at line 61 of file ProjectManagerDialog.h.

◆ m_projectNameLabel

wxStaticText* ProjectManagerDialog::m_projectNameLabel
private

Definition at line 64 of file ProjectManagerDialog.h.

◆ m_projectPathLabel

wxStaticText* ProjectManagerDialog::m_projectPathLabel
private

Definition at line 66 of file ProjectManagerDialog.h.

◆ m_removeBtn

wxButton* ProjectManagerDialog::m_removeBtn
private

Definition at line 74 of file ProjectManagerDialog.h.

◆ m_selectedPath

wxString ProjectManagerDialog::m_selectedPath
private

Definition at line 79 of file ProjectManagerDialog.h.


The documentation for this class was generated from the following files: