KiCad PCB EDA Suite
dialog_layers_setup.cpp File Reference
#include <fctsys.h>
#include <macros.h>
#include <confirm.h>
#include <pcbnew.h>
#include <pcb_edit_frame.h>
#include <view/view.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 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 (PCB_EDIT_FRAME *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 47 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 );

Function Documentation

static LSEQ dlg_layers ( )
static

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

72 {
73  // layers that are put out into the dialog UI, coordinate with wxformbuilder and
74  // getCTLs( LAYER_NUM aLayerNumber )
75  static const PCB_LAYER_ID layers[] = {
76  F_CrtYd,
77  F_Fab,
78  F_Adhes,
79  F_Paste,
80  F_SilkS,
81  F_Mask,
82  F_Cu,
83 
84  In1_Cu,
85  In2_Cu,
86  In3_Cu,
87  In4_Cu,
88  In5_Cu,
89  In6_Cu,
90  In7_Cu,
91  In8_Cu,
92  In9_Cu,
93  In10_Cu,
94  In11_Cu,
95  In12_Cu,
96  In13_Cu,
97  In14_Cu,
98  In15_Cu,
99 
100  In16_Cu,
101  In17_Cu,
102  In18_Cu,
103  In19_Cu,
104  In20_Cu,
105  In21_Cu,
106  In22_Cu,
107  In23_Cu,
108  In24_Cu,
109  In25_Cu,
110  In26_Cu,
111  In27_Cu,
112  In28_Cu,
113  In29_Cu,
114  In30_Cu,
115 
116  B_Cu,
117  B_Mask,
118  B_SilkS,
119  B_Paste,
120  B_Adhes,
121  B_Fab,
122  B_CrtYd,
123 
124  Edge_Cuts,
125  Margin,
126  Eco2_User,
127  Eco1_User,
128  Cmts_User,
129  Dwgs_User,
130  };
131 
132  return LSEQ( layers, layers + DIM( layers ) );
133 }
#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 762 of file dialog_layers_setup.cpp.

References i.

Referenced by DIALOG_LAYERS_SETUP::testLayerNames().

763 {
764  for( unsigned i=0; i<chars.Len(); ++i )
765  {
766  if( str.Find( chars[i] ) != wxNOT_FOUND )
767  return true;
768  }
769 
770  return false;
771 }
const string & str
Definition: json11.cpp:596
size_t i
Definition: json11.cpp:597
bool InvokeLayerSetup ( PCB_EDIT_FRAME aCaller,
BOARD aBoard 
)

Function InvokeLayerSetup shows the layer setup dialog.

Parameters
aCalleris the PCB_EDIT_FRAME 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 903 of file dialog_layers_setup.cpp.

Referenced by PCB_EDIT_FRAME::Process_Config().

904 {
905  DIALOG_LAYERS_SETUP dlg( aCaller, aBoard );
906 
907  return dlg.ShowModal() == wxID_OK;
908 }

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

Definition at line 235 of file dialog_layers_setup.cpp.