refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS
This commit is contained in:
parent
90ab5860dc
commit
81d1e17f02
|
@ -38,11 +38,10 @@
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/frame.h>
|
#include <wx/frame.h>
|
||||||
|
|
||||||
struct MODULE_3D_SETTINGS;
|
class MODULE_3D_SETTINGS;
|
||||||
class S3D_CACHE;
|
class S3D_CACHE;
|
||||||
class S3D_FILENAME_RESOLVER;
|
class S3D_FILENAME_RESOLVER;
|
||||||
class C3D_MODEL_VIEWER;
|
class C3D_MODEL_VIEWER;
|
||||||
//class wxGenericDirCtrl;
|
|
||||||
|
|
||||||
class DLG_SELECT_3DMODEL : public wxDialog
|
class DLG_SELECT_3DMODEL : public wxDialog
|
||||||
{
|
{
|
||||||
|
|
|
@ -407,6 +407,7 @@ set( PCB_COMMON_SRCS
|
||||||
../pcbnew/kicad_clipboard.cpp
|
../pcbnew/kicad_clipboard.cpp
|
||||||
../pcbnew/gpcb_plugin.cpp
|
../pcbnew/gpcb_plugin.cpp
|
||||||
../pcbnew/pcb_netlist.cpp
|
../pcbnew/pcb_netlist.cpp
|
||||||
|
../pcbnew/pcb_display_options.cpp
|
||||||
widgets/widget_net_selector.cpp
|
widgets/widget_net_selector.cpp
|
||||||
pcb_plot_params_keywords.cpp
|
pcb_plot_params_keywords.cpp
|
||||||
pcb_keywords.cpp
|
pcb_keywords.cpp
|
||||||
|
@ -532,7 +533,7 @@ target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} rt )
|
||||||
|
|
||||||
add_dependencies( dsntest lib-dependencies )
|
add_dependencies( dsntest lib-dependencies )
|
||||||
|
|
||||||
target_link_libraries( pcbcommon 3d-viewer )
|
target_link_libraries( pcbcommon )
|
||||||
|
|
||||||
|
|
||||||
# _kiway.so
|
# _kiway.so
|
||||||
|
|
|
@ -96,11 +96,11 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, CVPCB_MAINFRA
|
||||||
GetScreen()->SetGrid( m_LastGridSizeId + ID_POPUP_GRID_LEVEL_1000 );
|
GetScreen()->SetGrid( m_LastGridSizeId + ID_POPUP_GRID_LEVEL_1000 );
|
||||||
|
|
||||||
// Initialize some display options
|
// Initialize some display options
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
displ_opts->m_DisplayPadIsol = false; // Pad clearance has no meaning here
|
displ_opts->m_DisplayPadIsol = false; // Pad clearance has no meaning here
|
||||||
|
|
||||||
// Track and via clearance has no meaning here.
|
// Track and via clearance has no meaning here.
|
||||||
displ_opts->m_ShowTrackClearanceMode = DO_NOT_SHOW_CLEARANCE;
|
displ_opts->m_ShowTrackClearanceMode = PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE;
|
||||||
|
|
||||||
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||||
ReCreateHToolbar();
|
ReCreateHToolbar();
|
||||||
|
@ -249,7 +249,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar()
|
||||||
|
|
||||||
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent )
|
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
wxString msgTextsFill[2] = { _( "Show texts in filled mode" ),
|
wxString msgTextsFill[2] = { _( "Show texts in filled mode" ),
|
||||||
_( "Show texts in sketch mode" ) };
|
_( "Show texts in sketch mode" ) };
|
||||||
|
@ -264,7 +264,7 @@ void DISPLAY_FOOTPRINTS_FRAME::OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
|
|
||||||
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent )
|
void DISPLAY_FOOTPRINTS_FRAME::OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
wxString msgEdgesFill[2] = { _( "Show outlines in filled mode" ),
|
wxString msgEdgesFill[2] = { _( "Show outlines in filled mode" ),
|
||||||
_( "Show outlines in sketch mode" ) };
|
_( "Show outlines in sketch mode" ) };
|
||||||
|
@ -295,7 +295,7 @@ bool DISPLAY_FOOTPRINTS_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* Po
|
||||||
void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
switch( id )
|
switch( id )
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,7 +72,7 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::initDialog()
|
||||||
/* mandatory to use escape key as cancel under wxGTK. */
|
/* mandatory to use escape key as cancel under wxGTK. */
|
||||||
SetFocus();
|
SetFocus();
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
|
||||||
|
|
||||||
m_EdgesDisplayOption->SetValue( not displ_opts->m_DisplayModEdgeFill );
|
m_EdgesDisplayOption->SetValue( not displ_opts->m_DisplayModEdgeFill );
|
||||||
m_TextDisplayOption->SetValue( not displ_opts->m_DisplayModTextFill );
|
m_TextDisplayOption->SetValue( not displ_opts->m_DisplayModTextFill );
|
||||||
|
@ -89,7 +89,7 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::initDialog()
|
||||||
|
|
||||||
void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::UpdateObjectSettings( void )
|
void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::UpdateObjectSettings( void )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)m_Parent->GetDisplayOptions();
|
||||||
|
|
||||||
displ_opts->m_DisplayModEdgeFill = not m_EdgesDisplayOption->GetValue();
|
displ_opts->m_DisplayModEdgeFill = not m_EdgesDisplayOption->GetValue();
|
||||||
displ_opts->m_DisplayModTextFill = not m_TextDisplayOption->GetValue();
|
displ_opts->m_DisplayModTextFill = not m_TextDisplayOption->GetValue();
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#ifndef BOARD_DESIGN_SETTINGS_H_
|
#ifndef BOARD_DESIGN_SETTINGS_H_
|
||||||
#define BOARD_DESIGN_SETTINGS_H_
|
#define BOARD_DESIGN_SETTINGS_H_
|
||||||
|
|
||||||
#include <pcbstruct.h> // NB_COLORS
|
|
||||||
#include <class_pad.h>
|
#include <class_pad.h>
|
||||||
#include <class_track.h>
|
#include <class_track.h>
|
||||||
#include <class_netclass.h>
|
#include <class_netclass.h>
|
||||||
|
|
|
@ -61,15 +61,13 @@ public:
|
||||||
virtual void Save( wxConfigBase *aConfig ) override;
|
virtual void Save( wxConfigBase *aConfig ) override;
|
||||||
/**
|
/**
|
||||||
* Function GetLayerColor
|
* Function GetLayerColor
|
||||||
* @return the color for aLayer which is one of the layer indices given
|
* @return the color for aLayer which
|
||||||
* in pcbstruct.h or in schematic
|
|
||||||
*/
|
*/
|
||||||
COLOR4D GetLayerColor( LAYER_NUM aLayer ) const;
|
COLOR4D GetLayerColor( LAYER_NUM aLayer ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SetLayerColor
|
* Function SetLayerColor
|
||||||
* sets the color for aLayer which is one of the layer indices given
|
* sets the color for aLayer
|
||||||
* in pcbstruct.h or in schematic
|
|
||||||
*/
|
*/
|
||||||
void SetLayerColor( LAYER_NUM aLayer, COLOR4D aColor );
|
void SetLayerColor( LAYER_NUM aLayer, COLOR4D aColor );
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#define INCLUDE__COMMON_H_
|
#define INCLUDE__COMMON_H_
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/cstdint.hpp>
|
|
||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include <wx/confbase.h>
|
#include <wx/confbase.h>
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
|
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
|
*
|
||||||
|
* 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 2
|
||||||
|
* 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, you may find one here:
|
||||||
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||||
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file pcb_display_options.h
|
||||||
|
* @brief Definition of PCB_DISPLAY_OPTIONS class
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PCB_DISPLAY_OPTIONS_H_
|
||||||
|
#define PCB_DISPLAY_OPTIONS_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class PCB_DISPLAY_OPTIONS
|
||||||
|
* handles display options like enable/disable some optional drawings.
|
||||||
|
*/
|
||||||
|
class PCB_DISPLAY_OPTIONS
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enum TRACE_CLEARANCE_DISPLAY_MODE_T
|
||||||
|
* is the set of values for DISPLAY_OPTIONS.ShowTrackClearanceMode parameter option.
|
||||||
|
* This parameter controls how to show tracks and vias clearance area.
|
||||||
|
*/
|
||||||
|
enum TRACE_CLEARANCE_DISPLAY_MODE_T {
|
||||||
|
DO_NOT_SHOW_CLEARANCE = 0, // Do not show clearance areas
|
||||||
|
SHOW_CLEARANCE_NEW_TRACKS, /* Show clearance areas only for new track
|
||||||
|
* during track creation. */
|
||||||
|
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS, /* Show clearance areas only for new track
|
||||||
|
* during track creation, and shows a via
|
||||||
|
* clearance area at end of current new
|
||||||
|
* segment (guide to place a new via
|
||||||
|
*/
|
||||||
|
SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS,
|
||||||
|
/* Show clearance for new, moving and
|
||||||
|
* dragging tracks and vias
|
||||||
|
*/
|
||||||
|
SHOW_CLEARANCE_ALWAYS /* Show Always clearance areas
|
||||||
|
* for track and vias
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
bool m_DisplayPadFill;
|
||||||
|
bool m_DisplayViaFill;
|
||||||
|
bool m_DisplayPadNum; // show pads numbers
|
||||||
|
bool m_DisplayPadIsol;
|
||||||
|
bool m_DisplayModEdgeFill; // How to display module drawings ( sketch/ filled )
|
||||||
|
bool m_DisplayModTextFill; // How to display module texts ( sketch/ filled )
|
||||||
|
bool m_DisplayPcbTrackFill; // false : tracks are show in sketch mode, true = filled.
|
||||||
|
|
||||||
|
/// How trace clearances are displayed. @see TRACE_CLEARANCE_DISPLAY_MODE_T.
|
||||||
|
TRACE_CLEARANCE_DISPLAY_MODE_T m_ShowTrackClearanceMode;
|
||||||
|
|
||||||
|
bool m_DisplayPolarCood;
|
||||||
|
int m_DisplayZonesMode;
|
||||||
|
int m_DisplayNetNamesMode; /* 0 do not show netnames,
|
||||||
|
* 1 show netnames on pads
|
||||||
|
* 2 show netnames on tracks
|
||||||
|
* 3 show netnames on tracks and pads
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool m_DisplayDrawItemsFill; // How to display graphic items on board ( sketch/ filled )
|
||||||
|
bool m_ContrastModeDisplay;
|
||||||
|
int m_MaxLinksShowed; // in track creation: number of hairwires shown
|
||||||
|
bool m_Show_Module_Ratsnest; // When moving a footprint: allows displaying a ratsnest
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
PCB_DISPLAY_OPTIONS();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PCBSTRUCT_H_
|
|
@ -40,8 +40,8 @@
|
||||||
#include <eda_text.h> // EDA_DRAW_MODE_T
|
#include <eda_text.h> // EDA_DRAW_MODE_T
|
||||||
#include <richio.h>
|
#include <richio.h>
|
||||||
#include <class_pcb_screen.h>
|
#include <class_pcb_screen.h>
|
||||||
#include <pcbstruct.h>
|
|
||||||
|
|
||||||
|
#include <pcb_display_options.h>
|
||||||
#include <pcb_general_settings.h>
|
#include <pcb_general_settings.h>
|
||||||
|
|
||||||
/* Forward declarations of classes. */
|
/* Forward declarations of classes. */
|
||||||
|
@ -68,7 +68,7 @@ class PCB_GENERAL_SETTINGS ;
|
||||||
class PCB_BASE_FRAME : public EDA_DRAW_FRAME
|
class PCB_BASE_FRAME : public EDA_DRAW_FRAME
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DISPLAY_OPTIONS m_DisplayOptions;
|
PCB_DISPLAY_OPTIONS m_DisplayOptions;
|
||||||
EDA_UNITS_T m_UserGridUnit;
|
EDA_UNITS_T m_UserGridUnit;
|
||||||
wxRealPoint m_UserGridSize;
|
wxRealPoint m_UserGridSize;
|
||||||
|
|
||||||
|
|
|
@ -618,7 +618,7 @@ int getOptimalModulePlacement( PCB_EDIT_FRAME* aFrame, MODULE* aModule, wxDC* aD
|
||||||
wxPoint LastPosOK;
|
wxPoint LastPosOK;
|
||||||
double min_cost, curr_cost, Score;
|
double min_cost, curr_cost, Score;
|
||||||
bool TstOtherSide;
|
bool TstOtherSide;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)aFrame->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)aFrame->GetDisplayOptions();
|
||||||
BOARD* brd = aFrame->GetBoard();
|
BOARD* brd = aFrame->GetBoard();
|
||||||
|
|
||||||
aModule->CalculateBoundingBox();
|
aModule->CalculateBoundingBox();
|
||||||
|
|
|
@ -382,7 +382,7 @@ void PCB_BASE_FRAME::Show3D_Frame( wxCommandEvent& event )
|
||||||
void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
||||||
{
|
{
|
||||||
PCB_LAYER_ID preslayer = GetActiveLayer();
|
PCB_LAYER_ID preslayer = GetActiveLayer();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
// Check if the specified layer matches the present layer
|
// Check if the specified layer matches the present layer
|
||||||
if( layer == preslayer )
|
if( layer == preslayer )
|
||||||
|
@ -431,7 +431,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
||||||
|
|
||||||
void PCB_BASE_FRAME::OnTogglePolarCoords( wxCommandEvent& aEvent )
|
void PCB_BASE_FRAME::OnTogglePolarCoords( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
SetStatusText( wxEmptyString );
|
SetStatusText( wxEmptyString );
|
||||||
|
|
||||||
displ_opts->m_DisplayPolarCood = !displ_opts->m_DisplayPolarCood;
|
displ_opts->m_DisplayPolarCood = !displ_opts->m_DisplayPolarCood;
|
||||||
|
@ -442,7 +442,7 @@ void PCB_BASE_FRAME::OnTogglePolarCoords( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
|
void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
displ_opts->m_DisplayPadFill = !displ_opts->m_DisplayPadFill;
|
displ_opts->m_DisplayPadFill = !displ_opts->m_DisplayPadFill;
|
||||||
EDA_DRAW_PANEL_GAL* gal = GetGalCanvas();
|
EDA_DRAW_PANEL_GAL* gal = GetGalCanvas();
|
||||||
|
@ -470,7 +470,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
void PCB_BASE_FRAME::OnUpdateCoordType( wxUpdateUIEvent& aEvent )
|
void PCB_BASE_FRAME::OnUpdateCoordType( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
aEvent.Check( displ_opts->m_DisplayPolarCood );
|
aEvent.Check( displ_opts->m_DisplayPolarCood );
|
||||||
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_POLAR_COORD,
|
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_POLAR_COORD,
|
||||||
|
@ -482,7 +482,8 @@ void PCB_BASE_FRAME::OnUpdateCoordType( wxUpdateUIEvent& aEvent )
|
||||||
|
|
||||||
void PCB_BASE_FRAME::OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent )
|
void PCB_BASE_FRAME::OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
aEvent.Check( !displ_opts->m_DisplayPadFill );
|
aEvent.Check( !displ_opts->m_DisplayPadFill );
|
||||||
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
|
||||||
displ_opts->m_DisplayPadFill ?
|
displ_opts->m_DisplayPadFill ?
|
||||||
|
@ -621,7 +622,7 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg )
|
||||||
if( aId < 0 )
|
if( aId < 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
// handle color changes for transitions in and out of ID_TRACK_BUTT
|
// handle color changes for transitions in and out of ID_TRACK_BUTT
|
||||||
if( ( GetToolId() == ID_TRACK_BUTT && aId != ID_TRACK_BUTT )
|
if( ( GetToolId() == ID_TRACK_BUTT && aId != ID_TRACK_BUTT )
|
||||||
|
@ -654,7 +655,7 @@ void PCB_BASE_FRAME::UpdateStatusBar()
|
||||||
double dYpos;
|
double dYpos;
|
||||||
wxString line;
|
wxString line;
|
||||||
wxString locformatter;
|
wxString locformatter;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
EDA_DRAW_FRAME::UpdateStatusBar();
|
EDA_DRAW_FRAME::UpdateStatusBar();
|
||||||
|
|
||||||
|
@ -983,7 +984,7 @@ void PCB_BASE_FRAME::UseGalCanvas( bool aEnable )
|
||||||
// Transfer latest current display options from legacy to GAL canvas:
|
// Transfer latest current display options from legacy to GAL canvas:
|
||||||
auto painter = static_cast<KIGFX::PCB_PAINTER*>( galCanvas->GetView()->GetPainter() );
|
auto painter = static_cast<KIGFX::PCB_PAINTER*>( galCanvas->GetView()->GetPainter() );
|
||||||
auto settings = painter->GetSettings();
|
auto settings = painter->GetSettings();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
settings->LoadDisplayOptions( displ_opts );
|
settings->LoadDisplayOptions( displ_opts );
|
||||||
|
|
||||||
galCanvas->GetView()->RecacheAllItems();
|
galCanvas->GetView()->RecacheAllItems();
|
||||||
|
|
|
@ -489,7 +489,7 @@ static void drawMovingBlock( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a
|
||||||
BASE_SCREEN* screen = aPanel->GetScreen();
|
BASE_SCREEN* screen = aPanel->GetScreen();
|
||||||
|
|
||||||
// do not show local module rastnest in block move, it is not usable.
|
// do not show local module rastnest in block move, it is not usable.
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)aPanel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( aPanel->GetDisplayOptions() );
|
||||||
bool showRats = displ_opts->m_Show_Module_Ratsnest;
|
bool showRats = displ_opts->m_Show_Module_Ratsnest;
|
||||||
displ_opts->m_Show_Module_Ratsnest = false;
|
displ_opts->m_Show_Module_Ratsnest = false;
|
||||||
|
|
||||||
|
|
|
@ -1088,7 +1088,6 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// virtual, see pcbstruct.h
|
|
||||||
void BOARD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
|
void BOARD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
|
||||||
{
|
{
|
||||||
wxString txt;
|
wxString txt;
|
||||||
|
@ -1123,7 +1122,6 @@ void BOARD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// virtual, see pcbstruct.h
|
|
||||||
SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] )
|
SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] )
|
||||||
{
|
{
|
||||||
KICAD_T stype;
|
KICAD_T stype;
|
||||||
|
|
|
@ -327,7 +327,7 @@ void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
|
||||||
auto gcolor = frame->Settings().Colors().GetLayerColor( m_Layer );
|
auto gcolor = frame->Settings().Colors().GetLayerColor( m_Layer );
|
||||||
|
|
||||||
GRSetDrawMode( DC, mode_color );
|
GRSetDrawMode( DC, mode_color );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
bool filled = displ_opts ? displ_opts->m_DisplayDrawItemsFill : FILLED;
|
bool filled = displ_opts ? displ_opts->m_DisplayDrawItemsFill : FILLED;
|
||||||
int width = m_Width;
|
int width = m_Width;
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,7 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
|
||||||
auto frame = static_cast<PCB_EDIT_FRAME*> ( panel->GetParent() );
|
auto frame = static_cast<PCB_EDIT_FRAME*> ( panel->GetParent() );
|
||||||
auto color = frame->Settings().Colors().GetLayerColor( GetLayer() );
|
auto color = frame->Settings().Colors().GetLayerColor( GetLayer() );
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) panel->GetDisplayOptions();
|
||||||
|
|
||||||
if( ( draw_mode & GR_ALLOW_HIGHCONTRAST ) && displ_opts && displ_opts->m_ContrastModeDisplay )
|
if( ( draw_mode & GR_ALLOW_HIGHCONTRAST ) && displ_opts && displ_opts->m_ContrastModeDisplay )
|
||||||
{
|
{
|
||||||
|
@ -331,8 +331,6 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// see pcbstruct.h
|
|
||||||
void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
|
void DRAWSEGMENT::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
|
@ -123,7 +123,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
|
||||||
auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
|
auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
|
||||||
auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
|
auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
if(( draw_mode & GR_ALLOW_HIGHCONTRAST ) && displ_opts && displ_opts->m_ContrastModeDisplay )
|
if(( draw_mode & GR_ALLOW_HIGHCONTRAST ) && displ_opts && displ_opts->m_ContrastModeDisplay )
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,7 +93,7 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE mode_color,
|
||||||
auto gcolor = frame->Settings().Colors().GetLayerColor( m_Layer );
|
auto gcolor = frame->Settings().Colors().GetLayerColor( m_Layer );
|
||||||
|
|
||||||
GRSetDrawMode( DC, mode_color );
|
GRSetDrawMode( DC, mode_color );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
bool filled = displ_opts ? displ_opts->m_DisplayDrawItemsFill : FILLED;
|
bool filled = displ_opts ? displ_opts->m_DisplayDrawItemsFill : FILLED;
|
||||||
width = m_Width;
|
width = m_Width;
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
|
||||||
|
|
||||||
wxCHECK_RET( frame != NULL, wxT( "Panel has no parent frame window." ) );
|
wxCHECK_RET( frame != NULL, wxT( "Panel has no parent frame window." ) );
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)frame->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( frame->GetDisplayOptions() );
|
||||||
PCB_SCREEN* screen = frame->GetScreen();
|
PCB_SCREEN* screen = frame->GetScreen();
|
||||||
|
|
||||||
if( displ_opts && displ_opts->m_DisplayPadFill == SKETCH )
|
if( displ_opts && displ_opts->m_DisplayPadFill == SKETCH )
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
#include <wxPcbStruct.h>
|
#include <wxPcbStruct.h>
|
||||||
#include <pcbstruct.h>
|
#include <pcb_display_options.h>
|
||||||
#include <layer_widget.h>
|
#include <layer_widget.h>
|
||||||
#include <macros.h>
|
#include <macros.h>
|
||||||
#include <menus_helpers.h>
|
#include <menus_helpers.h>
|
||||||
|
@ -562,7 +562,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
myframe->SetActiveLayer( layer );
|
myframe->SetActiveLayer( layer );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)myframe->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)myframe->GetDisplayOptions();
|
||||||
|
|
||||||
if( m_alwaysShowActiveCopperLayer )
|
if( m_alwaysShowActiveCopperLayer )
|
||||||
OnLayerSelected();
|
OnLayerSelected();
|
||||||
|
|
|
@ -69,12 +69,12 @@ void TEXTE_PCB::SetTextAngle( double aAngle )
|
||||||
void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
|
void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
|
||||||
GR_DRAWMODE DrawMode, const wxPoint& offset )
|
GR_DRAWMODE DrawMode, const wxPoint& offset )
|
||||||
{
|
{
|
||||||
wxASSERT( panel );
|
wxASSERT( panel );
|
||||||
|
|
||||||
if( !panel )
|
if( !panel )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BOARD* brd = GetBoard();
|
BOARD* brd = GetBoard();
|
||||||
|
|
||||||
if( brd->IsLayerVisible( m_Layer ) == false )
|
if( brd->IsLayerVisible( m_Layer ) == false )
|
||||||
return;
|
return;
|
||||||
|
@ -83,7 +83,12 @@ void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
|
||||||
auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
|
auto color = frame->Settings().Colors().GetLayerColor( m_Layer );
|
||||||
|
|
||||||
EDA_DRAW_MODE_T fillmode = FILLED;
|
EDA_DRAW_MODE_T fillmode = FILLED;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = nullptr;
|
||||||
|
|
||||||
|
if( panel )
|
||||||
|
{
|
||||||
|
displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
}
|
||||||
|
|
||||||
if( displ_opts && displ_opts->m_DisplayDrawItemsFill == SKETCH )
|
if( displ_opts && displ_opts->m_DisplayDrawItemsFill == SKETCH )
|
||||||
fillmode = SKETCH;
|
fillmode = SKETCH;
|
||||||
|
|
|
@ -254,7 +254,7 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMod
|
||||||
color = frame->Settings().Colors().GetItemColor( LAYER_MOD_TEXT_INVISIBLE );
|
color = frame->Settings().Colors().GetItemColor( LAYER_MOD_TEXT_INVISIBLE );
|
||||||
}
|
}
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)aPanel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( aPanel->GetDisplayOptions() );
|
||||||
|
|
||||||
// shade text if high contrast mode is active
|
// shade text if high contrast mode is active
|
||||||
if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && displ_opts && displ_opts->m_ContrastModeDisplay )
|
if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && displ_opts && displ_opts->m_ContrastModeDisplay )
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
* @brief Functions relatives to tracks, vias and segments used to fill zones.
|
* @brief Functions relatives to tracks, vias and segments used to fill zones.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <gr_basic.h>
|
#include <gr_basic.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
@ -51,14 +52,14 @@
|
||||||
* tests to see if the clearance border is drawn on the given track.
|
* tests to see if the clearance border is drawn on the given track.
|
||||||
* @return bool - true if should draw clearance, else false.
|
* @return bool - true if should draw clearance, else false.
|
||||||
*/
|
*/
|
||||||
static bool ShowClearance( DISPLAY_OPTIONS* aDisplOpts, const TRACK* aTrack )
|
static bool ShowClearance( PCB_DISPLAY_OPTIONS* aDisplOpts, const TRACK* aTrack )
|
||||||
{
|
{
|
||||||
// maybe return true for tracks and vias, not for zone segments
|
// maybe return true for tracks and vias, not for zone segments
|
||||||
return IsCopperLayer( aTrack->GetLayer() )
|
return IsCopperLayer( aTrack->GetLayer() )
|
||||||
&& ( aTrack->Type() == PCB_TRACE_T || aTrack->Type() == PCB_VIA_T )
|
&& ( aTrack->Type() == PCB_TRACE_T || aTrack->Type() == PCB_VIA_T )
|
||||||
&& ( ( aDisplOpts->m_ShowTrackClearanceMode == SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS
|
&& ( ( aDisplOpts->m_ShowTrackClearanceMode == PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS
|
||||||
&& ( aTrack->IsDragging() || aTrack->IsMoving() || aTrack->IsNew() ) )
|
&& ( aTrack->IsDragging() || aTrack->IsMoving() || aTrack->IsNew() ) )
|
||||||
|| ( aDisplOpts->m_ShowTrackClearanceMode == SHOW_CLEARANCE_ALWAYS )
|
|| ( aDisplOpts->m_ShowTrackClearanceMode == PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_ALWAYS )
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -554,7 +555,7 @@ void TRACK::DrawShortNetname( EDA_DRAW_PANEL* panel,
|
||||||
* - only tracks with a length > 10 * thickness are eligible
|
* - only tracks with a length > 10 * thickness are eligible
|
||||||
* and, of course, if we are not printing the board
|
* and, of course, if we are not printing the board
|
||||||
*/
|
*/
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
if( displ_opts->m_DisplayNetNamesMode == 0 || displ_opts->m_DisplayNetNamesMode == 1 )
|
if( displ_opts->m_DisplayNetNamesMode == 0 || displ_opts->m_DisplayNetNamesMode == 1 )
|
||||||
return;
|
return;
|
||||||
|
@ -649,7 +650,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && displ_opts->m_ContrastModeDisplay )
|
if( ( aDrawMode & GR_ALLOW_HIGHCONTRAST ) && displ_opts->m_ContrastModeDisplay )
|
||||||
{
|
{
|
||||||
|
@ -701,7 +702,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
|
||||||
void SEGZONE::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
|
void SEGZONE::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
|
||||||
const wxPoint& aOffset )
|
const wxPoint& aOffset )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
if( displ_opts->m_DisplayZonesMode != 0 )
|
if( displ_opts->m_DisplayZonesMode != 0 )
|
||||||
return;
|
return;
|
||||||
|
@ -789,7 +790,7 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const w
|
||||||
int fillvia = 0;
|
int fillvia = 0;
|
||||||
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) panel->GetParent();
|
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) panel->GetParent();
|
||||||
PCB_SCREEN* screen = frame->GetScreen();
|
PCB_SCREEN* screen = frame->GetScreen();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)frame->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( frame->GetDisplayOptions() );
|
||||||
|
|
||||||
if( displ_opts->m_DisplayViaFill == FILLED )
|
if( displ_opts->m_DisplayViaFill == FILLED )
|
||||||
fillvia = 1;
|
fillvia = 1;
|
||||||
|
|
|
@ -34,7 +34,9 @@
|
||||||
#include <pcbnew.h>
|
#include <pcbnew.h>
|
||||||
#include <class_board_item.h>
|
#include <class_board_item.h>
|
||||||
#include <class_board_connected_item.h>
|
#include <class_board_connected_item.h>
|
||||||
#include <PolyLine.h>
|
#include <pcb_display_options.h>
|
||||||
|
|
||||||
|
//#include <PolyLine.h>
|
||||||
#include <trigo.h>
|
#include <trigo.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +44,7 @@ class TRACK;
|
||||||
class VIA;
|
class VIA;
|
||||||
class D_PAD;
|
class D_PAD;
|
||||||
class MSG_PANEL_ITEM;
|
class MSG_PANEL_ITEM;
|
||||||
|
class SHAPE_POLY_SET;
|
||||||
|
|
||||||
// Via types
|
// Via types
|
||||||
// Note that this enum must be synchronized to GAL_LAYER_ID
|
// Note that this enum must be synchronized to GAL_LAYER_ID
|
||||||
|
|
|
@ -361,7 +361,7 @@ void ZONE_CONTAINER::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE aDrawMod
|
||||||
auto color = frame->Settings().Colors().GetLayerColor( draw_layer );
|
auto color = frame->Settings().Colors().GetLayerColor( draw_layer );
|
||||||
|
|
||||||
GRSetDrawMode( DC, aDrawMode );
|
GRSetDrawMode( DC, aDrawMode );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
if( displ_opts->m_ContrastModeDisplay )
|
if( displ_opts->m_ContrastModeDisplay )
|
||||||
{
|
{
|
||||||
|
@ -415,7 +415,7 @@ void ZONE_CONTAINER::DrawFilledArea( EDA_DRAW_PANEL* panel,
|
||||||
{
|
{
|
||||||
|
|
||||||
static std::vector <wxPoint> CornersBuffer;
|
static std::vector <wxPoint> CornersBuffer;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
// outline_mode is false to show filled polys,
|
// outline_mode is false to show filled polys,
|
||||||
// and true to show polygons outlines only (test and debug purposes)
|
// and true to show polygons outlines only (test and debug purposes)
|
||||||
|
@ -563,7 +563,7 @@ void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC,
|
||||||
auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
|
auto frame = static_cast<PCB_BASE_FRAME*> ( panel->GetParent() );
|
||||||
auto color = frame->Settings().Colors().GetLayerColor( GetLayer() );
|
auto color = frame->Settings().Colors().GetLayerColor( GetLayer() );
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
if( displ_opts->m_ContrastModeDisplay )
|
if( displ_opts->m_ContrastModeDisplay )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
/**
|
|
||||||
* @file classpcb.cpp
|
|
||||||
* @brief Member functions of classes used in Pcbnew (see pcbstruct.h)
|
|
||||||
* except for tracks (see class_track.cpp).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
|
@ -198,31 +192,3 @@ int PCB_SCREEN::MilsToIuScalar()
|
||||||
{
|
{
|
||||||
return (int)IU_PER_MILS;
|
return (int)IU_PER_MILS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DISPLAY_OPTIONS::DISPLAY_OPTIONS()
|
|
||||||
{
|
|
||||||
m_DisplayPadFill = FILLED;
|
|
||||||
m_DisplayViaFill = FILLED;
|
|
||||||
m_DisplayPadNum = true;
|
|
||||||
m_DisplayPadIsol = true;
|
|
||||||
|
|
||||||
m_DisplayModEdgeFill = FILLED;
|
|
||||||
m_DisplayModTextFill = FILLED;
|
|
||||||
m_DisplayPcbTrackFill = FILLED; // false = sketch , true = filled
|
|
||||||
m_ShowTrackClearanceMode = SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS;
|
|
||||||
|
|
||||||
m_DisplayPolarCood = false; /* false = display absolute coordinates,
|
|
||||||
* true = display polar cordinates */
|
|
||||||
m_DisplayZonesMode = 0; /* 0 = Show filled areas outlines in zones,
|
|
||||||
* 1 = do not show filled areas outlines
|
|
||||||
* 2 = show outlines of filled areas */
|
|
||||||
m_DisplayNetNamesMode = 3; /* 0 do not show netnames,
|
|
||||||
* 1 show netnames on pads
|
|
||||||
* 2 show netnames on tracks
|
|
||||||
* 3 show netnames on tracks and pads */
|
|
||||||
m_DisplayDrawItemsFill = FILLED;
|
|
||||||
m_ContrastModeDisplay = false;
|
|
||||||
m_MaxLinksShowed = 3; // in track creation: number of hairwires shown
|
|
||||||
m_Show_Module_Ratsnest = true; // When moving a footprint: allows displaying a ratsnest
|
|
||||||
}
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
|
||||||
BOARD_ITEM* item;
|
BOARD_ITEM* item;
|
||||||
|
|
||||||
GENERAL_COLLECTORS_GUIDE guide = GetCollectorsGuide();
|
GENERAL_COLLECTORS_GUIDE guide = GetCollectorsGuide();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( GetDisplayOptions() );
|
||||||
|
|
||||||
// Assign to scanList the proper item types desired based on tool type
|
// Assign to scanList the proper item types desired based on tool type
|
||||||
// or hotkey that is in play.
|
// or hotkey that is in play.
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
#include <pcbnew.h>
|
#include <pcbnew.h>
|
||||||
#include <wxPcbStruct.h>
|
#include <wxPcbStruct.h>
|
||||||
#include <pcbstruct.h>
|
#include <pcb_display_options.h>
|
||||||
#include <config_map.h>
|
#include <config_map.h>
|
||||||
|
|
||||||
#include <pcbnew_id.h>
|
#include <pcbnew_id.h>
|
||||||
|
@ -46,13 +46,13 @@
|
||||||
#include <widgets/gal_options_panel.h>
|
#include <widgets/gal_options_panel.h>
|
||||||
|
|
||||||
|
|
||||||
static const UTIL::CFG_MAP<TRACE_CLEARANCE_DISPLAY_MODE_T> traceClearanceSelectMap =
|
static const UTIL::CFG_MAP<PCB_DISPLAY_OPTIONS::TRACE_CLEARANCE_DISPLAY_MODE_T> traceClearanceSelectMap =
|
||||||
{
|
{
|
||||||
{ SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS, 2 }, // Default
|
{ PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS, 2 }, // Default
|
||||||
{ DO_NOT_SHOW_CLEARANCE, 0 },
|
{ PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE, 0 },
|
||||||
{ SHOW_CLEARANCE_NEW_TRACKS, 1 },
|
{ PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS, 1 },
|
||||||
{ SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS, 3 },
|
{ PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS, 3 },
|
||||||
{ SHOW_CLEARANCE_ALWAYS, 4 },
|
{ PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_ALWAYS, 4 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) :
|
||||||
|
|
||||||
bool DIALOG_DISPLAY_OPTIONS::TransferDataToWindow()
|
bool DIALOG_DISPLAY_OPTIONS::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
const DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
|
const PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
|
||||||
|
|
||||||
m_OptDisplayTracks->SetValue( displ_opts->m_DisplayPcbTrackFill == SKETCH );
|
m_OptDisplayTracks->SetValue( displ_opts->m_DisplayPcbTrackFill == SKETCH );
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ bool DIALOG_DISPLAY_OPTIONS::TransferDataToWindow()
|
||||||
*/
|
*/
|
||||||
bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
|
bool DIALOG_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) m_parent->GetDisplayOptions();
|
||||||
|
|
||||||
m_parent->SetShowPageLimits( m_Show_Page_Limits->GetValue() );
|
m_parent->SetShowPageLimits( m_Show_Page_Limits->GetValue() );
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ void DIALOG_GENERALOPTIONS::init()
|
||||||
m_sdbSizerOK->SetDefault();
|
m_sdbSizerOK->SetDefault();
|
||||||
|
|
||||||
m_Board = GetParent()->GetBoard();
|
m_Board = GetParent()->GetBoard();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetParent()->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetParent()->GetDisplayOptions();
|
||||||
|
|
||||||
/* Set display options */
|
/* Set display options */
|
||||||
m_PolarDisplay->SetSelection( displ_opts->m_DisplayPolarCood ? 1 : 0 );
|
m_PolarDisplay->SetSelection( displ_opts->m_DisplayPolarCood ? 1 : 0 );
|
||||||
|
@ -97,7 +97,7 @@ void DIALOG_GENERALOPTIONS::OnCancelClick( wxCommandEvent& event )
|
||||||
void DIALOG_GENERALOPTIONS::OnOkClick( wxCommandEvent& event )
|
void DIALOG_GENERALOPTIONS::OnOkClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
EDA_UNITS_T ii;
|
EDA_UNITS_T ii;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetParent()->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetParent()->GetDisplayOptions();
|
||||||
|
|
||||||
displ_opts->m_DisplayPolarCood = ( m_PolarDisplay->GetSelection() == 0 ) ? false : true;
|
displ_opts->m_DisplayPolarCood = ( m_PolarDisplay->GetSelection() == 0 ) ? false : true;
|
||||||
ii = g_UserUnit;
|
ii = g_UserUnit;
|
||||||
|
|
|
@ -68,7 +68,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
|
|
||||||
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
||||||
MODULE* module;
|
MODULE* module;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
m_canvas->CrossHairOff( &dc );
|
m_canvas->CrossHairOff( &dc );
|
||||||
|
|
||||||
|
@ -1352,7 +1352,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
|
||||||
void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
||||||
{
|
{
|
||||||
PCB_LAYER_ID curLayer = GetActiveLayer();
|
PCB_LAYER_ID curLayer = GetActiveLayer();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
// Check if the specified layer matches the present layer
|
// Check if the specified layer matches the present layer
|
||||||
if( layer == curLayer )
|
if( layer == curLayer )
|
||||||
|
@ -1427,7 +1427,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
|
||||||
int lastToolID = GetToolId();
|
int lastToolID = GetToolId();
|
||||||
|
|
||||||
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
// Stop the current command and deselect the current tool.
|
// Stop the current command and deselect the current tool.
|
||||||
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
|
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
|
||||||
|
|
|
@ -113,7 +113,7 @@ static void Move_Segment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPos
|
||||||
void PCB_EDIT_FRAME::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC )
|
void PCB_EDIT_FRAME::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC )
|
||||||
{
|
{
|
||||||
EDA_ITEM* PtStruct;
|
EDA_ITEM* PtStruct;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
bool tmp = displ_opts->m_DisplayDrawItemsFill;
|
bool tmp = displ_opts->m_DisplayDrawItemsFill;
|
||||||
|
|
||||||
if( Segment == NULL )
|
if( Segment == NULL )
|
||||||
|
@ -347,7 +347,7 @@ static void DrawSegment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi
|
||||||
if( Segment == NULL )
|
if( Segment == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)aPanel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) ( aPanel->GetDisplayOptions() );
|
||||||
bool tmp = displ_opts->m_DisplayDrawItemsFill;
|
bool tmp = displ_opts->m_DisplayDrawItemsFill;
|
||||||
|
|
||||||
displ_opts->m_DisplayDrawItemsFill = SKETCH;
|
displ_opts->m_DisplayDrawItemsFill = SKETCH;
|
||||||
|
|
|
@ -675,19 +675,19 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
|
||||||
|
|
||||||
PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen();
|
PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen();
|
||||||
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
|
PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) aPanel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) aPanel-> GetDisplayOptions();
|
||||||
|
|
||||||
bool tmp = displ_opts->m_DisplayPcbTrackFill;
|
bool tmp = displ_opts->m_DisplayPcbTrackFill;
|
||||||
displ_opts->m_DisplayPcbTrackFill = true;
|
displ_opts->m_DisplayPcbTrackFill = true;
|
||||||
TRACE_CLEARANCE_DISPLAY_MODE_T showTrackClearanceMode = displ_opts->m_ShowTrackClearanceMode;
|
auto showTrackClearanceMode = displ_opts->m_ShowTrackClearanceMode;
|
||||||
|
|
||||||
if ( g_FirstTrackSegment == NULL )
|
if ( g_FirstTrackSegment == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NETCLASSPTR netclass = g_FirstTrackSegment->GetNetClass();
|
NETCLASSPTR netclass = g_FirstTrackSegment->GetNetClass();
|
||||||
|
|
||||||
if( showTrackClearanceMode != DO_NOT_SHOW_CLEARANCE )
|
if( showTrackClearanceMode != PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE )
|
||||||
displ_opts->m_ShowTrackClearanceMode = SHOW_CLEARANCE_ALWAYS;
|
displ_opts->m_ShowTrackClearanceMode = PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_ALWAYS;
|
||||||
|
|
||||||
// Values to Via circle
|
// Values to Via circle
|
||||||
int boardViaRadius = frame->GetDesignSettings().GetCurrentViaSize()/2;
|
int boardViaRadius = frame->GetDesignSettings().GetCurrentViaSize()/2;
|
||||||
|
@ -702,7 +702,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
|
||||||
|
|
||||||
frame->TraceAirWiresToTargets( aDC );
|
frame->TraceAirWiresToTargets( aDC );
|
||||||
|
|
||||||
if( showTrackClearanceMode >= SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS )
|
if( showTrackClearanceMode >= PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS )
|
||||||
{
|
{
|
||||||
COLOR4D color = frame->Settings().Colors().GetLayerColor( g_CurrentTrackSegment->GetLayer() );
|
COLOR4D color = frame->Settings().Colors().GetLayerColor( g_CurrentTrackSegment->GetLayer() );
|
||||||
DrawViaCirclesWhenEditingNewTrack( panelClipBox, aDC, g_CurrentTrackSegment->GetEnd(),
|
DrawViaCirclesWhenEditingNewTrack( panelClipBox, aDC, g_CurrentTrackSegment->GetEnd(),
|
||||||
|
@ -766,7 +766,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
|
||||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
DBG( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||||
DrawTraces( aPanel, aDC, g_FirstTrackSegment, g_CurrentTrackList.GetCount(), GR_XOR );
|
DrawTraces( aPanel, aDC, g_FirstTrackSegment, g_CurrentTrackList.GetCount(), GR_XOR );
|
||||||
|
|
||||||
if( showTrackClearanceMode >= SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS )
|
if( showTrackClearanceMode >= PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS )
|
||||||
{
|
{
|
||||||
COLOR4D color = frame->Settings().Colors().GetLayerColor(g_CurrentTrackSegment->GetLayer());
|
COLOR4D color = frame->Settings().Colors().GetLayerColor(g_CurrentTrackSegment->GetLayer());
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway,
|
||||||
|
|
||||||
// Set some display options here, because the FOOTPRINT_WIZARD_FRAME
|
// Set some display options here, because the FOOTPRINT_WIZARD_FRAME
|
||||||
// does not have a config menu to do that:
|
// does not have a config menu to do that:
|
||||||
DISPLAY_OPTIONS* disp_opts = (DISPLAY_OPTIONS*) GetDisplayOptions();
|
auto disp_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
disp_opts->m_DisplayPadIsol = false;
|
disp_opts->m_DisplayPadIsol = false;
|
||||||
disp_opts->m_DisplayPadNum = true;
|
disp_opts->m_DisplayPadNum = true;
|
||||||
GetBoard()->SetElementVisibility( LAYER_NO_CONNECTS, false );
|
GetBoard()->SetElementVisibility( LAYER_NO_CONNECTS, false );
|
||||||
|
|
|
@ -70,7 +70,7 @@ bool PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
||||||
MODULE* module = NULL;
|
MODULE* module = NULL;
|
||||||
int evt_type = 0; //Used to post a wxCommandEvent on demand
|
int evt_type = 0; //Used to post a wxCommandEvent on demand
|
||||||
PCB_SCREEN* screen = GetScreen();
|
PCB_SCREEN* screen = GetScreen();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
/* Convert lower to upper case
|
/* Convert lower to upper case
|
||||||
* (the usual toupper function has problem with non ascii codes like function keys
|
* (the usual toupper function has problem with non ascii codes like function keys
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
void FOOTPRINT_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
void FOOTPRINT_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
bool state = m_optionsToolBar->GetToolToggled( id );
|
bool state = m_optionsToolBar->GetToolToggled( id );
|
||||||
|
|
||||||
switch( id )
|
switch( id )
|
||||||
|
@ -83,7 +83,7 @@ void FOOTPRINT_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||||
|
|
||||||
PARAM_CFG_ARRAY& FOOTPRINT_EDIT_FRAME::GetConfigurationSettings()
|
PARAM_CFG_ARRAY& FOOTPRINT_EDIT_FRAME::GetConfigurationSettings()
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
BOARD_DESIGN_SETTINGS& settings = GetDesignSettings();
|
BOARD_DESIGN_SETTINGS& settings = GetDesignSettings();
|
||||||
|
|
||||||
// Update everything
|
// Update everything
|
||||||
|
@ -148,4 +148,3 @@ PARAM_CFG_ARRAY& FOOTPRINT_EDIT_FRAME::GetConfigurationSettings()
|
||||||
|
|
||||||
return m_configParams;
|
return m_configParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -596,7 +596,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent )
|
||||||
void FOOTPRINT_EDIT_FRAME::OnUpdateOptionsToolbar( wxUpdateUIEvent& aEvent )
|
void FOOTPRINT_EDIT_FRAME::OnUpdateOptionsToolbar( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
int id = aEvent.GetId();
|
int id = aEvent.GetId();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
bool state = false;
|
bool state = false;
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreat
|
||||||
s_PickedList.ClearItemsList();
|
s_PickedList.ClearItemsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
if( displ_opts->m_Show_Module_Ratsnest && aDC )
|
if( displ_opts->m_Show_Module_Ratsnest && aDC )
|
||||||
TraceModuleRatsNest( aDC );
|
TraceModuleRatsNest( aDC );
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void Abort_MoveTrack( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
||||||
bool aErase )
|
bool aErase )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) aPanel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) aPanel->GetDisplayOptions();
|
||||||
wxPoint moveVector;
|
wxPoint moveVector;
|
||||||
int tmp = displ_opts->m_DisplayPcbTrackFill;
|
int tmp = displ_opts->m_DisplayPcbTrackFill;
|
||||||
GR_DRAWMODE draw_mode = GR_XOR | GR_HIGHLIGHT;
|
GR_DRAWMODE draw_mode = GR_XOR | GR_HIGHLIGHT;
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||||
|
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||||
|
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
|
||||||
|
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
|
*
|
||||||
|
* 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 2
|
||||||
|
* 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, you may find one here:
|
||||||
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||||
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <common.h>
|
||||||
|
#include <pcbnew.h>
|
||||||
|
#include <class_board_design_settings.h>
|
||||||
|
#include <layers_id_colors_and_visibility.h>
|
||||||
|
#include <pcb_display_options.h>
|
||||||
|
#include <eda_text.h>
|
||||||
|
|
||||||
|
PCB_DISPLAY_OPTIONS::PCB_DISPLAY_OPTIONS()
|
||||||
|
{
|
||||||
|
m_DisplayPadFill = FILLED;
|
||||||
|
m_DisplayViaFill = FILLED;
|
||||||
|
m_DisplayPadNum = true;
|
||||||
|
m_DisplayPadIsol = true;
|
||||||
|
|
||||||
|
m_DisplayModEdgeFill = FILLED;
|
||||||
|
m_DisplayModTextFill = FILLED;
|
||||||
|
m_DisplayPcbTrackFill = FILLED; // false = sketch , true = filled
|
||||||
|
m_ShowTrackClearanceMode = SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS;
|
||||||
|
|
||||||
|
m_DisplayPolarCood = false; /* false = display absolute coordinates,
|
||||||
|
* true = display polar cordinates */
|
||||||
|
m_DisplayZonesMode = 0; /* 0 = Show filled areas outlines in zones,
|
||||||
|
* 1 = do not show filled areas outlines
|
||||||
|
* 2 = show outlines of filled areas */
|
||||||
|
m_DisplayNetNamesMode = 3; /* 0 do not show netnames,
|
||||||
|
* 1 show netnames on pads
|
||||||
|
* 2 show netnames on tracks
|
||||||
|
* 3 show netnames on tracks and pads */
|
||||||
|
m_DisplayDrawItemsFill = FILLED;
|
||||||
|
m_ContrastModeDisplay = false;
|
||||||
|
m_MaxLinksShowed = 3; // in track creation: number of hairwires shown
|
||||||
|
m_Show_Module_Ratsnest = true; // When moving a footprint: allows displaying a ratsnest
|
||||||
|
}
|
|
@ -117,7 +117,7 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalTy
|
||||||
|
|
||||||
if( frame )
|
if( frame )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) frame->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) frame->GetDisplayOptions();
|
||||||
static_cast<KIGFX::PCB_RENDER_SETTINGS*>( m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( displ_opts );
|
static_cast<KIGFX::PCB_RENDER_SETTINGS*>( m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( displ_opts );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,7 @@ void PCB_DRAW_PANEL_GAL::OnShow()
|
||||||
if( frame )
|
if( frame )
|
||||||
{
|
{
|
||||||
SetTopLayer( frame->GetActiveLayer() );
|
SetTopLayer( frame->GetActiveLayer() );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) frame->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*) frame->GetDisplayOptions();
|
||||||
static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
|
static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
|
||||||
m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( displ_opts );
|
m_view->GetPainter()->GetSettings() )->LoadDisplayOptions( displ_opts );
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
|
|
||||||
#include <layers_id_colors_and_visibility.h>
|
#include <layers_id_colors_and_visibility.h>
|
||||||
#include <pcb_painter.h>
|
#include <pcb_painter.h>
|
||||||
|
#include <pcb_display_options.h>
|
||||||
|
|
||||||
#include <gal/graphics_abstraction_layer.h>
|
#include <gal/graphics_abstraction_layer.h>
|
||||||
#include <convert_basic_shapes_to_polygon.h>
|
#include <convert_basic_shapes_to_polygon.h>
|
||||||
|
|
||||||
|
@ -118,7 +120,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( const COLORS_DESIGN_SETTINGS* aSet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS* aOptions )
|
void PCB_RENDER_SETTINGS::LoadDisplayOptions( const PCB_DISPLAY_OPTIONS* aOptions )
|
||||||
{
|
{
|
||||||
if( aOptions == NULL )
|
if( aOptions == NULL )
|
||||||
return;
|
return;
|
||||||
|
@ -178,23 +180,23 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS* aOptions )
|
||||||
// Clearance settings
|
// Clearance settings
|
||||||
switch( aOptions->m_ShowTrackClearanceMode )
|
switch( aOptions->m_ShowTrackClearanceMode )
|
||||||
{
|
{
|
||||||
case DO_NOT_SHOW_CLEARANCE:
|
case PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE:
|
||||||
m_clearance = CL_NONE;
|
m_clearance = CL_NONE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOW_CLEARANCE_NEW_TRACKS:
|
case PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS:
|
||||||
m_clearance = CL_NEW | CL_TRACKS;
|
m_clearance = CL_NEW | CL_TRACKS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS:
|
case PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS:
|
||||||
m_clearance = CL_NEW | CL_TRACKS | CL_VIAS;
|
m_clearance = CL_NEW | CL_TRACKS | CL_VIAS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS:
|
case PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS:
|
||||||
m_clearance = CL_NEW | CL_EDITED | CL_TRACKS | CL_VIAS;
|
m_clearance = CL_NEW | CL_EDITED | CL_TRACKS | CL_VIAS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOW_CLEARANCE_ALWAYS:
|
case PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_ALWAYS:
|
||||||
m_clearance = CL_NEW | CL_EDITED | CL_EXISTING | CL_TRACKS | CL_VIAS;
|
m_clearance = CL_NEW | CL_EDITED | CL_EXISTING | CL_TRACKS | CL_VIAS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
class EDA_ITEM;
|
class EDA_ITEM;
|
||||||
class COLORS_DESIGN_SETTINGS;
|
class COLORS_DESIGN_SETTINGS;
|
||||||
class DISPLAY_OPTIONS;
|
class PCB_DISPLAY_OPTIONS;
|
||||||
|
|
||||||
class BOARD_ITEM;
|
class BOARD_ITEM;
|
||||||
class BOARD;
|
class BOARD;
|
||||||
|
@ -99,7 +99,7 @@ public:
|
||||||
* for vias/pads/tracks and so on).
|
* for vias/pads/tracks and so on).
|
||||||
* @param aOptions are settings that you want to use for displaying items.
|
* @param aOptions are settings that you want to use for displaying items.
|
||||||
*/
|
*/
|
||||||
void LoadDisplayOptions( const DISPLAY_OPTIONS* aOptions );
|
void LoadDisplayOptions( const PCB_DISPLAY_OPTIONS* aOptions );
|
||||||
|
|
||||||
/// @copydoc RENDER_SETTINGS::GetColor()
|
/// @copydoc RENDER_SETTINGS::GetColor()
|
||||||
virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) const override;
|
virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) const override;
|
||||||
|
|
|
@ -326,7 +326,7 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters()
|
||||||
|
|
||||||
PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
|
PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
if( m_configParams.empty() )
|
if( m_configParams.empty() )
|
||||||
{
|
{
|
||||||
|
@ -344,7 +344,7 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
|
||||||
&displ_opts->m_DisplayPcbTrackFill, true ) );
|
&displ_opts->m_DisplayPcbTrackFill, true ) );
|
||||||
m_configParams.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ),
|
m_configParams.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ),
|
||||||
(int*) &displ_opts->m_ShowTrackClearanceMode,
|
(int*) &displ_opts->m_ShowTrackClearanceMode,
|
||||||
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) );
|
PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) );
|
||||||
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ),
|
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ),
|
||||||
&displ_opts->m_DisplayPadFill, true ) );
|
&displ_opts->m_DisplayPadFill, true ) );
|
||||||
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ),
|
m_configParams.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ),
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
#include <wxPcbStruct.h>
|
#include <wxPcbStruct.h>
|
||||||
#include <pcbplot.h>
|
#include <pcbplot.h>
|
||||||
#include <pcbstruct.h>
|
|
||||||
#include <base_units.h>
|
#include <base_units.h>
|
||||||
#include <reporter.h>
|
#include <reporter.h>
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
|
|
|
@ -51,9 +51,8 @@ void FOOTPRINT_EDIT_FRAME::PrintPage( wxDC* aDC,
|
||||||
{
|
{
|
||||||
const GR_DRAWMODE drawmode = (GR_DRAWMODE) 0;
|
const GR_DRAWMODE drawmode = (GR_DRAWMODE) 0;
|
||||||
int defaultPenSize = Millimeter2iu( 0.2 );
|
int defaultPenSize = Millimeter2iu( 0.2 );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) GetDisplayOptions();
|
||||||
|
PCB_DISPLAY_OPTIONS save_opt;
|
||||||
DISPLAY_OPTIONS save_opt;
|
|
||||||
|
|
||||||
PRINT_PARAMETERS * printParameters = (PRINT_PARAMETERS*) aData; // can be null
|
PRINT_PARAMETERS * printParameters = (PRINT_PARAMETERS*) aData; // can be null
|
||||||
PRINT_PARAMETERS::DrillShapeOptT drillShapeOpt = PRINT_PARAMETERS::FULL_DRILL_SHAPE;
|
PRINT_PARAMETERS::DrillShapeOptT drillShapeOpt = PRINT_PARAMETERS::FULL_DRILL_SHAPE;
|
||||||
|
@ -73,7 +72,7 @@ void FOOTPRINT_EDIT_FRAME::PrintPage( wxDC* aDC,
|
||||||
displ_opts->m_DisplayModEdgeFill = FILLED;
|
displ_opts->m_DisplayModEdgeFill = FILLED;
|
||||||
displ_opts->m_DisplayModTextFill = FILLED;
|
displ_opts->m_DisplayModTextFill = FILLED;
|
||||||
displ_opts->m_DisplayPcbTrackFill = true;
|
displ_opts->m_DisplayPcbTrackFill = true;
|
||||||
displ_opts->m_ShowTrackClearanceMode = DO_NOT_SHOW_CLEARANCE;
|
displ_opts->m_ShowTrackClearanceMode = PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE;
|
||||||
displ_opts->m_DisplayDrawItemsFill = FILLED;
|
displ_opts->m_DisplayDrawItemsFill = FILLED;
|
||||||
displ_opts->m_DisplayZonesMode = 0;
|
displ_opts->m_DisplayZonesMode = 0;
|
||||||
displ_opts->m_DisplayNetNamesMode = 0;
|
displ_opts->m_DisplayNetNamesMode = 0;
|
||||||
|
@ -110,13 +109,13 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC,
|
||||||
void* aData)
|
void* aData)
|
||||||
{
|
{
|
||||||
const GR_DRAWMODE drawmode = (GR_DRAWMODE) 0;
|
const GR_DRAWMODE drawmode = (GR_DRAWMODE) 0;
|
||||||
DISPLAY_OPTIONS save_opt;
|
PCB_DISPLAY_OPTIONS save_opt;
|
||||||
BOARD* Pcb = GetBoard();
|
BOARD* Pcb = GetBoard();
|
||||||
int defaultPenSize = Millimeter2iu( 0.2 );
|
int defaultPenSize = Millimeter2iu( 0.2 );
|
||||||
bool onePagePerLayer = false;
|
bool onePagePerLayer = false;
|
||||||
|
|
||||||
PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*) aData; // can be null
|
PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*) aData; // can be null
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) GetDisplayOptions();
|
||||||
|
|
||||||
if( printParameters && printParameters->m_OptionPrintPage == 0 )
|
if( printParameters && printParameters->m_OptionPrintPage == 0 )
|
||||||
onePagePerLayer = true;
|
onePagePerLayer = true;
|
||||||
|
@ -186,7 +185,7 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC,
|
||||||
displ_opts->m_DisplayModEdgeFill = FILLED;
|
displ_opts->m_DisplayModEdgeFill = FILLED;
|
||||||
displ_opts->m_DisplayModTextFill = FILLED;
|
displ_opts->m_DisplayModTextFill = FILLED;
|
||||||
displ_opts->m_DisplayPcbTrackFill = true;
|
displ_opts->m_DisplayPcbTrackFill = true;
|
||||||
displ_opts->m_ShowTrackClearanceMode = DO_NOT_SHOW_CLEARANCE;
|
displ_opts->m_ShowTrackClearanceMode = PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE;
|
||||||
displ_opts->m_DisplayDrawItemsFill = FILLED;
|
displ_opts->m_DisplayDrawItemsFill = FILLED;
|
||||||
displ_opts->m_DisplayZonesMode = 0;
|
displ_opts->m_DisplayZonesMode = 0;
|
||||||
displ_opts->m_DisplayNetNamesMode = 0;
|
displ_opts->m_DisplayNetNamesMode = 0;
|
||||||
|
|
|
@ -196,7 +196,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule, wxPoint aMoveVector
|
||||||
void PCB_BASE_FRAME::TraceAirWiresToTargets( wxDC* aDC )
|
void PCB_BASE_FRAME::TraceAirWiresToTargets( wxDC* aDC )
|
||||||
{
|
{
|
||||||
auto connectivity = GetBoard()->GetConnectivity();
|
auto connectivity = GetBoard()->GetConnectivity();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) GetDisplayOptions();
|
||||||
|
|
||||||
auto targets = connectivity->NearestUnconnectedTargets( s_ref, s_CursorPos, s_refNet );
|
auto targets = connectivity->NearestUnconnectedTargets( s_ref, s_CursorPos, s_refNet );
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ void MODULE::DrawOutlinesWhenMoving( EDA_DRAW_PANEL* panel, wxDC* DC,
|
||||||
D_PAD* pt_pad;
|
D_PAD* pt_pad;
|
||||||
|
|
||||||
DrawEdgesOnly( panel, DC, aMoveVector, GR_XOR );
|
DrawEdgesOnly( panel, DC, aMoveVector, GR_XOR );
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*) panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*) ( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
// Show pads in sketch mode to speedu up drawings
|
// Show pads in sketch mode to speedu up drawings
|
||||||
pad_fill_tmp = displ_opts->m_DisplayPadFill;
|
pad_fill_tmp = displ_opts->m_DisplayPadFill;
|
||||||
|
|
|
@ -898,9 +898,9 @@ void PNS_KICAD_IFACE::DisplayItem( const PNS::ITEM* aItem, int aColor, int aClea
|
||||||
if( m_dispOptions )
|
if( m_dispOptions )
|
||||||
{
|
{
|
||||||
auto clearanceDisp = m_dispOptions->m_ShowTrackClearanceMode;
|
auto clearanceDisp = m_dispOptions->m_ShowTrackClearanceMode;
|
||||||
pitem->ShowTrackClearance( clearanceDisp != DO_NOT_SHOW_CLEARANCE );
|
pitem->ShowTrackClearance( clearanceDisp != PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE );
|
||||||
pitem->ShowViaClearance( clearanceDisp != DO_NOT_SHOW_CLEARANCE
|
pitem->ShowViaClearance( clearanceDisp != PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE
|
||||||
&& clearanceDisp != SHOW_CLEARANCE_NEW_TRACKS );
|
&& clearanceDisp != PCB_DISPLAY_OPTIONS::SHOW_CLEARANCE_NEW_TRACKS );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1037,5 +1037,5 @@ void PNS_KICAD_IFACE::SetHostFrame( PCB_EDIT_FRAME* aFrame )
|
||||||
m_frame = aFrame;
|
m_frame = aFrame;
|
||||||
|
|
||||||
m_commit.reset( new BOARD_COMMIT( m_frame ) );
|
m_commit.reset( new BOARD_COMMIT( m_frame ) );
|
||||||
m_dispOptions = (DISPLAY_OPTIONS*) m_frame->GetDisplayOptions();
|
m_dispOptions = (PCB_DISPLAY_OPTIONS*) m_frame->GetDisplayOptions();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ class PNS_PCBNEW_DEBUG_DECORATOR;
|
||||||
|
|
||||||
class BOARD;
|
class BOARD;
|
||||||
class BOARD_COMMIT;
|
class BOARD_COMMIT;
|
||||||
class DISPLAY_OPTIONS;
|
class PCB_DISPLAY_OPTIONS;
|
||||||
|
|
||||||
namespace KIGFX
|
namespace KIGFX
|
||||||
{
|
{
|
||||||
|
@ -78,7 +78,7 @@ private:
|
||||||
BOARD* m_board;
|
BOARD* m_board;
|
||||||
PCB_EDIT_FRAME* m_frame;
|
PCB_EDIT_FRAME* m_frame;
|
||||||
std::unique_ptr<BOARD_COMMIT> m_commit;
|
std::unique_ptr<BOARD_COMMIT> m_commit;
|
||||||
DISPLAY_OPTIONS* m_dispOptions;
|
PCB_DISPLAY_OPTIONS* m_dispOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -157,7 +157,7 @@ ITEM* TOOL_BASE::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLayer )
|
||||||
|
|
||||||
ITEM* rv = NULL;
|
ITEM* rv = NULL;
|
||||||
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();
|
PCB_EDIT_FRAME* frame = getEditFrame<PCB_EDIT_FRAME>();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)frame->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)frame->GetDisplayOptions();
|
||||||
|
|
||||||
for( int i = 0; i < 4; i++ )
|
for( int i = 0; i < 4; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wxPcbStruct.h>
|
#include <wxPcbStruct.h>
|
||||||
#include <pcbstruct.h> // HISTORY_NUMBER
|
|
||||||
#include <confirm.h> // DisplayError()
|
#include <confirm.h> // DisplayError()
|
||||||
#include <gestfich.h> // EDA_FileSelector()
|
#include <gestfich.h> // EDA_FileSelector()
|
||||||
#include <trigo.h> // RotatePoint()
|
#include <trigo.h> // RotatePoint()
|
||||||
|
|
|
@ -733,7 +733,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
bool state = event.IsChecked();
|
bool state = event.IsChecked();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
switch( id )
|
switch( id )
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,7 +120,7 @@ void PCB_EDIT_FRAME::OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent )
|
||||||
void PCB_EDIT_FRAME::OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent )
|
void PCB_EDIT_FRAME::OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
int selected = aEvent.GetId() - ID_TB_OPTIONS_SHOW_ZONES;
|
int selected = aEvent.GetId() - ID_TB_OPTIONS_SHOW_ZONES;
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
|
||||||
if( aEvent.IsChecked() && ( displ_opts->m_DisplayZonesMode == selected ) )
|
if( aEvent.IsChecked() && ( displ_opts->m_DisplayZonesMode == selected ) )
|
||||||
return;
|
return;
|
||||||
|
@ -161,7 +161,7 @@ void PCB_EDIT_FRAME::OnUpdateAutoDeleteTrack( wxUpdateUIEvent& aEvent )
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::OnUpdateViaDrawMode( wxUpdateUIEvent& aEvent )
|
void PCB_EDIT_FRAME::OnUpdateViaDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
aEvent.Check( !displ_opts->m_DisplayViaFill );
|
aEvent.Check( !displ_opts->m_DisplayViaFill );
|
||||||
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
|
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
|
||||||
displ_opts->m_DisplayViaFill ?
|
displ_opts->m_DisplayViaFill ?
|
||||||
|
@ -172,7 +172,7 @@ void PCB_EDIT_FRAME::OnUpdateViaDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent )
|
void PCB_EDIT_FRAME::OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
aEvent.Check( !displ_opts->m_DisplayPcbTrackFill );
|
aEvent.Check( !displ_opts->m_DisplayPcbTrackFill );
|
||||||
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
|
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
|
||||||
displ_opts->m_DisplayPcbTrackFill ?
|
displ_opts->m_DisplayPcbTrackFill ?
|
||||||
|
@ -183,7 +183,7 @@ void PCB_EDIT_FRAME::OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent )
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent )
|
void PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
aEvent.Check( displ_opts->m_ContrastModeDisplay );
|
aEvent.Check( displ_opts->m_ContrastModeDisplay );
|
||||||
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
|
m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
|
||||||
displ_opts->m_ContrastModeDisplay ?
|
displ_opts->m_ContrastModeDisplay ?
|
||||||
|
|
|
@ -154,7 +154,6 @@ TOOL_ACTION PCB_ACTIONS::showLocalRatsnest( "pcbnew.Control.showLocalRatsnest",
|
||||||
AS_GLOBAL, 0,
|
AS_GLOBAL, 0,
|
||||||
"", "" );
|
"", "" );
|
||||||
|
|
||||||
|
|
||||||
class ZONE_CONTEXT_MENU : public CONTEXT_MENU
|
class ZONE_CONTEXT_MENU : public CONTEXT_MENU
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -263,7 +263,7 @@ int PCBNEW_CONTROL::TrackDisplayMode( const TOOL_EVENT& aEvent )
|
||||||
auto settings = painter->GetSettings();
|
auto settings = painter->GetSettings();
|
||||||
|
|
||||||
// Apply new display options to the GAL canvas
|
// Apply new display options to the GAL canvas
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
||||||
displ_opts->m_DisplayPcbTrackFill = !displ_opts->m_DisplayPcbTrackFill;
|
displ_opts->m_DisplayPcbTrackFill = !displ_opts->m_DisplayPcbTrackFill;
|
||||||
settings->LoadDisplayOptions( displ_opts );
|
settings->LoadDisplayOptions( displ_opts );
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ int PCBNEW_CONTROL::PadDisplayMode( const TOOL_EVENT& aEvent )
|
||||||
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
||||||
auto settings = painter->GetSettings();
|
auto settings = painter->GetSettings();
|
||||||
|
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
||||||
|
|
||||||
// Apply new display options to the GAL canvas
|
// Apply new display options to the GAL canvas
|
||||||
displ_opts->m_DisplayPadFill = !displ_opts->m_DisplayPadFill;
|
displ_opts->m_DisplayPadFill = !displ_opts->m_DisplayPadFill;
|
||||||
|
@ -306,7 +306,7 @@ int PCBNEW_CONTROL::ViaDisplayMode( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
||||||
auto settings = painter->GetSettings();
|
auto settings = painter->GetSettings();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
||||||
|
|
||||||
// Apply new display options to the GAL canvas
|
// Apply new display options to the GAL canvas
|
||||||
displ_opts->m_DisplayViaFill = !displ_opts->m_DisplayViaFill;
|
displ_opts->m_DisplayViaFill = !displ_opts->m_DisplayViaFill;
|
||||||
|
@ -328,7 +328,7 @@ int PCBNEW_CONTROL::ZoneDisplayMode( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
||||||
auto settings = painter->GetSettings();
|
auto settings = painter->GetSettings();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
||||||
|
|
||||||
// Apply new display options to the GAL canvas
|
// Apply new display options to the GAL canvas
|
||||||
if( aEvent.IsAction( &PCB_ACTIONS::zoneDisplayEnable ) )
|
if( aEvent.IsAction( &PCB_ACTIONS::zoneDisplayEnable ) )
|
||||||
|
@ -355,7 +355,7 @@ int PCBNEW_CONTROL::HighContrastMode( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
auto painter = static_cast<KIGFX::PCB_PAINTER*>( getView()->GetPainter() );
|
||||||
auto settings = painter->GetSettings();
|
auto settings = painter->GetSettings();
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)m_frame->GetDisplayOptions();
|
||||||
|
|
||||||
displ_opts->m_ContrastModeDisplay = !displ_opts->m_ContrastModeDisplay;
|
displ_opts->m_ContrastModeDisplay = !displ_opts->m_ContrastModeDisplay;
|
||||||
settings->LoadDisplayOptions( displ_opts );
|
settings->LoadDisplayOptions( displ_opts );
|
||||||
|
|
|
@ -295,7 +295,7 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* am_canvas, wxDC* DC, int aNetCode )
|
||||||
static void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* aModule,
|
static void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* aModule,
|
||||||
int ox, int oy, LSET aLayerMask, GR_DRAWMODE draw_mode )
|
int ox, int oy, LSET aLayerMask, GR_DRAWMODE draw_mode )
|
||||||
{
|
{
|
||||||
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)panel->GetDisplayOptions();
|
auto displ_opts = (PCB_DISPLAY_OPTIONS*)( panel->GetDisplayOptions() );
|
||||||
|
|
||||||
int tmp = displ_opts->m_DisplayPadFill;
|
int tmp = displ_opts->m_DisplayPadFill;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue