2 * wxCreaDevManagerDescriptionFrame.cpp
4 * Created on: 23/10/2012
8 #include "wxCreaDevManagerDescriptionPanel.h"
10 #include "images/Cicon64.xpm"
12 #include "creaDevManagerIds.h"
14 #include <wx/statbox.h>
18 BEGIN_EVENT_TABLE(wxCreaDevManagerDescriptionPanel, wxPanel)
19 EVT_BUTTON(ID_BUTTON_NEWPROJECT, wxCreaDevManagerDescriptionPanel::OnBtnNewProject)
20 EVT_BUTTON(ID_BUTTON_OPENPROJECT, wxCreaDevManagerDescriptionPanel::OnBtnOpenProject)
23 wxCreaDevManagerDescriptionPanel::wxCreaDevManagerDescriptionPanel(
26 const wxString& caption,
32 wxCreaDevManagerDescriptionPanel::Create(parent, id, caption, pos, size, style);
35 wxCreaDevManagerDescriptionPanel::~wxCreaDevManagerDescriptionPanel()
39 bool wxCreaDevManagerDescriptionPanel::Create(
42 const wxString& caption,
48 wxPanel::Create(parent, id, pos, size, style);
55 void wxCreaDevManagerDescriptionPanel::CreateView(wxString title, wxString imagePath, wxString type, std::vector< std::pair< std::string, std::string > > properties)
57 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
60 sizer->Add(new wxStaticText(this, -1, _("Welcome")),0, wxALIGN_CENTER, 0);
62 sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(Cicon)),0, wxALIGN_CENTER, 0);
64 sizer->Add(new wxStaticText(this, -1, _("Crea Development Manager")),0, wxALIGN_CENTER, 0);
68 wxStaticBox* propsBox = new wxStaticBox(this, -1, _T("&Properties"));
70 wxStaticBoxSizer* propsBoxInnerSizer = new wxStaticBoxSizer(propsBox, wxVERTICAL);
71 sizer -> Add(propsBoxInnerSizer, 1, wxCENTER | wxEXPAND | wxALL, 5);
73 wxString propsText = wxString(_T("Property 1: value 1\nProperty 2: long valuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuue 2"));
74 wxStaticText* props = new wxStaticText(this, -1, propsText, wxDefaultPosition, wxSize(140,10));
75 propsBoxInnerSizer->Add(props, 1, wxEXPAND | wxALL, 5);
78 wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
80 wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
81 sizer -> Add(actionsBoxInnerSizer, 2, wxCENTER | wxEXPAND | wxALL, 10);
83 actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_NEWPROJECT, _T("New Project")), 0, wxRIGHT | wxLEFT, 20);
84 actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPENPROJECT, _T("Open Project")), 0, wxRIGHT | wxLEFT, 20);
88 sizer->SetSizeHints(this);
94 void wxCreaDevManagerDescriptionPanel::OnBtnNewProject(wxCommandEvent& event)
96 event.ResumePropagation(1);
100 void wxCreaDevManagerDescriptionPanel::OnBtnOpenProject(wxCommandEvent& event)
102 event.ResumePropagation(1);