KiCad PCB EDA Suite
panel_color_settings_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12PANEL_COLOR_SETTINGS_BASE::PANEL_COLOR_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
13{
14 m_mainSizer = new wxBoxSizer( wxVERTICAL );
15
16 wxBoxSizer* bControlSizer;
17 bControlSizer = new wxBoxSizer( wxHORIZONTAL );
18
19 m_staticText9 = new wxStaticText( this, wxID_ANY, _("Theme:"), wxDefaultPosition, wxDefaultSize, 0 );
20 m_staticText9->Wrap( -1 );
21 bControlSizer->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
22
23 wxArrayString m_cbThemeChoices;
24 m_cbTheme = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbThemeChoices, 0 );
25 m_cbTheme->SetSelection( 0 );
26 m_cbTheme->SetMinSize( wxSize( 150,-1 ) );
27
28 bControlSizer->Add( m_cbTheme, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
29
30
31 bControlSizer->Add( 0, 0, 1, wxEXPAND, 5 );
32
33 m_optOverrideColors = new wxCheckBox( this, wxID_ANY, _("Override individual item colors"), wxDefaultPosition, wxDefaultSize, 0 );
34 m_optOverrideColors->SetToolTip( _("Show all items in their default color even if they have specific colors set in their properties.") );
35
36 bControlSizer->Add( m_optOverrideColors, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
37
38
39 bControlSizer->Add( 0, 0, 1, wxEXPAND, 5 );
40
41 m_btnOpenFolder = new wxButton( this, wxID_ANY, _("Open Theme Folder"), wxDefaultPosition, wxDefaultSize, 0 );
42 m_btnOpenFolder->SetToolTip( _("Open the folder containing color themes") );
43
44 bControlSizer->Add( m_btnOpenFolder, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
45
46
47 m_mainSizer->Add( bControlSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
48
49 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
50 m_mainSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
51
52 m_colorsMainSizer = new wxBoxSizer( wxHORIZONTAL );
53
54 wxBoxSizer* bottomMargin;
55 bottomMargin = new wxBoxSizer( wxVERTICAL );
56
57 m_colorsListWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxVSCROLL );
58 m_colorsListWindow->SetScrollRate( 5, 5 );
59 m_colorsListWindow->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
60 m_colorsListWindow->SetMinSize( wxSize( 240,-1 ) );
61
62 m_colorsGridSizer = new wxFlexGridSizer( 0, 2, 0, 0 );
63 m_colorsGridSizer->AddGrowableCol( 0 );
64 m_colorsGridSizer->SetFlexibleDirection( wxHORIZONTAL );
65 m_colorsGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
66
67 m_colorsGridSizer->SetMinSize( wxSize( 100,-1 ) );
68
70 m_colorsListWindow->Layout();
72 bottomMargin->Add( m_colorsListWindow, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
73
74
75 m_colorsMainSizer->Add( bottomMargin, 0, wxEXPAND|wxBOTTOM, 3 );
76
77 m_previewPanelSizer = new wxBoxSizer( wxVERTICAL );
78
79
80 m_colorsMainSizer->Add( m_previewPanelSizer, 1, wxEXPAND, 5 );
81
82
83 m_mainSizer->Add( m_colorsMainSizer, 1, wxEXPAND|wxLEFT, 5 );
84
85
86 this->SetSizer( m_mainSizer );
87 this->Layout();
88 m_mainSizer->Fit( this );
89
90 // Connect Events
91 this->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_COLOR_SETTINGS_BASE::OnSize ) );
92 m_cbTheme->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_COLOR_SETTINGS_BASE::OnThemeChanged ), NULL, this );
93 m_cbTheme->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_COLOR_SETTINGS_BASE::OnLeftDownTheme ), NULL, this );
94 m_optOverrideColors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COLOR_SETTINGS_BASE::OnOverrideItemColorsClicked ), NULL, this );
95 m_btnOpenFolder->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COLOR_SETTINGS_BASE::OnBtnOpenThemeFolderClicked ), NULL, this );
96}
97
99{
100 // Disconnect Events
101 this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_COLOR_SETTINGS_BASE::OnSize ) );
102 m_cbTheme->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_COLOR_SETTINGS_BASE::OnThemeChanged ), NULL, this );
103 m_cbTheme->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_COLOR_SETTINGS_BASE::OnLeftDownTheme ), NULL, this );
104 m_optOverrideColors->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COLOR_SETTINGS_BASE::OnOverrideItemColorsClicked ), NULL, this );
105 m_btnOpenFolder->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COLOR_SETTINGS_BASE::OnBtnOpenThemeFolderClicked ), NULL, this );
106
107}
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnSize(wxSizeEvent &event)
virtual void OnOverrideItemColorsClicked(wxCommandEvent &event)
virtual void OnLeftDownTheme(wxMouseEvent &event)
PANEL_COLOR_SETTINGS_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 OnBtnOpenThemeFolderClicked(wxCommandEvent &event)
virtual void OnThemeChanged(wxCommandEvent &event)
A wxPanel that is designed to be reset in a standard manner.
#define _(s)