KiCad PCB EDA Suite
dialog_template_selector_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 17 2015)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_TEMPLATE_SELECTOR_BASE::DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxSize( 640,480 ), wxDefaultSize );
15 
16  wxBoxSizer* bmainSizer;
17  bmainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
20 
21  bmainSizer->Add( m_notebook, 0, wxEXPAND | wxALL, 3 );
22 
23  m_htmlWin = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHW_SCROLLBAR_AUTO );
24  bmainSizer->Add( m_htmlWin, 1, wxALL|wxEXPAND, 3 );
25 
26  m_staticTextTpath = new wxStaticText( this, wxID_ANY, _("Template path"), wxDefaultPosition, wxDefaultSize, 0 );
27  m_staticTextTpath->Wrap( -1 );
28  bmainSizer->Add( m_staticTextTpath, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
29 
30  wxBoxSizer* bsizerTemplateSelector;
31  bsizerTemplateSelector = new wxBoxSizer( wxHORIZONTAL );
32 
33  m_tcTemplatePath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
34  bsizerTemplateSelector->Add( m_tcTemplatePath, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
35 
36  m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
37  bsizerTemplateSelector->Add( m_buttonBrowse, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
38 
39  m_buttonValidate = new wxButton( this, wxID_ANY, _("Validate"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
40  bsizerTemplateSelector->Add( m_buttonValidate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
41 
42 
43  bmainSizer->Add( bsizerTemplateSelector, 0, wxEXPAND, 5 );
44 
45  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
46  bmainSizer->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
47 
48  m_sdbSizer = new wxStdDialogButtonSizer();
49  m_sdbSizerOK = new wxButton( this, wxID_OK );
50  m_sdbSizer->AddButton( m_sdbSizerOK );
51  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
52  m_sdbSizer->AddButton( m_sdbSizerCancel );
53  m_sdbSizer->Realize();
54 
55  bmainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 3 );
56 
57 
58  this->SetSizer( bmainSizer );
59  this->Layout();
60 
61  this->Centre( wxBOTH );
62 
63  // Connect Events
64  m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnPageChange ), NULL, this );
65  m_htmlWin->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnHtmlLinkActivated ), NULL, this );
66  m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onDirectoryBrowseClicked ), NULL, this );
67  m_buttonValidate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onValidatePath ), NULL, this );
68 }
69 
71 {
72  // Disconnect Events
73  m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnPageChange ), NULL, this );
74  m_htmlWin->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnHtmlLinkActivated ), NULL, this );
75  m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onDirectoryBrowseClicked ), NULL, this );
76  m_buttonValidate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onValidatePath ), NULL, this );
77 
78 }
79 
80 TEMPLATE_SELECTION_PANEL_BASE::TEMPLATE_SELECTION_PANEL_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
81 {
82  m_SizerBase = new wxBoxSizer( wxHORIZONTAL );
83 
84  m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL );
85  m_scrolledWindow->SetScrollRate( 5, 5 );
86  m_SizerChoice = new wxBoxSizer( wxHORIZONTAL );
87 
88 
89  m_scrolledWindow->SetSizer( m_SizerChoice );
90  m_scrolledWindow->Layout();
92  m_SizerBase->Add( m_scrolledWindow, 0, wxEXPAND | wxALL, 3 );
93 
94 
95  this->SetSizer( m_SizerBase );
96  this->Layout();
97 }
98 
100 {
101 }
102 
103 TEMPLATE_WIDGET_BASE::TEMPLATE_WIDGET_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
104 {
105  this->SetMinSize( wxSize( 74,-1 ) );
106  this->SetMaxSize( wxSize( 74,-1 ) );
107 
108  wxBoxSizer* bSizer4;
109  bSizer4 = new wxBoxSizer( wxVERTICAL );
110 
111  m_bitmapIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 64,64 ), 0 );
112  bSizer4->Add( m_bitmapIcon, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3 );
113 
114  m_staticTitle = new wxStaticText( this, wxID_ANY, _("Project Template Title"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
115  m_staticTitle->Wrap( 150 );
116  bSizer4->Add( m_staticTitle, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3 );
117 
118 
119  this->SetSizer( bSizer4 );
120  this->Layout();
121 }
122 
124 {
125 }
virtual void onValidatePath(wxCommandEvent &event)
TEMPLATE_WIDGET_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(74,-1), long style=wxTAB_TRAVERSAL)
virtual void OnPageChange(wxNotebookEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
TEMPLATE_SELECTION_PANEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1, 140), long style=wxNO_BORDER|wxTAB_TRAVERSAL)
DIALOG_TEMPLATE_SELECTOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Project Template Selector"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(640, 480), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnHtmlLinkActivated(wxHtmlLinkEvent &event)
virtual void onDirectoryBrowseClicked(wxCommandEvent &event)