KiCad PCB EDA Suite
sch_screen.cpp File Reference

Implementation of SCH_SCREEN and SCH_SCREENS classes. More...

#include <fctsys.h>
#include <gr_basic.h>
#include <common.h>
#include <kicad_string.h>
#include <eeschema_id.h>
#include <pgm_base.h>
#include <kiway.h>
#include <class_drawpanel.h>
#include <sch_item_struct.h>
#include <schframe.h>
#include <class_plotter.h>
#include <netlist.h>
#include <class_netlist_object.h>
#include <class_library.h>
#include <sch_junction.h>
#include <sch_bus_entry.h>
#include <sch_line.h>
#include <sch_marker.h>
#include <sch_no_connect.h>
#include <sch_sheet.h>
#include <sch_component.h>
#include <sch_text.h>
#include <lib_pin.h>
#include <symbol_lib_table.h>
#include <boost/foreach.hpp>

Go to the source code of this file.

Macros

#define EESCHEMA_FILE_STAMP   "EESchema"
 

Functions

static bool SortByTimeStamp (const EDA_ITEM *item1, const EDA_ITEM *item2)
 Sort a list of schematic items by time stamp and type. More...
 

Variables

static double SchematicZoomList []
 
static GRID_TYPE SchematicGridList []
 

Detailed Description

Implementation of SCH_SCREEN and SCH_SCREENS classes.

Definition in file sch_screen.cpp.

Macro Definition Documentation

#define EESCHEMA_FILE_STAMP   "EESchema"

Definition at line 60 of file sch_screen.cpp.

Function Documentation

static bool SortByTimeStamp ( const EDA_ITEM item1,
const EDA_ITEM item2 
)
static

Sort a list of schematic items by time stamp and type.

Definition at line 1198 of file sch_screen.cpp.

References EDA_ITEM::GetTimeStamp(), SCH_SHEET_T, and EDA_ITEM::Type().

Referenced by SCH_SCREENS::ReplaceDuplicateTimeStamps().

1199 {
1200  int ii = item1->GetTimeStamp() - item2->GetTimeStamp();
1201 
1202  /* If the time stamps are the same, compare type in order to have component objects
1203  * before sheet object. This is done because changing the sheet time stamp
1204  * before the component time stamp could cause the current annotation to be lost.
1205  */
1206  if( ( ii == 0 && ( item1->Type() != item2->Type() ) ) && ( item1->Type() == SCH_SHEET_T ) )
1207  ii = -1;
1208 
1209  return ii < 0;
1210 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:225
timestamp_t GetTimeStamp() const
Definition: base_struct.h:231

Variable Documentation

GRID_TYPE SchematicGridList[]
static
Initial value:
= {
{ ID_POPUP_GRID_LEVEL_100, wxRealPoint( 100, 100 ) },
{ ID_POPUP_GRID_LEVEL_50, wxRealPoint( 50, 50 ) },
{ ID_POPUP_GRID_LEVEL_25, wxRealPoint( 25, 25 ) },
{ ID_POPUP_GRID_LEVEL_10, wxRealPoint( 10, 10 ) },
{ ID_POPUP_GRID_LEVEL_5, wxRealPoint( 5, 5 ) },
{ ID_POPUP_GRID_LEVEL_2, wxRealPoint( 2, 2 ) },
{ ID_POPUP_GRID_LEVEL_1, wxRealPoint( 1, 1 ) },
}

Definition at line 83 of file sch_screen.cpp.

double SchematicZoomList[]
static
Initial value:
=
{
0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 8.0, 11.0,
13.0, 16.0, 20.0, 26.0, 32.0, 48.0, 64.0, 80.0, 128.0
}

Definition at line 65 of file sch_screen.cpp.

Referenced by SCH_SCREEN::SCH_SCREEN().