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 <collectors.h>
#include <dialog_layers_setup_base.h>

Go to the source code of this file.

Classes

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 44 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 49 of file dialog_layers_setup.cpp.

Function Documentation

static LSEQ dlg_layers ( )
static

Definition at line 73 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().

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

Definition at line 713 of file dialog_layers_setup.cpp.

Referenced by DIALOG_LAYERS_SETUP::testLayerNames().

714 {
715  for( unsigned i=0; i<chars.Len(); ++i )
716  {
717  if( str.Find( chars[i] ) != wxNOT_FOUND )
718  return true;
719  }
720 
721  return false;
722 }
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 822 of file dialog_layers_setup.cpp.

Referenced by PCB_EDIT_FRAME::Process_Config().

823 {
824  DIALOG_LAYERS_SETUP dlg( aCaller, aBoard );
825 
826  return dlg.ShowModal() == wxID_OK;
827 }

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:690
static LSET FrontTechMask()
Function FrontTechMask returns a mask holding all technical layers (no CU layer) on front side...
Definition: lset.cpp:702
Class LSET is a set of PCB_LAYER_IDs.
static LSET UserMask()
Definition: lset.cpp:730

Definition at line 227 of file dialog_layers_setup.cpp.