mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 09:41:41 +00:00
Work on colors handling, and others changes. see changelog.
hide/show rastnest in pcbnew is currently not working, will be fixed soon
This commit is contained in:
parent
4768fc784c
commit
5732d815c6
3d-viewer
CHANGELOG.txtcommon
cvpcb
eeschema
class_sch_screen.cppdialog_eeschema_options_base.cppdialog_eeschema_options_base.fbpdialog_eeschema_options_base.h
gerbview
include
class_board_design_settings.hclass_colors_design_settings.hlayers_id_colors_and_visibility.hpcbcommon.hpcbstruct.hwxPcbStruct.h
pcbnew
automove.cppautoplac.cppclass_board.cppclass_board_design_settings.cppclass_dimension.cppclass_drawsegment.cppclass_edge_mod.cppclass_mire.cppclass_module.cppclass_netinfo_item.cppclass_pad_draw_functions.cppclass_pcb_text.cppclass_text_mod.cppclass_track.cppclass_zone.cppdialog_general_options.cppdialog_general_options.heditrack-part2.cppeditrack.cppmodules.cpppcbframe.cpppcbnew.cpppcbnew.hpcbnew_config.cpppcbnew_config.hprint_board_functions.cppratsnest.cpptool_pcb.cpptoolbars_update_user_interface.cpp
@ -11,6 +11,7 @@
|
||||
#include "drawtxt.h"
|
||||
#include "confirm.h"
|
||||
#include "class_board_design_settings.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
#include "3d_viewer.h"
|
||||
#include "trackball.h"
|
||||
@ -362,7 +363,7 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track )
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||
return;
|
||||
|
||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
int color = g_ColorsSettings.GetLayerColor(layer);
|
||||
|
||||
if( layer == LAST_COPPER_LAYER )
|
||||
layer = g_Parm_3D_Visu.m_Layers - 1;
|
||||
@ -392,7 +393,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||
return;
|
||||
|
||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
int color = g_ColorsSettings.GetLayerColor(layer);
|
||||
|
||||
if( layer == LAST_COPPER_LAYER )
|
||||
layer = g_Parm_3D_Visu.m_Layers - 1;
|
||||
@ -467,14 +468,14 @@ void Pcb3D_GLCanvas::Draw3D_Via( SEGVIA* via )
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) ==
|
||||
false )
|
||||
continue;
|
||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
color = g_ColorsSettings.GetLayerColor(layer);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( LAYER_N_FRONT ) ==
|
||||
false )
|
||||
continue;
|
||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[LAYER_N_FRONT];
|
||||
color = g_ColorsSettings.GetLayerColor(LAYER_N_FRONT);
|
||||
}
|
||||
|
||||
SetGLColor( color );
|
||||
@ -491,7 +492,7 @@ void Pcb3D_GLCanvas::Draw3D_Via( SEGVIA* via )
|
||||
}
|
||||
|
||||
// Drawing hole:
|
||||
color = g_Parm_3D_Visu.m_BoardSettings->m_ViaColor[via->m_Shape];
|
||||
color = g_ColorsSettings.GetItemColor(VIAS_VISIBLE + via->m_Shape);
|
||||
SetGLColor( color );
|
||||
height = g_Parm_3D_Visu.m_LayerZcoord[top_layer] -
|
||||
g_Parm_3D_Visu.m_LayerZcoord[bottom_layer];
|
||||
@ -510,7 +511,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawSegment( DRAWSEGMENT* segment )
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||
return;
|
||||
|
||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
int color = g_ColorsSettings.GetLayerColor(layer);
|
||||
|
||||
SetGLColor( color );
|
||||
w = segment->m_Width * g_Parm_3D_Visu.m_BoardScale;
|
||||
@ -596,7 +597,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text )
|
||||
if( !Get3DLayerEnable( layer ) )
|
||||
return;
|
||||
|
||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
int color = g_ColorsSettings.GetLayerColor(layer);
|
||||
|
||||
|
||||
SetGLColor( color );
|
||||
@ -730,7 +731,7 @@ void EDGE_MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( m_Layer ) == false )
|
||||
return;
|
||||
|
||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[m_Layer];
|
||||
int color = g_ColorsSettings.GetLayerColor(m_Layer);
|
||||
|
||||
|
||||
SetGLColor( color );
|
||||
@ -838,7 +839,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||
if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER)
|
||||
&& !Both )
|
||||
continue;
|
||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
color = g_ColorsSettings.GetLayerColor(layer);
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) ==
|
||||
false )
|
||||
continue;
|
||||
@ -890,7 +891,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||
if( (layer > FIRST_COPPER_LAYER)
|
||||
&& (layer < LAST_COPPER_LAYER) && !Both )
|
||||
continue;
|
||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
color = g_ColorsSettings.GetLayerColor(layer);
|
||||
glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 );
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) ==
|
||||
false )
|
||||
@ -968,7 +969,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||
if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER)
|
||||
&& !Both )
|
||||
continue;
|
||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||
color = g_ColorsSettings.GetLayerColor(layer);
|
||||
glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 );
|
||||
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) ==
|
||||
false )
|
||||
|
@ -4,6 +4,37 @@ KiCad ChangeLog 2010
|
||||
Please add newer entries at the top, list the date and your name with
|
||||
email address.
|
||||
|
||||
2010-Jan-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||
================================================================================
|
||||
++ All:
|
||||
added a test to solve a problem when cross compiling Kicad under Linux for Windows
|
||||
Specific to countries that use a comma as separators in floating point numbers notation:
|
||||
Depending on wxWideget version:
|
||||
printed as 0,5 and read as 0.5
|
||||
or
|
||||
printed as 0.5 and read as 0,5
|
||||
So float values are always broken in dialogs (many are seen as 0)
|
||||
Now a test is made, and if there are problems relative to floats
|
||||
(write/read conversion error),
|
||||
use the C convention (always a point as separator)
|
||||
|
||||
++ eeschema:
|
||||
Removed metrics grid values, that cannot be handled in schematic.
|
||||
(because 2 items are seen as connected if they have the same coordinates
|
||||
mixing mm and mils with internal units = 1 mil break netlist
|
||||
and ERC calculations
|
||||
So grid value *must* be an integer (in 1/1000 inch).
|
||||
And metric grid is not very useful in schematic.
|
||||
(Also 1 mil and 0.025 mm can be seen as the same value for a schematic that do not
|
||||
needs precision in dimensions, so no need to have mils and mm in grid values)
|
||||
|
||||
++ pcbnew:
|
||||
Starting work on color selection and items visibility
|
||||
* code cleaning and removing global values.
|
||||
* Separe visibility options for board editor and module editor
|
||||
(work in progress, just starting)
|
||||
|
||||
|
||||
2010-Jan-28 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||
================================================================================
|
||||
*fixed eeschema crash when using the hotkey m (move) command.
|
||||
|
@ -13,6 +13,7 @@ set(COMMON_SRCS
|
||||
bezier_curves.cpp
|
||||
block_commande.cpp
|
||||
build_version.cpp
|
||||
class_colors_design_settings.cpp
|
||||
class_marker_base.cpp
|
||||
class_plotter.cpp
|
||||
class_undoredo_container.cpp
|
||||
|
@ -117,6 +117,16 @@ StructColors ColorRefs[NBCOLOR] =
|
||||
{ 128, 255, 255, LIGHTYELLOW, wxT( "LIGHTYELLOW" ), LIGHTYELLOW }
|
||||
};
|
||||
|
||||
/** Function to use local notation or C standard notation for floating point numbers
|
||||
* some countries use 1,5 and others (and C) 1.5
|
||||
* so we switch from local to C and C to local when reading or writing files
|
||||
* And other problem is a bug when cross compiling under linux:
|
||||
* a printf print 1,5 and the read functions expects 1.5
|
||||
* (depending on version print = 1.5 and read = 1,5
|
||||
* Very annoying and we detect this and use a stupid but necessary workarount
|
||||
*/
|
||||
bool g_DisableFloatingPointLocalNotation = false;
|
||||
|
||||
|
||||
/** function SetLocaleTo_C_standard
|
||||
* because kicad is internationalized, switch internalization to "C" standard
|
||||
@ -146,7 +156,8 @@ void SetLocaleTo_C_standard( void )
|
||||
*/
|
||||
void SetLocaleTo_Default( void )
|
||||
{
|
||||
setlocale( LC_NUMERIC, "" ); // revert to the current locale
|
||||
if( ! g_DisableFloatingPointLocalNotation )
|
||||
setlocale( LC_NUMERIC, "" ); // revert to the current locale
|
||||
}
|
||||
|
||||
|
||||
|
@ -684,6 +684,22 @@ bool WinEDA_App::SetLanguage( bool first_time )
|
||||
m_EDA_CommonConfig->Write( wxT( "Language" ), m_LanguageId );
|
||||
}
|
||||
|
||||
// Test if floating point notation is working (bug in cross compilation)
|
||||
// Make a conversion double <=> string
|
||||
double dtst = 0.5;
|
||||
wxString msg;
|
||||
extern bool g_DisableFloatingPointLocalNotation; // See common.cpp
|
||||
g_DisableFloatingPointLocalNotation = false;
|
||||
msg << dtst;
|
||||
double result;
|
||||
msg.ToDouble(&result);
|
||||
if( result != dtst ) // string to double encode/decode does not work! Bug detected
|
||||
{
|
||||
// Disable floating point localisation:
|
||||
g_DisableFloatingPointLocalNotation = true;
|
||||
SetLocaleTo_C_standard( );
|
||||
}
|
||||
|
||||
if( !m_Locale->IsLoaded( DictionaryName ) )
|
||||
m_Locale->AddCatalog( DictionaryName );
|
||||
|
||||
|
@ -88,7 +88,6 @@ const wxString PcbFileWildcard(
|
||||
|
||||
int g_CurrentVersionPCB = 1;
|
||||
|
||||
|
||||
int g_TimeOut; // Timer for automatic saving
|
||||
int g_SaveTime; // Time for next saving
|
||||
|
||||
|
@ -14,11 +14,14 @@
|
||||
#include "bitmaps.h"
|
||||
#include "protos.h"
|
||||
#include "cvstruct.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
#include "build_version.h"
|
||||
|
||||
#include <wx/snglinst.h>
|
||||
|
||||
// Colors for layers and items
|
||||
COLORS_DESIGN_SETTINGS g_ColorsSettings;
|
||||
|
||||
/* Constant string definitions for CvPcb */
|
||||
const wxString ComponentFileExtension( wxT( "cmp" ) );
|
||||
|
@ -48,10 +48,19 @@ static int SchematicZoomList[] =
|
||||
|
||||
#define SCHEMATIC_ZOOM_LIST_CNT ( sizeof( SchematicZoomList ) / \
|
||||
sizeof( int ) )
|
||||
#define MM_TO_SCH_UNITS 1000.0 / 25.4000508001016
|
||||
#define MM_TO_SCH_UNITS 1000.0 / 25.4 //schematic internal unites are mils
|
||||
|
||||
|
||||
/* Default grid sizes for the schematic editor. */
|
||||
/* Default grid sizes for the schematic editor.
|
||||
* Do NOT add others values (mainly grid values in mm),
|
||||
* because they can break the schematic:
|
||||
* because wires and pins are considered as connected when the are to the same coordinate
|
||||
* we cannot mix coordinates in mils (internal units) and mm
|
||||
* (that cannot exactly converted in mils in many cases
|
||||
* in fact schematic must only use 50 and 25 mils to place labnels, wires and components
|
||||
* others values are useful only for graphic items (mainly in library editor)
|
||||
* so use integer values in mils only.
|
||||
*/
|
||||
static GRID_TYPE SchematicGridList[] = {
|
||||
{ ID_POPUP_GRID_LEVEL_50, wxRealPoint( 50, 50 ) },
|
||||
{ ID_POPUP_GRID_LEVEL_25, wxRealPoint( 25, 25 ) },
|
||||
@ -59,18 +68,6 @@ static GRID_TYPE SchematicGridList[] = {
|
||||
{ ID_POPUP_GRID_LEVEL_5, wxRealPoint( 5, 5 ) },
|
||||
{ ID_POPUP_GRID_LEVEL_2, wxRealPoint( 2, 2 ) },
|
||||
{ ID_POPUP_GRID_LEVEL_1, wxRealPoint( 1, 1 ) },
|
||||
|
||||
// predefined grid list in mm
|
||||
{ ID_POPUP_GRID_LEVEL_2_5MM, wxRealPoint( MM_TO_SCH_UNITS * 2.5,
|
||||
MM_TO_SCH_UNITS * 2.5 ) },
|
||||
{ ID_POPUP_GRID_LEVEL_1MM, wxRealPoint( MM_TO_SCH_UNITS,
|
||||
MM_TO_SCH_UNITS ) },
|
||||
{ ID_POPUP_GRID_LEVEL_0_5MM, wxRealPoint( MM_TO_SCH_UNITS * 0.5,
|
||||
MM_TO_SCH_UNITS * 0.5 ) },
|
||||
{ ID_POPUP_GRID_LEVEL_0_25MM, wxRealPoint( MM_TO_SCH_UNITS * 0.25,
|
||||
MM_TO_SCH_UNITS * 0.25 ) },
|
||||
{ ID_POPUP_GRID_LEVEL_0_1MM, wxRealPoint( MM_TO_SCH_UNITS * 0.1,
|
||||
MM_TO_SCH_UNITS * 0.1 ) }
|
||||
};
|
||||
|
||||
#define SCHEMATIC_GRID_LIST_CNT ( sizeof( SchematicGridList ) / \
|
||||
|
@ -82,7 +82,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
||||
m_staticText9->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_spinRepeatHorizontal = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2000, 0 );
|
||||
m_spinRepeatHorizontal = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 500, 0 );
|
||||
fgSizer1->Add( m_spinRepeatHorizontal, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticRepeatXUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
@ -93,7 +93,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
||||
m_staticText12->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText12, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_spinRepeatVertical = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 2000, 100 );
|
||||
m_spinRepeatVertical = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 500, 100 );
|
||||
fgSizer1->Add( m_spinRepeatVertical, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
m_staticRepeatYUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
@ -104,7 +104,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
|
||||
m_staticText16->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText16, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_spinRepeatLabel = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -100, 100, 1 );
|
||||
m_spinRepeatLabel = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 10, 1 );
|
||||
fgSizer1->Add( m_spinRepeatLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
|
||||
|
||||
|
||||
|
@ -742,10 +742,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="initial">1</property>
|
||||
<property name="max">2000</property>
|
||||
<property name="initial">0</property>
|
||||
<property name="max">500</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">1</property>
|
||||
<property name="min">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_spinRepeatHorizontal</property>
|
||||
<property name="permission">protected</property>
|
||||
@ -899,10 +899,10 @@
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="initial">1</property>
|
||||
<property name="max">2000</property>
|
||||
<property name="initial">100</property>
|
||||
<property name="max">500</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">1</property>
|
||||
<property name="min">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_spinRepeatVertical</property>
|
||||
<property name="permission">protected</property>
|
||||
@ -1057,9 +1057,9 @@
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="initial">1</property>
|
||||
<property name="max">100</property>
|
||||
<property name="max">10</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min">-100</property>
|
||||
<property name="min">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_spinRepeatLabel</property>
|
||||
<property name="permission">protected</property>
|
@ -1,82 +1,82 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __dialog_eeschema_options_base__
|
||||
#define __dialog_eeschema_options_base__
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_EESCHEMA_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText2;
|
||||
wxChoice* m_choiceUnits;
|
||||
|
||||
wxStaticText* m_staticText3;
|
||||
wxChoice* m_choiceGridSize;
|
||||
wxStaticText* m_staticGridUnits;
|
||||
wxStaticText* m_staticText5;
|
||||
wxSpinCtrl* m_spinLineWidth;
|
||||
wxStaticText* m_staticLineWidthUnits;
|
||||
wxStaticText* m_staticText7;
|
||||
wxSpinCtrl* m_spinTextSize;
|
||||
wxStaticText* m_staticTextSizeUnits;
|
||||
wxStaticText* m_staticText9;
|
||||
wxSpinCtrl* m_spinRepeatHorizontal;
|
||||
wxStaticText* m_staticRepeatXUnits;
|
||||
wxStaticText* m_staticText12;
|
||||
wxSpinCtrl* m_spinRepeatVertical;
|
||||
wxStaticText* m_staticRepeatYUnits;
|
||||
wxStaticText* m_staticText16;
|
||||
wxSpinCtrl* m_spinRepeatLabel;
|
||||
|
||||
wxCheckBox* m_checkShowGrid;
|
||||
wxCheckBox* m_checkShowHiddenPins;
|
||||
wxCheckBox* m_checkAutoPan;
|
||||
wxCheckBox* m_checkAnyOrientation;
|
||||
wxCheckBox* m_checkPageLimits;
|
||||
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChooseUnits( wxCommandEvent& event ){ event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_EESCHEMA_OPTIONS_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__dialog_eeschema_options_base__
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __dialog_eeschema_options_base__
|
||||
#define __dialog_eeschema_options_base__
|
||||
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_EESCHEMA_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticText2;
|
||||
wxChoice* m_choiceUnits;
|
||||
|
||||
wxStaticText* m_staticText3;
|
||||
wxChoice* m_choiceGridSize;
|
||||
wxStaticText* m_staticGridUnits;
|
||||
wxStaticText* m_staticText5;
|
||||
wxSpinCtrl* m_spinLineWidth;
|
||||
wxStaticText* m_staticLineWidthUnits;
|
||||
wxStaticText* m_staticText7;
|
||||
wxSpinCtrl* m_spinTextSize;
|
||||
wxStaticText* m_staticTextSizeUnits;
|
||||
wxStaticText* m_staticText9;
|
||||
wxSpinCtrl* m_spinRepeatHorizontal;
|
||||
wxStaticText* m_staticRepeatXUnits;
|
||||
wxStaticText* m_staticText12;
|
||||
wxSpinCtrl* m_spinRepeatVertical;
|
||||
wxStaticText* m_staticRepeatYUnits;
|
||||
wxStaticText* m_staticText16;
|
||||
wxSpinCtrl* m_spinRepeatLabel;
|
||||
|
||||
wxCheckBox* m_checkShowGrid;
|
||||
wxCheckBox* m_checkShowHiddenPins;
|
||||
wxCheckBox* m_checkAutoPan;
|
||||
wxCheckBox* m_checkAnyOrientation;
|
||||
wxCheckBox* m_checkPageLimits;
|
||||
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChooseUnits( wxCommandEvent& event ){ event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_EESCHEMA_OPTIONS_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__dialog_eeschema_options_base__
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "protos.h"
|
||||
#include "zones.h"
|
||||
#include "class_board_design_settings.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
#include "build_version.h"
|
||||
|
||||
@ -27,7 +28,9 @@ wxString g_PhotoFilenameExt;
|
||||
wxString g_DrillFilenameExt;
|
||||
wxString g_PenFilenameExt;
|
||||
|
||||
int g_DCodesColor;
|
||||
// Colors for layers and items
|
||||
COLORS_DESIGN_SETTINGS g_ColorsSettings;
|
||||
|
||||
int g_Default_GERBER_Format;
|
||||
int g_Plot_Spot_Mini; /* Diameter of the opening mini-track for GERBER. */
|
||||
int g_DisplayPolygonsModeSketch;
|
||||
|
@ -25,12 +25,21 @@ typedef enum
|
||||
FORMAT_POST
|
||||
} PlotFormat;
|
||||
|
||||
/**
|
||||
* Enum ITEM_VISIBLE
|
||||
* is a set of visible PCB elements.
|
||||
*/
|
||||
enum ITEM_VISIBLE
|
||||
{
|
||||
DCODES_VISIBLE,
|
||||
|
||||
END_ITEM_VISIBLE_LIST // sentinel
|
||||
};
|
||||
|
||||
extern wxString g_PhotoFilenameExt;
|
||||
extern wxString g_DrillFilenameExt;
|
||||
extern wxString g_PenFilenameExt;
|
||||
|
||||
extern int g_DCodesColor;
|
||||
extern int g_Default_GERBER_Format;
|
||||
|
||||
extern int g_Plot_Spot_Mini; /* Diameter of the opening mini-track for
|
||||
|
@ -3,12 +3,16 @@
|
||||
/*************************/
|
||||
|
||||
#include "param_config.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
#define GROUP wxT("/gerbview")
|
||||
#define GROUPLIB wxT("libraries")
|
||||
|
||||
#define INSETUP TRUE
|
||||
|
||||
/* Useful macro : */
|
||||
#define LOC_COLOR(numlayer) &g_ColorsSettings.m_LayersColors[numlayer]
|
||||
|
||||
/* Liste des parametres */
|
||||
|
||||
static PARAM_CFG_WXSTRING PhotoExtBufCfg
|
||||
@ -81,7 +85,7 @@ static PARAM_CFG_SETCOLOR ColorLayer0Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay0"),
|
||||
&g_DesignSettings.m_LayerColor[0],
|
||||
LOC_COLOR(0),
|
||||
GREEN
|
||||
);
|
||||
|
||||
@ -89,7 +93,7 @@ static PARAM_CFG_SETCOLOR ColorLayer1Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay1"),
|
||||
&g_DesignSettings.m_LayerColor[1],
|
||||
LOC_COLOR(1),
|
||||
BLUE
|
||||
);
|
||||
|
||||
@ -97,7 +101,7 @@ static PARAM_CFG_SETCOLOR ColorLayer2Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay2"),
|
||||
&g_DesignSettings.m_LayerColor[2],
|
||||
LOC_COLOR(2),
|
||||
LIGHTGRAY
|
||||
);
|
||||
|
||||
@ -105,7 +109,7 @@ static PARAM_CFG_SETCOLOR ColorLayer3Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay3"),
|
||||
&g_DesignSettings.m_LayerColor[3],
|
||||
LOC_COLOR(3),
|
||||
5
|
||||
);
|
||||
|
||||
@ -113,7 +117,7 @@ static PARAM_CFG_SETCOLOR ColorLayer4Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay4"),
|
||||
&g_DesignSettings.m_LayerColor[4],
|
||||
LOC_COLOR(4),
|
||||
4
|
||||
);
|
||||
|
||||
@ -121,7 +125,7 @@ static PARAM_CFG_SETCOLOR ColorLayer5Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay5"),
|
||||
&g_DesignSettings.m_LayerColor[5],
|
||||
LOC_COLOR(5),
|
||||
5
|
||||
);
|
||||
|
||||
@ -129,7 +133,7 @@ static PARAM_CFG_SETCOLOR ColorLayer6Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay6"),
|
||||
&g_DesignSettings.m_LayerColor[6],
|
||||
LOC_COLOR(6),
|
||||
6
|
||||
);
|
||||
|
||||
@ -137,7 +141,7 @@ static PARAM_CFG_SETCOLOR ColorLayer7Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay7"),
|
||||
&g_DesignSettings.m_LayerColor[7],
|
||||
LOC_COLOR(7),
|
||||
5
|
||||
);
|
||||
|
||||
@ -145,7 +149,7 @@ static PARAM_CFG_SETCOLOR ColorLayer8Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay8"),
|
||||
&g_DesignSettings.m_LayerColor[8],
|
||||
LOC_COLOR(8),
|
||||
7
|
||||
);
|
||||
|
||||
@ -153,7 +157,7 @@ static PARAM_CFG_SETCOLOR ColorLayer9Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLay9"),
|
||||
&g_DesignSettings.m_LayerColor[9],
|
||||
LOC_COLOR(9),
|
||||
1
|
||||
);
|
||||
|
||||
@ -161,7 +165,7 @@ static PARAM_CFG_SETCOLOR ColorLayer10Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayA"),
|
||||
&g_DesignSettings.m_LayerColor[10],
|
||||
LOC_COLOR(10),
|
||||
2
|
||||
);
|
||||
|
||||
@ -169,7 +173,7 @@ static PARAM_CFG_SETCOLOR ColorLayer11Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayB"),
|
||||
&g_DesignSettings.m_LayerColor[11],
|
||||
LOC_COLOR(11),
|
||||
3
|
||||
);
|
||||
|
||||
@ -177,7 +181,7 @@ static PARAM_CFG_SETCOLOR ColorLayer12Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayC"),
|
||||
&g_DesignSettings.m_LayerColor[12],
|
||||
LOC_COLOR(12),
|
||||
12
|
||||
);
|
||||
|
||||
@ -185,7 +189,7 @@ static PARAM_CFG_SETCOLOR ColorLayer13Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayD"),
|
||||
&g_DesignSettings.m_LayerColor[13],
|
||||
LOC_COLOR(13),
|
||||
13
|
||||
);
|
||||
|
||||
@ -193,7 +197,7 @@ static PARAM_CFG_SETCOLOR ColorLayer14Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayE"),
|
||||
&g_DesignSettings.m_LayerColor[14],
|
||||
LOC_COLOR(14),
|
||||
14
|
||||
);
|
||||
|
||||
@ -201,7 +205,7 @@ static PARAM_CFG_SETCOLOR ColorLayer15Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayF"),
|
||||
&g_DesignSettings.m_LayerColor[15],
|
||||
LOC_COLOR(15),
|
||||
RED
|
||||
);
|
||||
|
||||
@ -209,7 +213,7 @@ static PARAM_CFG_SETCOLOR ColorLayer16Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayG"),
|
||||
&g_DesignSettings.m_LayerColor[16],
|
||||
LOC_COLOR(16),
|
||||
1
|
||||
);
|
||||
|
||||
@ -217,7 +221,7 @@ static PARAM_CFG_SETCOLOR ColorLayer17Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayH"),
|
||||
&g_DesignSettings.m_LayerColor[17],
|
||||
LOC_COLOR(17),
|
||||
5
|
||||
);
|
||||
|
||||
@ -225,7 +229,7 @@ static PARAM_CFG_SETCOLOR ColorLayer18Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayI"),
|
||||
&g_DesignSettings.m_LayerColor[18],
|
||||
LOC_COLOR(18),
|
||||
11
|
||||
);
|
||||
|
||||
@ -233,7 +237,7 @@ static PARAM_CFG_SETCOLOR ColorLayer19Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayJ"),
|
||||
&g_DesignSettings.m_LayerColor[19],
|
||||
LOC_COLOR(19),
|
||||
4
|
||||
);
|
||||
|
||||
@ -241,7 +245,7 @@ static PARAM_CFG_SETCOLOR ColorLayer20Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayK"),
|
||||
&g_DesignSettings.m_LayerColor[20],
|
||||
LOC_COLOR(20),
|
||||
5
|
||||
);
|
||||
|
||||
@ -249,7 +253,7 @@ static PARAM_CFG_SETCOLOR ColorLayer21Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayL"),
|
||||
&g_DesignSettings.m_LayerColor[21],
|
||||
LOC_COLOR(21),
|
||||
3
|
||||
);
|
||||
|
||||
@ -257,7 +261,7 @@ static PARAM_CFG_SETCOLOR ColorLayer22Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayM"),
|
||||
&g_DesignSettings.m_LayerColor[22],
|
||||
LOC_COLOR(22),
|
||||
6
|
||||
);
|
||||
|
||||
@ -265,7 +269,7 @@ static PARAM_CFG_SETCOLOR ColorLayer23Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayN"),
|
||||
&g_DesignSettings.m_LayerColor[23],
|
||||
LOC_COLOR(23),
|
||||
5
|
||||
);
|
||||
|
||||
@ -273,7 +277,7 @@ static PARAM_CFG_SETCOLOR ColorLayer24Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayO"),
|
||||
&g_DesignSettings.m_LayerColor[24],
|
||||
LOC_COLOR(24),
|
||||
LIGHTGRAY
|
||||
);
|
||||
|
||||
@ -281,7 +285,7 @@ static PARAM_CFG_SETCOLOR ColorLayer25Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayP"),
|
||||
&g_DesignSettings.m_LayerColor[25],
|
||||
LOC_COLOR(25),
|
||||
1
|
||||
);
|
||||
|
||||
@ -289,7 +293,7 @@ static PARAM_CFG_SETCOLOR ColorLayer26Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayQ"),
|
||||
&g_DesignSettings.m_LayerColor[26],
|
||||
LOC_COLOR(26),
|
||||
2
|
||||
);
|
||||
|
||||
@ -297,7 +301,7 @@ static PARAM_CFG_SETCOLOR ColorLayer27Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayR"),
|
||||
&g_DesignSettings.m_LayerColor[27],
|
||||
LOC_COLOR(27),
|
||||
14
|
||||
);
|
||||
|
||||
@ -305,7 +309,7 @@ static PARAM_CFG_SETCOLOR ColorLayer28Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayS"),
|
||||
&g_DesignSettings.m_LayerColor[28],
|
||||
LOC_COLOR(28),
|
||||
YELLOW
|
||||
);
|
||||
|
||||
@ -313,7 +317,7 @@ static PARAM_CFG_SETCOLOR ColorLayer29Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayT"),
|
||||
&g_DesignSettings.m_LayerColor[29],
|
||||
LOC_COLOR(29),
|
||||
13
|
||||
);
|
||||
|
||||
@ -321,7 +325,7 @@ static PARAM_CFG_SETCOLOR ColorLayer30Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayU"),
|
||||
&g_DesignSettings.m_LayerColor[30],
|
||||
LOC_COLOR(30),
|
||||
14
|
||||
);
|
||||
|
||||
@ -329,7 +333,7 @@ static PARAM_CFG_SETCOLOR ColorLayer31Cfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("ColLayV"),
|
||||
&g_DesignSettings.m_LayerColor[31],
|
||||
LOC_COLOR(31),
|
||||
7
|
||||
);
|
||||
|
||||
@ -347,7 +351,7 @@ static PARAM_CFG_SETCOLOR ColorDCodesCfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT("CoDCode"),
|
||||
&g_DCodesColor,
|
||||
&g_ColorsSettings.m_ItemsColors[DCODES_VISIBLE],
|
||||
WHITE
|
||||
);
|
||||
|
||||
|
@ -5,10 +5,6 @@
|
||||
/*Set up the items and layer colors and show/no show options
|
||||
*/
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma implementation "set_color.h"
|
||||
#endif
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
@ -442,7 +438,7 @@ void WinEDA_SetColorsFrame::UpdateLayerSettings()
|
||||
g_GridColor = CurrentColor[32];
|
||||
s_showGrid = laytool_list[32]->m_CheckBox->GetValue();
|
||||
|
||||
g_DCodesColor = CurrentColor[33];
|
||||
g_ColorsSettings.SetItemColor(DCODES_VISIBLE, CurrentColor[33] );
|
||||
DisplayOpt.DisplayPadNum = laytool_list[33]->m_CheckBox->GetValue();
|
||||
|
||||
// Additional command required for updating visibility of grid.
|
||||
|
@ -5,11 +5,8 @@
|
||||
#ifndef SET_COLOR_H
|
||||
#define SET_COLOR_H
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "set_color.cpp"
|
||||
#endif
|
||||
|
||||
#include "wx/statline.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
class wxBoxSizer;
|
||||
class wxFlexGridSizer;
|
||||
@ -48,8 +45,8 @@ enum col_sel_id {
|
||||
const int BUTT_SIZE_X = 20;
|
||||
const int BUTT_SIZE_Y = 16;
|
||||
|
||||
/* Macro utile : */
|
||||
#define ADR(numlayer) &g_DesignSettings.m_LayerColor[(numlayer)]
|
||||
/* Useful macro : */
|
||||
#define LOC_COLOR(numlayer) &g_ColorsSettings.m_LayersColors[numlayer]
|
||||
|
||||
|
||||
/**********************************/
|
||||
@ -84,112 +81,112 @@ static ButtonIndex Msg_Layers_Cu =
|
||||
static ColorButton Layer_1_Butt=
|
||||
{
|
||||
_("Layer 1"), // Title
|
||||
ADR(0), // Address of optional parameter
|
||||
LOC_COLOR(0), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_2_Butt=
|
||||
{
|
||||
_("Layer 2"), // Title
|
||||
ADR(1), // Address of optional parameter
|
||||
LOC_COLOR(1), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_3_Butt=
|
||||
{
|
||||
_("Layer 3"), // Title
|
||||
ADR(2), // Address of optional parameter
|
||||
LOC_COLOR(2), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_4_Butt=
|
||||
{
|
||||
_("Layer 4"), // Title
|
||||
ADR(3), // Address of optional parameter
|
||||
LOC_COLOR(3), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_5_Butt=
|
||||
{
|
||||
_("Layer 5"), // Title
|
||||
ADR(4), // Address of optional parameter
|
||||
LOC_COLOR(4), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_6_Butt=
|
||||
{
|
||||
_("Layer 6"), // Title
|
||||
ADR(5), // Address of optional parameter
|
||||
LOC_COLOR(5), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_7_Butt=
|
||||
{
|
||||
_("Layer 7"), // Title
|
||||
ADR(6), // Address of optional parameter
|
||||
LOC_COLOR(6), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_8_Butt=
|
||||
{
|
||||
_("Layer 8"), // Title
|
||||
ADR(7), // Address of optional parameter
|
||||
LOC_COLOR(7), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_9_Butt=
|
||||
{
|
||||
_("Layer 9"), // Title
|
||||
ADR(8), // Address of optional parameter
|
||||
LOC_COLOR(8), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_10_Butt=
|
||||
{
|
||||
_("Layer 10"), // Title
|
||||
ADR(9), // Address of optional parameter
|
||||
LOC_COLOR(9), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_11_Butt=
|
||||
{
|
||||
_("Layer 11"), // Title
|
||||
ADR(10), // Address of optional parameter
|
||||
LOC_COLOR(10), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_12_Butt=
|
||||
{
|
||||
_("Layer 12"), // Title
|
||||
ADR(11), // Address of optional parameter
|
||||
LOC_COLOR(11), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_13_Butt=
|
||||
{
|
||||
_("Layer 13"), // Title
|
||||
ADR(12), // Address of optional parameter
|
||||
LOC_COLOR(12), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_14_Butt=
|
||||
{
|
||||
_("Layer 14"), // Title
|
||||
ADR(13), // Address of optional parameter
|
||||
LOC_COLOR(13), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_15_Butt=
|
||||
{
|
||||
_("Layer 15"), // Title
|
||||
ADR(14), // Address of optional parameter
|
||||
LOC_COLOR(14), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_16_Butt=
|
||||
{
|
||||
_("Layer 16"), // Title
|
||||
ADR(15), // Address of optional parameter
|
||||
LOC_COLOR(15), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
@ -203,112 +200,112 @@ static ButtonIndex Msg_Layers_Tech =
|
||||
static ColorButton Layer_17_Butt=
|
||||
{
|
||||
_("Layer 17"), // Title
|
||||
ADR(16), // Address of optional parameter
|
||||
LOC_COLOR(16), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_18_Butt=
|
||||
{
|
||||
_("Layer 18"), // Title
|
||||
ADR(17), // Address of optional parameter
|
||||
LOC_COLOR(17), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_19_Butt=
|
||||
{
|
||||
_("Layer 19"), // Title
|
||||
ADR(18), // Address of optional parameter
|
||||
LOC_COLOR(18), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_20_Butt=
|
||||
{
|
||||
_("Layer 20"), // Title
|
||||
ADR(19), // Address of optional parameter
|
||||
LOC_COLOR(19), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_21_Butt=
|
||||
{
|
||||
_("Layer 21"), // Title
|
||||
ADR(20), // Address of optional parameter
|
||||
LOC_COLOR(20), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_22_Butt=
|
||||
{
|
||||
_("Layer 22"), // Title
|
||||
ADR(21), // Address of optional parameter
|
||||
LOC_COLOR(21), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_23_Butt=
|
||||
{
|
||||
_("Layer 23"), // Title
|
||||
ADR(22), // Address of optional parameter
|
||||
LOC_COLOR(22), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_24_Butt=
|
||||
{
|
||||
_("Layer 24"), // Title
|
||||
ADR(23), // Address of optional parameter
|
||||
LOC_COLOR(23), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_25_Butt=
|
||||
{
|
||||
_("Layer 25"), // Title
|
||||
ADR(24), // Address of optional parameter
|
||||
LOC_COLOR(24), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_26_Butt=
|
||||
{
|
||||
_("Layer 26"), // Title
|
||||
ADR(25), // Address of optional parameter
|
||||
LOC_COLOR(25), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_27_Butt=
|
||||
{
|
||||
_("Layer 27"), // Title
|
||||
ADR(26), // Address of optional parameter
|
||||
LOC_COLOR(26), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_28_Butt=
|
||||
{
|
||||
_("Layer 28"), // Title
|
||||
ADR(27), // Address of optional parameter
|
||||
LOC_COLOR(27), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_29_Butt=
|
||||
{
|
||||
_("Layer 29"), // Title
|
||||
ADR(28), // Address of optional parameter
|
||||
LOC_COLOR(28), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_30_Butt=
|
||||
{
|
||||
_("Layer 30"), // Title
|
||||
ADR(29), // Address of optional parameter
|
||||
LOC_COLOR(29), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_31_Butt=
|
||||
{
|
||||
_("Layer 31"), // Title
|
||||
ADR(30), // Address of optional parameter
|
||||
LOC_COLOR(30), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
static ColorButton Layer_32_Butt=
|
||||
{
|
||||
_("Layer 32"), // Title
|
||||
ADR(31), // Address of optional parameter
|
||||
LOC_COLOR(31), // Address of optional parameter
|
||||
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||
};
|
||||
|
||||
@ -330,7 +327,7 @@ static ColorButton Grid_Butt=
|
||||
static ColorButton Show_DCodes_Butt=
|
||||
{
|
||||
_("D codes id."), // Title
|
||||
&g_DCodesColor, // Address of optional parameter
|
||||
&g_ColorsSettings.m_ItemsColors[DCODES_VISIBLE], // Address of optional parameter
|
||||
FALSE,
|
||||
&DisplayOpt.DisplayPadNum // Address of boolean display control parameter to toggle
|
||||
};
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "pcbplot.h"
|
||||
#include "protos.h"
|
||||
#include "class_board_design_settings.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
static void Draw_Track_Buffer( WinEDA_DrawPanel* panel,
|
||||
wxDC* DC,
|
||||
@ -142,7 +143,7 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay
|
||||
}
|
||||
else
|
||||
{
|
||||
Color = g_DesignSettings.m_LayerColor[track->GetLayer()];
|
||||
Color = g_ColorsSettings.GetLayerColor( track->GetLayer() );
|
||||
filled = (g_DisplayPolygonsModeSketch == 0);
|
||||
}
|
||||
|
||||
@ -170,7 +171,7 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay
|
||||
}
|
||||
else
|
||||
{
|
||||
Color = g_DesignSettings.m_LayerColor[track->GetLayer()];
|
||||
Color = g_ColorsSettings.GetLayerColor( track->GetLayer() );
|
||||
filled = (g_DisplayPolygonsModeSketch == 0);
|
||||
}
|
||||
|
||||
@ -253,7 +254,7 @@ void Trace_Segment( WinEDA_DrawPanel* panel, wxDC* DC, TRACK* track, int draw_mo
|
||||
if( g_DesignSettings.IsLayerVisible( track->GetLayer() ) == false )
|
||||
return;
|
||||
|
||||
color = g_DesignSettings.m_LayerColor[track->GetLayer()];
|
||||
color = g_ColorsSettings.GetLayerColor( track->GetLayer() );
|
||||
|
||||
if( draw_mode & GR_SURBRILL )
|
||||
{
|
||||
@ -452,9 +453,11 @@ void Affiche_DCodes_Pistes( WinEDA_DrawPanel* panel, wxDC* DC, BOARD* Pcb, int d
|
||||
orient = TEXT_ORIENT_VERT;
|
||||
width /= 2;
|
||||
}
|
||||
|
||||
int color = g_ColorsSettings.GetItemColor(DCODES_VISIBLE);
|
||||
|
||||
DrawGraphicText( panel, DC,
|
||||
pos, (EDA_Colors) g_DCodesColor, Line,
|
||||
pos, (EDA_Colors) color, Line,
|
||||
orient, wxSize( width, width ),
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
0, false, false, false);
|
||||
|
@ -37,18 +37,6 @@ protected:
|
||||
int m_VisibleLayers; // Bit-mask for layer visibility
|
||||
int m_VisibleElements; // Bit-mask for element category visibility
|
||||
|
||||
public:
|
||||
|
||||
// Color options for screen display of the Printed Board:
|
||||
int m_LayerColor[LAYER_COUNT]; ///< Layer colors (tracks and graphic items)
|
||||
|
||||
int m_ViaColor[4]; // Via color (depending on is type)
|
||||
|
||||
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
||||
|
||||
int m_RatsnestColor; // Ratsnest color
|
||||
|
||||
|
||||
public:
|
||||
EDA_BoardDesignSettings();
|
||||
|
||||
@ -184,34 +172,6 @@ public:
|
||||
* @param aNewLayerCount = The new number of enabled copper layers
|
||||
*/
|
||||
void SetCopperLayerCount( int aNewLayerCount );
|
||||
|
||||
/**
|
||||
* Function GetLayerColor
|
||||
* returns the color for aLayer which is one of the layer indices given
|
||||
* in pcbstruct.h
|
||||
*/
|
||||
int GetLayerColor( int aLayer )
|
||||
{
|
||||
if( (unsigned) aLayer < (unsigned) NB_LAYERS )
|
||||
{
|
||||
return m_LayerColor[aLayer];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function SetLayerColor
|
||||
* sets the color for aLayer which is one of the layer indices given
|
||||
* in pcbstruct.h
|
||||
*/
|
||||
void SetLayerColor( int aLayer, int aColor )
|
||||
{
|
||||
if( (unsigned) aLayer < (unsigned) NB_LAYERS )
|
||||
{
|
||||
m_LayerColor[aLayer] = aColor;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
58
include/class_colors_design_settings.h
Normal file
58
include/class_colors_design_settings.h
Normal file
@ -0,0 +1,58 @@
|
||||
/****************************************************/
|
||||
/* class_colors_design_settings.h */
|
||||
/* handle colors used to draw all items or layers */
|
||||
/****************************************************/
|
||||
|
||||
#ifndef _COLORS_DESIGN_SETTING_H
|
||||
#define _COLORS_DESIGN_SETTING_H
|
||||
|
||||
#define LAYERSCOLORSBUFFERSIZE 32
|
||||
#define ITEMSCOLORSBUFFERSIZE 32
|
||||
|
||||
/* Class for handle list of color settings for designs
|
||||
* in Eeschema, Pcbnew and gerbview
|
||||
*/
|
||||
class COLORS_DESIGN_SETTINGS
|
||||
{
|
||||
public:
|
||||
// Color options for screen display of the Printed Board and schematic:
|
||||
|
||||
// Common to Eeschema, Pcbnew, Gerbview
|
||||
int m_LayersColors[LAYERSCOLORSBUFFERSIZE]; ///< Layer colors (tracks and graphic items)
|
||||
|
||||
// Common to Eeschema, Pcbnew
|
||||
int m_ItemsColors[ITEMSCOLORSBUFFERSIZE]; ///< All others items but layers
|
||||
|
||||
public:
|
||||
COLORS_DESIGN_SETTINGS( );
|
||||
|
||||
/**
|
||||
* Function GetLayerColor
|
||||
* @return the color for aLayer which is one of the layer indices given
|
||||
* in pcbstruct.h or in schematic
|
||||
*/
|
||||
int GetLayerColor( int aLayer );
|
||||
|
||||
/**
|
||||
* Function SetLayerColor
|
||||
* sets the color for aLayer which is one of the layer indices given
|
||||
* in pcbstruct.h or in schematic
|
||||
*/
|
||||
void SetLayerColor( int aLayer, int aColor );
|
||||
|
||||
/**
|
||||
* Function GetItemColor
|
||||
* @return the color for an item which is one of the item indices given
|
||||
* in pcbstruct.h, enum PCB_VISIBLE or in schematic
|
||||
*/
|
||||
int GetItemColor( int aItemIdx );
|
||||
|
||||
/**
|
||||
* Function SetItemColor
|
||||
* sets the color for an item which is one of the item indices given
|
||||
* in pcbstruct.h, enum PCB_VISIBLE or in schematic
|
||||
*/
|
||||
void SetItemColor( int aItemIdx, int aColor );
|
||||
};
|
||||
|
||||
#endif // _COLORS_DESIGN_SETTING_H
|
182
include/layers_id_colors_and_visibility.h
Normal file
182
include/layers_id_colors_and_visibility.h
Normal file
@ -0,0 +1,182 @@
|
||||
/**************************************************************/
|
||||
/* pcbstruct.h : some classes and definitions used in pcbnew */
|
||||
/**************************************************************/
|
||||
|
||||
#ifndef _LAYERS_ID_AND_VISIBILITY_H_
|
||||
#define _LAYERS_ID_AND_VISIBILITY_H_
|
||||
|
||||
/* Layer identification (layer number) */
|
||||
#define FIRST_COPPER_LAYER 0
|
||||
#define LAYER_N_BACK 0
|
||||
#define LAYER_N_2 1
|
||||
#define LAYER_N_3 2
|
||||
#define LAYER_N_4 3
|
||||
#define LAYER_N_5 4
|
||||
#define LAYER_N_6 5
|
||||
#define LAYER_N_7 6
|
||||
#define LAYER_N_8 7
|
||||
#define LAYER_N_9 8
|
||||
#define LAYER_N_10 9
|
||||
#define LAYER_N_11 10
|
||||
#define LAYER_N_12 11
|
||||
#define LAYER_N_13 12
|
||||
#define LAYER_N_14 13
|
||||
#define LAYER_N_15 14
|
||||
#define LAYER_N_FRONT 15
|
||||
#define LAST_COPPER_LAYER LAYER_N_FRONT
|
||||
#define NB_COPPER_LAYERS (LAST_COPPER_LAYER + 1)
|
||||
|
||||
#define FIRST_NO_COPPER_LAYER 16
|
||||
#define ADHESIVE_N_BACK 16
|
||||
#define ADHESIVE_N_FRONT 17
|
||||
#define SOLDERPASTE_N_BACK 18
|
||||
#define SOLDERPASTE_N_FRONT 19
|
||||
#define SILKSCREEN_N_BACK 20
|
||||
#define SILKSCREEN_N_FRONT 21
|
||||
#define SOLDERMASK_N_BACK 22
|
||||
#define SOLDERMASK_N_FRONT 23
|
||||
#define DRAW_N 24
|
||||
#define COMMENT_N 25
|
||||
#define ECO1_N 26
|
||||
#define ECO2_N 27
|
||||
#define EDGE_N 28
|
||||
#define LAST_NO_COPPER_LAYER 28
|
||||
#define UNUSED_LAYER_29 29
|
||||
#define UNUSED_LAYER_30 30
|
||||
#define UNUSED_LAYER_31 31
|
||||
#define NB_LAYERS (LAST_NO_COPPER_LAYER + 1)
|
||||
|
||||
#define LAYER_COUNT 32
|
||||
|
||||
// Masks to identify a layer by a bit map
|
||||
#define LAYER_BACK (1 << LAYER_N_BACK) ///< bit mask for copper layer
|
||||
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
|
||||
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
|
||||
#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4
|
||||
#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5
|
||||
#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6
|
||||
#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7
|
||||
#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8
|
||||
#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9
|
||||
#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10
|
||||
#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11
|
||||
#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12
|
||||
#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13
|
||||
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
|
||||
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
|
||||
#define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer
|
||||
#define ADHESIVE_LAYER_BACK (1 << ADHESIVE_N_BACK)
|
||||
#define ADHESIVE_LAYER_FRONT (1 << ADHESIVE_N_FRONT)
|
||||
#define SOLDERPASTE_LAYER_BACK (1 << SOLDERPASTE_N_BACK)
|
||||
#define SOLDERPASTE_LAYER_FRONT (1 << SOLDERPASTE_N_FRONT)
|
||||
#define SILKSCREEN_LAYER_BACK (1 << SILKSCREEN_N_BACK)
|
||||
#define SILKSCREEN_LAYER_FRONT (1 << SILKSCREEN_N_FRONT)
|
||||
#define SOLDERMASK_LAYER_BACK (1 << SOLDERMASK_N_BACK)
|
||||
#define SOLDERMASK_LAYER_FRONT (1 << SOLDERMASK_N_FRONT)
|
||||
#define DRAW_LAYER (1 << DRAW_N)
|
||||
#define COMMENT_LAYER (1 << COMMENT_N)
|
||||
#define ECO1_LAYER (1 << ECO1_N)
|
||||
#define ECO2_LAYER (1 << ECO2_N)
|
||||
#define EDGE_LAYER (1 << EDGE_N)
|
||||
|
||||
#define FIRST_NON_COPPER_LAYER ADHESIVE_N_BACK
|
||||
#define LAST_NON_COPPER_LAYER EDGE_N
|
||||
|
||||
// extra bits 0xE0000000
|
||||
/* Helpful global layers mask : */
|
||||
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
|
||||
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
|
||||
#define ALL_NO_CU_LAYERS 0x1FFF0000
|
||||
#define ALL_CU_LAYERS 0x0000FFFF
|
||||
#define INTERNAL_LAYERS 0x00007FFE
|
||||
#define EXTERNAL_LAYERS 0x00008001
|
||||
|
||||
|
||||
// layers order in dialogs (plot, print and toolbars)
|
||||
// in same order than in setup layers dialog
|
||||
// (Front or Top to Back or Bottom)
|
||||
#define DECLARE_LAYERS_ORDER_LIST(list) int list[LAYER_COUNT] =\
|
||||
{ LAYER_N_FRONT,\
|
||||
LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12,\
|
||||
LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8,\
|
||||
LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4,\
|
||||
LAYER_N_3, LAYER_N_2,\
|
||||
LAYER_N_BACK,\
|
||||
ADHESIVE_N_FRONT , ADHESIVE_N_BACK,\
|
||||
SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,\
|
||||
SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,\
|
||||
SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,\
|
||||
DRAW_N,\
|
||||
COMMENT_N,\
|
||||
ECO1_N, ECO2_N,\
|
||||
EDGE_N,\
|
||||
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31\
|
||||
};
|
||||
|
||||
/**
|
||||
* Enum PCB_VISIBLE
|
||||
* is a set of visible PCB elements.
|
||||
* @see BOARD::SetVisibleElementColor()
|
||||
* @see BOARD::SetVisibleElement()
|
||||
*/
|
||||
enum PCB_VISIBLE
|
||||
{
|
||||
VIAS_VISIBLE,
|
||||
VIA_MICROVIA_VISIBLE,
|
||||
VIA_BBLIND_VISIBLE,
|
||||
VIA_THROUGH_VISIBLE,
|
||||
MOD_TEXT_FR_VISIBLE,
|
||||
MOD_TEXT_BK_VISIBLE,
|
||||
MOD_TEXT_INVISIBLE, ///< text marked as invisible
|
||||
ANCHOR_VISIBLE,
|
||||
PAD_FR_VISIBLE,
|
||||
PAD_BK_VISIBLE,
|
||||
RATSNEST_VISIBLE,
|
||||
GRID_VISIBLE,
|
||||
|
||||
// the rest of these do not currently support color changes:
|
||||
NO_CONNECTS_VISIBLE, ///< show a marker on pads with no nets
|
||||
MOD_FR_VISIBLE, ///< show modules on front
|
||||
MOD_BK_VISIBLE, ///< show modules on back
|
||||
MOD_VALUES_VISIBLE, ///< show modules values (when texts are visibles)
|
||||
MOD_REFERENCES_VISIBLE, ///< show modules references (when texts are visibles)
|
||||
|
||||
END_PCB_VISIBLE_LIST // sentinel
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Function IsValidLayerIndex
|
||||
* tests whether a given integer is a valid layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid layer index
|
||||
*/
|
||||
inline bool IsValidLayerIndex( int aLayerIndex )
|
||||
{
|
||||
return aLayerIndex >= 0 && aLayerIndex < NB_LAYERS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function IsValidCopperLayerIndex
|
||||
* tests whether an integer is a valid copper layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid copper layer index
|
||||
*/
|
||||
inline bool IsValidCopperLayerIndex( int aLayerIndex )
|
||||
{
|
||||
return aLayerIndex >= FIRST_COPPER_LAYER && aLayerIndex <= LAST_COPPER_LAYER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function IsValidNonCopperLayerIndex
|
||||
* tests whether an integer is a valid non copper layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid non copper layer index
|
||||
*/
|
||||
inline bool IsValidNonCopperLayerIndex( int aLayerIndex )
|
||||
{
|
||||
return aLayerIndex >= FIRST_NO_COPPER_LAYER
|
||||
&& aLayerIndex <= LAST_NO_COPPER_LAYER;
|
||||
}
|
||||
|
||||
#endif // _LAYERS_ID_AND_VISIBILITY_H_
|
@ -36,12 +36,6 @@ extern const wxString PcbFileWildcard;
|
||||
extern wxString g_ViaType_Name[4];
|
||||
|
||||
extern int g_CurrentVersionPCB;
|
||||
extern int g_AnchorColor;
|
||||
extern int g_ModuleTextCMPColor;
|
||||
extern int g_ModuleTextCUColor;
|
||||
extern int g_ModuleTextNOVColor;
|
||||
extern int g_PadCUColor;
|
||||
extern int g_PadCMPColor;
|
||||
|
||||
|
||||
extern int g_TimeOut; // Timer for automatic saving
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "base_struct.h"
|
||||
#include "class_base_screen.h"
|
||||
#include "class_board_item.h"
|
||||
#include "layers_id_colors_and_visibility.h"
|
||||
|
||||
// Definitions relatives aux libraries
|
||||
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
|
||||
@ -33,114 +34,6 @@
|
||||
#define CHAIN (1 << 0) // mark segment
|
||||
|
||||
|
||||
/* Layer identification (layer number) */
|
||||
#define FIRST_COPPER_LAYER 0
|
||||
#define LAYER_N_BACK 0
|
||||
#define LAYER_N_2 1
|
||||
#define LAYER_N_3 2
|
||||
#define LAYER_N_4 3
|
||||
#define LAYER_N_5 4
|
||||
#define LAYER_N_6 5
|
||||
#define LAYER_N_7 6
|
||||
#define LAYER_N_8 7
|
||||
#define LAYER_N_9 8
|
||||
#define LAYER_N_10 9
|
||||
#define LAYER_N_11 10
|
||||
#define LAYER_N_12 11
|
||||
#define LAYER_N_13 12
|
||||
#define LAYER_N_14 13
|
||||
#define LAYER_N_15 14
|
||||
#define LAYER_N_FRONT 15
|
||||
#define LAST_COPPER_LAYER LAYER_N_FRONT
|
||||
#define NB_COPPER_LAYERS (LAST_COPPER_LAYER + 1)
|
||||
|
||||
#define FIRST_NO_COPPER_LAYER 16
|
||||
#define ADHESIVE_N_BACK 16
|
||||
#define ADHESIVE_N_FRONT 17
|
||||
#define SOLDERPASTE_N_BACK 18
|
||||
#define SOLDERPASTE_N_FRONT 19
|
||||
#define SILKSCREEN_N_BACK 20
|
||||
#define SILKSCREEN_N_FRONT 21
|
||||
#define SOLDERMASK_N_BACK 22
|
||||
#define SOLDERMASK_N_FRONT 23
|
||||
#define DRAW_N 24
|
||||
#define COMMENT_N 25
|
||||
#define ECO1_N 26
|
||||
#define ECO2_N 27
|
||||
#define EDGE_N 28
|
||||
#define LAST_NO_COPPER_LAYER 28
|
||||
#define UNUSED_LAYER_29 29
|
||||
#define UNUSED_LAYER_30 30
|
||||
#define UNUSED_LAYER_31 31
|
||||
#define NB_LAYERS (LAST_NO_COPPER_LAYER + 1)
|
||||
|
||||
#define LAYER_COUNT 32
|
||||
|
||||
|
||||
#define LAYER_BACK (1 << LAYER_N_BACK) ///< bit mask for copper layer
|
||||
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
|
||||
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
|
||||
#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4
|
||||
#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5
|
||||
#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6
|
||||
#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7
|
||||
#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8
|
||||
#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9
|
||||
#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10
|
||||
#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11
|
||||
#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12
|
||||
#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13
|
||||
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
|
||||
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
|
||||
#define LAYER_FRONT (1 << LAYER_N_FRONT) ///< bit mask for component layer
|
||||
#define ADHESIVE_LAYER_BACK (1 << ADHESIVE_N_BACK)
|
||||
#define ADHESIVE_LAYER_FRONT (1 << ADHESIVE_N_FRONT)
|
||||
#define SOLDERPASTE_LAYER_BACK (1 << SOLDERPASTE_N_BACK)
|
||||
#define SOLDERPASTE_LAYER_FRONT (1 << SOLDERPASTE_N_FRONT)
|
||||
#define SILKSCREEN_LAYER_BACK (1 << SILKSCREEN_N_BACK)
|
||||
#define SILKSCREEN_LAYER_FRONT (1 << SILKSCREEN_N_FRONT)
|
||||
#define SOLDERMASK_LAYER_BACK (1 << SOLDERMASK_N_BACK)
|
||||
#define SOLDERMASK_LAYER_FRONT (1 << SOLDERMASK_N_FRONT)
|
||||
#define DRAW_LAYER (1 << DRAW_N)
|
||||
#define COMMENT_LAYER (1 << COMMENT_N)
|
||||
#define ECO1_LAYER (1 << ECO1_N)
|
||||
#define ECO2_LAYER (1 << ECO2_N)
|
||||
#define EDGE_LAYER (1 << EDGE_N)
|
||||
|
||||
#define FIRST_NON_COPPER_LAYER ADHESIVE_N_BACK
|
||||
#define LAST_NON_COPPER_LAYER EDGE_N
|
||||
|
||||
// extra bits 0xE0000000
|
||||
/* Helpful global layers mask : */
|
||||
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
|
||||
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
|
||||
#define ALL_NO_CU_LAYERS 0x1FFF0000
|
||||
#define ALL_CU_LAYERS 0x0000FFFF
|
||||
#define INTERNAL_LAYERS 0x00007FFE
|
||||
#define EXTERNAL_LAYERS 0x00008001
|
||||
|
||||
|
||||
// layers order in dialogs (plot, print and toolbars)
|
||||
// in same order than in setup layers dialog
|
||||
// (Front or Top to Back or Bottom)
|
||||
#define DECLARE_LAYERS_ORDER_LIST(list) int list[LAYER_COUNT] =\
|
||||
{ LAYER_N_FRONT,\
|
||||
LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12,\
|
||||
LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8,\
|
||||
LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4,\
|
||||
LAYER_N_3, LAYER_N_2,\
|
||||
LAYER_N_BACK,\
|
||||
ADHESIVE_N_FRONT , ADHESIVE_N_BACK,\
|
||||
SOLDERPASTE_N_FRONT, SOLDERPASTE_N_BACK,\
|
||||
SILKSCREEN_N_FRONT, SILKSCREEN_N_BACK,\
|
||||
SOLDERMASK_N_FRONT, SOLDERMASK_N_BACK,\
|
||||
DRAW_N,\
|
||||
COMMENT_N,\
|
||||
ECO1_N, ECO2_N,\
|
||||
EDGE_N,\
|
||||
UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31\
|
||||
};
|
||||
|
||||
class NETINFO_ITEM;
|
||||
class MARKER_PCB;
|
||||
class RATSNEST_ITEM;
|
||||
@ -153,73 +46,6 @@ class RATSNEST_ITEM;
|
||||
#include "class_board.h"
|
||||
|
||||
|
||||
/**
|
||||
* Enum PCB_VISIBLE
|
||||
* is a set of visible PCB elements.
|
||||
* @see BOARD::SetVisibleElementColor()
|
||||
* @see BOARD::SetVisibleElement()
|
||||
*/
|
||||
enum PCB_VISIBLE
|
||||
{
|
||||
VIAS_VISIBLE,
|
||||
VIA_MICROVIA_VISIBLE,
|
||||
VIA_BBLIND_VISIBLE,
|
||||
VIA_THROUGH_VISIBLE,
|
||||
MOD_TEXT_FR_VISIBLE,
|
||||
MOD_TEXT_BK_VISIBLE,
|
||||
MOD_TEXT_INVISIBLE, ///< text marked as invisible
|
||||
ANCHOR_VISIBLE,
|
||||
PAD_FR_VISIBLE,
|
||||
PAD_BK_VISIBLE,
|
||||
RATSNEST_VISIBLE,
|
||||
GRID_VISIBLE,
|
||||
|
||||
// the rest of these do not currently support color changes:
|
||||
NO_CONNECTS_VISIBLE, ///< show a marker on pads with no nets
|
||||
MOD_FR_VISIBLE, ///< show modules on front
|
||||
MOD_BK_VISIBLE, ///< show modules on back
|
||||
MOD_VALUES_VISIBLE, ///< show modules values (when texts are visibles)
|
||||
MOD_REFERENCES_VISIBLE, ///< show modules references (when texts are visibles)
|
||||
|
||||
END_VISIBLE // sentinel
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Function IsValidLayerIndex
|
||||
* tests whether a given integer is a valid layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid layer index
|
||||
*/
|
||||
inline bool IsValidLayerIndex( int aLayerIndex )
|
||||
{
|
||||
return aLayerIndex >= 0 && aLayerIndex < NB_LAYERS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function IsValidCopperLayerIndex
|
||||
* tests whether an integer is a valid copper layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid copper layer index
|
||||
*/
|
||||
inline bool IsValidCopperLayerIndex( int aLayerIndex )
|
||||
{
|
||||
return aLayerIndex >= FIRST_COPPER_LAYER && aLayerIndex <= LAST_COPPER_LAYER;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function IsValidNonCopperLayerIndex
|
||||
* tests whether an integer is a valid non copper layer index
|
||||
* @param aLayerIndex = Layer index to test
|
||||
* @return true if aLayerIndex is a valid non copper layer index
|
||||
*/
|
||||
inline bool IsValidNonCopperLayerIndex( int aLayerIndex )
|
||||
{
|
||||
return aLayerIndex >= FIRST_NO_COPPER_LAYER
|
||||
&& aLayerIndex <= LAST_NO_COPPER_LAYER;
|
||||
}
|
||||
|
||||
|
||||
// Values for m_DisplayViaMode member:
|
||||
enum DisplayViaMode {
|
||||
VIA_HOLE_NOT_SHOW = 0,
|
||||
|
@ -808,7 +808,6 @@ public:
|
||||
void GlobalRoute( wxDC* DC );
|
||||
|
||||
void Show_1_Ratsnest( EDA_BaseStruct* item, wxDC* DC );
|
||||
void Ratsnest_On_Off( wxDC* DC );
|
||||
void Clean_Pcb( wxDC* DC );
|
||||
|
||||
void InstallFindFrame( const wxPoint& pos, wxDC* DC );
|
||||
|
@ -65,7 +65,7 @@ void WinEDA_PcbFrame::AutoPlace( wxCommandEvent& event )
|
||||
}
|
||||
|
||||
/* Erase ratsnest if needed */
|
||||
if( g_Show_Ratsnest )
|
||||
if( GetBoard()->IsElementVisible(RATSNEST_VISIBLE) )
|
||||
DrawGeneralRatsnest( &dc );
|
||||
GetBoard()->m_Status_Pcb |= DO_NOT_SHOW_GENERAL_RASTNEST;
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "zones.h"
|
||||
#include "cell.h"
|
||||
#include "class_board_design_settings.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
#include "protos.h"
|
||||
|
||||
@ -856,6 +857,10 @@ float WinEDA_PcbFrame::Compute_Ratsnest_PlaceModule( wxDC* DC )
|
||||
return -1;
|
||||
cout = 0;
|
||||
|
||||
int color = g_ColorsSettings.GetItemColor(RATSNEST_VISIBLE);
|
||||
|
||||
if( AutoPlaceShowAll )
|
||||
GRSetDrawMode( DC, GR_XOR );
|
||||
for( unsigned ii = 0; ii < GetBoard()->m_LocalRatsnest.size(); ii++ )
|
||||
{
|
||||
RATSNEST_ITEM* pt_local_chevelu = &GetBoard()->m_LocalRatsnest[ii];
|
||||
@ -871,7 +876,7 @@ float WinEDA_PcbFrame::Compute_Ratsnest_PlaceModule( wxDC* DC )
|
||||
if( AutoPlaceShowAll )
|
||||
{
|
||||
GRLine( &DrawPanel->m_ClipBox, DC, ox, oy, fx, fy,
|
||||
0, g_DesignSettings.m_RatsnestColor | GR_XOR );
|
||||
0, color );
|
||||
}
|
||||
|
||||
/* Cost of the ratsnest. */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user