]> Creatis software - crea.git/blob - lib/creaDevManagerLib/wxCDMMainDescriptionPanel.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMMainDescriptionPanel.cpp
1 /*
2  * wxCDMMainPanel.cpp
3  *
4  *  Created on: 13/11/2012
5  *      Author: daniel
6  */
7
8 #include "wxCDMMainDescriptionPanel.h"
9 #include "creaDevManagerIds.h"
10 #include "images/Cicon64.xpm"
11
12
13 wxCDMMainDescriptionPanel::wxCDMMainDescriptionPanel(
14     wxWindow* parent,
15     wxWindowID id,
16     const wxString& caption,
17     const wxPoint& pos,
18     const wxSize& size,
19     long style
20 )
21 {
22   wxCDMMainDescriptionPanel::Create(parent, id, caption, pos, size, style);
23 }
24
25 wxCDMMainDescriptionPanel::~wxCDMMainDescriptionPanel()
26 {
27 }
28
29 bool wxCDMMainDescriptionPanel::Create(
30     wxWindow* parent,
31     wxWindowID id,
32     const wxString& caption,
33     const wxPoint& pos,
34     const wxSize& size,
35     long style
36 )
37 {
38   wxPanel::Create(parent, id, pos, size, style);
39   CreateControls();
40   return TRUE;
41 }
42
43 void wxCDMMainDescriptionPanel::CreateControls()
44 {
45   wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
46
47   //Welcome
48   sizer->Add(new wxStaticText(this, -1, _("Welcome")),0, wxALIGN_CENTER, 0);
49
50   //Image
51   sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(Cicon)),0, wxALIGN_CENTER, 0);
52
53   //Crea Development Manager
54   sizer->Add(new wxStaticText(this, -1, _("Crea Development Manager")),0, wxALIGN_CENTER, 0);
55
56   //Actions
57   wxStaticBox* actionsBox = new wxStaticBox(this, -1, _T("&Actions"));
58   wxStaticBoxSizer* actionsBoxInnerSizer = new wxStaticBoxSizer(actionsBox, wxVERTICAL);
59   sizer -> Add(actionsBoxInnerSizer, 2, wxEXPAND | wxALL, 20);
60
61   actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_NEWPROJECT, _T("New Project")), 0, wxRIGHT | wxLEFT, 20);
62   actionsBoxInnerSizer->Add(new wxButton(this, ID_BUTTON_OPENPROJECT, _T("Open Project")), 0, wxRIGHT | wxLEFT, 20);
63
64   //Asign sizer
65   sizer->SetSizeHints(this);
66   SetSizer(sizer);
67 }
68
69 void wxCDMMainDescriptionPanel::OnBtnNewProject(wxCommandEvent& event)
70 {
71   event.ResumePropagation(1);
72   event.Skip();
73 }
74
75 void wxCDMMainDescriptionPanel::OnBtnOpenProject(wxCommandEvent& event)
76 {
77   event.ResumePropagation(1);
78   event.Skip();
79 }
80