25#include <wx/settings.h>
26#include <wx/dcbuffer.h>
76 SetMinSize( GetBestSize() );
172 return aOptions.
All();
180 wxCheckBox* cb =
dynamic_cast<wxCheckBox*
>( aEvent.GetEventObject() );
188 label.Printf(
_(
"Only %s" ), cb->GetLabel().Lower() );
190 menu.Append(
new wxMenuItem( &menu, wxID_ANY, label, wxEmptyString, wxITEM_NORMAL ) );
220 wxCommandEvent
dummy;
275 wxColour highlight = wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT );
276 wxColour bg = GetBackgroundColour();
288 int step = --( it->second );
292 it->first->SetBackgroundColour( step > 0 ?
flashColour( step ) : wxNullColour );
293 it->first->Refresh();
320 wxPaintDC dc(
this );
328 wxCheckBox* checkbox = pair.first;
329 int step = pair.second;
334 wxPoint checkboxPos = checkbox->GetPosition();
335 wxSize checkboxSize = checkbox->GetSize();
336 wxRect checkboxRect( checkboxPos, checkboxSize );
342 wxColour overlayColor( blend.Red(), blend.Green(), blend.Blue(), 128 );
343 dc.SetBrush( wxBrush( overlayColor ) );
344 dc.SetPen( wxPen( overlayColor ) );
345 dc.DrawRectangle( checkboxRect );
wxCheckBox * m_cbAllItems
PANEL_SELECTION_FILTER_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)
wxCheckBox * m_cbKeepouts
wxCheckBox * m_cbFootprints
wxCheckBox * m_cbLockedItems
wxCheckBox * m_cbOtherItems
wxCheckBox * m_cbGridItems
wxCheckBox * m_cbGraphics
wxCheckBox * m_cbDimensions
PCB_BASE_EDIT_FRAME * m_frame
void onPopupSelection(wxCommandEvent &aEvent)
std::map< wxCheckBox *, int > m_flashCounters
void flashCheckbox(wxCheckBox *aBox)
PCB_SELECTION_TOOL * m_tool
bool setFilterFromCheckboxes(PCB_SELECTION_FILTER_OPTIONS &aOptions)
wxCheckBox * m_onlyCheckbox
PANEL_SELECTION_FILTER(wxWindow *aParent)
void OnFlashEvent(PCB_SELECTION_FILTER_EVENT &aEvent)
void SetCheckboxesFromFilter(PCB_SELECTION_FILTER_OPTIONS &aOptions)
void onFlashTimer(wxTimerEvent &aEvent)
wxColour flashColour(int aStep) const
void OnLanguageChanged(wxCommandEvent &aEvent)
void OnFilterChanged(wxCommandEvent &aEvent) override
~PANEL_SELECTION_FILTER()
void onRightClick(wxMouseEvent &aEvent)
void onPanelPaint(wxPaintEvent &aEvent)
Common, abstract interface for edit frames.
PCB_SELECTION_FILTER_OPTIONS m_options
void SetBorders(bool aLeft, bool aRight, bool aTop, bool aBottom)
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
wxDEFINE_EVENT(EVT_PCB_SELECTION_FILTER_FLASH, PCB_SELECTION_FILTER_EVENT)
std::vector< FAB_LAYER_COLOR > dummy
This file contains data structures that are saved in the project file or project local settings file ...
bool otherItems
Anything not fitting one of the above categories.
bool vias
Vias (all types>
bool gridItems
Grid Items.
bool keepouts
Keepout zones.
bool graphics
Graphic lines, shapes, polygons.
bool footprints
Allow selecting entire footprints.
bool text
Text (free or attached to a footprint)
bool lockedItems
Allow selecting locked items.
bool tracks
Copper tracks.
bool dimensions
Dimension items.