pcb 4.1.1
An interactive printed circuit board layout editor.

create.h File Reference

Prototypes for create routines. More...

#include "global.h"
Include dependency graph for create.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void CreateBeLenient (bool)
 Set the lenience mode.
DataTypeCreateNewBuffer (void)
 Creates a new paste buffer.
void pcb_colors_from_settings (PCBType *)
 Perhaps PCB should internally just use the Settings colors?
PCBTypeCreateNewPCB ()
 Creates a new PCB.
int CreateNewPCBPost (PCBType *, int)
 This post-processing step adds the top and bottom silk layers to a pre-existing PCB.
PinTypeCreateNewVia (DataType *, Coord, Coord, Coord, Coord, Coord, Coord, char *, FlagType)
 Creates a new via.
PinTypeCreateNewViaEx (DataType *, Coord, Coord, Coord, Coord, Coord, Coord, char *, FlagType, Cardinal buried_from, Cardinal buried_to)
 Creates a new via with buried info.
LineTypeCreateDrawnLineOnLayer (LayerType *, Coord, Coord, Coord, Coord, Coord, Coord, FlagType)
 Creates a new line on a layer and checks for overlap and extension.
LineTypeCreateNewLineOnLayer (LayerType *, Coord, Coord, Coord, Coord, Coord, Coord, FlagType)
RatTypeCreateNewRat (DataType *, Coord, Coord, Coord, Coord, Cardinal, Cardinal, Coord, FlagType)
 Creates a new rat-line.
ArcTypeCreateNewArcOnLayer (LayerType *, Coord, Coord, Coord, Coord, Angle, Angle, Coord, Coord, FlagType)
 Creates a new arc on a layer.
PolygonTypeCreateNewPolygonFromRectangle (LayerType *, Coord, Coord, Coord, Coord, FlagType)
 Creates a new polygon from the old formats rectangle data.
TextTypeCreateNewText (LayerType *, FontType *, Coord, Coord, unsigned, int, char *, FlagType)
 Creates a new text on a layer.
PolygonTypeCreateNewPolygon (LayerType *, FlagType)
 Creates a new polygon on a layer.
PointTypeCreateNewPointInPolygon (PolygonType *, Coord, Coord)
 Creates a new point in a polygon.
PolygonTypeCreateNewHoleInPolygon (PolygonType *polygon)
 Creates a new hole in a polygon.
ElementTypeCreateNewElement (DataType *, FontType *, FlagType, char *, char *, char *, Coord, Coord, BYTE, int, FlagType, bool)
 Creates an new element.
LineTypeCreateNewLineInElement (ElementType *, Coord, Coord, Coord, Coord, Coord)
 Creates a new line for an element.
ArcTypeCreateNewArcInElement (ElementType *, Coord, Coord, Coord, Coord, Angle, Angle, Coord)
 Creates a new arc in an element.
PinTypeCreateNewPin (ElementType *, Coord, Coord, Coord, Coord, Coord, Coord, char *, char *, FlagType)
 Creates a new pin in an element.
PadTypeCreateNewPad (ElementType *, Coord, Coord, Coord, Coord, Coord, Coord, Coord, char *, char *, FlagType)
 Creates a new pad in an element.
LineTypeCreateNewLineInSymbol (SymbolType *, Coord, Coord, Coord, Coord, Coord)
 Creates a new line in a symbol.
void CreateDefaultFont (PCBType *)
 Parses a file with font information and installs it into the provided PCB.
RubberbandTypeCreateNewRubberbandEntry (LayerType *, LineType *, PointType *)
 Adds a new line to the rubberband list of 'Crosshair.AttachedObject'.
LibraryMenuTypeCreateNewNet (LibraryType *, char *, char *)
 Add a new net to the netlist menu.
LibraryEntryTypeCreateNewConnection (LibraryMenuType *, char *)
 Add a connection to the net.
AttributeTypeCreateNewAttribute (AttributeListType *list, char *name, char *value)
 Add an attribute to a list..

Detailed Description

Prototypes for create routines.


Copyright.


PCB, interactive printed circuit board design

Copyright (C) 1994,1995,1996 Thomas Nau

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Contact addresses for paper mail and Email: Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany Thomas.Nau@rz.uni-ulm.de

Definition in file create.h.


Function Documentation

void CreateBeLenient ( bool  v)

Set the lenience mode.

TRUE during file loads, for example to allow overlapping vias.
FALSE otherwise, to stop the user from doing normally dangerous things.

Definition at line 86 of file create.c.

References be_lenient.

Referenced by Parse().

