KiCad PCB EDA Suite
dialog_template_selector_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version 3.10.0)
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  m_notebook->SetMinSize( wxSize( -1,100 ) );
21 
22 
23  bmainSizer->Add( m_notebook, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
24 
25  m_htmlWin = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHW_SCROLLBAR_AUTO );
26  bmainSizer->Add( m_htmlWin, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
27 
28  wxBoxSizer* bsizerTemplateSelector;
29  bsizerTemplateSelector = new wxBoxSizer( wxHORIZONTAL );
30 
31  m_staticTextTpath = new wxStaticText( this, wxID_ANY, _("Folder:"), wxDefaultPosition, wxDefaultSize, 0 );
32  m_staticTextTpath->Wrap( -1 );
33  bsizerTemplateSelector->Add( m_staticTextTpath, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
34 
35  m_tcTemplatePath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
36  bsizerTemplateSelector->Add( m_tcTemplatePath, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
37 
38  m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
39  bsizerTemplateSelector->Add( m_browseButton, 0, wxTOP|wxBOTTOM, 5 );
40 
41  m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
42  bsizerTemplateSelector->Add( m_reloadButton, 0, wxALL, 5 );
43 
44 
45  bmainSizer->Add( bsizerTemplateSelector, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
46 
47  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
48  bmainSizer->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
49 
50  m_sdbSizer = new wxStdDialogButtonSizer();
51  m_sdbSizerOK = new wxButton( this, wxID_OK );
52  m_sdbSizer->AddButton( m_sdbSizerOK );
53  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
54  m_sdbSizer->AddButton( m_sdbSizerCancel );
55  m_sdbSizer->Realize();
56 
57  bmainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 3 );
58 
59 
60  this->SetSizer( bmainSizer );
61  this->Layout();
62 
63  this->Centre( wxBOTH );
64 
65  // Connect Events
66  m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnPageChange ), NULL, this );
67  m_htmlWin->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnHtmlLinkActivated ), NULL, this );
68  m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onDirectoryBrowseClicked ), NULL, this );
69  m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onReload ), NULL, this );
70 }
71 
73 {
74  // Disconnect Events
75  m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnPageChange ), NULL, this );
76  m_htmlWin->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnHtmlLinkActivated ), NULL, this );
77  m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onDirectoryBrowseClicked ), NULL, this );
78  m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onReload ), NULL, this );
79 
80 }
81 
82 TEMPLATE_SELECTION_PANEL_BASE::TEMPLATE_SELECTION_PANEL_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
83 {
84  m_SizerBase = new wxBoxSizer( wxHORIZONTAL );
85 
86  m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
87  m_scrolledWindow->SetScrollRate( 5, 5 );
88  m_SizerChoice = new wxGridSizer( 1, 0, 0, 0 );
89 
90 
91  m_scrolledWindow->SetSizer( m_SizerChoice );
92  m_scrolledWindow->Layout();
94  m_SizerBase->Add( m_scrolledWindow, 1, wxEXPAND, 5 );
95 
96 
97  this->SetSizer( m_SizerBase );
98  this->Layout();
99 }
100 
102 {
103 }
104 
105 TEMPLATE_WIDGET_BASE::TEMPLATE_WIDGET_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
106 {
107  this->SetMinSize( wxSize( 108,-1 ) );
108  this->SetMaxSize( wxSize( 108,-1 ) );
109 
110  wxBoxSizer* bSizerMain;
111  bSizerMain = new wxBoxSizer( wxVERTICAL );
112 
113  m_bitmapIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 64,64 ), 0 );
114  m_bitmapIcon->SetMinSize( wxSize( 64,64 ) );
115 
116  bSizerMain->Add( m_bitmapIcon, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 3 );
117 
118  m_staticTitle = new wxStaticText( this, wxID_ANY, _("Project Template Title"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
119  m_staticTitle->Wrap( 100 );
120  bSizerMain->Add( m_staticTitle, 1, wxALL|wxALIGN_CENTER_HORIZONTAL, 3 );
121 
122 
123  this->SetSizer( bSizerMain );
124  this->Layout();
125 }
126 
128 {
129 }
virtual void OnPageChange(wxNotebookEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual void onReload(wxCommandEvent &event)
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, 540), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
#define _(s)
TEMPLATE_SELECTION_PANEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1, 140), long style=wxTAB_TRAVERSAL|wxBORDER_NONE, const wxString &name=wxEmptyString)
Add dark theme support to wxHtmlWindow.
Definition: html_window.h:33
TEMPLATE_WIDGET_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(108,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnHtmlLinkActivated(wxHtmlLinkEvent &event)
virtual void onDirectoryBrowseClicked(wxCommandEvent &event)