KiCad PCB EDA Suite
|
Abstract functions of LAYER_WIDGET so they may be tied into the GERBVIEW_FRAME's data and we can add a popup menu which is specific to Pcbnew's needs. More...
#include <gerbview_layer_widget.h>
Public Member Functions | |
GERBER_LAYER_WIDGET (GERBVIEW_FRAME *aParent, wxWindow *aFocusOwner) | |
void | CollectCurrentColorSettings (COLOR_SETTINGS *aColorSettings) |
Collect the current color settings and put it in aColorSettings. | |
void | ReFill () |
Rebuild Render for instance after the config is read. | |
void | ReFillRender () |
Rebuild Render for instance after the config is read. | |
void | OnLayerRightClick (wxMenu &aMenu) override |
Notify client code about a layer being right-clicked. | |
void | OnLayerColorChange (int aLayer, const COLOR4D &aColor) override |
Notify client code about a layer color change. | |
bool | OnLayerSelect (int aLayer) override |
Notify client code whenever the user selects a different layer. | |
void | OnLayerVisible (int aLayer, bool isVisible, bool isFinal) override |
Notify client code about a layer visibility change. | |
void | OnRenderColorChange (int aId, const COLOR4D &aColor) override |
Notify client code whenever the user changes a rendering color. | |
void | OnRenderEnable (int aId, bool isEnabled) override |
Notify client code whenever the user changes an rendering enable in one of the rendering checkboxes. | |
void | SetLayersManagerTabsText () |
Update the layer manager tabs labels. | |
bool | OnLayerSelected () |
Ensure the active layer is visible, and other layers not visible when m_alwaysShowActiveLayer is true. | |
void | AddRightClickMenuItems (wxMenu *aMenu) |
Add menu items to a menu that should be shown when right-clicking the Gerber 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). | |
Static Public Attributes | |
static const wxEventType | EVT_LAYER_COLOR_CHANGE = wxNewEventType() |
Protected Types | |
enum | LAYER_MANAGER { ID_LAYER_MANAGER_START = LAYER_WIDGET::ID_LAST_VALUE , ID_SHOW_ALL_LAYERS = ID_LAYER_MANAGER_START , ID_SHOW_NO_LAYERS , ID_SHOW_NO_LAYERS_BUT_ACTIVE , ID_ALWAYS_SHOW_NO_LAYERS_BUT_ACTIVE , ID_SORT_GBR_LAYERS_X2 , ID_SORT_GBR_LAYERS_FILE_EXT , ID_SET_GBR_LAYERS_DRAW_PRMS , ID_LAYER_MOVE_UP , ID_LAYER_MOVE_DOWN , ID_LAYER_DELETE , ID_LAYER_MANAGER_END = ID_LAYER_DELETE } |
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_PROVIDER * | m_IconProvider |
wxString | m_smallestLayerString |
Private Member Functions | |
void | onRightDownLayers (wxMouseEvent &event) |
Put up a popup menu for the layer panel. | |
void | onPopupSelection (wxCommandEvent &event) |
void | installRightLayerClickHandler () |
this is for the popup menu, the right click handler has to be installed on every child control within the layer panel. | |
GERBER_FILE_IMAGE_LIST * | GetImagesList () |
Private Attributes | |
GERBVIEW_FRAME * | m_frame |
bool | m_alwaysShowActiveLayer |
Abstract functions of LAYER_WIDGET so they may be tied into the GERBVIEW_FRAME's data and we can add a popup menu which is specific to Pcbnew's needs.
Definition at line 36 of file gerbview_layer_widget.h.
|
protected |
Definition at line 96 of file gerbview_layer_widget.h.
|
protectedinherited |
Enumerator | |
---|---|
ID_CHANGE_LAYER_COLOR | |
ID_CHANGE_RENDER_COLOR | |
ID_LAST_VALUE |
Definition at line 458 of file layer_widget.h.
GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET | ( | GERBVIEW_FRAME * | aParent, |
wxWindow * | aFocusOwner | ||
) |
aParent | is the parent frame. |
aFocusOwner | is the window that has the keyboard focus. |
Definition at line 48 of file gerbview_layer_widget.cpp.
References ID_LAYER_MANAGER_END, ID_LAYER_MANAGER_START, m_alwaysShowActiveLayer, LAYER_WIDGET::m_LayerScrolledWindow, onPopupSelection(), onRightDownLayers(), ReFillRender(), and SetLayersManagerTabsText().
void GERBER_LAYER_WIDGET::AddRightClickMenuItems | ( | wxMenu * | aMenu | ) |
Add menu items to a menu that should be shown when right-clicking the Gerber layer widget.
aMenu | is the menu to modify: menuitems will be added to aMenu. |
Definition at line 158 of file gerbview_layer_widget.cpp.
References _, KIUI::AddMenuItem(), ID_ALWAYS_SHOW_NO_LAYERS_BUT_ACTIVE, ID_LAYER_DELETE, ID_LAYER_MOVE_DOWN, ID_LAYER_MOVE_UP, ID_SET_GBR_LAYERS_DRAW_PRMS, ID_SHOW_ALL_LAYERS, ID_SHOW_NO_LAYERS, ID_SHOW_NO_LAYERS_BUT_ACTIVE, ID_SORT_GBR_LAYERS_FILE_EXT, ID_SORT_GBR_LAYERS_X2, and KiBitmap().
Referenced by OnLayerRightClick(), and onRightDownLayers().
|
inherited |
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 LAYER_WIDGET::GetLayerRowCount(), and LAYER_WIDGET::insertLayerRow().
Referenced by LAYER_WIDGET::AppendLayerRows(), and ReFill().
|
inlineinherited |
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 LAYER_WIDGET::AppendLayerRow(), and LAYER_WIDGET::UpdateLayouts().
|
inherited |
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 LAYER_WIDGET::GetRenderRowCount(), and LAYER_WIDGET::insertRenderRow().
Referenced by LAYER_WIDGET::AppendRenderRows().
|
inlineinherited |
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 LAYER_WIDGET::AppendRenderRow(), and LAYER_WIDGET::UpdateLayouts().
Referenced by ReFillRender().
|
inherited |
Empty out the layer rows.
Definition at line 645 of file layer_widget.cpp.
References LAYER_WIDGET::m_LayersFlexGridSizer.
Referenced by ReFill().
|
inherited |
Empty out the render rows.
Definition at line 658 of file layer_widget.cpp.
References LAYER_WIDGET::m_RenderFlexGridSizer.
Referenced by ReFillRender().
void GERBER_LAYER_WIDGET::CollectCurrentColorSettings | ( | COLOR_SETTINGS * | aColorSettings | ) |
Collect the current color settings and put it in aColorSettings.
Definition at line 84 of file gerbview_layer_widget.cpp.
References color, LAYER_WIDGET::findLayerRow(), LAYER_WIDGET::findRenderRow(), GERBER_DRAWLAYERS_COUNT, GERBVIEW_LAYER_ID_START, LAYER_WIDGET::GetLayerColor(), LAYER_WIDGET::GetRenderColor(), LAYER_DCODES, LAYER_GERBVIEW_BACKGROUND, LAYER_GERBVIEW_DRAWINGSHEET, LAYER_GERBVIEW_GRID, LAYER_GERBVIEW_PAGE_LIMITS, LAYER_NEGATIVE_OBJECTS, and COLOR_SETTINGS::SetColor().
Referenced by PANEL_GERBVIEW_COLOR_SETTINGS::PANEL_GERBVIEW_COLOR_SETTINGS().
|
staticprotectedinherited |
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.
Definition at line 63 of file layer_widget.cpp.
References LYR_COLUMN_COUNT.
Referenced by LAYER_WIDGET::insertLayerRow(), and LAYER_WIDGET::insertRenderRow().
|
protectedinherited |
Return the row index that aLayer resides in, or -1 if not found.
Definition at line 272 of file layer_widget.cpp.
References LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::getLayerComp(), and LAYER_WIDGET::GetLayerRowCount().
Referenced by CollectCurrentColorSettings(), LAYER_WIDGET::GetLayerColor(), LAYER_WIDGET::IsLayerVisible(), LAYER_WIDGET::OnLeftDownLayers(), ReFill(), LAYER_WIDGET::SelectLayer(), LAYER_WIDGET::setLayerCheckbox(), and LAYER_WIDGET::SetLayerColor().
|
protectedinherited |
Definition at line 301 of file layer_widget.cpp.
References LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::getRenderComp(), and LAYER_WIDGET::GetRenderRowCount().
Referenced by CollectCurrentColorSettings(), LAYER_WIDGET::GetRenderState(), and LAYER_WIDGET::SetRenderState().
|
inlineprotectedvirtualinherited |
Subclasses can override this to provide accurate representation of transparent color swatches.
Definition at line 369 of file layer_widget.h.
Referenced by LAYER_WIDGET::insertLayerRow(), and LAYER_WIDGET::insertRenderRow().
|
inherited |
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, LAYER_WIDGET::m_LayerPanel, LAYER_WIDGET::m_LayersFlexGridSizer, LAYER_WIDGET::m_RenderFlexGridSizer, LAYER_WIDGET::m_RenderingPanel, and RND_COLUMN_COUNT.
Referenced by GERBVIEW_FRAME::GERBVIEW_FRAME(), and GERBVIEW_FRAME::ReFillLayerWidget().
|
staticprotectedinherited |
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 LAYER_WIDGET::findLayerRow(), LAYER_WIDGET::findRenderRow(), LAYER_WIDGET::GetSelectedLayer(), LAYER_WIDGET::OnLayerCheckBox(), LAYER_WIDGET::OnLayerSwatchChanged(), LAYER_WIDGET::OnLeftDownLayers(), onPopupSelection(), LAYER_WIDGET::OnRenderCheckBox(), and LAYER_WIDGET::OnRenderSwatchChanged().
|
private |
Definition at line 71 of file gerbview_layer_widget.cpp.
References GERBER_FILE_IMAGE_LIST::GetImagesList().
Referenced by ReFill().
|
inherited |
Return the color of the layer ROW associated with aLayer id.
Definition at line 753 of file layer_widget.cpp.
References LAYER_WIDGET::findLayerRow(), and LAYER_WIDGET::getLayerComp().
Referenced by CollectCurrentColorSettings().
|
protectedinherited |
Return the component within the m_LayersFlexGridSizer at aRow and aCol or NULL if these parameters are out of range.
aRow | is the row index |
aColumn | is the column |
Definition at line 261 of file layer_widget.cpp.
References LYR_COLUMN_COUNT, and LAYER_WIDGET::m_LayersFlexGridSizer.
Referenced by LAYER_WIDGET::findLayerRow(), LAYER_WIDGET::GetLayerColor(), LAYER_WIDGET::GetSelectedLayer(), LAYER_WIDGET::IsLayerVisible(), LAYER_WIDGET::OnLeftDownLayers(), onPopupSelection(), LAYER_WIDGET::OnRenderSwatchChanged(), LAYER_WIDGET::SelectLayerRow(), LAYER_WIDGET::setLayerCheckbox(), LAYER_WIDGET::SetLayerColor(), LAYER_WIDGET::UpdateLayerIcons(), and LAYER_WIDGET::updateLayerRow().
|
inherited |
Return the number of rows in the layer tab.
Definition at line 624 of file layer_widget.cpp.
References LYR_COLUMN_COUNT, and LAYER_WIDGET::m_LayersFlexGridSizer.
Referenced by LAYER_WIDGET::AppendLayerRow(), LAYER_WIDGET::findLayerRow(), LAYER_WIDGET::OnLeftDownLayers(), onPopupSelection(), LAYER_WIDGET::OnRenderSwatchChanged(), and LAYER_WIDGET::UpdateLayerIcons().
|
inherited |
Return the color of the Render ROW in position aRow.
Definition at line 770 of file layer_widget.cpp.
References LAYER_WIDGET::getRenderComp().
Referenced by CollectCurrentColorSettings().
|
protectedinherited |
Definition at line 290 of file layer_widget.cpp.
References LAYER_WIDGET::m_RenderFlexGridSizer, and RND_COLUMN_COUNT.
Referenced by LAYER_WIDGET::findRenderRow(), LAYER_WIDGET::GetRenderColor(), LAYER_WIDGET::GetRenderState(), LAYER_WIDGET::OnRenderSwatchChanged(), and LAYER_WIDGET::SetRenderState().
|
inherited |
Return the number of rows in the render tab.
Definition at line 631 of file layer_widget.cpp.
References LAYER_WIDGET::m_RenderFlexGridSizer, and RND_COLUMN_COUNT.
Referenced by LAYER_WIDGET::AppendRenderRow(), LAYER_WIDGET::findRenderRow(), and LAYER_WIDGET::OnRenderSwatchChanged().
|
inherited |
Return the state of the checkbox associated with aId.
Definition at line 801 of file layer_widget.cpp.
References LAYER_WIDGET::findRenderRow(), and LAYER_WIDGET::getRenderComp().
|
inherited |
Return the selected layer or -1 if none.
Definition at line 692 of file layer_widget.cpp.
References LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::m_CurrentRow, and UNDEFINED_LAYER.
|
protectedinherited |
Append or insert a new row in the layer portion of the widget.
Definition at line 319 of file layer_widget.cpp.
References _, LAYER_WIDGET::ROW::color, COLUMN_ALPHA_INDICATOR, COLUMN_COLOR_LYR_CB, COLUMN_COLOR_LYRNAME, COLUMN_COLORBM, COLUMN_ICON_ACTIVE, LAYER_WIDGET::ROW::defaultColor, LAYER_WIDGET::encodeId(), LAYER_WIDGET::getBackgroundLayerColor(), LAYER_WIDGET::ROW::id, LYR_COLUMN_COUNT, LAYER_WIDGET::m_IconProvider, LAYER_WIDGET::m_LayerScrolledWindow, LAYER_WIDGET::m_LayersFlexGridSizer, LAYER_WIDGET::m_PointSize, LAYER_WIDGET::m_smallestLayerString, ROW_ICON_PROVIDER::OFF, LAYER_WIDGET::OnLayerCheckBox(), LAYER_WIDGET::OnLayerSwatchChanged(), LAYER_WIDGET::OnLeftDownLayers(), LAYER_WIDGET::OnRightDownLayer(), LAYER_WIDGET::ROW::rowName, WX_ELLIPSIZED_STATIC_TEXT::SetMinimumStringLength(), shrinkFont(), LAYER_WIDGET::ROW::state, SWATCH_SMALL, and LAYER_WIDGET::ROW::tooltip.
Referenced by LAYER_WIDGET::AppendLayerRow().
|
protectedinherited |
Definition at line 414 of file layer_widget.cpp.
References _, LAYER_WIDGET::ROW::changeable, LAYER_WIDGET::ROW::color, LAYER_WIDGET::ROW::defaultColor, LAYER_WIDGET::encodeId(), LAYER_WIDGET::getBackgroundLayerColor(), LAYER_WIDGET::ROW::id, LAYER_WIDGET::m_PointSize, LAYER_WIDGET::m_RenderFlexGridSizer, LAYER_WIDGET::m_RenderScrolledWindow, LAYER_WIDGET::OnRenderCheckBox(), LAYER_WIDGET::OnRenderSwatchChanged(), LAYER_WIDGET::OnRightDownRender(), RND_COLUMN_COUNT, LAYER_WIDGET::ROW::rowName, shrinkFont(), LAYER_WIDGET::ROW::spacer, LAYER_WIDGET::ROW::state, SWATCH_SMALL, and LAYER_WIDGET::ROW::tooltip.
Referenced by LAYER_WIDGET::AppendRenderRow().
|
private |
this is for the popup menu, the right click handler has to be installed on every child control within the layer panel.
|
inherited |
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, LAYER_WIDGET::findLayerRow(), and LAYER_WIDGET::getLayerComp().
Referenced by GERBVIEW_FRAME::IsLayerVisible().
|
protectedinherited |
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 LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::OnLayerVisible(), and LAYER_WIDGET::passOnFocus().
Referenced by LAYER_WIDGET::insertLayerRow().
|
overridevirtual |
Notify client code about a layer color change.
Derived objects will handle this accordingly.
aLayer | is the board layer to change. |
aColor | is the new color. |
Implements LAYER_WIDGET.
Definition at line 338 of file gerbview_layer_widget.cpp.
References GERBER_DRAW_LAYER, EDA_DRAW_FRAME::GetCanvas(), GERBVIEW_FRAME::GetColorSettings(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), EDA_DRAW_PANEL_GAL::GetView(), KIGFX::RENDER_SETTINGS::LoadColors(), m_frame, EDA_DRAW_PANEL_GAL::Refresh(), COLOR_SETTINGS::SetColor(), GERBVIEW_FRAME::SetLayerColor(), and KIGFX::VIEW::UpdateLayerColor().
|
overridevirtual |
Notify client code about a layer being right-clicked.
aMenu | is the right-click menu containing layer-scoped options. |
Implements LAYER_WIDGET.
Definition at line 332 of file gerbview_layer_widget.cpp.
References AddRightClickMenuItems().
|
overridevirtual |
Notify client code whenever the user selects a different layer.
Derived classes will handle this accordingly, and can deny the change by returning false.
aLayer | is the board layer to select. |
Implements LAYER_WIDGET.
Definition at line 355 of file gerbview_layer_widget.cpp.
References KIGFX::COLOR, GERBVIEW_FRAME::GetActiveLayer(), EDA_DRAW_FRAME::GetCanvas(), KIGFX::VIEW::GetPainter(), DCODE_SELECTION_BOX::GetSelectedDCodeId(), EDA_DRAW_PANEL_GAL::GetView(), GERBVIEW_FRAME::m_DCodeSelector, m_frame, OnLayerSelected(), EDA_DRAW_PANEL_GAL::Refresh(), GERBVIEW_FRAME::SetActiveLayer(), GERBVIEW_FRAME::syncLayerBox(), and KIGFX::VIEW::UpdateAllItems().
bool GERBER_LAYER_WIDGET::OnLayerSelected | ( | ) |
Ensure the active layer is visible, and other layers not visible when m_alwaysShowActiveLayer is true.
Definition at line 279 of file gerbview_layer_widget.cpp.
References ID_ALWAYS_SHOW_NO_LAYERS_BUT_ACTIVE, m_alwaysShowActiveLayer, and onPopupSelection().
Referenced by OnLayerSelect(), and GERBVIEW_FRAME::SetActiveLayer().
|
protectedinherited |
Called when a user changes a swatch color.
Definition at line 154 of file layer_widget.cpp.
References LAYER_WIDGET::EVT_LAYER_COLOR_CHANGE, LAYER_WIDGET::getDecodedId(), COLOR_SWATCH::GetSwatchColor(), LAYER_WIDGET::OnLayerColorChange(), and LAYER_WIDGET::passOnFocus().
Referenced by LAYER_WIDGET::insertLayerRow().
|
overridevirtual |
Notify client code about a layer visibility change.
aLayer | is the board layer to select. |
isVisible | is the new visible state. |
isFinal | is 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. |
Implements LAYER_WIDGET.
Definition at line 381 of file gerbview_layer_widget.cpp.
References EDA_DRAW_FRAME::GetCanvas(), GERBVIEW_FRAME::GetVisibleLayers(), m_frame, EDA_DRAW_PANEL_GAL::Refresh(), and GERBVIEW_FRAME::SetVisibleLayers().
|
protectedinherited |
Definition at line 77 of file layer_widget.cpp.
References LAYER_WIDGET::findLayerRow(), LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::GetLayerRowCount(), LAYER_WIDGET::m_LayerScrolledWindow, LAYER_WIDGET::m_LayersFlexGridSizer, LAYER_WIDGET::OnLayerSelect(), LAYER_WIDGET::passOnFocus(), and LAYER_WIDGET::SelectLayerRow().
Referenced by LAYER_WIDGET::insertLayerRow().
|
private |
Definition at line 212 of file gerbview_layer_widget.cpp.
References COLUMN_COLOR_LYR_CB, GERBVIEW_FRAME::Erase_Current_DrawLayer(), GERBVIEW_FRAME::GetActiveLayer(), EDA_DRAW_FRAME::GetCanvas(), LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::GetLayerRowCount(), TOOLS_HOLDER::GetToolManager(), ID_ALWAYS_SHOW_NO_LAYERS_BUT_ACTIVE, ID_LAYER_DELETE, ID_LAYER_MOVE_DOWN, ID_LAYER_MOVE_UP, ID_SET_GBR_LAYERS_DRAW_PRMS, ID_SHOW_ALL_LAYERS, ID_SHOW_NO_LAYERS, ID_SHOW_NO_LAYERS_BUT_ACTIVE, ID_SORT_GBR_LAYERS_FILE_EXT, ID_SORT_GBR_LAYERS_X2, m_alwaysShowActiveLayer, m_frame, GERBVIEW_ACTIONS::moveLayerDown, GERBVIEW_ACTIONS::moveLayerUp, EDA_DRAW_PANEL_GAL::Refresh(), TOOL_MANAGER::RunAction(), GERBVIEW_FRAME::SetLayerDrawPrms(), GERBVIEW_FRAME::SetVisibleLayers(), GERBVIEW_FRAME::SortLayersByFileExtension(), and GERBVIEW_FRAME::SortLayersByX2Attributes().
Referenced by GERBER_LAYER_WIDGET(), and OnLayerSelected().
|
protectedinherited |
Definition at line 241 of file layer_widget.cpp.
References LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::OnRenderEnable(), and LAYER_WIDGET::passOnFocus().
Referenced by LAYER_WIDGET::insertRenderRow().
|
overridevirtual |
Notify client code whenever the user changes a rendering color.
aId | is the same id that was established in a Rendering row via the AddRenderRow() function. |
aColor | is the new color. |
Implements LAYER_WIDGET.
Definition at line 394 of file gerbview_layer_widget.cpp.
References KIGFX::COLOR, EDA_DRAW_FRAME::GetCanvas(), GERBVIEW_FRAME::GetColorSettings(), EDA_DRAW_PANEL_GAL::GetView(), m_frame, EDA_DRAW_PANEL_GAL::Refresh(), COLOR_SETTINGS::SetColor(), GERBVIEW_FRAME::SetVisibleElementColor(), and KIGFX::TARGET_NONCACHED.
|
overridevirtual |
Notify client code whenever the user changes an rendering enable in one of the rendering checkboxes.
aId | is the same id that was established in a Rendering row via the AddRenderRow() function. |
isEnabled | is the state of the checkbox, true if checked. |
Implements LAYER_WIDGET.
Definition at line 411 of file gerbview_layer_widget.cpp.
References EDA_DRAW_FRAME::GetCanvas(), EDA_DRAW_PANEL_GAL::GetGAL(), EDA_DRAW_PANEL_GAL::GetView(), EDA_DRAW_FRAME::IsGridVisible(), LAYER_GERBVIEW_GRID, m_frame, KIGFX::VIEW::MarkTargetDirty(), EDA_DRAW_PANEL_GAL::Refresh(), GERBVIEW_FRAME::SetElementVisibility(), KIGFX::GAL::SetGridVisibility(), KIGFX::VIEW::SetLayerVisible(), and KIGFX::TARGET_NONCACHED.
|
protectedinherited |
Called when user has changed the swatch color of a render entry.
Definition at line 204 of file layer_widget.cpp.
References LAYER_WIDGET::getDecodedId(), LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::GetLayerRowCount(), LAYER_WIDGET::getRenderComp(), LAYER_WIDGET::GetRenderRowCount(), COLOR_SWATCH::GetSwatchColor(), LAYER_PCB_BACKGROUND, LAYER_WIDGET::OnRenderColorChange(), LAYER_WIDGET::passOnFocus(), and COLOR_SWATCH::SetSwatchBackground().
Referenced by LAYER_WIDGET::insertRenderRow().
|
protectedinherited |
Called when user right-clicks a layer.
Definition at line 125 of file layer_widget.cpp.
References _, KIUI::AddMenuItem(), LAYER_WIDGET::ID_CHANGE_LAYER_COLOR, KiBitmap(), LAYER_WIDGET::OnLayerRightClick(), and LAYER_WIDGET::passOnFocus().
Referenced by LAYER_WIDGET::insertLayerRow().
|
private |
Put up a popup menu for the layer panel.
Definition at line 201 of file gerbview_layer_widget.cpp.
References AddRightClickMenuItems(), and LAYER_WIDGET::passOnFocus().
Referenced by GERBER_LAYER_WIDGET().
|
protectedinherited |
Notify when user right-clicks a render option.
Definition at line 181 of file layer_widget.cpp.
References _, KIUI::AddMenuItem(), COLOR_SWATCH::GetNewSwatchColor(), LAYER_WIDGET::ID_CHANGE_RENDER_COLOR, KiBitmap(), and LAYER_WIDGET::passOnFocus().
Referenced by LAYER_WIDGET::insertRenderRow().
|
protectedinherited |
Definition at line 251 of file layer_widget.cpp.
References LAYER_WIDGET::passOnFocus().
Referenced by LAYER_WIDGET::LAYER_WIDGET().
|
protectedinherited |
Give away the keyboard focus up to the main parent window.
Definition at line 482 of file layer_widget.cpp.
References LAYER_WIDGET::m_FocusOwner.
Referenced by LAYER_WIDGET::OnLayerCheckBox(), LAYER_WIDGET::OnLayerSwatchChanged(), LAYER_WIDGET::OnLeftDownLayers(), LAYER_WIDGET::OnRenderCheckBox(), LAYER_WIDGET::OnRenderSwatchChanged(), LAYER_WIDGET::OnRightDownLayer(), onRightDownLayers(), LAYER_WIDGET::OnRightDownRender(), LAYER_WIDGET::OnTabChange(), and LAYER_WIDGET::SelectLayerRow().
void GERBER_LAYER_WIDGET::ReFill | ( | ) |
Rebuild Render for instance after the config is read.
Definition at line 292 of file gerbview_layer_widget.cpp.
References LAYER_WIDGET::AppendLayerRow(), LAYER_WIDGET::ClearLayerRows(), color, LAYER_WIDGET::findLayerRow(), GERBER_DRAW_LAYER, GERBER_DRAWLAYERS_COUNT, EDA_DRAW_FRAME::GetCanvas(), GERBER_FILE_IMAGE_LIST::GetDisplayName(), GetImagesList(), GERBVIEW_FRAME::GetLayerColor(), EDA_DRAW_PANEL_GAL::GetView(), GERBVIEW_FRAME::IsLayerVisible(), KIGFX::VIEW::IsLayerVisible(), m_frame, LAYER_WIDGET::SetLayerVisible(), LAYER_WIDGET::updateLayerRow(), and LAYER_WIDGET::UpdateLayouts().
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::GERBVIEW_FRAME(), and GERBVIEW_FRAME::ReFillLayerWidget().
void GERBER_LAYER_WIDGET::ReFillRender | ( | ) |
Rebuild Render for instance after the config is read.
Definition at line 118 of file gerbview_layer_widget.cpp.
References _, LAYER_WIDGET::AppendRenderRows(), arrayDim(), BLACK, LAYER_WIDGET::ClearRenderRows(), color, LAYER_WIDGET::ROW::color, DARKGRAY, DARKRED, GERBVIEW_FRAME::GetVisibleElementColor(), GERBVIEW_FRAME::IsElementVisible(), LAYER_DCODES, LAYER_GERBVIEW_BACKGROUND, LAYER_GERBVIEW_DRAWINGSHEET, LAYER_GERBVIEW_GRID, LAYER_GERBVIEW_PAGE_LIMITS, LAYER_NEGATIVE_OBJECTS, m_frame, RR, LAYER_WIDGET::ROW::state, and WHITE.
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::CommonSettingsChanged(), GERBER_LAYER_WIDGET(), and GERBVIEW_FRAME::GERBVIEW_FRAME().
|
inherited |
Change the row selection in the layer list to aLayer provided.
Definition at line 685 of file layer_widget.cpp.
References LAYER_WIDGET::findLayerRow(), and LAYER_WIDGET::SelectLayerRow().
Referenced by GERBVIEW_FRAME::SetActiveLayer(), and GERBVIEW_FRAME::syncLayerWidget().
|
inherited |
Change the row selection in the layer list to the given row.
Definition at line 664 of file layer_widget.cpp.
References LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::m_CurrentRow, ROW_ICON_PROVIDER::OFF, ROW_ICON_PROVIDER::ON, LAYER_WIDGET::passOnFocus(), and INDICATOR_ICON::SetIndicatorState().
Referenced by LAYER_WIDGET::OnLeftDownLayers(), and LAYER_WIDGET::SelectLayer().
|
protectedinherited |
Definition at line 710 of file layer_widget.cpp.
References COLUMN_COLOR_LYR_CB, LAYER_WIDGET::findLayerRow(), and LAYER_WIDGET::getLayerComp().
Referenced by LAYER_WIDGET::SetLayerVisible().
|
inherited |
Change the color of aLayer.
Definition at line 738 of file layer_widget.cpp.
References LAYER_WIDGET::findLayerRow(), and LAYER_WIDGET::getLayerComp().
void GERBER_LAYER_WIDGET::SetLayersManagerTabsText | ( | ) |
Update the layer manager tabs labels.
Useful when changing Language or to set labels to a non default value.
Definition at line 77 of file gerbview_layer_widget.cpp.
References _, and LAYER_WIDGET::m_notebook.
Referenced by GERBER_LAYER_WIDGET(), and GERBVIEW_FRAME::ShowChangedLanguage().
|
inherited |
Set aLayer visible or not.
This does not invoke OnLayerVisible().
Definition at line 703 of file layer_widget.cpp.
References LAYER_WIDGET::OnLayerVisible(), and LAYER_WIDGET::setLayerCheckbox().
Referenced by ReFill().
|
inherited |
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().
aId | is the same unique id used when adding a ROW to the Render tab. |
isSet | is the new checkbox state. |
Definition at line 787 of file layer_widget.cpp.
References LAYER_WIDGET::findRenderRow(), and LAYER_WIDGET::getRenderComp().
Referenced by GERBVIEW_FRAME::SetElementVisibility(), and GERBVIEW_FRAME::SetGridVisibility().
|
inlineinherited |
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 LAYER_WIDGET::m_smallestLayerString.
Referenced by GERBVIEW_FRAME::GERBVIEW_FRAME().
|
inherited |
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, LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::GetLayerRowCount(), LAYER_WIDGET::m_CurrentRow, ROW_ICON_PROVIDER::OFF, ROW_ICON_PROVIDER::ON, and INDICATOR_ICON::SetIndicatorState().
Referenced by GERBVIEW_FRAME::LoadListOfGerberAndDrillFiles(), and GERBVIEW_FRAME::LoadZipArchiveFile().
|
protectedinherited |
Definition at line 395 of file layer_widget.cpp.
References COLUMN_COLOR_LYRNAME, LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::m_CurrentRow, ROW_ICON_PROVIDER::OFF, ROW_ICON_PROVIDER::ON, and INDICATOR_ICON::SetIndicatorState().
Referenced by ReFill().
|
inherited |
Definition at line 817 of file layer_widget.cpp.
References LAYER_WIDGET::m_LayerPanel, LAYER_WIDGET::m_LayersFlexGridSizer, LAYER_WIDGET::m_RenderFlexGridSizer, and LAYER_WIDGET::m_RenderingPanel.
Referenced by LAYER_WIDGET::AppendLayerRows(), LAYER_WIDGET::AppendRenderRows(), and ReFill().
|
inlineprotectedvirtualinherited |
Definition at line 363 of file layer_widget.h.
|
staticinherited |
Definition at line 120 of file layer_widget.h.
Referenced by LAYER_WIDGET::OnLayerSwatchChanged().
|
private |
Definition at line 128 of file gerbview_layer_widget.h.
Referenced by GERBER_LAYER_WIDGET(), OnLayerSelected(), and onPopupSelection().
|
protectedinherited |
selected row of layer list
Definition at line 474 of file layer_widget.h.
Referenced by LAYER_WIDGET::GetSelectedLayer(), LAYER_WIDGET::LAYER_WIDGET(), LAYER_WIDGET::SelectLayerRow(), LAYER_WIDGET::UpdateLayerIcons(), and LAYER_WIDGET::updateLayerRow().
|
protectedinherited |
Definition at line 473 of file layer_widget.h.
Referenced by LAYER_WIDGET::LAYER_WIDGET(), and LAYER_WIDGET::passOnFocus().
|
private |
Definition at line 126 of file gerbview_layer_widget.h.
Referenced by OnLayerColorChange(), OnLayerSelect(), OnLayerVisible(), onPopupSelection(), OnRenderColorChange(), OnRenderEnable(), ReFill(), and ReFillRender().
|
protectedinherited |
Definition at line 477 of file layer_widget.h.
Referenced by LAYER_WIDGET::insertLayerRow(), LAYER_WIDGET::LAYER_WIDGET(), and LAYER_WIDGET::~LAYER_WIDGET().
|
protectedinherited |
Definition at line 466 of file layer_widget.h.
Referenced by LAYER_WIDGET::GetBestSize(), LAYER_WIDGET::LAYER_WIDGET(), and LAYER_WIDGET::UpdateLayouts().
|
protectedinherited |
Definition at line 467 of file layer_widget.h.
Referenced by GERBER_LAYER_WIDGET(), LAYER_WIDGET::insertLayerRow(), LAYER_WIDGET::LAYER_WIDGET(), and LAYER_WIDGET::OnLeftDownLayers().
|
protectedinherited |
Definition at line 468 of file layer_widget.h.
Referenced by LAYER_WIDGET::ClearLayerRows(), LAYER_WIDGET::GetBestSize(), LAYER_WIDGET::getLayerComp(), LAYER_WIDGET::GetLayerRowCount(), LAYER_WIDGET::insertLayerRow(), LAYER_WIDGET::LAYER_WIDGET(), LAYER_WIDGET::OnLeftDownLayers(), and LAYER_WIDGET::UpdateLayouts().
|
protectedinherited |
Definition at line 465 of file layer_widget.h.
Referenced by LAYER_WIDGET::LAYER_WIDGET(), and SetLayersManagerTabsText().
|
protectedinherited |
Definition at line 475 of file layer_widget.h.
Referenced by LAYER_WIDGET::insertLayerRow(), LAYER_WIDGET::insertRenderRow(), and LAYER_WIDGET::LAYER_WIDGET().
|
protectedinherited |
Definition at line 471 of file layer_widget.h.
Referenced by LAYER_WIDGET::ClearRenderRows(), LAYER_WIDGET::GetBestSize(), LAYER_WIDGET::getRenderComp(), LAYER_WIDGET::GetRenderRowCount(), LAYER_WIDGET::insertRenderRow(), LAYER_WIDGET::LAYER_WIDGET(), and LAYER_WIDGET::UpdateLayouts().
|
protectedinherited |
Definition at line 469 of file layer_widget.h.
Referenced by LAYER_WIDGET::GetBestSize(), LAYER_WIDGET::LAYER_WIDGET(), and LAYER_WIDGET::UpdateLayouts().
|
protectedinherited |
Definition at line 470 of file layer_widget.h.
Referenced by LAYER_WIDGET::insertRenderRow(), and LAYER_WIDGET::LAYER_WIDGET().
|
protectedinherited |
Definition at line 479 of file layer_widget.h.
Referenced by LAYER_WIDGET::insertLayerRow(), and LAYER_WIDGET::SetSmallestLayerString().