pcb 4.1.1
An interactive printed circuit board layout editor.

gui-pinout-preview.c File Reference

#include "global.h"
#include "gui.h"
#include "copy.h"
#include "data.h"
#include "draw.h"
#include "mymem.h"
#include "move.h"
#include "rotate.h"
#include "gui-pinout-preview.h"
Include dependency graph for gui-pinout-preview.c:

Go to the source code of this file.

Defines

#define SENSIBLE_VIEW_SCALE   (100. / MIL_TO_COORD (150.))

Enumerations

enum  { PROP_ELEMENT_DATA = 1 }

Functions

static void pinout_set_view (GhidPinoutPreview *pinout)
static void pinout_set_data (GhidPinoutPreview *pinout, ElementType *element)
static void ghid_pinout_preview_constructed (GObject *object)
 GObject constructed.
static void ghid_pinout_preview_finalize (GObject *object)
 GObject finalise handler.
static void ghid_pinout_preview_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
 GObject property setter function.
static void ghid_pinout_preview_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
 GObject property getter function.
static void ghid_pinout_preview_class_init (GhidPinoutPreviewClass *klass)
 GType class initialiser for GhidPinoutPreview.
GType ghid_pinout_preview_get_type ()
 Function to retrieve GhidPinoutPreview's GType identifier.
GtkWidget * ghid_pinout_preview_new (ElementType *element)
 Convenience function to create a new pinout preview.
void ghid_pinout_preview_get_natural_size (GhidPinoutPreview *pinout, int *width, int *height)
 Query the natural size of a pinout preview.

Variables

static GObjectClass * ghid_pinout_preview_parent_class = NULL

Define Documentation

#define SENSIBLE_VIEW_SCALE   (100. / MIL_TO_COORD (150.))

Definition at line 51 of file gui-pinout-preview.c.

Referenced by pinout_set_view().


Enumeration Type Documentation

anonymous enum
Enumerator:
PROP_ELEMENT_DATA 

Definition at line 130 of file gui-pinout-preview.c.


Function Documentation

static void ghid_pinout_preview_class_init ( GhidPinoutPreviewClass klass) [static]

GType class initialiser for GhidPinoutPreview.

Function Description
GType class initialiser for GhidPinoutPreview. We override our parent virtual class methods as needed and register our GObject properties.
Parameters:
[in]klassThe GhidPinoutPreviewClass we are initialising

Definition at line 246 of file gui-pinout-preview.c.

References ghid_pinout_preview_constructed(), ghid_pinout_preview_expose(), ghid_pinout_preview_finalize(), ghid_pinout_preview_get_property(), ghid_pinout_preview_parent_class, ghid_pinout_preview_set_property(), and PROP_ELEMENT_DATA.

Referenced by ghid_pinout_preview_get_type().

Here is the call graph for this function:

static void ghid_pinout_preview_constructed ( GObject *  object) [static]

GObject constructed.

Function Description
Initialise the pinout preview object once it is constructed. Chain up in case the parent class wants to do anything too.
Parameters:
[in]objectThe pinout preview object

Definition at line 148 of file gui-pinout-preview.c.

References ghid_init_drawing_widget(), ghid_pinout_preview_parent_class, and gport.

Referenced by ghid_pinout_preview_class_init().

Here is the call graph for this function:

static void ghid_pinout_preview_finalize ( GObject *  object) [static]

GObject finalise handler.

Function Description
Just before the GhidPinoutPreview GObject is finalized, free our allocated data, and then chain up to the parent's finalize handler.
Parameters:
[in]widgetThe GObject being finalized.

Definition at line 168 of file gui-pinout-preview.c.

References GHID_PINOUT_PREVIEW, ghid_pinout_preview_parent_class, pinout, and pinout_set_data().

Referenced by ghid_pinout_preview_class_init().

Here is the call graph for this function:

void ghid_pinout_preview_get_natural_size ( GhidPinoutPreview pinout,
int *  width,
int *  height 
)

Query the natural size of a pinout preview.

Function Description
Convenience function to query the natural size of a pinout preview

Definition at line 330 of file gui-pinout-preview.c.

References _GhidPinoutPreview::h_pixels, and _GhidPinoutPreview::w_pixels.

Referenced by ghid_pinout_window_show().

static void ghid_pinout_preview_get_property ( GObject *  object,
guint  property_id,
GValue *  value,
GParamSpec *  pspec 
) [static]

GObject property getter function.

Function Description
Getter function for GhidPinoutPreview's GObject properties, "settings-name" and "toplevel".
Parameters:
[in]objectThe GObject whose properties we are getting
[in]property_idThe numeric id. under which the property was registered with g_object_class_install_property()
[out]valueThe GValue in which to return the value of the property
[in]pspecA GParamSpec describing the property being got

Definition at line 225 of file gui-pinout-preview.c.

Referenced by ghid_pinout_preview_class_init().

GType ghid_pinout_preview_get_type ( void  )

Function to retrieve GhidPinoutPreview's GType identifier.

Function Description
Function to retrieve GhidPinoutPreview's GType identifier. Upon first call, this registers the GhidPinoutPreview in the GType system. Subsequently it returns the saved value from its first execution.
Returns:
the GType identifier associated with GhidPinoutPreview.

Definition at line 278 of file gui-pinout-preview.c.

References ghid_pinout_preview_class_init().

Here is the call graph for this function:

GtkWidget* ghid_pinout_preview_new ( ElementType element)

Convenience function to create a new pinout preview.

Function Description
Convenience function which creates a GhidPinoutPreview.
Returns:
The GhidPinoutPreview created.

Definition at line 313 of file gui-pinout-preview.c.

References GHID_TYPE_PINOUT_PREVIEW.

Referenced by ghid_pinout_window_show().

static void ghid_pinout_preview_set_property ( GObject *  object,
guint  property_id,
const GValue *  value,
GParamSpec *  pspec 
) [static]

GObject property setter function.

Function Description
Setter function for GhidPinoutPreview's GObject properties, "settings-name" and "toplevel".
Parameters:
[in]objectThe GObject whose properties we are setting
[in]property_idThe numeric id. under which the property was registered with g_object_class_install_property()
[in]valueThe GValue the property is being set from
[in]pspecA GParamSpec describing the property being set

Definition at line 192 of file gui-pinout-preview.c.

References FALSE, GHID_PINOUT_PREVIEW, pinout, pinout_set_data(), PROP_ELEMENT_DATA, and window.

Referenced by ghid_pinout_preview_class_init().

Here is the call graph for this function:


Variable Documentation