36 #define SELECT_COLNUM 0 37 #define COLOR_COLNUM 1 38 #define LAYERNAME_COLNUM 2 91 LSET aNotAllowedLayersMask );
110 LSET aNotAllowedLayersMask ) :
129 GetSizer()->SetSizeHints(
this );
142 if( event.GetKeyCode() == WXK_ESCAPE )
162 wxColour
color( wxColour::AlphaBlend( fg.Red(), bg.Red(), fg.Alpha() / 255.0 ),
163 wxColour::AlphaBlend( fg.Green(), bg.Green(), fg.Alpha() / 255.0 ),
164 wxColour::AlphaBlend( fg.Blue(), bg.Blue(), fg.Alpha() / 255.0 ) );
226 wxPoint aDlgPosition )
230 if( aDlgPosition != wxDefaultPosition )
232 wxSize dlgSize = dlg.GetSize();
233 aDlgPosition.x -= dlgSize.x/2;
234 aDlgPosition.y -= dlgSize.y/2;
238 if( dlg.ShowModal() != wxID_CANCEL )
287 if( dlg.ShowModal() == wxID_OK )
320 GetSizer()->SetSizeHints(
this );
339 wxColour
color( wxColour::AlphaBlend( fg.Red(), bg.Red(), fg.Alpha() / 255.0 ),
340 wxColour::AlphaBlend( fg.Green(), bg.Green(), fg.Alpha() / 255.0 ),
341 wxColour::AlphaBlend( fg.Blue(), bg.Blue(), fg.Alpha() / 255.0 ) );
382 int row =
event.GetRow();
397 int row =
event.GetRow();
PCB_LAYER_ID SelectOneLayer(PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask=LSET(), wxPoint aDlgPosition=wxDefaultPosition)
Show the dialog box for a layer selection.
Class DIALOG_LAYER_SELECTION_BASE.
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
SELECT_COPPER_LAYERS_PAIR_DIALOG(PCB_BASE_FRAME *aParent, BOARD *aPcb, PCB_LAYER_ID aFrontLayer, PCB_LAYER_ID aBackLayer)
void OnLeftGridCellClick(wxGridEvent &event) override
This file is part of the common library.
COLOR4D getLayerColor(LAYER_NUM aLayer) const override
wxString getLayerName(LAYER_NUM aLayer) const override
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings Returns a bit-mask of all t...
void OnLeftGridCellClick(wxGridEvent &event) override
bool IsLayerEnabled(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
std::vector< PCB_LAYER_ID > m_layersId
wxGrid * m_leftGridLayers
wxGrid * m_leftGridLayers
Classes used in Pcbnew, CvPcb and GerbView.
virtual COLOR_SETTINGS * GetColorSettings() const override
Helper to retrieve the current color settings.
wxGrid * m_rightGridLayers
void GetLayerPair(PCB_LAYER_ID &aFrontLayer, PCB_LAYER_ID &aBackLayer)
PCB_LAYER_ID
A quick note on layer IDs:
LSET is a set of PCB_LAYER_IDs.
void onCharHook(wxKeyEvent &event)
std::vector< PCB_LAYER_ID > m_layersIdRightColumn
void SetPosition(const wxPoint &aNewPosition)
Force the position of the dialog to a new position.
wxGrid * m_rightGridLayers
LAYER_NUM GetLayerSelection()
PCB_LAYER_ID m_Route_Layer_BOTTOM
std::vector< PCB_LAYER_ID > m_layersIdLeftColumn
~PCB_ONE_LAYER_SELECTOR()
LSET m_notAllowedLayersMask
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
int LAYER_NUM
This can be replaced with int and removed.
COLOR4D GetColor(int aLayer) const
PCB_LAYER_ID m_layerSelected
PCB_LAYER_ID m_frontLayer
PCB_LAYER_SELECTOR(PCB_BASE_FRAME *aFrame)
Information pertinent to a Pcbnew printed circuit board.
void OnRightGridCellClick(wxGridEvent &event) override
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
bool isLayerEnabled(LAYER_NUM aLayer) const override
Class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE.
void OnRightGridCellClick(wxGridEvent &event) override
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
PCB_LAYER_ID m_Route_Layer_TOP
SELECT_COPPER_LAYERS_PAIR_DIALOG displays a double pcb copper layers list in a dialog,...
PCB_ONE_LAYER_SELECTOR(PCB_BASE_FRAME *aParent, BOARD *aBrd, PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask)
A color representation with 4 components: red, green, blue, alpha.