pcb 4.1.1
An interactive printed circuit board layout editor.

ghid-route-style-selector.h File Reference

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include "global.h"
Include dependency graph for ghid-route-style-selector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GHID_ROUTE_STYLE_SELECTOR_TYPE   (ghid_route_style_selector_get_type ())
#define GHID_ROUTE_STYLE_SELECTOR(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_ROUTE_STYLE_SELECTOR_TYPE, GHidRouteStyleSelector))
#define GHID_ROUTE_STYLE_SELECTOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GHID_ROUTE_STYLE_SELECTOR_TYPE, GHidRouteStyleSelectorClass))
#define IS_GHID_ROUTE_STYLE_SELECTOR(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_ROUTE_STYLE_SELECTOR_TYPE))
#define IS_GHID_ROUTE_STYLE_SELECTOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GHID_ROUTE_STYLE_SELECTOR_TYPE))

Typedefs

typedef struct
_GHidRouteStyleSelector 
GHidRouteStyleSelector
typedef struct
_GHidRouteStyleSelectorClass 
GHidRouteStyleSelectorClass

Functions

GType ghid_route_style_selector_get_type (void)
GtkWidget * ghid_route_style_selector_new (void)
 Create a new GHidRouteStyleSelector.
gint ghid_route_style_selector_install_items (GHidRouteStyleSelector *rss, GtkMenuShell *shell, gint pos)
 Install the "Route Style" menu items.
void ghid_route_style_selector_add_route_style (GHidRouteStyleSelector *rss, RouteStyleType *data)
 Adds a route style to a GHidRouteStyleSelector.
gboolean ghid_route_style_selector_select_style (GHidRouteStyleSelector *rss, RouteStyleType *rst)
 Selects a route style and emits a select-style signal.
void ghid_route_style_selector_edit_dialog (GHidRouteStyleSelector *rss)
GtkAccelGroup * ghid_route_style_selector_get_accel_group (GHidRouteStyleSelector *rss)
 Returns the GtkAccelGroup of a route style selector.
void ghid_route_style_selector_sync (GHidRouteStyleSelector *rss, Coord Thick, Coord Hole, Coord Diameter, Coord Keepaway)
 Sets a GHidRouteStyleSelector selection to given values.
void ghid_route_style_selector_empty (GHidRouteStyleSelector *rss)
 Removes all styles from a route style selector.

Define Documentation

#define GHID_ROUTE_STYLE_SELECTOR (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHID_ROUTE_STYLE_SELECTOR_TYPE, GHidRouteStyleSelector))
#define GHID_ROUTE_STYLE_SELECTOR_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GHID_ROUTE_STYLE_SELECTOR_TYPE, GHidRouteStyleSelectorClass))

Definition at line 14 of file ghid-route-style-selector.h.

#define GHID_ROUTE_STYLE_SELECTOR_TYPE   (ghid_route_style_selector_get_type ())

Definition at line 12 of file ghid-route-style-selector.h.

Referenced by ghid_route_style_selector_new().

#define IS_GHID_ROUTE_STYLE_SELECTOR (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHID_ROUTE_STYLE_SELECTOR_TYPE))

Definition at line 15 of file ghid-route-style-selector.h.

#define IS_GHID_ROUTE_STYLE_SELECTOR_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GHID_ROUTE_STYLE_SELECTOR_TYPE))

Definition at line 16 of file ghid-route-style-selector.h.


Typedef Documentation


Function Documentation

void ghid_route_style_selector_add_route_style ( GHidRouteStyleSelector rss,
RouteStyleType data 
)

Adds a route style to a GHidRouteStyleSelector.

Function Description
Adds a new route style to be managed by this selector. Note that the route style object passed to this function will be updated directly.
Parameters:
[in]rssThe selector to be acted on
[in]dataPCB's route style object describing the style

Definition at line 497 of file ghid-route-style-selector.c.

References FALSE, and ghid_route_style_selector_real_add_route_style().

Referenced by make_route_style_buttons().

Here is the call graph for this function:

GtkAccelGroup* ghid_route_style_selector_get_accel_group ( GHidRouteStyleSelector rss)

Returns the GtkAccelGroup of a route style selector.

Function Description
Parameters:
[in]rssThe selector to be acted on
Returns:
the accel group of the selector

Definition at line 586 of file ghid-route-style-selector.c.

References _GHidRouteStyleSelector::accel_group.

Referenced by ghid_install_accel_groups(), and ghid_remove_accel_groups().

GType ghid_route_style_selector_get_type ( void  )

Definition at line 363 of file ghid-route-style-selector.c.

References ghid_route_style_selector_class_init(), and ghid_route_style_selector_init().

Here is the call graph for this function:

gint ghid_route_style_selector_install_items ( GHidRouteStyleSelector rss,
GtkMenuShell *  shell,
gint  pos 
)

Install the "Route Style" menu items.

Function Description
Takes a menu shell and installs menu items for route style selection in the shell, at the given position. Note that we aren't really guaranteed the ordering of these items, since our internal data structure is a hash table. This shouldn't be a problem.
Parameters:
[in]rssThe selector to be acted on
[in]shellThe menu to install the items in
[in]posThe position in the menu to install items
Returns:
the number of items installed

Definition at line 518 of file ghid-route-style-selector.c.

References _route_style::action, action, DATA_COL, _route_style::menu_item, _GHidRouteStyleSelector::model, n, and style.

Referenced by ghid_main_menu_install_route_style_selector().

gboolean ghid_route_style_selector_select_style ( GHidRouteStyleSelector rss,
RouteStyleType rst 
)

Selects a route style and emits a select-style signal.

Parameters:
[in]rssThe selector to be acted on
[in]rstThe style to select
Returns:
TRUE if a style was selected, FALSE otherwise

Definition at line 550 of file ghid-route-style-selector.c.

References _route_style::action, _GHidRouteStyleSelector::active_style, DATA_COL, FALSE, ghid_route_style_selector_signals, _GHidRouteStyleSelector::model, _route_style::rst, SELECT_STYLE_SIGNAL, _route_style::sig_id, style, and TRUE.

Referenced by ghid_route_style_selector_edit_dialog(), and ghid_sync_with_new_layout().

void ghid_route_style_selector_sync ( GHidRouteStyleSelector rss,
Coord  Thick,
Coord  Hole,
Coord  Diameter,
Coord  Keepaway 
)

Sets a GHidRouteStyleSelector selection to given values.

Function Description
Given the line thickness, via size and clearance values of a route style, this function selects a route style with the given values. If there is no such style registered with the selector, nothing will happen. This function does not emit any signals.
Parameters:
[in]rssThe selector to be acted on
[in]ThickCoord to match selection to
[in]HoleCoord to match selection to
[in]DiameterCoord to match selection to
[in]KeepawayCoord to match selection to

Definition at line 605 of file ghid-route-style-selector.c.

References _route_style::action, _GHidRouteStyleSelector::active_style, DATA_COL, RouteStyleType::Diameter, FALSE, RouteStyleType::Hole, RouteStyleType::Keepaway, _GHidRouteStyleSelector::model, _GHidRouteStyleSelector::null_action, _route_style::rst, _route_style::sig_id, style, RouteStyleType::Thick, and TRUE.

Referenced by RouteStylesChanged().