KiCad PCB EDA Suite
Loading...
Searching...
No Matches
net_selector.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
23
24
25class BOARD;
26class NETINFO_LIST;
28
29
31{
32public:
33 // Note: this list of arguments is here because it keeps us from having to customize
34 // the constructor calls in wxFormBuilder.
35 NET_SELECTOR( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition,
36 const wxSize &size = wxDefaultSize, long style = 0 );
37
38 void SetNetInfo( const NETINFO_LIST* aNetInfoList );
39
40 // Set to wxEmptyString to disallow indeterminate settings
41 void SetIndeterminateString( const wxString& aString );
42
43 void SetSelectedNetcode( int aNetcode );
44 void SetSelectedNet( const wxString& aNetname );
45 void SetIndeterminate();
46
47 bool IsIndeterminate();
49 wxString GetSelectedNetname();
50
51 void SetSelectedString( const wxString& aString ) override
52 {
53 wxFAIL_MSG( "Unsupported; use SetSelectedNet() or SetSelectedNetcode()" );
54 }
55
56protected:
59};
60
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
FILTER_COMBOBOX(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
Container for NETINFO_ITEM elements, which are the nets.
Definition netinfo.h:221
void SetNetInfo(const NETINFO_LIST *aNetInfoList)
void SetSelectedString(const wxString &aString) override
wxString m_indeterminateString
NET_SELECTOR_COMBOPOPUP * m_netSelectorPopup
NET_SELECTOR(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
bool IsIndeterminate()
int GetSelectedNetcode()
void SetIndeterminateString(const wxString &aString)
void SetSelectedNetcode(int aNetcode)
void SetIndeterminate()
void SetSelectedNet(const wxString &aNetname)
wxString GetSelectedNetname()