KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LAYER_WIDGET Class Referenceabstract

Manage a list of layers with the notion of a "current" layer, and layer specific visibility control. More...

#include <layer_widget.h>

Inheritance diagram for LAYER_WIDGET:
GERBER_LAYER_WIDGET

Classes

struct  ROW
 Provide all the data needed to add a row to a LAYER_WIDGET. More...
 

Public Member Functions

 LAYER_WIDGET (wxWindow *aParent, wxWindow *aFocusOwner, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
 
virtual ~LAYER_WIDGET ()
 
void SetSmallestLayerString (const wxString &aString)
 Set the string that is used for determining the smallest string displayed in the layer's tab.
 
wxSize GetBestSize () const
 Return the preferred minimum size, taking into consideration the dynamic content.
 
int GetLayerRowCount () const
 Return the number of rows in the layer tab.
 
int GetRenderRowCount () const
 Return the number of rows in the render tab.
 
void AppendLayerRow (const ROW &aRow)
 Append a new row in the layer portion of the widget.
 
void AppendLayerRows (const ROW *aRowsArray, int aRowCount)
 Append new rows in the layer portion of the widget.
 
void ClearLayerRows ()
 Empty out the layer rows.
 
void AppendRenderRow (const ROW &aRow)
 Append a new row in the render portion of the widget.
 
void AppendRenderRows (const ROW *aRowsArray, int aRowCount)
 Append new rows in the render portion of the widget.
 
void ClearRenderRows ()
 Empty out the render rows.
 
void SelectLayerRow (int aRow)
 Change the row selection in the layer list to the given row.
 
void SelectLayer (int aLayer)
 Change the row selection in the layer list to aLayer provided.
 
int GetSelectedLayer ()
 Return the selected layer or -1 if none.
 
void SetLayerVisible (int aLayer, bool isVisible)
 Set aLayer visible or not.
 
bool IsLayerVisible (int aLayer)
 Return the visible state of the layer ROW associated with aLayer id.
 
void SetLayerColor (int aLayer, const COLOR4D &aColor)
 Change the color of aLayer.
 
COLOR4D GetLayerColor (int aLayer) const
 Return the color of the layer ROW associated with aLayer id.
 
COLOR4D GetRenderColor (int aRow) const
 Return the color of the Render ROW in position aRow.
 
void SetRenderState (int aId, bool isSet)
 Set the state of the checkbox associated with aId within the Render tab group of the widget.
 
bool GetRenderState (int aId)
 Return the state of the checkbox associated with aId.
 
void UpdateLayouts ()
 
void UpdateLayerIcons ()
 Update all layer manager icons (layers only).
 
virtual void OnLayerColorChange (int aLayer, const COLOR4D &aColor)=0
 Notify client code about a layer color change.
 
virtual bool OnLayerSelect (int aLayer)=0
 Notify client code whenever the user selects a different layer.
 
virtual void OnLayerVisible (int aLayer, bool isVisible, bool isFinal=true)=0
 Notify client code about a layer visibility change.
 
virtual void OnLayerRightClick (wxMenu &aMenu)=0
 Notify client code about a layer being right-clicked.
 
virtual void OnRenderColorChange (int aId, const COLOR4D &aColor)=0
 Notify client code whenever the user changes a rendering color.
 
virtual void OnRenderEnable (int aId, bool isEnabled)=0
 Notify client code whenever the user changes an rendering enable in one of the rendering checkboxes.
 

Static Public Attributes

static const wxEventType EVT_LAYER_COLOR_CHANGE = wxNewEventType()
 

Protected Types

enum  POPUP_ID { ID_CHANGE_LAYER_COLOR = wxID_HIGHEST , ID_CHANGE_RENDER_COLOR , ID_LAST_VALUE }
 

Protected Member Functions

virtual bool useAlternateBitmap (int aRow)
 
virtual COLOR4D getBackgroundLayerColor ()
 Subclasses can override this to provide accurate representation of transparent color swatches.
 
void OnLeftDownLayers (wxMouseEvent &event)
 
void OnRightDownLayer (wxMouseEvent &event, COLOR_SWATCH *aColorSwatch, const wxString &aLayerName)
 Called when user right-clicks a layer.
 
void OnLayerSwatchChanged (wxCommandEvent &aEvent)
 Called when a user changes a swatch color.
 
void OnLayerCheckBox (wxCommandEvent &event)
 Handle the "is layer visible" checkbox and propagates the event to the client's notification function.
 
void OnRightDownRender (wxMouseEvent &aEvent, COLOR_SWATCH *aColorSwatch, const wxString &aRenderName)
 Notify when user right-clicks a render option.
 
void OnRenderSwatchChanged (wxCommandEvent &aEvent)
 Called when user has changed the swatch color of a render entry.
 
void OnRenderCheckBox (wxCommandEvent &event)
 
void OnTabChange (wxNotebookEvent &event)
 
wxWindow * getLayerComp (int aRow, int aColumn) const
 Return the component within the m_LayersFlexGridSizer at aRow and aCol or NULL if these parameters are out of range.
 
wxWindow * getRenderComp (int aRow, int aColumn) const
 
int findLayerRow (int aLayer) const
 Return the row index that aLayer resides in, or -1 if not found.
 
int findRenderRow (int aId) const
 
void insertLayerRow (int aRow, const ROW &aSpec)
 Append or insert a new row in the layer portion of the widget.
 
void insertRenderRow (int aRow, const ROW &aSpec)
 
void setLayerCheckbox (int aLayer, bool isVisible)
 
void updateLayerRow (int aRow, const wxString &aName)
 
void passOnFocus ()
 Give away the keyboard focus up to the main parent window.
 

Static Protected Member Functions

static int encodeId (int aColumn, int aId)
 Allow saving a layer index within a control as its wxControl id.
 
static int getDecodedId (int aControlId)
 Decode aControlId to original un-encoded value.
 

Protected Attributes

wxNotebook * m_notebook
 
wxPanel * m_LayerPanel
 
wxScrolledWindow * m_LayerScrolledWindow
 
wxFlexGridSizer * m_LayersFlexGridSizer
 
wxPanel * m_RenderingPanel
 
wxScrolledWindow * m_RenderScrolledWindow
 
wxFlexGridSizer * m_RenderFlexGridSizer
 
wxWindow * m_FocusOwner
 
int m_CurrentRow
 selected row of layer list
 
int m_PointSize
 
ROW_ICON_PROVIDERm_IconProvider
 
wxString m_smallestLayerString
 

Detailed Description

Manage a list of layers with the notion of a "current" layer, and layer specific visibility control.

You must derive from it to use it so you can implement the abstract functions which receive the events. Each layer is given its own color, and that color can be changed within the UI provided here. This widget knows nothing of the client code, meaning it has no knowledge of a BOARD or anything. To use it you must derive from this class and implement the abstract functions:

void OnLayerColorChange( int aLayer, int aColor );

bool OnLayerSelect( int aLayer );

void OnLayerVisible( int aLayer, bool isVisible );

void OnRenderColorChange( int id, int aColor );

void OnRenderEnable( int id, bool isEnabled );

Note
Even if designed toward layers, it is used to contain other stuff, too (the second page in pcbnew contains render items, for example).

Definition at line 77 of file layer_widget.h.

Member Enumeration Documentation

◆ POPUP_ID

enum LAYER_WIDGET::POPUP_ID
protected
Enumerator
ID_CHANGE_LAYER_COLOR 
ID_CHANGE_RENDER_COLOR 
ID_LAST_VALUE 

Definition at line 458 of file layer_widget.h.

Constructor & Destructor Documentation

◆ LAYER_WIDGET()

LAYER_WIDGET::LAYER_WIDGET ( wxWindow *  aParent,
wxWindow *  aFocusOwner,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL 
)
Parameters
aParentis the parent window.
aFocusOwneris the window that should be sent the focus after.
idis the wxWindow id ( default = wxID_ANY).
posis the window position.
sizeis the window size.
styleis the window style.

Definition at line 488 of file layer_widget.cpp.

References _, KIUI::c_IndicatorSizeDIP, LYR_COLUMN_COUNT, m_CurrentRow, m_FocusOwner, m_IconProvider, m_LayerPanel, m_LayerScrolledWindow, m_LayersFlexGridSizer, m_notebook, m_PointSize, m_RenderFlexGridSizer, m_RenderingPanel, m_RenderScrolledWindow, OnTabChange(), and RND_COLUMN_COUNT.

◆ ~LAYER_WIDGET()

LAYER_WIDGET::~LAYER_WIDGET ( )
virtual

Definition at line 576 of file layer_widget.cpp.

References m_IconProvider.

Member Function Documentation

◆ AppendLayerRow()

void LAYER_WIDGET::AppendLayerRow ( const ROW aRow)

Append a new row in the layer portion of the widget.

The user must ensure that ROW::id is unique for all existing rows on Windows.

Definition at line 638 of file layer_widget.cpp.

References GetLayerRowCount(), and insertLayerRow().

Referenced by AppendLayerRows(), and GERBER_LAYER_WIDGET::ReFill().

◆ AppendLayerRows()

void LAYER_WIDGET::AppendLayerRows ( const ROW aRowsArray,
int  aRowCount 
)
inline

Append new rows in the layer portion of the widget.

The user must ensure that ROW::id is unique for all existing rows on Windows.

Definition at line 175 of file layer_widget.h.

References AppendLayerRow(), and UpdateLayouts().

◆ AppendRenderRow()

void LAYER_WIDGET::AppendRenderRow ( const ROW aRow)

Append a new row in the render portion of the widget.

The user must ensure that ROW::id is unique for all existing rows on Windows.

Definition at line 651 of file layer_widget.cpp.

References GetRenderRowCount(), and insertRenderRow().

Referenced by AppendRenderRows().

◆ AppendRenderRows()

void LAYER_WIDGET::AppendRenderRows ( const ROW aRowsArray,
int  aRowCount 
)
inline

Append new rows in the render portion of the widget.

The user must ensure that ROW::id is unique for all existing rows on Windows.

Definition at line 200 of file layer_widget.h.

References AppendRenderRow(), and UpdateLayouts().

Referenced by GERBER_LAYER_WIDGET::ReFillRender().

◆ ClearLayerRows()

void LAYER_WIDGET::ClearLayerRows ( )

Empty out the layer rows.

Definition at line 645 of file layer_widget.cpp.

References m_LayersFlexGridSizer.

Referenced by GERBER_LAYER_WIDGET::ReFill().

◆ ClearRenderRows()

void LAYER_WIDGET::ClearRenderRows ( )

Empty out the render rows.

Definition at line 658 of file layer_widget.cpp.

References m_RenderFlexGridSizer.

Referenced by GERBER_LAYER_WIDGET::ReFillRender().

◆ encodeId()

int LAYER_WIDGET::encodeId ( int  aColumn,
int  aId 
)
staticprotected

Allow saving a layer index within a control as its wxControl id.

To do so in a way that all child wxControl ids within a wxWindow are unique, since this is required by Windows.

See also
getDecodedId()

Definition at line 63 of file layer_widget.cpp.

References LYR_COLUMN_COUNT.

Referenced by insertLayerRow(), and insertRenderRow().

◆ findLayerRow()

int LAYER_WIDGET::findLayerRow ( int  aLayer) const
protected

◆ findRenderRow()

int LAYER_WIDGET::findRenderRow ( int  aId) const
protected

◆ getBackgroundLayerColor()

virtual COLOR4D LAYER_WIDGET::getBackgroundLayerColor ( )
inlineprotectedvirtual

Subclasses can override this to provide accurate representation of transparent color swatches.

Definition at line 369 of file layer_widget.h.

Referenced by insertLayerRow(), and insertRenderRow().

◆ GetBestSize()

wxSize LAYER_WIDGET::GetBestSize ( ) const

Return the preferred minimum size, taking into consideration the dynamic content.

Nothing in wxWidgets was reliable enough so this overrides one of their functions.

Definition at line 582 of file layer_widget.cpp.

References LYR_COLUMN_COUNT, m_LayerPanel, m_LayersFlexGridSizer, m_RenderFlexGridSizer, m_RenderingPanel, and RND_COLUMN_COUNT.

Referenced by GERBVIEW_FRAME::GERBVIEW_FRAME(), and GERBVIEW_FRAME::ReFillLayerWidget().

◆ getDecodedId()

int LAYER_WIDGET::getDecodedId ( int  aControlId)
staticprotected

Decode aControlId to original un-encoded value.

This holds if encodedId was called with a layer (this box is used for other things than layers, too).

Definition at line 70 of file layer_widget.cpp.

References LYR_COLUMN_COUNT.

Referenced by findLayerRow(), findRenderRow(), GetSelectedLayer(), OnLayerCheckBox(), OnLayerSwatchChanged(), OnLeftDownLayers(), GERBER_LAYER_WIDGET::onPopupSelection(), OnRenderCheckBox(), and OnRenderSwatchChanged().

◆ GetLayerColor()

COLOR4D LAYER_WIDGET::GetLayerColor ( int  aLayer) const

Return the color of the layer ROW associated with aLayer id.

Definition at line 753 of file layer_widget.cpp.

References findLayerRow(), and getLayerComp().

Referenced by GERBER_LAYER_WIDGET::CollectCurrentColorSettings().

◆ getLayerComp()

wxWindow * LAYER_WIDGET::getLayerComp ( int  aRow,
int  aColumn 
) const
protected

Return the component within the m_LayersFlexGridSizer at aRow and aCol or NULL if these parameters are out of range.

Parameters
aRowis the row index
aColumnis the column
Returns
the component installed within the sizer at given grid coordinate.

Definition at line 261 of file layer_widget.cpp.

References LYR_COLUMN_COUNT, and m_LayersFlexGridSizer.

Referenced by findLayerRow(), GetLayerColor(), GetSelectedLayer(), IsLayerVisible(), OnLeftDownLayers(), GERBER_LAYER_WIDGET::onPopupSelection(), OnRenderSwatchChanged(), SelectLayerRow(), setLayerCheckbox(), SetLayerColor(), UpdateLayerIcons(), and updateLayerRow().

◆ GetLayerRowCount()

int LAYER_WIDGET::GetLayerRowCount ( ) const

Return the number of rows in the layer tab.

Definition at line 624 of file layer_widget.cpp.

References LYR_COLUMN_COUNT, and m_LayersFlexGridSizer.

Referenced by AppendLayerRow(), findLayerRow(), OnLeftDownLayers(), GERBER_LAYER_WIDGET::onPopupSelection(), OnRenderSwatchChanged(), and UpdateLayerIcons().

◆ GetRenderColor()

COLOR4D LAYER_WIDGET::GetRenderColor ( int  aRow) const

Return the color of the Render ROW in position aRow.

Definition at line 770 of file layer_widget.cpp.

References getRenderComp().

Referenced by GERBER_LAYER_WIDGET::CollectCurrentColorSettings().

◆ getRenderComp()

wxWindow * LAYER_WIDGET::getRenderComp ( int  aRow,
int  aColumn 
) const
protected

◆ GetRenderRowCount()

int LAYER_WIDGET::GetRenderRowCount ( ) const

Return the number of rows in the render tab.

Definition at line 631 of file layer_widget.cpp.

References m_RenderFlexGridSizer, and RND_COLUMN_COUNT.

Referenced by AppendRenderRow(), findRenderRow(), and OnRenderSwatchChanged().

◆ GetRenderState()

bool LAYER_WIDGET::GetRenderState ( int  aId)

Return the state of the checkbox associated with aId.

Returns
true if checked, else false.

Definition at line 801 of file layer_widget.cpp.

References findRenderRow(), and getRenderComp().

◆ GetSelectedLayer()

int LAYER_WIDGET::GetSelectedLayer ( )

Return the selected layer or -1 if none.

Definition at line 692 of file layer_widget.cpp.

References getDecodedId(), getLayerComp(), m_CurrentRow, and UNDEFINED_LAYER.

◆ insertLayerRow()

◆ insertRenderRow()

◆ IsLayerVisible()

bool LAYER_WIDGET::IsLayerVisible ( int  aLayer)

Return the visible state of the layer ROW associated with aLayer id.

Definition at line 723 of file layer_widget.cpp.

References COLUMN_COLOR_LYR_CB, findLayerRow(), and getLayerComp().

Referenced by GERBVIEW_FRAME::IsLayerVisible().

◆ OnLayerCheckBox()

void LAYER_WIDGET::OnLayerCheckBox ( wxCommandEvent &  event)
protected

Handle the "is layer visible" checkbox and propagates the event to the client's notification function.

Definition at line 171 of file layer_widget.cpp.

References getDecodedId(), OnLayerVisible(), and passOnFocus().

Referenced by insertLayerRow().

◆ OnLayerColorChange()

virtual void LAYER_WIDGET::OnLayerColorChange ( int  aLayer,
const COLOR4D aColor 
)
pure virtual

Notify client code about a layer color change.

Derived objects will handle this accordingly.

Parameters
aLayeris the board layer to change.
aColoris the new color.

Implemented in GERBER_LAYER_WIDGET.

Referenced by OnLayerSwatchChanged().

◆ OnLayerRightClick()

virtual void LAYER_WIDGET::OnLayerRightClick ( wxMenu &  aMenu)
pure virtual

Notify client code about a layer being right-clicked.

Parameters
aMenuis the right-click menu containing layer-scoped options.

Implemented in GERBER_LAYER_WIDGET.

Referenced by OnRightDownLayer().

◆ OnLayerSelect()

virtual bool LAYER_WIDGET::OnLayerSelect ( int  aLayer)
pure virtual

Notify client code whenever the user selects a different layer.

Derived classes will handle this accordingly, and can deny the change by returning false.

Parameters
aLayeris the board layer to select.

Implemented in GERBER_LAYER_WIDGET.

Referenced by OnLeftDownLayers().

◆ OnLayerSwatchChanged()

void LAYER_WIDGET::OnLayerSwatchChanged ( wxCommandEvent &  aEvent)
protected

Called when a user changes a swatch color.

Definition at line 154 of file layer_widget.cpp.

References EVT_LAYER_COLOR_CHANGE, getDecodedId(), COLOR_SWATCH::GetSwatchColor(), OnLayerColorChange(), and passOnFocus().

Referenced by insertLayerRow().

◆ OnLayerVisible()

virtual void LAYER_WIDGET::OnLayerVisible ( int  aLayer,
bool  isVisible,
bool  isFinal = true 
)
pure virtual

Notify client code about a layer visibility change.

Parameters
aLayeris the board layer to select.
isVisibleis the new visible state.
isFinalis true when this is the last of potentially several such calls, and can be used to decide when to update the screen only one time instead of several times in the midst of a multiple layer change.

Implemented in GERBER_LAYER_WIDGET.

Referenced by OnLayerCheckBox(), and SetLayerVisible().

◆ OnLeftDownLayers()

void LAYER_WIDGET::OnLeftDownLayers ( wxMouseEvent &  event)
protected

◆ OnRenderCheckBox()

void LAYER_WIDGET::OnRenderCheckBox ( wxCommandEvent &  event)
protected

Definition at line 241 of file layer_widget.cpp.

References getDecodedId(), OnRenderEnable(), and passOnFocus().

Referenced by insertRenderRow().

◆ OnRenderColorChange()

virtual void LAYER_WIDGET::OnRenderColorChange ( int  aId,
const COLOR4D aColor 
)
pure virtual

Notify client code whenever the user changes a rendering color.

Parameters
aIdis the same id that was established in a Rendering row via the AddRenderRow() function.
aColoris the new color.

Implemented in GERBER_LAYER_WIDGET.

Referenced by OnRenderSwatchChanged().

◆ OnRenderEnable()

virtual void LAYER_WIDGET::OnRenderEnable ( int  aId,
bool  isEnabled 
)
pure virtual

Notify client code whenever the user changes an rendering enable in one of the rendering checkboxes.

Parameters
aIdis the same id that was established in a Rendering row via the AddRenderRow() function.
isEnabledis the state of the checkbox, true if checked.

Implemented in GERBER_LAYER_WIDGET.

Referenced by OnRenderCheckBox().

◆ OnRenderSwatchChanged()

void LAYER_WIDGET::OnRenderSwatchChanged ( wxCommandEvent &  aEvent)
protected

◆ OnRightDownLayer()

void LAYER_WIDGET::OnRightDownLayer ( wxMouseEvent &  event,
COLOR_SWATCH aColorSwatch,
const wxString &  aLayerName 
)
protected

Called when user right-clicks a layer.

Definition at line 125 of file layer_widget.cpp.

References _, KIUI::AddMenuItem(), ID_CHANGE_LAYER_COLOR, KiBitmap(), OnLayerRightClick(), and passOnFocus().

Referenced by insertLayerRow().

◆ OnRightDownRender()

void LAYER_WIDGET::OnRightDownRender ( wxMouseEvent &  aEvent,
COLOR_SWATCH aColorSwatch,
const wxString &  aRenderName 
)
protected

Notify when user right-clicks a render option.

Definition at line 181 of file layer_widget.cpp.

References _, KIUI::AddMenuItem(), COLOR_SWATCH::GetNewSwatchColor(), ID_CHANGE_RENDER_COLOR, KiBitmap(), and passOnFocus().

Referenced by insertRenderRow().

◆ OnTabChange()

void LAYER_WIDGET::OnTabChange ( wxNotebookEvent &  event)
protected

Definition at line 251 of file layer_widget.cpp.

References passOnFocus().

Referenced by LAYER_WIDGET().

◆ passOnFocus()

void LAYER_WIDGET::passOnFocus ( )
protected

◆ SelectLayer()

void LAYER_WIDGET::SelectLayer ( int  aLayer)

Change the row selection in the layer list to aLayer provided.

Definition at line 685 of file layer_widget.cpp.

References findLayerRow(), and SelectLayerRow().

Referenced by GERBVIEW_FRAME::SetActiveLayer(), and GERBVIEW_FRAME::syncLayerWidget().

◆ SelectLayerRow()

void LAYER_WIDGET::SelectLayerRow ( int  aRow)

Change the row selection in the layer list to the given row.

Definition at line 664 of file layer_widget.cpp.

References getLayerComp(), m_CurrentRow, ROW_ICON_PROVIDER::OFF, ROW_ICON_PROVIDER::ON, passOnFocus(), and INDICATOR_ICON::SetIndicatorState().

Referenced by OnLeftDownLayers(), and SelectLayer().

◆ setLayerCheckbox()

void LAYER_WIDGET::setLayerCheckbox ( int  aLayer,
bool  isVisible 
)
protected

Definition at line 710 of file layer_widget.cpp.

References COLUMN_COLOR_LYR_CB, findLayerRow(), and getLayerComp().

Referenced by SetLayerVisible().

◆ SetLayerColor()

void LAYER_WIDGET::SetLayerColor ( int  aLayer,
const COLOR4D aColor 
)

Change the color of aLayer.

Definition at line 738 of file layer_widget.cpp.

References findLayerRow(), and getLayerComp().

◆ SetLayerVisible()

void LAYER_WIDGET::SetLayerVisible ( int  aLayer,
bool  isVisible 
)

Set aLayer visible or not.

This does not invoke OnLayerVisible().

Definition at line 703 of file layer_widget.cpp.

References OnLayerVisible(), and setLayerCheckbox().

Referenced by GERBER_LAYER_WIDGET::ReFill().

◆ SetRenderState()

void LAYER_WIDGET::SetRenderState ( int  aId,
bool  isSet 
)

Set the state of the checkbox associated with aId within the Render tab group of the widget.

This does not fire an event, i.e. does not invoke OnRenderEnable().

Parameters
aIdis the same unique id used when adding a ROW to the Render tab.
isSetis the new checkbox state.

Definition at line 787 of file layer_widget.cpp.

References findRenderRow(), and getRenderComp().

Referenced by GERBVIEW_FRAME::SetElementVisibility(), and GERBVIEW_FRAME::SetGridVisibility().

◆ SetSmallestLayerString()

void LAYER_WIDGET::SetSmallestLayerString ( const wxString &  aString)
inline

Set the string that is used for determining the smallest string displayed in the layer's tab.

Definition at line 141 of file layer_widget.h.

References m_smallestLayerString.

Referenced by GERBVIEW_FRAME::GERBVIEW_FRAME().

◆ UpdateLayerIcons()

void LAYER_WIDGET::UpdateLayerIcons ( )

Update all layer manager icons (layers only).

Useful when loading a file or clearing a layer because they change, and the indicator arrow icon needs to be updated

Definition at line 827 of file layer_widget.cpp.

References COLUMN_ICON_ACTIVE, getLayerComp(), GetLayerRowCount(), m_CurrentRow, ROW_ICON_PROVIDER::OFF, ROW_ICON_PROVIDER::ON, and INDICATOR_ICON::SetIndicatorState().

Referenced by GERBVIEW_FRAME::LoadListOfGerberAndDrillFiles(), and GERBVIEW_FRAME::LoadZipArchiveFile().

◆ updateLayerRow()

void LAYER_WIDGET::updateLayerRow ( int  aRow,
const wxString &  aName 
)
protected

◆ UpdateLayouts()

void LAYER_WIDGET::UpdateLayouts ( )

◆ useAlternateBitmap()

virtual bool LAYER_WIDGET::useAlternateBitmap ( int  aRow)
inlineprotectedvirtual
Returns
true if bitmaps shown in Render layer list are alternate bitmaps, or false if they are "normal" bitmaps This is a virtual function because Pcbnew uses normal bitmaps but GerbView uses both bitmaps (alternate bitmaps to show layers in use, normal for others)

Definition at line 363 of file layer_widget.h.

Member Data Documentation

◆ EVT_LAYER_COLOR_CHANGE

const wxEventType LAYER_WIDGET::EVT_LAYER_COLOR_CHANGE = wxNewEventType()
static

Definition at line 120 of file layer_widget.h.

Referenced by OnLayerSwatchChanged().

◆ m_CurrentRow

int LAYER_WIDGET::m_CurrentRow
protected

selected row of layer list

Definition at line 474 of file layer_widget.h.

Referenced by GetSelectedLayer(), LAYER_WIDGET(), SelectLayerRow(), UpdateLayerIcons(), and updateLayerRow().

◆ m_FocusOwner

wxWindow* LAYER_WIDGET::m_FocusOwner
protected

Definition at line 473 of file layer_widget.h.

Referenced by LAYER_WIDGET(), and passOnFocus().

◆ m_IconProvider

ROW_ICON_PROVIDER* LAYER_WIDGET::m_IconProvider
protected

Definition at line 477 of file layer_widget.h.

Referenced by insertLayerRow(), LAYER_WIDGET(), and ~LAYER_WIDGET().

◆ m_LayerPanel

wxPanel* LAYER_WIDGET::m_LayerPanel
protected

Definition at line 466 of file layer_widget.h.

Referenced by GetBestSize(), LAYER_WIDGET(), and UpdateLayouts().

◆ m_LayerScrolledWindow

wxScrolledWindow* LAYER_WIDGET::m_LayerScrolledWindow
protected

◆ m_LayersFlexGridSizer

wxFlexGridSizer* LAYER_WIDGET::m_LayersFlexGridSizer
protected

◆ m_notebook

wxNotebook* LAYER_WIDGET::m_notebook
protected

Definition at line 465 of file layer_widget.h.

Referenced by LAYER_WIDGET(), and GERBER_LAYER_WIDGET::SetLayersManagerTabsText().

◆ m_PointSize

int LAYER_WIDGET::m_PointSize
protected

Definition at line 475 of file layer_widget.h.

Referenced by insertLayerRow(), insertRenderRow(), and LAYER_WIDGET().

◆ m_RenderFlexGridSizer

wxFlexGridSizer* LAYER_WIDGET::m_RenderFlexGridSizer
protected

◆ m_RenderingPanel

wxPanel* LAYER_WIDGET::m_RenderingPanel
protected

Definition at line 469 of file layer_widget.h.

Referenced by GetBestSize(), LAYER_WIDGET(), and UpdateLayouts().

◆ m_RenderScrolledWindow

wxScrolledWindow* LAYER_WIDGET::m_RenderScrolledWindow
protected

Definition at line 470 of file layer_widget.h.

Referenced by insertRenderRow(), and LAYER_WIDGET().

◆ m_smallestLayerString

wxString LAYER_WIDGET::m_smallestLayerString
protected

Definition at line 479 of file layer_widget.h.

Referenced by insertLayerRow(), and SetSmallestLayerString().


The documentation for this class was generated from the following files: