KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_packages_view_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_panel.h"
10
12
14
15PANEL_PACKAGES_VIEW_BASE::PANEL_PACKAGES_VIEW_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bSizer1;
18 bSizer1 = new wxBoxSizer( wxVERTICAL );
19
20 m_splitter1 = new WX_SPLITTER_WINDOW( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE );
21 m_splitter1->SetSashGravity( 0.25 );
22 m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( PANEL_PACKAGES_VIEW_BASE::m_splitter1OnIdle ), NULL, this );
23
24 m_panelList = new WX_PANEL( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE|wxTAB_TRAVERSAL );
25 wxBoxSizer* bPanelListSizer;
26 bPanelListSizer = new wxBoxSizer( wxVERTICAL );
27
28 wxBoxSizer* bSizer8;
29 bSizer8 = new wxBoxSizer( wxHORIZONTAL );
30
31 m_searchCtrl = new wxSearchCtrl( m_panelList, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
32 #ifndef __WXMAC__
33 m_searchCtrl->ShowSearchButton( true );
34 #endif
35 m_searchCtrl->ShowCancelButton( false );
36 bSizer8->Add( m_searchCtrl, 1, wxEXPAND|wxALL, 5 );
37
38 m_buttonUpdateAll = new wxButton( m_panelList, wxID_ANY, _("Update All"), wxDefaultPosition, wxDefaultSize, 0 );
39 bSizer8->Add( m_buttonUpdateAll, 0, wxBOTTOM|wxRIGHT|wxTOP, 5 );
40
41
42 bPanelListSizer->Add( bSizer8, 0, wxEXPAND, 5 );
43
44 m_packageListWindow = new wxScrolledWindow( m_panelList, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE|wxVSCROLL );
45 m_packageListWindow->SetScrollRate( 5, 5 );
46 wxBoxSizer* bSizer2;
47 bSizer2 = new wxBoxSizer( wxVERTICAL );
48
49
50 m_packageListWindow->SetSizer( bSizer2 );
51 m_packageListWindow->Layout();
52 bSizer2->Fit( m_packageListWindow );
53 bPanelListSizer->Add( m_packageListWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
54
55
56 m_panelList->SetSizer( bPanelListSizer );
57 m_panelList->Layout();
58 bPanelListSizer->Fit( m_panelList );
59 m_panelDetails = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
60 wxBoxSizer* bPanelDetailsSizer;
61 bPanelDetailsSizer = new wxBoxSizer( wxHORIZONTAL );
62
63 m_infoScrollWindow = new wxScrolledWindow( m_panelDetails, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
64 m_infoScrollWindow->SetScrollRate( 5, 5 );
65 m_infoScrollWindow->SetMinSize( wxSize( 480,-1 ) );
66
67 wxBoxSizer* bSizerScrolledWindow;
68 bSizerScrolledWindow = new wxBoxSizer( wxVERTICAL );
69
70 m_infoText = new HTML_WINDOW( m_infoScrollWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_NEVER );
71 m_infoText->SetMinSize( wxSize( -1,100 ) );
72
73 bSizerScrolledWindow->Add( m_infoText, 0, wxALL|wxEXPAND, 5 );
74
75 m_sizerVersions = new wxBoxSizer( wxVERTICAL );
76
77 m_gridVersions = new WX_GRID( m_infoScrollWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
78
79 // Grid
80 m_gridVersions->CreateGrid( 0, 5 );
81 m_gridVersions->EnableEditing( false );
82 m_gridVersions->EnableGridLines( true );
83 m_gridVersions->EnableDragGridSize( false );
84 m_gridVersions->SetMargins( 0, 0 );
85
86 // Columns
87 m_gridVersions->AutoSizeColumns();
88 m_gridVersions->EnableDragColMove( false );
89 m_gridVersions->EnableDragColSize( true );
90 m_gridVersions->SetColLabelValue( 0, _("Version") );
91 m_gridVersions->SetColLabelValue( 1, _("Download Size") );
92 m_gridVersions->SetColLabelValue( 2, _("Install Size") );
93 m_gridVersions->SetColLabelValue( 3, _("Compatible") );
94 m_gridVersions->SetColLabelValue( 4, _("Status") );
96 m_gridVersions->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
97
98 // Rows
99 m_gridVersions->EnableDragRowSize( false );
100 m_gridVersions->SetRowLabelSize( 0 );
101 m_gridVersions->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
102
103 // Label Appearance
104
105 // Cell Defaults
106 m_gridVersions->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
107 m_sizerVersions->Add( m_gridVersions, 0, wxEXPAND|wxRIGHT, 5 );
108
109 wxBoxSizer* bSizerVersionButtons;
110 bSizerVersionButtons = new wxBoxSizer( wxHORIZONTAL );
111
112 m_showAllVersions = new wxCheckBox( m_infoScrollWindow, wxID_ANY, _("Show all versions"), wxDefaultPosition, wxDefaultSize, 0 );
113 bSizerVersionButtons->Add( m_showAllVersions, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
114
115
116 bSizerVersionButtons->Add( 0, 0, 1, wxEXPAND, 5 );
117
118 m_buttonDownload = new wxButton( m_infoScrollWindow, wxID_ANY, _("Download"), wxDefaultPosition, wxDefaultSize, 0 );
119 bSizerVersionButtons->Add( m_buttonDownload, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
120
121 m_buttonAction = new wxButton( m_infoScrollWindow, wxID_ANY, _("Install"), wxDefaultPosition, wxDefaultSize, 0 );
122 bSizerVersionButtons->Add( m_buttonAction, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
123
124
125 m_sizerVersions->Add( bSizerVersionButtons, 0, wxEXPAND|wxRIGHT, 5 );
126
127
128 bSizerScrolledWindow->Add( m_sizerVersions, 0, wxEXPAND|wxRIGHT|wxLEFT, 3 );
129
130
131 m_infoScrollWindow->SetSizer( bSizerScrolledWindow );
132 m_infoScrollWindow->Layout();
133 bSizerScrolledWindow->Fit( m_infoScrollWindow );
134 bPanelDetailsSizer->Add( m_infoScrollWindow, 1, wxEXPAND, 5 );
135
136
137 m_panelDetails->SetSizer( bPanelDetailsSizer );
138 m_panelDetails->Layout();
139 bPanelDetailsSizer->Fit( m_panelDetails );
140 m_splitter1->SplitVertically( m_panelList, m_panelDetails, 0 );
141 bSizer1->Add( m_splitter1, 1, wxEXPAND|wxALL, 5 );
142
143
144 this->SetSizer( bSizer1 );
145 this->Layout();
146 bSizer1->Fit( this );
147
148 // Connect Events
149 m_buttonUpdateAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnUpdateAllClicked ), NULL, this );
150 m_infoScrollWindow->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_PACKAGES_VIEW_BASE::OnSizeInfoBox ), NULL, this );
151 m_infoText->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_PACKAGES_VIEW_BASE::OnURLClicked ), NULL, this );
152 m_infoText->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PACKAGES_VIEW_BASE::OnInfoMouseWheel ), NULL, this );
153 m_gridVersions->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PACKAGES_VIEW_BASE::OnVersionsCellClicked ), NULL, this );
154 m_showAllVersions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnShowAllVersionsClicked ), NULL, this );
155 m_buttonDownload->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnDownloadVersionClicked ), NULL, this );
156 m_buttonAction->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnVersionActionClicked ), NULL, this );
157}
158
160{
161 // Disconnect Events
162 m_buttonUpdateAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnUpdateAllClicked ), NULL, this );
163 m_infoScrollWindow->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_PACKAGES_VIEW_BASE::OnSizeInfoBox ), NULL, this );
164 m_infoText->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( PANEL_PACKAGES_VIEW_BASE::OnURLClicked ), NULL, this );
165 m_infoText->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PACKAGES_VIEW_BASE::OnInfoMouseWheel ), NULL, this );
166 m_gridVersions->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PACKAGES_VIEW_BASE::OnVersionsCellClicked ), NULL, this );
167 m_showAllVersions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnShowAllVersionsClicked ), NULL, this );
168 m_buttonDownload->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnDownloadVersionClicked ), NULL, this );
169 m_buttonAction->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGES_VIEW_BASE::OnVersionActionClicked ), NULL, this );
170
171}
const char * name
Definition: DXF_plotter.cpp:57
Add dark theme support to wxHtmlWindow.
Definition: html_window.h:35
WX_SPLITTER_WINDOW * m_splitter1
virtual void OnVersionActionClicked(wxCommandEvent &event)
wxScrolledWindow * m_packageListWindow
virtual void OnVersionsCellClicked(wxGridEvent &event)
void m_splitter1OnIdle(wxIdleEvent &)
PANEL_PACKAGES_VIEW_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnUpdateAllClicked(wxCommandEvent &event)
virtual void OnURLClicked(wxHtmlLinkEvent &event)
virtual void OnShowAllVersionsClicked(wxCommandEvent &event)
virtual void OnInfoMouseWheel(wxMouseEvent &event)
virtual void OnSizeInfoBox(wxSizeEvent &event)
wxScrolledWindow * m_infoScrollWindow
virtual void OnDownloadVersionClicked(wxCommandEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:249
#define _(s)