KiCad PCB EDA Suite
general.h File Reference

Go to the source code of this file.

Macros

#define EESCHEMA_VERSION   2
 
#define SCHEMATIC_HEAD_STRING   "Schematic File Version"
 
#define DANGLING_SYMBOL_SIZE   12
 
#define DEFAULT_REPEAT_OFFSET_X   0
 the default X value (overwritten by the eeschema config) More...
 
#define DEFAULT_REPEAT_OFFSET_Y   100
 the default Y value (overwritten by the eeschema config) More...
 
#define REPEAT_OFFSET_MAX   1000
 the max value of repeat offset value More...
 
#define DEFAULT_REPEAT_LABEL_INC   1
 the default value (overwritten by the eeschema config) More...
 
#define DEFAULT_REPEAT_OFFSET_PIN   100
 the default value (overwritten by the eeschema config) More...
 
#define DEFAULTBUSTHICKNESS   12
 The thickness to draw lines that thickness is set to 0 (default thickness) (can be changed in preference menu) More...
 
#define DEFAULTDRAWLINETHICKNESS   6
 The default pin len value when creating pins(can be changed in preference menu) More...
 
#define DEFAULTPINLENGTH   100
 The default pin number size when creating pins(can be changed in preference menu) More...
 
#define DEFAULTPINNUMSIZE   50
 The default pin name size when creating pins(can be changed in preference menu) More...
 
#define DEFAULTPINNAMESIZE   50
 
#define GR_DEFAULT_DRAWMODE   GR_COPY
 

Functions

