KiCad PCB EDA Suite
PANEL_SELECTION_FILTER_BASE Class Reference

Class PANEL_SELECTION_FILTER_BASE. More...

#include <panel_selection_filter_base.h>

Inheritance diagram for PANEL_SELECTION_FILTER_BASE:
WX_PANEL PANEL_SELECTION_FILTER

Public Member Functions

 PANEL_SELECTION_FILTER_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(249, 146), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_SELECTION_FILTER_BASE ()
 
void SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom)
 

Protected Member Functions

virtual void OnUpdateUI (wxUpdateUIEvent &event)
 
virtual void OnFilterChanged (wxCommandEvent &event)
 

Protected Attributes

wxCheckBox * m_cbAllItems
 
wxCheckBox * m_cbLockedItems
 
wxCheckBox * m_cbFootprints
 
wxCheckBox * m_cbText
 
wxCheckBox * m_cbTracks
 
wxCheckBox * m_cbVias
 
wxCheckBox * m_cbPads
 
wxCheckBox * m_cbGraphics
 
wxCheckBox * m_cbZones
 
wxCheckBox * m_cbKeepouts
 
wxCheckBox * m_cbDimensions
 
wxCheckBox * m_cbOtherItems
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_SELECTION_FILTER_BASE()

PANEL_SELECTION_FILTER_BASE::PANEL_SELECTION_FILTER_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( 249,146 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 12 of file panel_selection_filter_base.cpp.

12  : WX_PANEL( parent, id, pos, size, style, name )
13 {
14  wxGridBagSizer* gbSizer1;
15  gbSizer1 = new wxGridBagSizer( 0, 0 );
16  gbSizer1->SetFlexibleDirection( wxBOTH );
17  gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
18 
19  m_cbAllItems = new wxCheckBox( this, wxID_ANY, _("All items"), wxDefaultPosition, wxDefaultSize, 0 );
20  m_cbAllItems->SetValue(true);
21  gbSizer1->Add( m_cbAllItems, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxTOP, 5 );
22 
23  m_cbLockedItems = new wxCheckBox( this, wxID_ANY, _("Locked items"), wxDefaultPosition, wxDefaultSize, 0 );
24  m_cbLockedItems->SetValue(true);
25  m_cbLockedItems->SetToolTip( _("Allow selection of locked items") );
26 
27  gbSizer1->Add( m_cbLockedItems, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT|wxTOP, 5 );
28 
29  m_cbFootprints = new wxCheckBox( this, wxID_ANY, _("Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
30  m_cbFootprints->SetValue(true);
31  gbSizer1->Add( m_cbFootprints, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
32 
33  m_cbText = new wxCheckBox( this, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
34  m_cbText->SetValue(true);
35  gbSizer1->Add( m_cbText, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
36 
37  m_cbTracks = new wxCheckBox( this, wxID_ANY, _("Tracks"), wxDefaultPosition, wxDefaultSize, 0 );
38  m_cbTracks->SetValue(true);
39  gbSizer1->Add( m_cbTracks, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
40 
41  m_cbVias = new wxCheckBox( this, wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
42  m_cbVias->SetValue(true);
43  gbSizer1->Add( m_cbVias, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
44 
45  m_cbPads = new wxCheckBox( this, wxID_ANY, _("Pads"), wxDefaultPosition, wxDefaultSize, 0 );
46  m_cbPads->SetValue(true);
47  gbSizer1->Add( m_cbPads, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
48 
49  m_cbGraphics = new wxCheckBox( this, wxID_ANY, _("Graphics"), wxDefaultPosition, wxDefaultSize, 0 );
50  m_cbGraphics->SetValue(true);
51  gbSizer1->Add( m_cbGraphics, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
52 
53  m_cbZones = new wxCheckBox( this, wxID_ANY, _("Zones"), wxDefaultPosition, wxDefaultSize, 0 );
54  m_cbZones->SetValue(true);
55  gbSizer1->Add( m_cbZones, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
56 
57  m_cbKeepouts = new wxCheckBox( this, wxID_ANY, _("Rule Areas"), wxDefaultPosition, wxDefaultSize, 0 );
58  m_cbKeepouts->SetValue(true);
59  gbSizer1->Add( m_cbKeepouts, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 5 );
60 
61  m_cbDimensions = new wxCheckBox( this, wxID_ANY, _("Dimensions"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_cbDimensions->SetValue(true);
63  gbSizer1->Add( m_cbDimensions, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxLEFT|wxRIGHT, 5 );
64 
65  m_cbOtherItems = new wxCheckBox( this, wxID_ANY, _("Other items"), wxDefaultPosition, wxDefaultSize, 0 );
66  m_cbOtherItems->SetValue(true);
67  gbSizer1->Add( m_cbOtherItems, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxLEFT|wxRIGHT, 5 );
68 
69 
70  this->SetSizer( gbSizer1 );
71  this->Layout();
72 
73  // Connect Events
74  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SELECTION_FILTER_BASE::OnUpdateUI ) );
75  m_cbAllItems->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
76  m_cbLockedItems->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
77  m_cbFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
78  m_cbText->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
79  m_cbTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
80  m_cbVias->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
81  m_cbPads->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
82  m_cbGraphics->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
83  m_cbZones->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
84  m_cbKeepouts->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
85  m_cbDimensions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
86  m_cbOtherItems->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
87 }
virtual void OnFilterChanged(wxCommandEvent &event)
#define _(s)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
const char * name
Definition: DXF_plotter.cpp:56
WX_PANEL(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
Definition: wx_panel.cpp:28

References _, m_cbAllItems, m_cbDimensions, m_cbFootprints, m_cbGraphics, m_cbKeepouts, m_cbLockedItems, m_cbOtherItems, m_cbPads, m_cbText, m_cbTracks, m_cbVias, m_cbZones, OnFilterChanged(), and OnUpdateUI().

◆ ~PANEL_SELECTION_FILTER_BASE()

PANEL_SELECTION_FILTER_BASE::~PANEL_SELECTION_FILTER_BASE ( )

Definition at line 89 of file panel_selection_filter_base.cpp.

90 {
91  // Disconnect Events
92  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SELECTION_FILTER_BASE::OnUpdateUI ) );
93  m_cbAllItems->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
94  m_cbLockedItems->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
95  m_cbFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
96  m_cbText->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
97  m_cbTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
98  m_cbVias->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
99  m_cbPads->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
100  m_cbGraphics->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
101  m_cbZones->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
102  m_cbKeepouts->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
103  m_cbDimensions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
104  m_cbOtherItems->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_SELECTION_FILTER_BASE::OnFilterChanged ), NULL, this );
105 
106 }
virtual void OnFilterChanged(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)

References m_cbAllItems, m_cbDimensions, m_cbFootprints, m_cbGraphics, m_cbKeepouts, m_cbLockedItems, m_cbOtherItems, m_cbPads, m_cbText, m_cbTracks, m_cbVias, m_cbZones, OnFilterChanged(), and OnUpdateUI().

Member Function Documentation

◆ OnFilterChanged()

virtual void PANEL_SELECTION_FILTER_BASE::OnFilterChanged ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_SELECTION_FILTER.

Definition at line 49 of file panel_selection_filter_base.h.

49 { event.Skip(); }

Referenced by PANEL_SELECTION_FILTER_BASE(), and ~PANEL_SELECTION_FILTER_BASE().

◆ OnUpdateUI()

virtual void PANEL_SELECTION_FILTER_BASE::OnUpdateUI ( wxUpdateUIEvent &  event)
inlineprotectedvirtual

Definition at line 48 of file panel_selection_filter_base.h.

48 { event.Skip(); }

Referenced by PANEL_SELECTION_FILTER_BASE(), and ~PANEL_SELECTION_FILTER_BASE().

◆ SetBorders()

void WX_PANEL::SetBorders ( bool  aLeft,
bool  aRight,
bool  aTop,
bool  aBottom 
)
inlineinherited

Member Data Documentation

◆ m_cbAllItems

◆ m_cbDimensions

◆ m_cbFootprints

◆ m_cbGraphics

◆ m_cbKeepouts

◆ m_cbLockedItems

◆ m_cbOtherItems

◆ m_cbPads

◆ m_cbText

◆ m_cbTracks

◆ m_cbVias

◆ m_cbZones


The documentation for this class was generated from the following files: