pcb 4.1.1
An interactive printed circuit board layout editor.

set.c File Reference

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"
Include dependency graph for set.c:

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]

Detailed Description

Routines to update widgets and global settings (except output window and dialogs).


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 set.c.


Function Documentation

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

void SetLocalRef ( Coord  X,
Coord  Y,
bool  Showing 
)

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().

Here is the call graph for this function:

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.

Here is the call graph for this function:

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().


Variable Documentation

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().