2020-07-11 17:42:00 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
|
2023-09-24 17:26:42 +00:00
|
|
|
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2020-07-11 17:42:00 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _APPEARANCE_CONTROLS_H
|
|
|
|
#define _APPEARANCE_CONTROLS_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2020-11-12 20:19:22 +00:00
|
|
|
#include <board.h>
|
2020-07-11 17:42:00 +00:00
|
|
|
#include <gal/color4d.h>
|
2021-07-29 09:47:43 +00:00
|
|
|
#include <layer_ids.h>
|
2020-07-11 17:42:00 +00:00
|
|
|
#include <project/board_project_settings.h>
|
|
|
|
#include <widgets/appearance_controls_base.h>
|
|
|
|
|
|
|
|
|
|
|
|
class BITMAP_TOGGLE;
|
|
|
|
class COLOR_SWATCH;
|
|
|
|
class INDICATOR_ICON;
|
|
|
|
class PCB_BASE_FRAME;
|
2023-09-24 17:26:42 +00:00
|
|
|
class PCBNEW_SETTINGS;
|
2020-07-11 17:42:00 +00:00
|
|
|
class ROW_ICON_PROVIDER;
|
2020-08-20 01:11:22 +00:00
|
|
|
class GRID_BITMAP_TOGGLE_RENDERER;
|
2020-09-05 01:45:33 +00:00
|
|
|
class WX_COLLAPSIBLE_PANE;
|
|
|
|
class wxStaticLine;
|
2021-01-25 15:18:28 +00:00
|
|
|
class wxSlider;
|
|
|
|
class wxRadioButton;
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
using KIGFX::COLOR4D;
|
|
|
|
|
|
|
|
|
2020-08-20 01:11:22 +00:00
|
|
|
struct NET_GRID_ENTRY
|
|
|
|
{
|
|
|
|
NET_GRID_ENTRY( int aCode, const wxString& aName, const COLOR4D& aColor, bool aVisible )
|
|
|
|
{
|
|
|
|
code = aCode;
|
|
|
|
name = aName;
|
|
|
|
color = aColor;
|
|
|
|
visible = aVisible;
|
|
|
|
}
|
|
|
|
|
|
|
|
int code;
|
|
|
|
wxString name;
|
|
|
|
COLOR4D color;
|
|
|
|
bool visible;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class NET_GRID_TABLE : public wxGridTableBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum COLUMNS
|
|
|
|
{
|
|
|
|
COL_COLOR,
|
|
|
|
COL_VISIBILITY,
|
|
|
|
COL_LABEL,
|
|
|
|
COL_SIZE
|
|
|
|
};
|
|
|
|
|
|
|
|
static void* ColorToVoid( COLOR4D& aColor )
|
|
|
|
{
|
|
|
|
return static_cast<void*>( &aColor );
|
|
|
|
}
|
|
|
|
|
|
|
|
static COLOR4D VoidToColor( void* aColor )
|
|
|
|
{
|
|
|
|
return *static_cast<COLOR4D*>( aColor );
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
2020-09-04 17:42:04 +00:00
|
|
|
NET_GRID_TABLE( PCB_BASE_FRAME* aFrame, wxColor aBackgroundColor );
|
|
|
|
~NET_GRID_TABLE();
|
2020-08-20 01:11:22 +00:00
|
|
|
|
|
|
|
int GetNumberRows() override
|
|
|
|
{
|
|
|
|
return m_nets.size();
|
|
|
|
}
|
|
|
|
|
|
|
|
int GetNumberCols() override
|
|
|
|
{
|
|
|
|
return COL_SIZE;
|
|
|
|
}
|
|
|
|
|
2020-09-04 17:42:04 +00:00
|
|
|
wxGridCellAttr* GetAttr( int aRow, int aCol, wxGridCellAttr::wxAttrKind ) override;
|
|
|
|
|
2020-08-20 01:11:22 +00:00
|
|
|
wxString GetValue( int aRow, int aCol ) override;
|
|
|
|
|
|
|
|
void SetValue( int aRow, int aCol, const wxString& aValue ) override;
|
|
|
|
|
|
|
|
wxString GetTypeName( int aRow, int aCol ) override;
|
|
|
|
|
|
|
|
bool GetValueAsBool( int aRow, int aCol ) override;
|
|
|
|
|
|
|
|
void SetValueAsBool( int aRow, int aCol, bool aValue ) override;
|
|
|
|
|
|
|
|
void* GetValueAsCustom( int aRow, int aCol, const wxString& aTypeName ) override;
|
|
|
|
|
|
|
|
void SetValueAsCustom( int aRow, int aCol, const wxString& aTypeName, void* aValue ) override;
|
|
|
|
|
|
|
|
NET_GRID_ENTRY& GetEntry( int aRow );
|
|
|
|
|
2020-10-27 11:03:35 +00:00
|
|
|
int GetRowByNetcode( int aCode ) const;
|
2020-08-20 01:11:22 +00:00
|
|
|
|
|
|
|
void Rebuild();
|
|
|
|
|
|
|
|
void ShowAllNets();
|
|
|
|
|
|
|
|
void HideOtherNets( const NET_GRID_ENTRY& aNet );
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateNetVisibility( const NET_GRID_ENTRY& aNet );
|
|
|
|
|
|
|
|
void updateNetColor( const NET_GRID_ENTRY& aNet );
|
|
|
|
|
|
|
|
private:
|
|
|
|
PCB_BASE_FRAME* m_frame;
|
|
|
|
|
|
|
|
std::vector<NET_GRID_ENTRY> m_nets;
|
2020-09-04 17:42:04 +00:00
|
|
|
|
|
|
|
wxGridCellAttr* m_defaultAttr;
|
|
|
|
wxGridCellAttr* m_labelAttr;
|
2020-08-20 01:11:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
class APPEARANCE_CONTROLS : public APPEARANCE_CONTROLS_BASE, public BOARD_LISTENER
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Container for an appearance setting (can control a single board layer, or GAL layer, etc)
|
|
|
|
*/
|
|
|
|
struct APPEARANCE_SETTING
|
|
|
|
{
|
|
|
|
int id;
|
|
|
|
wxString label;
|
|
|
|
wxString tooltip;
|
|
|
|
bool visible;
|
|
|
|
bool can_control_opacity;
|
|
|
|
bool spacer;
|
|
|
|
|
|
|
|
wxPanel* ctl_panel;
|
|
|
|
INDICATOR_ICON* ctl_indicator;
|
|
|
|
BITMAP_TOGGLE* ctl_visibility;
|
|
|
|
COLOR_SWATCH* ctl_color;
|
|
|
|
wxStaticText* ctl_text;
|
|
|
|
wxSlider* ctl_opacity;
|
|
|
|
|
|
|
|
APPEARANCE_SETTING( const wxString& aLabel, int aId,
|
|
|
|
const wxString& aTooltip = wxEmptyString,
|
2020-09-20 01:20:41 +00:00
|
|
|
bool aCanControlOpacity = false ) :
|
|
|
|
id( aId ),
|
|
|
|
label( aLabel ),
|
|
|
|
tooltip( aTooltip ),
|
|
|
|
visible( true ),
|
|
|
|
can_control_opacity( aCanControlOpacity ),
|
|
|
|
spacer( false ),
|
|
|
|
ctl_panel( nullptr ),
|
|
|
|
ctl_indicator( nullptr ),
|
|
|
|
ctl_visibility( nullptr ),
|
|
|
|
ctl_color( nullptr ),
|
|
|
|
ctl_text( nullptr ),
|
|
|
|
ctl_opacity( nullptr )
|
2020-07-11 17:42:00 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
APPEARANCE_SETTING() :
|
2020-09-20 01:20:41 +00:00
|
|
|
id( -1 ),
|
|
|
|
visible( false ),
|
|
|
|
can_control_opacity( false ),
|
|
|
|
spacer( true ),
|
|
|
|
ctl_panel( nullptr ),
|
|
|
|
ctl_indicator( nullptr ),
|
|
|
|
ctl_visibility( nullptr ),
|
|
|
|
ctl_color( nullptr ),
|
|
|
|
ctl_text( nullptr ),
|
|
|
|
ctl_opacity( nullptr )
|
2020-07-11 17:42:00 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFocusOwner, bool aFpEditor = false );
|
2020-08-16 11:19:40 +00:00
|
|
|
~APPEARANCE_CONTROLS();
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
wxSize GetBestSize() const;
|
|
|
|
|
2023-09-24 17:26:42 +00:00
|
|
|
void SaveSettings( PCBNEW_SETTINGS* aCfg );
|
|
|
|
|
2022-02-19 14:58:07 +00:00
|
|
|
void OnLanguageChanged();
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Update the panel contents from the application and board models.
|
2020-07-11 17:42:00 +00:00
|
|
|
void OnBoardChanged();
|
|
|
|
|
|
|
|
void OnBoardNetSettingsChanged( BOARD& aBoard ) override;
|
2021-09-12 16:56:49 +00:00
|
|
|
void OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aItem ) override;
|
|
|
|
void OnBoardItemsAdded( BOARD& aBoard, std::vector<BOARD_ITEM*>& aItems ) override;
|
|
|
|
void OnBoardItemRemoved( BOARD& aBoard, BOARD_ITEM* aItem ) override;
|
|
|
|
void OnBoardItemsRemoved( BOARD& aBoard, std::vector<BOARD_ITEM*>& aItems ) override;
|
|
|
|
void OnBoardItemChanged( BOARD& aBoard, BOARD_ITEM* aItem ) override;
|
|
|
|
void OnBoardItemsChanged( BOARD& aBoard, std::vector<BOARD_ITEM*>& aItems ) override;
|
2020-12-07 23:29:30 +00:00
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Update the colors on all the widgets from the new chosen color theme.
|
2020-07-11 17:42:00 +00:00
|
|
|
void OnColorThemeChanged();
|
|
|
|
|
2022-11-06 00:34:13 +00:00
|
|
|
///< Respond to change in OS's DarkMode
|
|
|
|
void OnDarkModeToggle();
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Update the widget when the active board layer is changed.
|
2020-07-11 17:42:00 +00:00
|
|
|
void OnLayerChanged();
|
|
|
|
|
2021-02-17 03:31:09 +00:00
|
|
|
/// Notifies the panel when a net has been hidden or shown via the external tool.
|
|
|
|
void OnNetVisibilityChanged( int aNetCode, bool aVisibility );
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Manually update visibility for a given layer
|
2021-07-21 23:14:56 +00:00
|
|
|
void SetLayerVisible( int aLayer, bool isVisible );
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
void SetObjectVisible( GAL_LAYER_ID aLayer, bool isVisible = true );
|
|
|
|
|
|
|
|
void UpdateDisplayOptions();
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Return a list of the layer presets created by the user.
|
2020-07-11 17:42:00 +00:00
|
|
|
std::vector<LAYER_PRESET> GetUserLayerPresets() const;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Update the current layer presets from those saved in the project file.
|
2020-07-11 17:42:00 +00:00
|
|
|
void SetUserLayerPresets( std::vector<LAYER_PRESET>& aPresetList );
|
|
|
|
|
|
|
|
void ApplyLayerPreset( const wxString& aPresetName );
|
|
|
|
|
|
|
|
void ApplyLayerPreset( const LAYER_PRESET& aPreset );
|
|
|
|
|
|
|
|
wxString GetActiveLayerPreset() const
|
|
|
|
{
|
|
|
|
if( m_currentPreset )
|
|
|
|
return m_currentPreset->name;
|
|
|
|
else
|
|
|
|
return wxEmptyString;
|
|
|
|
}
|
|
|
|
|
2022-11-06 00:34:13 +00:00
|
|
|
const wxArrayString& GetLayerPresetsMRU() { return m_presetMRU; }
|
2020-08-19 10:31:20 +00:00
|
|
|
|
2021-10-24 22:07:06 +00:00
|
|
|
///< Return a list of viewports created by the user.
|
|
|
|
std::vector<VIEWPORT> GetUserViewports() const;
|
|
|
|
|
|
|
|
///< Update the current viewports from those saved in the project file.
|
|
|
|
void SetUserViewports( std::vector<VIEWPORT>& aPresetList );
|
|
|
|
|
|
|
|
void ApplyViewport( const wxString& aPresetName );
|
|
|
|
|
|
|
|
void ApplyViewport( const VIEWPORT& aPreset );
|
|
|
|
|
2022-11-06 00:34:13 +00:00
|
|
|
const wxArrayString& GetViewportsMRU() { return m_viewportMRU; }
|
2021-10-24 22:07:06 +00:00
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
void OnColorSwatchChanged( wxCommandEvent& aEvent );
|
|
|
|
|
|
|
|
void OnLayerContextMenu( wxCommandEvent& aEvent );
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Return the index of the current tab (0-2).
|
2020-08-18 02:06:31 +00:00
|
|
|
int GetTabIndex() const;
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
///< Set the current notebook tab.
|
2020-08-18 02:06:31 +00:00
|
|
|
void SetTabIndex( int aTab );
|
|
|
|
|
2021-03-26 01:24:12 +00:00
|
|
|
/**
|
|
|
|
* Function to force a redraw of the collapsible panes in this control.
|
|
|
|
*/
|
|
|
|
void RefreshCollapsiblePanes();
|
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
protected:
|
|
|
|
void OnNotebookPageChanged( wxNotebookEvent& event ) override;
|
2020-08-19 01:55:45 +00:00
|
|
|
void OnSetFocus( wxFocusEvent& aEvent ) override;
|
2020-08-20 01:11:22 +00:00
|
|
|
void OnSize( wxSizeEvent& aEvent ) override;
|
|
|
|
void OnNetGridClick( wxGridEvent& event ) override;
|
|
|
|
void OnNetGridDoubleClick( wxGridEvent& event ) override;
|
|
|
|
void OnNetGridRightClick( wxGridEvent& event ) override;
|
|
|
|
void OnNetGridMouseEvent( wxMouseEvent& aEvent );
|
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
private:
|
2021-01-27 22:15:38 +00:00
|
|
|
void createControls();
|
|
|
|
|
|
|
|
void rebuildLayers();
|
|
|
|
|
|
|
|
void rebuildLayerContextMenu();
|
|
|
|
|
|
|
|
void syncColorsAndVisibility();
|
|
|
|
|
|
|
|
void rebuildObjects();
|
|
|
|
|
|
|
|
void syncObjectSettings();
|
|
|
|
|
2022-11-06 11:17:54 +00:00
|
|
|
void buildNetClassMenu( wxMenu& aMenu, bool isDefaultClass, const wxString& aName );
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
void rebuildNets();
|
|
|
|
|
|
|
|
void loadDefaultLayerPresets();
|
|
|
|
|
|
|
|
void rebuildLayerPresetsWidget();
|
|
|
|
|
|
|
|
void syncLayerPresetSelection();
|
|
|
|
|
2021-10-24 22:07:06 +00:00
|
|
|
void rebuildViewportsWidget();
|
|
|
|
|
2021-06-11 07:32:47 +00:00
|
|
|
void onLayerLeftClick( wxMouseEvent& aEvent );
|
|
|
|
|
|
|
|
void rightClickHandler( wxMouseEvent& aEvent );
|
2021-01-27 22:15:38 +00:00
|
|
|
|
2022-02-23 17:39:06 +00:00
|
|
|
void onLayerVisibilityToggled( PCB_LAYER_ID aLayer );
|
2021-01-27 22:15:38 +00:00
|
|
|
|
|
|
|
void onObjectVisibilityChanged( GAL_LAYER_ID aLayer, bool isVisible, bool isFinal );
|
|
|
|
|
|
|
|
void setVisibleLayers( LSET aLayers );
|
|
|
|
|
|
|
|
void setVisibleObjects( GAL_SET aObjects );
|
|
|
|
|
|
|
|
LSET getVisibleLayers();
|
|
|
|
|
|
|
|
GAL_SET getVisibleObjects();
|
|
|
|
|
|
|
|
void onObjectOpacitySlider( int aLayer, float aOpacity );
|
|
|
|
|
|
|
|
void updateLayerPresetSelection( const wxString& aName );
|
|
|
|
|
|
|
|
void onLayerPresetChanged( wxCommandEvent& aEvent ) override;
|
|
|
|
|
|
|
|
void doApplyLayerPreset( const LAYER_PRESET& aPreset );
|
|
|
|
|
2021-10-24 22:07:06 +00:00
|
|
|
void updateViewportSelection( const wxString& aName );
|
|
|
|
|
|
|
|
void onViewportChanged( wxCommandEvent& aEvent ) override;
|
|
|
|
|
|
|
|
void doApplyViewport( const VIEWPORT& aViewport );
|
|
|
|
|
2021-01-27 22:15:38 +00:00
|
|
|
void onNetclassVisibilityChanged( wxCommandEvent& aEvent );
|
|
|
|
|
|
|
|
void showNetclass( const wxString& aClassName, bool aShow = true );
|
|
|
|
|
|
|
|
void onNetContextMenu( wxCommandEvent& aEvent );
|
|
|
|
|
|
|
|
void onNetclassColorChanged( wxCommandEvent& aEvent );
|
|
|
|
|
|
|
|
wxString netclassNameFromEvent( wxEvent& aEvent );
|
|
|
|
|
2021-10-04 12:42:08 +00:00
|
|
|
void onNetColorMode( wxCommandEvent& aEvent );
|
2021-01-27 22:15:38 +00:00
|
|
|
|
2021-10-04 12:42:08 +00:00
|
|
|
void onRatsnestMode( wxCommandEvent& aEvent );
|
2021-01-27 22:15:38 +00:00
|
|
|
|
|
|
|
void onNetclassContextMenu( wxCommandEvent& aEvent );
|
|
|
|
|
|
|
|
void handleBoardItemsChanged();
|
|
|
|
|
|
|
|
void passOnFocus();
|
|
|
|
|
|
|
|
void idleFocusHandler( wxIdleEvent& aEvent );
|
|
|
|
|
|
|
|
void onReadOnlySwatch();
|
|
|
|
|
|
|
|
bool doesBoardItemNeedRebuild( BOARD_ITEM* aBoardItem );
|
|
|
|
|
|
|
|
bool doesBoardItemNeedRebuild( std::vector<BOARD_ITEM*>& aBoardItems );
|
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
PCB_BASE_FRAME* m_frame;
|
|
|
|
|
2020-08-18 01:57:49 +00:00
|
|
|
wxWindow* m_focusOwner;
|
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
static const APPEARANCE_SETTING s_objectSettings[];
|
|
|
|
|
|
|
|
ROW_ICON_PROVIDER* m_iconProvider;
|
|
|
|
|
|
|
|
BOARD* m_board;
|
|
|
|
|
2020-09-30 03:29:58 +00:00
|
|
|
bool m_isFpEditor;
|
|
|
|
|
2020-08-20 01:11:22 +00:00
|
|
|
// Nets grid view
|
|
|
|
NET_GRID_TABLE* m_netsTable;
|
|
|
|
|
|
|
|
GRID_BITMAP_TOGGLE_RENDERER* m_toggleGridRenderer;
|
|
|
|
|
|
|
|
/// Grid cell that is being hovered over, for tooltips
|
|
|
|
wxGridCellCoords m_hoveredCell;
|
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_layerSettings;
|
2022-11-06 00:34:13 +00:00
|
|
|
std::map<PCB_LAYER_ID, APPEARANCE_SETTING*> m_layerSettingsMap;
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_objectSettings;
|
2022-11-06 00:34:13 +00:00
|
|
|
std::map<GAL_LAYER_ID, APPEARANCE_SETTING*> m_objectSettingsMap;
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
std::vector<std::unique_ptr<APPEARANCE_SETTING>> m_netclassSettings;
|
2022-11-06 00:34:13 +00:00
|
|
|
std::map<wxString, APPEARANCE_SETTING*> m_netclassSettingsMap;
|
2020-07-11 17:42:00 +00:00
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
// TODO(JE) Move preset storage to the PCB_CONTROL tool
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
std::map<wxString, LAYER_PRESET> m_layerPresets;
|
2021-10-24 22:07:06 +00:00
|
|
|
LAYER_PRESET* m_currentPreset;
|
|
|
|
LAYER_PRESET* m_lastSelectedUserPreset;
|
|
|
|
wxArrayString m_presetMRU;
|
2020-07-11 17:42:00 +00:00
|
|
|
|
2021-10-24 22:07:06 +00:00
|
|
|
std::map<wxString, VIEWPORT> m_viewports;
|
|
|
|
VIEWPORT* m_lastSelectedViewport;
|
|
|
|
wxArrayString m_viewportMRU;
|
2020-08-19 10:31:20 +00:00
|
|
|
|
2022-11-06 00:34:13 +00:00
|
|
|
wxMenu* m_layerContextMenu;
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
/// Stores wxIDs for each netclass for control event mapping
|
|
|
|
std::map<int, wxString> m_netclassIdMap;
|
|
|
|
|
|
|
|
/// The name of the netclass that was right-clicked
|
|
|
|
wxString m_contextMenuNetclass;
|
|
|
|
|
2020-08-19 01:55:45 +00:00
|
|
|
wxBoxSizer* m_layersOuterSizer;
|
|
|
|
wxBoxSizer* m_objectsOuterSizer;
|
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
// The built-in layer presets
|
|
|
|
static LAYER_PRESET presetNoLayers;
|
|
|
|
static LAYER_PRESET presetAllLayers;
|
|
|
|
static LAYER_PRESET presetAllCopper;
|
|
|
|
static LAYER_PRESET presetInnerCopper;
|
|
|
|
static LAYER_PRESET presetFront;
|
|
|
|
static LAYER_PRESET presetFrontAssembly;
|
|
|
|
static LAYER_PRESET presetBack;
|
|
|
|
static LAYER_PRESET presetBackAssembly;
|
2023-07-31 16:35:38 +00:00
|
|
|
// a LAYER_PRESET used only to store the objects visibility of the
|
|
|
|
// last selected built-in LAYER_PRESET preset
|
|
|
|
static LAYER_PRESET m_lastBuiltinPreset;
|
2020-07-11 17:42:00 +00:00
|
|
|
|
|
|
|
int m_pointSize;
|
|
|
|
|
2020-09-04 10:19:58 +00:00
|
|
|
wxColour m_layerPanelColour;
|
|
|
|
|
2020-09-05 01:45:33 +00:00
|
|
|
// Layer display options controls
|
|
|
|
WX_COLLAPSIBLE_PANE* m_paneLayerDisplayOptions;
|
2021-10-04 12:42:08 +00:00
|
|
|
wxStaticText* m_inactiveLayersLabel;
|
2020-09-05 01:45:33 +00:00
|
|
|
wxRadioButton* m_rbHighContrastNormal;
|
|
|
|
wxRadioButton* m_rbHighContrastDim;
|
|
|
|
wxRadioButton* m_rbHighContrastOff;
|
|
|
|
wxStaticLine* m_layerDisplaySeparator;
|
|
|
|
wxCheckBox* m_cbFlipBoard;
|
|
|
|
|
|
|
|
// Net display options controls
|
|
|
|
WX_COLLAPSIBLE_PANE* m_paneNetDisplayOptions;
|
2020-09-07 20:43:31 +00:00
|
|
|
wxStaticText* m_txtNetDisplayTitle;
|
2020-09-05 01:45:33 +00:00
|
|
|
wxRadioButton* m_rbNetColorAll;
|
|
|
|
wxRadioButton* m_rbNetColorRatsnest;
|
|
|
|
wxRadioButton* m_rbNetColorOff;
|
2020-09-07 20:43:31 +00:00
|
|
|
wxStaticText* m_txtRatsnestVisibility;
|
|
|
|
wxRadioButton* m_rbRatsnestAllLayers;
|
2021-10-04 12:42:08 +00:00
|
|
|
wxRadioButton* m_rbRatsnestVisLayers;
|
|
|
|
wxRadioButton* m_rbRatsnestNone;
|
2020-09-05 01:45:33 +00:00
|
|
|
|
2020-07-11 17:42:00 +00:00
|
|
|
enum POPUP_ID
|
|
|
|
{
|
|
|
|
ID_CHANGE_COLOR = wxID_HIGHEST,
|
|
|
|
ID_SET_NET_COLOR,
|
|
|
|
ID_CLEAR_NET_COLOR,
|
|
|
|
ID_SHOW_ALL_NETS,
|
|
|
|
ID_HIDE_OTHER_NETS,
|
|
|
|
ID_HIGHLIGHT_NET,
|
|
|
|
ID_SELECT_NET,
|
2020-09-16 23:09:12 +00:00
|
|
|
ID_DESELECT_NET,
|
2020-07-11 17:42:00 +00:00
|
|
|
ID_SHOW_ALL_COPPER_LAYERS,
|
|
|
|
ID_HIDE_ALL_COPPER_LAYERS,
|
|
|
|
ID_HIDE_ALL_BUT_ACTIVE,
|
|
|
|
ID_PRESET_NO_LAYERS,
|
|
|
|
ID_PRESET_ALL_LAYERS,
|
|
|
|
ID_PRESET_FRONT,
|
|
|
|
ID_PRESET_FRONT_ASSEMBLY,
|
|
|
|
ID_PRESET_INNER_COPPER,
|
|
|
|
ID_PRESET_BACK,
|
|
|
|
ID_PRESET_BACK_ASSEMBLY,
|
|
|
|
ID_HIDE_ALL_NON_COPPER,
|
|
|
|
ID_SHOW_ALL_NON_COPPER,
|
|
|
|
ID_LAST_VALUE
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|