File: clConfigurationSelectionCtrl.h

package info (click to toggle)
codelite 12.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (50 lines) | stat: -rw-r--r-- 1,828 bytes parent folder | download
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