KiCad PCB EDA Suite
dialog_layers_setup.cpp File Reference
#include <fctsys.h>
#include <macros.h>
#include <confirm.h>
#include <pcbnew.h>
#include <invoke_pcb_dialog.h>
#include <class_board.h>
#include <dialog_layers_setup_base.h>

Go to the source code of this file.

Classes

struct  CTLs
 Struct CTLs holds the 3 ui control pointers for a single board layer. More...
 
class  DIALOG_LAYERS_SETUP
 

Macros

#define HIDE_INACTIVE_LAYERS
 
#define USE_LAYER_MANAGER_COPPER_LAYERS_ORDER
 
#define RETCOP(x)   return CTLs( x##Name, x##CheckBox, x##Choice, x##Panel );
 
#define RETAUX(x)   return CTLs( x##Name, x##CheckBox, x##StaticText, x##Panel );
 

Functions

static LSEQ dlg_layers ()
 
static bool hasOneOf (const wxString &str, const wxString &chars)
 
bool InvokeLayerSetup (wxTopLevelWindow *aCaller, BOARD *aBoard)
 Function InvokeLayerSetup shows the layer setup dialog. More...
 

Variables

static const LSET presets []
 

Macro Definition Documentation

#define HIDE_INACTIVE_LAYERS

Definition at line 43 of file dialog_layers_setup.cpp.

#define RETAUX (   x)    return CTLs( x##Name, x##CheckBox, x##StaticText, x##Panel );
#define RETCOP (   x)    return CTLs( x##Name, x##CheckBox, x##Choice, x##Panel );
#define USE_LAYER_MANAGER_COPPER_LAYERS_ORDER

Definition at line 48 of file dialog_layers_setup.cpp.

Function Documentation

static LSEQ dlg_layers ( )
static

Definition at line 72 of file dialog_layers_setup.cpp.

References B_Adhes, B_CrtYd, B_Cu, B_Fab, B_Mask, B_Paste, B_SilkS, Cmts_User, DIM, Dwgs_User, Eco1_User, Eco2_User, Edge_Cuts, F_Adhes, F_CrtYd, F_Cu, F_Fab, F_Mask, F_Paste, F_SilkS, In10_Cu, In11_Cu, In12_Cu, In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu, In19_Cu, In1_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu, In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In2_Cu, In30_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu, In7_Cu, In8_Cu, In9_Cu, and Margin.

Referenced by DIALOG_LAYERS_SETUP::getUILayerMask(), DIALOG_LAYERS_SETUP::showBoardLayerNames(), and DIALOG_LAYERS_SETUP::showSelectedLayerCheckBoxes().

73 {
74  // layers that are put out into the dialog UI, coordinate with wxformbuilder and
75  // getCTLs( LAYER_NUM aLayerNumber )
76  static const LAYER_ID layers[] = {
77  F_CrtYd,
78  F_Fab,
79  F_Adhes,
80  F_Paste,
81  F_SilkS,
82  F_Mask,
83  F_Cu,
84 
85  In1_Cu,
86  In2_Cu,
87  In3_Cu,
88  In4_Cu,
89  In5_Cu,
90  In6_Cu,
91  In7_Cu,
92  In8_Cu,
93  In9_Cu,
94  In10_Cu,
95  In11_Cu,
96  In12_Cu,
97  In13_Cu,
98  In14_Cu,
99  In15_Cu,
100 
101  In16_Cu,
102  In17_Cu,
103  In18_Cu,
104  In19_Cu,
105  In20_Cu,
106  In21_Cu,
107  In22_Cu,
108  In23_Cu,
109  In24_Cu,
110  In25_Cu,
111  In26_Cu,
112  In27_Cu,
113  In28_Cu,
114  In29_Cu,
115  In30_Cu,
116 
117  B_Cu,
118  B_Mask,
119  B_SilkS,
120  B_Paste,
121  B_Adhes,
122  B_Fab,
123  B_CrtYd,
124 
125  Edge_Cuts,
126  Margin,
127  Eco2_User,
128  Eco1_User,
129  Cmts_User,
130  Dwgs_User,
131  };
132 
133  return LSEQ( layers, layers + DIM( layers ) );
134 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
Class LSEQ is a sequence (and therefore also a set) of LAYER_IDs.
LAYER_ID
Enum LAYER_ID is the set of PCB layers.
static bool hasOneOf ( const wxString &  str,
const wxString &  chars 
)
static

Definition at line 657 of file dialog_layers_setup.cpp.

Referenced by DIALOG_LAYERS_SETUP::testLayerNames().

658 {
659  for( unsigned i=0; i<chars.Len(); ++i )
660  if( str.Find( chars[i] ) != wxNOT_FOUND )
661  return true;
662  return false;
663 }
bool InvokeLayerSetup ( wxTopLevelWindow *  aCaller,
BOARD aBoard 
)

Function InvokeLayerSetup shows the layer setup dialog.

Parameters
aCalleris the wxTopLevelWindow which is invoking the dialog.
aBoardis the currently edited board.
Returns
bool - true if user pressed OK (did not abort), else false.

Definition at line 736 of file dialog_layers_setup.cpp.

Referenced by PCB_EDIT_FRAME::Process_Config().

737 {
738  DIALOG_LAYERS_SETUP dlg( aCaller, aBoard );
739 
740  return dlg.ShowModal() == wxID_OK;
741 }

Variable Documentation

const LSET presets[]
static
Initial value:
=
{
LSET(),
LSET().set(),
}
static LSET BackTechMask()
Function BackTechMask returns a mask holding all technical layers (no CU layer) on back side...
Definition: lset.cpp:682
static LSET FrontTechMask()
Function FrontTechMask returns a mask holding all technical layers (no CU layer) on front side...
Definition: lset.cpp:694
Class LSET is a set of LAYER_IDs.
static LSET UserMask()
Definition: lset.cpp:722

Definition at line 222 of file dialog_layers_setup.cpp.