KiCad PCB EDA Suite
Loading...
Searching...
No Matches
drc_re_layers_selection_choice_popup.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License as published by the
8
* Free Software Foundation, either version 3 of the License, or (at your
9
* option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef DRC_RE_LAYER_SELECTION_CHOICE_POPUP_H
21
#define DRC_RE_LAYER_SELECTION_CHOICE_POPUP_H
22
23
#include <wx/wx.h>
24
#include <wx/combo.h>
25
#include <wx/checklst.h>
26
27
#include <
lset.h
>
28
#include <
lseq.h
>
29
30
31
class
DRC_RE_LAYER_SELECTION_CHOICE_POPUP
:
public
wxComboPopup
32
{
33
public
:
34
DRC_RE_LAYER_SELECTION_CHOICE_POPUP
() =
default
;
35
36
void
Init
()
override
;
37
38
bool
Create
( wxWindow* aParent )
override
;
39
40
wxWindow*
GetControl
()
override
;
41
42
void
SetStringValue
(
const
wxString& value )
override
;
43
44
wxString
GetStringValue
()
const override
;
45
46
wxString
GetSelectedItemsString
();
47
48
std::vector<PCB_LAYER_ID>
GetSelectedLayers
(
49
const
std::vector<PCB_LAYER_ID>& aAllLayerIds,
50
const
std::function<wxString(
PCB_LAYER_ID
)>& nameGetter );
51
52
void
SetSelections
(
const
std::vector<PCB_LAYER_ID>& aLayerIDs,
53
const
std::function<wxString(
PCB_LAYER_ID
)>& aNameGetter );
54
55
void
PopulateWithLayerIDs
(
const
std::vector<PCB_LAYER_ID>& aLayerIDs,
56
const
std::function<wxString(
PCB_LAYER_ID
)>& aNameGetter );
57
58
private
:
59
void
populate
(
const
wxArrayString& items );
60
61
private
:
62
wxCheckListBox*
m_checkListBox
;
63
wxString
m_selectedItemsString
;
64
};
65
66
#endif
// DRC_RE_LAYER_SELECTION_CHOICE_POPUP_H
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::GetStringValue
wxString GetStringValue() const override
Definition
drc_re_layers_selection_choice_popup.cpp:54
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::GetSelectedLayers
std::vector< PCB_LAYER_ID > GetSelectedLayers(const std::vector< PCB_LAYER_ID > &aAllLayerIds, const std::function< wxString(PCB_LAYER_ID)> &nameGetter)
Definition
drc_re_layers_selection_choice_popup.cpp:88
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::Create
bool Create(wxWindow *aParent) override
Definition
drc_re_layers_selection_choice_popup.cpp:35
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::m_selectedItemsString
wxString m_selectedItemsString
Definition
drc_re_layers_selection_choice_popup.h:63
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::SetStringValue
void SetStringValue(const wxString &value) override
Definition
drc_re_layers_selection_choice_popup.cpp:48
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::PopulateWithLayerIDs
void PopulateWithLayerIDs(const std::vector< PCB_LAYER_ID > &aLayerIDs, const std::function< wxString(PCB_LAYER_ID)> &aNameGetter)
Definition
drc_re_layers_selection_choice_popup.cpp:138
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::GetControl
wxWindow * GetControl() override
Definition
drc_re_layers_selection_choice_popup.cpp:42
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::m_checkListBox
wxCheckListBox * m_checkListBox
Definition
drc_re_layers_selection_choice_popup.h:62
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::SetSelections
void SetSelections(const std::vector< PCB_LAYER_ID > &aLayerIDs, const std::function< wxString(PCB_LAYER_ID)> &aNameGetter)
Definition
drc_re_layers_selection_choice_popup.cpp:112
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::populate
void populate(const wxArrayString &items)
Definition
drc_re_layers_selection_choice_popup.cpp:60
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::GetSelectedItemsString
wxString GetSelectedItemsString()
Definition
drc_re_layers_selection_choice_popup.cpp:67
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::Init
void Init() override
Definition
drc_re_layers_selection_choice_popup.cpp:29
DRC_RE_LAYER_SELECTION_CHOICE_POPUP::DRC_RE_LAYER_SELECTION_CHOICE_POPUP
DRC_RE_LAYER_SELECTION_CHOICE_POPUP()=default
PCB_LAYER_ID
PCB_LAYER_ID
A quick note on layer IDs:
Definition
layer_ids.h:60
lseq.h
lset.h
src
pcbnew
drc
rule_editor
drc_re_layers_selection_choice_popup.h
Generated on Sun Feb 1 2026 00:08:31 for KiCad PCB EDA Suite by
1.13.2