1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#ifndef CLCONFIGURATIONSELECTIONCTRL_H
#define CLCONFIGURATIONSELECTIONCTRL_H
#include "drawingutils.h"
#include <wx/arrstr.h>
#include <wx/panel.h>
#define OPEN_CONFIG_MGR_STR _("Open Workspace Configuration Manager...")
class clConfigurationSelectionCtrl : public wxPanel
{
wxArrayString m_projects;
wxArrayString m_configurations;
wxString m_activeProject;
wxString m_activeConfiguration;
eButtonState m_state;
public:
clConfigurationSelectionCtrl(wxWindow* parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL);
virtual ~clConfigurationSelectionCtrl();
/**
* @brief update the list of projects and configurations available
*/
void Update(const wxArrayString& projects, const wxArrayString& configurations);
/**
* @brief clear everything
*/
void Clear();
void SetActiveConfiguration(const wxString& activeConfiguration);
void SetActiveProject(const wxString& activeProject);
void SetConfigurations(const wxArrayString& configurations) { this->m_configurations = configurations; }
void SetProjects(const wxArrayString& projects) { this->m_projects = projects; }
const wxString& GetActiveConfiguration() const { return m_activeConfiguration; }
const wxString& GetActiveProject() const { return m_activeProject; }
const wxArrayString& GetConfigurations() const { return m_configurations; }
const wxArrayString& GetProjects() const { return m_projects; }
protected:
void OnPaint(wxPaintEvent& e);
void OnEraseBG(wxEraseEvent& e);
void OnLeftDown(wxMouseEvent& e);
void OnEnterWindow(wxMouseEvent& e);
void OnLeaveWindow(wxMouseEvent& e);
};
#endif // CLCONFIGURATIONSELECTIONCTRL_H
|