pcb 4.1.1
An interactive printed circuit board layout editor.
|
Routines to update widgets and global settings (except output window and dialogs). More...
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
#include "action.h"
#include "buffer.h"
#include "compat.h"
#include "crosshair.h"
#include "data.h"
#include "draw.h"
#include "error.h"
#include "find.h"
#include "misc.h"
#include "move.h"
#include "set.h"
#include "undo.h"
#include "pcb-printf.h"
Go to the source code of this file.
Functions | |
void | SetGrid (Coord Grid, bool align) |
Sets cursor grid with respect to grid offset values. | |
void | SetLineSize (Coord Size) |
Sets a new line thickness. | |
void | SetViaSize (Coord Size, bool Force) |
Sets a new via thickness. | |
void | SetViaDrillingHole (Coord Size, bool Force) |
Sets a new via drilling hole. | |
void | pcb_use_route_style (RouteStyleType *rst) |
void | SetKeepawayWidth (Coord Width) |
Sets a keepaway width. | |
void | SetTextScale (int Scale) |
Sets a text scaling. | |
void | SetChangedFlag (bool New) |
Sets or resets changed flag and redraws status. | |
void | SetBufferNumber (int Number) |
Sets a new buffer number. | |
void | SaveMode (void) |
Save mode. | |
void | RestoreMode (void) |
Restore mode. | |
void | SetMode (int Mode) |
Set a new mode and update X cursor. | |
void | SetRouteStyle (char *name) |
Set route style. | |
void | SetLocalRef (Coord X, Coord Y, bool Showing) |
Variables | |
static int | mode_position = 0 |
static int | mode_stack [MAX_MODESTACK_DEPTH] |
Routines to update widgets and global settings (except output window and dialogs).
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
Definition in file set.c.
void pcb_use_route_style | ( | RouteStyleType * | rst | ) |
Definition at line 138 of file set.c.
References RouteStyleType::Diameter, RouteStyleType::Hole, RouteStyleType::Keepaway, SettingType::Keepaway, SettingType::LineThickness, Settings, RouteStyleType::Thick, SettingType::ViaDrillingHole, and SettingType::ViaThickness.
Referenced by ghid_sync_with_new_layout(), and route_style_changed_cb().
void RestoreMode | ( | void | ) |
Restore mode.
Definition at line 213 of file set.c.
References Message(), mode_position, mode_stack, and SetMode().
Referenced by ActionDelete(), ActionMode(), and ReleaseMode().
void SaveMode | ( | void | ) |
Save mode.
Definition at line 202 of file set.c.
References SettingType::Mode, mode_position, mode_stack, and Settings.
Referenced by ActionDelete(), ActionMode(), and click_cb().
void SetBufferNumber | ( | int | Number | ) |
Sets a new buffer number.
Definition at line 187 of file set.c.
References SettingType::BufferNumber, crosshair_update_range(), Number, and Settings.
Referenced by ActionPasteBuffer(), ActionRipUp(), ActionSelect(), click_cb(), and ReleaseMode().
void SetChangedFlag | ( | bool | New | ) |
Sets or resets changed flag and redraws status.
Definition at line 174 of file set.c.
References PCBType::Changed, and PCB.
Referenced by ActionAddRats(), ActionAutoPlaceSelected(), ActionAutoRoute(), ActionChange2ndSize(), ActionChangeClearSize(), ActionChangeHole(), ActionChangeJoin(), ActionChangeName(), ActionChangeOctagon(), ActionChangePaste(), ActionChangePinName(), ActionChangeSize(), ActionChangeSquare(), ActionClearOctagon(), ActionClearSquare(), ActionDelete(), ActionDeleteRats(), ActionDisperseElements(), ActionDisplay(), ActionElementList(), ActionMoveObject(), ActionMoveToCurrentLayer(), ActionPasteBuffer(), ActionRedo(), ActionRemoveSelected(), ActionRenumber(), ActionRipUp(), ActionSaveTo(), ActionSelect(), ActionSetOctagon(), ActionSetSquare(), ActionSetViaLayers(), ActionUndo(), ActionUnselect(), apply_vendor_map(), ChangeFlag(), ClearFlagOnLinesAndPolygons(), ClearFlagOnPinsViasAndPads(), click_cb(), CopyAttachedPolygonToLayer(), IncrementUndoSerialNumber(), InsertPointIntoPolygon(), layer_selector_rename_callback(), LookupElementConnections(), NotifyMode(), PolyToPolygonsOnLayer(), real_load_pcb(), ReleaseMode(), relocate(), RotateScreenObject(), selection_changed_cb(), and smartdisperse().
void SetGrid | ( | Coord | Grid, |
bool | align | ||
) |
Sets cursor grid with respect to grid offset values.
Definition at line 75 of file set.c.
References AttributePut, Crosshair, SettingType::DrawGrid, PCBType::Grid, PCBType::GridOffsetX, PCBType::GridOffsetY, PCB, pcb_g_strdup_printf(), Redraw(), Settings, CrosshairType::X, and CrosshairType::Y.
Referenced by ActionDisplay(), and ActionSetValue().
void SetKeepawayWidth | ( | Coord | Width | ) |
Sets a keepaway width.
Definition at line 150 of file set.c.
References SettingType::Keepaway, and Settings.
Referenced by ActionRouteStyle(), set_some_route_style(), and style_selected().
void SetLineSize | ( | Coord | Size | ) |
Sets a new line thickness.
Definition at line 99 of file set.c.
References Crosshair, FitCrosshairIntoGrid(), SettingType::LineThickness, PCB, Settings, TEST_FLAG, CrosshairType::X, and CrosshairType::Y.
Referenced by ActionRouteStyle(), ActionSetValue(), set_some_route_style(), and style_selected().
Definition at line 332 of file set.c.
References Marked, notify_mark_change(), MarkType::status, X, MarkType::X, Y, and MarkType::Y.
Referenced by ActionUndo(), AttachForCopy(), NotifyLine(), NotifyMode(), and SetMode().
void SetMode | ( | int | Mode | ) |
Set a new mode and update X cursor.
Protect the cursor while changing the mode.
Perform some additional stuff depending on the new mode.
Reset 'state' of attached objects.
Definition at line 234 of file set.c.
References _, addedLines, AdjustAttachedObjects(), ARC_MODE, CrosshairType::AttachedBox, CrosshairType::AttachedLine, CrosshairType::AttachedObject, CrosshairType::AttachedPolygon, ClearFlagOnAllObjects(), Crosshair, crosshair_update_range(), Draw(), IncrementUndoSerialNumber(), INSERTPOINT_MODE, LINE_MODE, Message(), SettingType::Mode, MOVE_MODE, MoveObjectAndRubberband(), NO_MODE, notify_crosshair_change(), PCB, AttachedLineType::Point1, AttachedBoxType::Point1, AttachedLineType::Point2, AttachedBoxType::Point2, polygon_st::PointN, POLYGON_MODE, POLYGONHOLE_MODE, AttachedObjectType::Ptr1, AttachedObjectType::Ptr2, AttachedObjectType::Ptr3, PCBType::RatDraw, RECTANGLE_MODE, SetLocalRef(), Settings, AttachedBoxType::State, AttachedLineType::State, AttachedObjectType::State, STATE_FIRST, STATE_SECOND, TEST_FLAG, TEXT_MODE, THERMAL_MODE, AttachedObjectType::Type, VIA_MODE, PointType::X, and PointType::Y.
Referenced by ActionDelete(), ActionLoadFrom(), ActionMode(), ActionSetSame(), click_cb(), do_set_mode(), FinishStroke(), ghid_create_pcb_widgets(), ghid_idle_cb(), libnode_select(), library_window_callback_tree_selection_changed(), main(), NotifyMode(), and RestoreMode().
void SetRouteStyle | ( | char * | name | ) |
Set route style.
Definition at line 315 of file set.c.
References END_LOOP, hid_actionl(), n, RouteStyleType::Name, NSTRCMP, PCB, style, and STYLE_LOOP.
void SetTextScale | ( | int | Scale | ) |
Sets a text scaling.
Definition at line 162 of file set.c.
References Settings, and SettingType::TextScale.
Referenced by ActionSetValue().
void SetViaDrillingHole | ( | Coord | Size, |
bool | Force | ||
) |
Sets a new via drilling hole.
Definition at line 127 of file set.c.
References Settings, SettingType::ViaDrillingHole, and SettingType::ViaThickness.
Referenced by ActionRouteStyle(), ActionSetValue(), set_some_route_style(), and style_selected().
void SetViaSize | ( | Coord | Size, |
bool | Force | ||
) |
Sets a new via thickness.
Definition at line 113 of file set.c.
References Settings, SettingType::ViaDrillingHole, and SettingType::ViaThickness.
Referenced by ActionRouteStyle(), ActionSetValue(), set_some_route_style(), and style_selected().
int mode_position = 0 [static] |
Definition at line 68 of file set.c.
Referenced by RestoreMode(), and SaveMode().
int mode_stack[MAX_MODESTACK_DEPTH] [static] |
Definition at line 69 of file set.c.
Referenced by RestoreMode(), and SaveMode().