void CreateDefaultFont ( PCBType pcb)

Parses a file with font information and installs it into the provided PCB.

Checks directories given as colon separated list by resource fontPath if the fonts filename doesn't contain a directory component.

Definition at line 999 of file create.c.

References _, PCBType::Font, SettingType::FontFile, Message(), ParseFont(), and Settings.

Referenced by CreateNewPCB().

Here is the call graph for this function:

ArcType* CreateNewArcInElement ( ElementType ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
Angle  ,
Angle  ,
Coord   
)

Creates a new arc in an element.

Definition at line 769 of file create.c.

References ElementType::Arc, ElementType::ArcN, ArcType::Delta, ArcType::Height, ID, NormalizeAngle(), ArcType::StartAngle, line_info::Thickness, ArcType::Thickness, ArcType::Width, X, ArcType::X, Y, and ArcType::Y.

Referenced by ConvertBufferToElement(), and CopyElementLowLevel().

Here is the call graph for this function:

AttributeType* CreateNewAttribute ( AttributeListType list,
char *  name,
char *  value 
)

Add an attribute to a list..

Definition at line 1062 of file create.c.

References AttributeListType::List, AttributeListType::Max, AttributeType::name, AttributeListType::Number, realloc(), STRDUP, and AttributeType::value.

Referenced by ActionElementSetAttr(), and CopyElementLowLevel().

Here is the call graph for this function:

DataType* CreateNewBuffer ( void  )

Creates a new paste buffer.

Definition at line 95 of file create.c.

References PCB, and DataType::pcb.

Referenced by CopyObjectToUndoList(), CreateNewPCB(), InitBuffers(), MoveObjectToRemoveUndoList(), and UndoCopyOrCreate().

LibraryEntryType* CreateNewConnection ( LibraryMenuType ,
char *   
)

Add a connection to the net.

Definition at line 1050 of file create.c.

References GetLibraryEntryMemory(), LibraryEntryType::ListEntry, and STRDUP.

Referenced by netlist_add().

Here is the call graph for this function:

ElementType* CreateNewElement ( DataType Data,
FontType PCBFont,
FlagType  Flags,
char *  Description,
char *  NameOnPCB,
char *  Value,
Coord  TextX,
Coord  TextY,
BYTE  Direction,
int  TextScale,
FlagType  TextFlags,
bool  uniqueName 
)

Creates an new element.

Note:
Memory is allocated if needed.

Definition at line 729 of file create.c.

References AddTextToElement(), DESCRIPTION_TEXT, line_info::Flags, GetElementMemory(), ID, MAX, NAMEONPCB_TEXT, UniqueElementName(), and VALUE_TEXT.

Referenced by ConvertBufferToElement(), and CopyElementLowLevel().

Here is the call graph for this function:

PolygonType* CreateNewHoleInPolygon ( PolygonType polygon)

Creates a new hole in a polygon.

Definition at line 716 of file create.c.

References GetHoleIndexMemoryInPolygon(), polygon_st::PointN, and Polygon.

Referenced by CopyPolygonLowLevel(), and PolyToPolygonsOnLayer().

Here is the call graph for this function:

LineType* CreateNewLineInElement ( ElementType ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
Coord   
)

Creates a new line for an element.

Definition at line 807 of file create.c.

References ID, ElementType::Line, line, ElementType::LineN, NoFlags, line_info::Thickness, line_info::X1, line_info::X2, line_info::Y1, and line_info::Y2.

Referenced by ConvertBufferToElement(), and CopyElementLowLevel().

LineType* CreateNewLineInSymbol ( SymbolType ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
Coord   
)

Creates a new line in a symbol.

Definition at line 966 of file create.c.

References SymbolType::Line, line, SymbolType::LineMax, SymbolType::LineN, realloc(), STEP_SYMBOLLINE, line_info::Thickness, line_info::X1, line_info::X2, line_info::Y1, and line_info::Y2.

Referenced by FontSave().

Here is the call graph for this function:

LibraryMenuType* CreateNewNet ( LibraryType ,
char *  ,
char *   
)

Add a new net to the netlist menu.

Definition at line 1030 of file create.c.

References LibraryMenuType::flag, GetLibraryMenuMemory(), LibraryMenuType::Name, NSTRCMP, and LibraryMenuType::Style.

Referenced by netlist_add().

Here is the call graph for this function:

PadType* CreateNewPad ( ElementType ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
char *  ,
char *  ,
FlagType   
)

Creates a new pad in an element.

Definition at line 905 of file create.c.

