31 GetSizer()->SetSizeHints(
this );
93 int numCheckboxesOnDlg = 0;
94 wxCheckBoxState suggestedState = wxCHK_UNDETERMINED;
98 const wxWindowList& list = this->GetChildren();
100 for( wxWindowList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext() )
102 wxWindow* current = node->GetData();
105 if( wxCheckBox* currCB =
dynamic_cast<wxCheckBox*
>( current ) )
111 if( !( currCB->GetLabelText().IsEmpty() || currCB->Is3State() ) )
112 numCheckboxesOnDlg++;
128 numCheckboxesOnDlg--;
141 suggestedState = wxCHK_UNCHECKED;
142 else if( numChecked == numCheckboxesOnDlg )
143 suggestedState = wxCHK_CHECKED;
145 return suggestedState;
151 if(
m_All_Items->Get3StateValue() == wxCHK_CHECKED )
160 if( !wxDialog::TransferDataFromWindow() )
wxCheckBox * m_Include_PcbTexts
wxCheckBox * m_Include_Zones
wxCheckBox * m_Include_Draw_Items
wxCheckBox * m_IncludeLockedModules
wxCheckBox * m_Include_Modules
wxCheckBox * m_Include_Vias
DIALOG_FILTER_SELECTION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Filter Selected Items"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * m_Include_Edges_Items
wxCheckBox * m_Include_Tracks
void checkBoxClicked(wxCommandEvent &aEvent) override
DIALOG_FILTER_SELECTION(PCB_BASE_FRAME *aParent, OPTIONS &aOptions)
Create the filter selection dialog.
void forceCheckboxStates(bool aNewState)
bool TransferDataToWindow() override
bool TransferDataFromWindow() override
void allItemsClicked(wxCommandEvent &aEvent) override
wxCheckBoxState GetSuggestedAllItemsState(void)
Reference to the options struct to fill.
void SetupStandardButtons(std::map< int, wxString > aLabels={})
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
Struct that will be set with the result of the user choices in the dialog.