int GetDefaultLineThickness ()
 Default line thickness used to draw/plot items having a default thickness line value (i.e. More...
 
void SetDefaultLineThickness (int aThickness)
 
int GetDefaultTextSize ()
 Default size for text in general. More...
 
void SetDefaultTextSize (int aSize)
 
int GetDefaultBusThickness ()
 Default line thickness used to draw/plot busses. More...
 
void SetDefaultBusThickness (int aThickness)
 
COLOR4D GetLayerColor (SCH_LAYER_ID aLayer)
 
void SetLayerColor (COLOR4D aColor, SCH_LAYER_ID aLayer)
 
COLOR4D GetItemSelectedColor ()
 
COLOR4D GetInvisibleItemColor ()
 

Variables

TRANSFORM DefaultTransform
 
SCH_SHEETg_RootSheet
 

Macro Definition Documentation

#define DANGLING_SYMBOL_SIZE   12
#define DEFAULT_REPEAT_LABEL_INC   1

the default value (overwritten by the eeschema config)

Definition at line 49 of file general.h.

Referenced by SCH_EDIT_FRAME::GetConfigurationSettings(), LIB_EDIT_FRAME::LoadSettings(), and SCH_BASE_FRAME::SCH_BASE_FRAME().

#define DEFAULT_REPEAT_OFFSET_PIN   100

the default value (overwritten by the eeschema config)

when repeating a pin The thickness to draw busses that do not have a specific width (can be changed in preference menu)

Definition at line 50 of file general.h.

Referenced by LIB_EDIT_FRAME::LIB_EDIT_FRAME(), and LIB_EDIT_FRAME::LoadSettings().

#define DEFAULT_REPEAT_OFFSET_X   0

the default X value (overwritten by the eeschema config)

Definition at line 46 of file general.h.

Referenced by SCH_EDIT_FRAME::GetConfigurationSettings(), LIB_EDIT_FRAME::LoadSettings(), and SCH_BASE_FRAME::SCH_BASE_FRAME().

#define DEFAULT_REPEAT_OFFSET_Y   100

the default Y value (overwritten by the eeschema config)

Definition at line 47 of file general.h.

Referenced by SCH_EDIT_FRAME::GetConfigurationSettings(), LIB_EDIT_FRAME::LoadSettings(), and SCH_BASE_FRAME::SCH_BASE_FRAME().

#define DEFAULTBUSTHICKNESS   12

The thickness to draw lines that thickness is set to 0 (default thickness) (can be changed in preference menu)

Definition at line 55 of file general.h.

Referenced by SCH_EDIT_FRAME::LoadSettings().

#define DEFAULTDRAWLINETHICKNESS   6

The default pin len value when creating pins(can be changed in preference menu)

Definition at line 59 of file general.h.

Referenced by LIB_EDIT_FRAME::LoadSettings(), and SCH_EDIT_FRAME::LoadSettings().

#define DEFAULTPINLENGTH   100

The default pin number size when creating pins(can be changed in preference menu)

Definition at line 62 of file general.h.

Referenced by LIB_EDIT_FRAME::LoadSettings().

#define DEFAULTPINNAMESIZE   50

Definition at line 68 of file general.h.

Referenced by LIB_EDIT_FRAME::LoadSettings().

#define DEFAULTPINNUMSIZE   50

The default pin name size when creating pins(can be changed in preference menu)

Definition at line 65 of file general.h.

Referenced by LIB_EDIT_FRAME::LoadSettings().

#define EESCHEMA_VERSION   2
#define REPEAT_OFFSET_MAX   1000

the max value of repeat offset value

Definition at line 48 of file general.h.

Referenced by SCH_EDIT_FRAME::GetConfigurationSettings().

#define SCHEMATIC_HEAD_STRING   "Schematic File Version"

Function Documentation

int GetDefaultBusThickness ( )

Default line thickness used to draw/plot busses.

Definition at line 63 of file eeschema_config.cpp.

References s_defaultBusThickness.

Referenced by SCH_LINE::GetPenSize(), SCH_BUS_BUS_ENTRY::GetPenSize(), SCH_EDIT_FRAME::OnPreferencesOptions(), and SCH_EDIT_FRAME::SaveSettings().

64 {
65  return s_defaultBusThickness;
66 }
static int s_defaultBusThickness
int GetDefaultLineThickness ( )

Default line thickness used to draw/plot items having a default thickness line value (i.e.

= 0 ).

Definition at line 100 of file eeschema_config.cpp.

References s_drawDefaultLineThickness.

Referenced by SCH_GLOBALLABEL::CreateGraphicShape(), DIALOG_PLOT_SCHEMATIC::createPDFFile(), SCH_NO_CONNECT::Draw(), SCH_TEXT::Draw(), SCH_FIELD::Draw(), SCH_GLOBALLABEL::Draw(), SCH_HIERLABEL::Draw(), SCH_PRINTOUT::DrawPage(), LIB_PIN::DrawPinTexts(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), SCH_GLOBALLABEL::GetBoundingBox(), SCH_HIERLABEL::GetBoundingBox(), SCH_NO_CONNECT::GetPenSize(), LIB_CIRCLE::GetPenSize(), LIB_RECTANGLE::GetPenSize(), LIB_POLYLINE::GetPenSize(), SCH_LINE::GetPenSize(), LIB_TEXT::GetPenSize(), LIB_BEZIER::GetPenSize(), LIB_ARC::GetPenSize(), SCH_SHEET_PIN::GetPenSize(), LIB_FIELD::GetPenSize(), SCH_FIELD::GetPenSize(), SCH_BUS_WIRE_ENTRY::GetPenSize(), SCH_TEXT::GetPenSize(), LIB_PIN::GetPenSize(), SCH_SHEET::GetPenSize(), SCH_TEXT::GetSchematicTextOffset(), SCH_GLOBALLABEL::GetSchematicTextOffset(), SCH_HIERLABEL::GetSchematicTextOffset(), SCH_NO_CONNECT::HitTest(), DIALOG_PLOT_SCHEMATIC::initDlg(), SCH_SCREEN::IsTerminalPoint(), LIB_EDIT_FRAME::OnPreferencesOptions(), SCH_EDIT_FRAME::OnPreferencesOptions(), SCH_SHEET::Plot(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), LIB_PIN::PlotPinTexts(), SCH_EDIT_FRAME::PrintPage(), SCH_EDIT_FRAME::RedrawActiveWindow(), SCH_EDIT_FRAME::SaveSettings(), and LIB_EDIT_FRAME::SVG_PlotComponent().

101 {
103 }
static int s_drawDefaultLineThickness
COLOR4D GetInvisibleItemColor ( )

Definition at line 124 of file eeschema_config.cpp.

References DARKGRAY.

Referenced by LIB_FIELD::drawGraphic(), LIB_PIN::drawGraphic(), and LIB_PIN::DrawPinElectricalTypeName().

125 {
126  return COLOR4D( DARKGRAY );
127 }
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
COLOR4D GetItemSelectedColor ( )
COLOR4D GetLayerColor ( SCH_LAYER_ID  aLayer)

Definition at line 166 of file eeschema.cpp.

References DIM, and SCH_LAYER_INDEX.

Referenced by WIDGET_EESCHEMA_COLOR_CONFIG::CreateControls(), SCH_MARKER::Draw(), SCH_NO_CONNECT::Draw(), SCH_JUNCTION::Draw(), SCH_BUS_ENTRY_BASE::Draw(), SCH_LINE::Draw(), SCH_TEXT::Draw(), SCH_FIELD::Draw(), SCH_GLOBALLABEL::Draw(), SCH_HIERLABEL::Draw(), SCH_SHEET::Draw(), LIB_CIRCLE::drawGraphic(), LIB_POLYLINE::drawGraphic(), LIB_RECTANGLE::drawGraphic(), LIB_BEZIER::drawGraphic(), LIB_ARC::drawGraphic(), LIB_PIN::DrawPinElectricalTypeName(), LIB_PIN::DrawPinSymbol(), LIB_PIN::DrawPinTexts(), DrawSegment(), LIB_FIELD::GetDefaultColor(), LIB_ITEM::GetDefaultColor(), SCH_BASE_FRAME::GetDrawBgColor(), LIB_VIEW_FRAME::LoadSettings(), LIB_EDIT_FRAME::LoadSettings(), SCH_EDIT_FRAME::LoadSettings(), LIB_BEZIER::Plot(), LIB_CIRCLE::Plot(), LIB_RECTANGLE::Plot(), SCH_JUNCTION::Plot(), SCH_NO_CONNECT::Plot(), LIB_POLYLINE::Plot(), SCH_BUS_ENTRY_BASE::Plot(), LIB_ARC::Plot(), SCH_BITMAP::Plot(), SCH_LINE::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), LIB_PART::Plot(), SCH_SHEET::Plot(), LIB_PART::PlotLibFields(), LIB_PIN::PlotPinTexts(), LIB_PIN::PlotSymbol(), and WIDGET_EESCHEMA_COLOR_CONFIG::TransferDataFromControl().

167 {
168  unsigned layer = SCH_LAYER_INDEX( aLayer );
169  wxASSERT( layer < DIM( s_layerColor ) );
170  return s_layerColor[layer];
171 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
static COLOR4D s_layerColor[SCH_LAYER_ID_COUNT]
Definition: eeschema.cpp:164
#define SCH_LAYER_INDEX(x)
void SetDefaultBusThickness ( int  aThickness)

Definition at line 69 of file eeschema_config.cpp.

References s_defaultBusThickness.

Referenced by SCH_EDIT_FRAME::LoadSettings(), and SCH_EDIT_FRAME::OnPreferencesOptions().

70 {
71  if( aThickness >= 1 )
72  s_defaultBusThickness = aThickness;
73  else
75 }
static int s_defaultBusThickness
void SetDefaultLineThickness ( int  aThickness)
void SetDefaultTextSize ( int  aSize)

Definition at line 87 of file eeschema_config.cpp.

References s_defaultTextSize.

Referenced by SCH_EDIT_FRAME::OnPreferencesOptions(), and DIALOG_LABEL_EDITOR::TextPropertiesAccept().

88 {
89  s_defaultTextSize = aTextSize;
90 }
static int s_defaultTextSize
Default size for text (not only labels)
void SetLayerColor ( COLOR4D  aColor,
SCH_LAYER_ID  aLayer 
)

Definition at line 173 of file eeschema.cpp.

References DIM, and SCH_LAYER_INDEX.

Referenced by SCH::IFACE::OnKifaceStart(), SCH_BASE_FRAME::SetDrawBgColor(), and WIDGET_EESCHEMA_COLOR_CONFIG::TransferDataFromControl().

174 {
175  unsigned layer = SCH_LAYER_INDEX( aLayer );
176  wxASSERT( layer < DIM( s_layerColor ) );
177  s_layerColor[layer] = aColor;
178 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
static COLOR4D s_layerColor[SCH_LAYER_ID_COUNT]
Definition: eeschema.cpp:164
#define SCH_LAYER_INDEX(x)

Variable Documentation

SCH_SHEET* g_RootSheet

Definition at line 54 of file eeschema.cpp.

Referenced by NETLIST_EXPORTER_GENERIC::addComponentFields(), SCH_EDIT_FRAME::AnnotateComponents(), SCH_EDIT_FRAME::backAnnotateFootprints(), SCH_EDIT_FRAME::BuildNetListBase(), SCH_SHEET_LIST::BuildSheetList(), SCH_EDIT_FRAME::CheckAnnotate(), SCH_FIND_COLLECTOR::Collect(), SCH_EDIT_FRAME::CreateArchiveLibraryCacheFile(), DIALOG_PLOT_SCHEMATIC::CreateDXFFile(), DIALOG_PLOT_SCHEMATIC::createHPGLFile(), DIALOG_PLOT_SCHEMATIC::createPDFFile(), DIALOG_PLOT_SCHEMATIC::createPSFile(), SCH_EDIT_FRAME::CreateScreens(), DIALOG_PLOT_SCHEMATIC::createSVGFile(), DIALOG_ERC::DisplayERC_MarkersList(), SCH_EDIT_FRAME::doAutoSave(), SCH_EDIT_FRAME::EditSheet(), NETLIST_EXPORTER::findAllUnitsOfComponent(), SCH_EDIT_FRAME::FindComponentAndItem(), NETLIST_DIALOG::GenNetlist(), SCH_PRINTOUT::GetPageInfo(), SCH_PRINTOUT::HasPage(), HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG(), SCH_EDIT_FRAME::isAutoSaveRequired(), SCH_SHEET::Load(), NETLIST_EXPORTER_GENERIC::makeComponents(), NETLIST_EXPORTER_GENERIC::makeDesignHeader(), SCH_EDIT_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnFindDrcMarker(), SCH_EDIT_FRAME::OnFindReplace(), SCH_EDIT_FRAME::OnFindSchematicItem(), SCH_EDIT_FRAME::OnLeftClick(), DIALOG_ERC::OnLeftClickMarkersList(), NETLIST_DIALOG::OnNetlistTypeSelection(), SCH_EDIT_FRAME::OnOpenCvpcb(), SCH_EDIT_FRAME::OnOpenPcbModuleEditor(), SCH_EDIT_FRAME::OnOpenPcbnew(), DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked(), SCH_EDIT_FRAME::OnPrint(), SCH_PRINTOUT::OnPrintPage(), SCH_EDIT_FRAME::OnRightClick(), DIALOG_BOM::OnRunPlugin(), SCH_EDIT_FRAME::OnSaveProject(), SCH_EDIT_FRAME::OnUpdateHierarchySheet(), SCH_EDIT_FRAME::OnUpdatePCB(), SCH_EDIT_FRAME::OnUpdateSave(), SCH_EDIT_FRAME::OpenProjectFiles(), RESCUE_CACHE_CANDIDATE::OpenRescueLibrary(), SCH_EDIT_FRAME::PasteListOfItems(), SCH_EDIT_FRAME::prepareForNetlist(), SCH_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Special_Functions(), SCH_EDIT_FRAME::ProcessCmpToFootprintLinkFile(), NETLIST_EXPORTER_PSPICE::ProcessNetlist(), NETLIST_DIALOG::RunSimulator(), SCH_EDIT_FRAME::SaveProjectSettings(), SCH_SCREENS::SCH_SCREENS(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), DIALOG_ERC::TestErc(), SCH_SHEET_PATH::TestForRecursion(), SCH_SHEET_LIST::TestForRecursion(), NETLIST_EXPORTER_PSPICE::UpdateDirectives(), SCH_EDIT_FRAME::updateFindReplaceView(), WriteDiagnosticERC(), NETLIST_EXPORTER_ORCADPCB2::WriteNetlist(), NETLIST_EXPORTER_CADSTAR::WriteNetlist(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().