References CLEAR_FLAG, line_info::Clearance, pad_st::Element, line_info::Flags, GetPadMemory(), ID, Mask, pad_st::Mask, pad_st::Name, pad_st::Number, STRDUP, line_info::Thickness, line_info::X1, line_info::X2, line_info::Y1, and line_info::Y2.

Referenced by ConvertBufferToElement(), and CopyElementLowLevel().

Here is the call graph for this function:

int CreateNewPCBPost ( PCBType pcb,
int  use_defaults 
)

This post-processing step adds the top and bottom silk layers to a pre-existing PCB.

Called after PCB->Data->LayerN is set.

Returns:
Returns zero if no errors, else nonzero.

Definition at line 231 of file create.c.

References bottom_silk_layer, PCBType::Data, SettingType::Groups, DataType::Layer, PCBType::LayerGroups, DataType::LayerN, LT_SILK, LayerType::Name, ParseGroupString(), pcb_colors_from_settings(), Settings, top_silk_layer, and LayerType::Type.

Referenced by ActionNew(), main(), and real_load_pcb().

Here is the call graph for this function:

PointType* CreateNewPointInPolygon ( PolygonType ,
Coord  ,
Coord   
)

Creates a new point in a polygon.

Definition at line 701 of file create.c.

References GetPointMemoryInPolygon(), ID, PointType::ID, X, PointType::X, Y, and PointType::Y.

Referenced by CopyPolygonLowLevel(), CreateNewPolygonFromRectangle(), InsertPointIntoPolygon(), MorphPolygon(), NotifyMode(), and PolyToPolygonsOnLayer().

Here is the call graph for this function:

PolygonType* CreateNewPolygon ( LayerType ,
FlagType   
)

Creates a new polygon on a layer.

Definition at line 684 of file create.c.

References polygon_st::Clipped, line_info::Flags, GetPolygonMemory(), ID, polygon_st::NoHoles, and polygon_st::NoHolesValid.

Referenced by AddPolygonToBuffer(), CopyAttachedPolygonToLayer(), CopyPolygon(), CreateNewPolygonFromRectangle(), MorphPolygon(), and PolyToPolygonsOnLayer().

Here is the call graph for this function:

PolygonType* CreateNewPolygonFromRectangle ( LayerType ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
FlagType   
)

Creates a new polygon from the old formats rectangle data.

Definition at line 624 of file create.c.

References CreateNewPointInPolygon(), CreateNewPolygon(), LayerType::polygon_tree, r_create_tree(), r_insert_entry(), and SetPolygonBoundingBox().

Referenced by NotifyMode().

Here is the call graph for this function:

RatType* CreateNewRat ( DataType ,
Coord  ,
Coord  ,
Coord  ,
Coord  ,
Cardinal  ,
Cardinal  ,
Coord  ,
FlagType   
)
RubberbandType* CreateNewRubberbandEntry ( LayerType Layer,
LineType Line,
PointType MovedPoint 
)

Adds a new line to the rubberband list of 'Crosshair.AttachedObject'.

If Layer == 0 it is a rat line.

Definition at line 1012 of file create.c.

References GetRubberbandMemory(), Layer, RubberbandType::Layer, line_info::Line, RubberbandType::Line, RubberbandType::MovedPoint, ptr, and TOGGLE_FLAG.

Referenced by CheckPolygonForRubberbandConnection(), rat_callback(), and rubber_callback().

Here is the call graph for this function:

TextType* CreateNewText ( LayerType ,
FontType ,
Coord  ,
Coord  ,
unsigned  ,
int  ,
char *  ,
FlagType   
)

Creates a new text on a layer.

Definition at line 648 of file create.c.

References TextType::Direction, line_info::Flags, GetTextMemory(), ID, r_create_tree(), r_insert_entry(), TextType::Scale, SetTextBoundingBox(), LayerType::text_tree, TextType::TextString, X, TextType::X, Y, and TextType::Y.

Referenced by AddTextToBuffer(), CopyText(), and NotifyMode().

Here is the call graph for this function:

PinType* CreateNewViaEx ( DataType Data,
Coord  X,
Coord  Y,
Coord  Thickness,
Coord  Clearance,
Coord  Mask,
Coord  DrillingHole,
char *  Name,
FlagType  Flags,
Cardinal  buried_from,
Cardinal  buried_to 
)

Creates a new via with buried info.

*

Definition at line 325 of file create.c.

References pin_st::BuriedFrom, pin_st::BuriedTo, and CreateNewVia().

Referenced by AddViaToBuffer(), CopyVia(), moveline_callback(), and NotifyMode().

Here is the call graph for this function: