37#define SELECT_COLNUM 0
39#define LAYERNAME_COLNUM 2
40#define LAYER_HK_COLUMN 3
84 LSET aNotAllowedLayersMask,
bool aHideCheckBoxes =
false );
93 void OnMouseMove( wxUpdateUIEvent& aEvent )
override;
116 LSET aNotAllowedLayersMask,
117 bool aHideCheckBoxes ) :
136 if( aHideCheckBoxes )
145 GetSizer()->SetSizeHints(
this );
193 if( event.GetKeyCode() == WXK_ESCAPE )
213 wxColour
color( wxColour::AlphaBlend( fg.Red(), bg.Red(), fg.Alpha() / 255.0 ),
214 wxColour::AlphaBlend( fg.Green(), bg.Green(), fg.Alpha() / 255.0 ),
215 wxColour::AlphaBlend( fg.Blue(), bg.Blue(), fg.Alpha() / 255.0 ) );
286 wxPoint aDlgPosition )
290 if( aDlgPosition != wxDefaultPosition )
292 wxSize dlgSize = dlg.GetSize();
293 aDlgPosition.x -= dlgSize.x/2;
294 aDlgPosition.y -= dlgSize.y/2;
298 if( dlg.ShowModal() != wxID_CANCEL )
344 if( dlg.ShowModal() == wxID_OK )
377 GetSizer()->SetSizeHints(
this );
396 wxColour
color( wxColour::AlphaBlend( fg.Red(), bg.Red(), fg.Alpha() / 255.0 ),
397 wxColour::AlphaBlend( fg.Green(), bg.Green(), fg.Alpha() / 255.0 ),
398 wxColour::AlphaBlend( fg.Blue(), bg.Blue(), fg.Alpha() / 255.0 ) );
439 int row =
event.GetRow();
454 int row =
event.GetRow();
Information pertinent to a Pcbnew printed circuit board.
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
bool IsLayerEnabled(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
COLOR4D GetColor(int aLayer) const
Class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE.
wxGrid * m_rightGridLayers
wxGrid * m_leftGridLayers
Class DIALOG_LAYER_SELECTION_BASE.
wxGrid * m_leftGridLayers
wxGrid * m_rightGridLayers
bool IsQuasiModal() const
void EndQuasiModal(int retCode)
void SetPosition(const wxPoint &aNewPosition)
Force the position of the dialog to a new position.
A color representation with 4 components: red, green, blue, alpha.
wxColour ToColour() const
Base class to build a layer list.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
LSET is a set of PCB_LAYER_IDs.
static TOOL_ACTION * LayerIDToAction(PCB_LAYER_ID aLayerID)
Translate a layer ID into the action that switches to that layer.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
PCB_LAYER_ID SelectOneLayer(PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask=LSET(), wxPoint aDlgPosition=wxDefaultPosition)
Show the dialog box for a layer selection.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
bool isLayerEnabled(int aLayer) const override
COLOR4D getLayerColor(int aLayer) const override
PCB_LAYER_SELECTOR(PCB_BASE_FRAME *aFrame)
wxString getLayerName(int aLayer) const override
Display a PCB layers list in a dialog to select one layer from this list.
void OnLeftGridCellClick(wxGridEvent &aEvent) override
void OnRightGridCellClick(wxGridEvent &aEvent) override
void onCharHook(wxKeyEvent &event)
~PCB_ONE_LAYER_SELECTOR()
std::vector< PCB_LAYER_ID > m_layersIdLeftColumn
LSET m_notAllowedLayersMask
PCB_ONE_LAYER_SELECTOR(PCB_BASE_FRAME *aParent, BOARD *aBrd, PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask, bool aHideCheckBoxes=false)
std::vector< PCB_LAYER_ID > m_layersIdRightColumn
void OnMouseMove(wxUpdateUIEvent &aEvent) override
PCB_LAYER_ID m_layerSelected
wxString getLayerHotKey(PCB_LAYER_ID aLayer) const
PCB_LAYER_ID m_Route_Layer_TOP
PCB_LAYER_ID m_Route_Layer_BOTTOM
Display a pair PCB copper layers list in a dialog to select a layer pair from these lists.
std::vector< PCB_LAYER_ID > m_layersId
void GetLayerPair(PCB_LAYER_ID &aFrontLayer, PCB_LAYER_ID &aBackLayer)
PCB_LAYER_ID m_frontLayer
void OnRightGridCellClick(wxGridEvent &event) override
void OnLeftGridCellClick(wxGridEvent &event) override
SELECT_COPPER_LAYERS_PAIR_DIALOG(PCB_BASE_FRAME *aParent, BOARD *aPcb, PCB_LAYER_ID aFrontLayer, PCB_LAYER_ID aBackLayer)
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
This file is part of the common library.
wxString AddHotkeyName(const wxString &aText, int aHotKey, HOTKEY_ACTION_TYPE aStyle)
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
@ LAYER_PCB_BACKGROUND
PCB background color.
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)