pcb 4.1.1
An interactive printed circuit board layout editor.
|
#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 "hid/common/trackball.h"
#include "gui-trackball.h"
Go to the source code of this file.
Enumerations | |
enum | { ROTATION_CHANGED, VIEW_2D_CHANGED, LAST_SIGNAL } |
Functions | |
static gboolean | button_press_cb (GtkWidget *widget, GdkEventButton *ev, gpointer userdata) |
static gboolean | button_release_cb (GtkWidget *widget, GdkEventButton *ev, gpointer userdata) |
static gboolean | motion_notify_cb (GtkWidget *widget, GdkEventMotion *ev, gpointer userdata) |
static gboolean | ghid_trackball_expose (GtkWidget *widget, GdkEventExpose *ev) |
static gboolean | view_2d_toggled_cb (GtkToggleButton *toggle, gpointer userdata) |
static GObject * | ghid_trackball_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) |
GObject constructor. | |
static void | ghid_trackball_finalize (GObject *object) |
GObject finalise handler. | |
static void | ghid_trackball_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) |
GObject property setter function. | |
static void | ghid_trackball_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) |
GObject property getter function. | |
static void | ghid_trackball_class_init (GhidTrackballClass *klass) |
GType class initialiser for GhidTrackball. | |
GType | ghid_trackball_get_type () |
Function to retrieve GhidTrackball's GType identifier. | |
GtkWidget * | ghid_trackball_new (void) |
Convenience function to create a new trackball widget. | |
Variables | |
static guint | ghid_trackball_signals [LAST_SIGNAL] = { 0 } |
static GObjectClass * | ghid_trackball_parent_class = NULL |
anonymous enum |
Definition at line 48 of file gui-trackball.c.
static gboolean button_press_cb | ( | GtkWidget * | widget, |
GdkEventButton * | ev, | ||
gpointer | userdata | ||
) | [static] |
Definition at line 60 of file gui-trackball.c.
References axis_to_quat(), _GhidTrackball::dragging, GHID_TRACKBALL, ghid_trackball_signals, _GhidTrackball::quart1, _GhidTrackball::quart2, ROTATION_CHANGED, TRUE, _GhidTrackball::x1, and _GhidTrackball::y1.
Referenced by ghid_trackball_constructor().
static gboolean button_release_cb | ( | GtkWidget * | widget, |
GdkEventButton * | ev, | ||
gpointer | userdata | ||
) | [static] |
Definition at line 96 of file gui-trackball.c.
References _GhidTrackball::dragging, FALSE, GHID_TRACKBALL, _GhidTrackball::quart1, _GhidTrackball::quart2, and TRUE.
Referenced by ghid_trackball_constructor().
static void ghid_trackball_class_init | ( | GhidTrackballClass * | klass | ) | [static] |
GType class initialiser for GhidTrackball.
[in] | klass | The GhidTrackballClass we are initialising |
Definition at line 368 of file gui-trackball.c.
References ghid_trackball_constructor(), ghid_trackball_finalize(), ghid_trackball_get_property(), ghid_trackball_parent_class, ghid_trackball_set_property(), ghid_trackball_signals, ROTATION_CHANGED, and VIEW_2D_CHANGED.
Referenced by ghid_trackball_get_type().
static GObject* ghid_trackball_constructor | ( | GType | type, |
guint | n_construct_properties, | ||
GObjectConstructParam * | construct_properties | ||
) | [static] |
GObject constructor.
[in] | type | The GType of object to be constructed |
[in] | n_construct_properties | Number of construct properties |
[in] | contruct_params | The construct properties |
Definition at line 246 of file gui-trackball.c.
References _, axis_to_quat(), button_press_cb(), button_release_cb(), _GhidTrackball::drawing_area, FALSE, GHID_TRACKBALL, ghid_trackball_expose(), ghid_trackball_parent_class, motion_notify_cb(), _GhidTrackball::quart1, _GhidTrackball::quart2, TRUE, _GhidTrackball::view_2d, and view_2d_toggled_cb().
Referenced by ghid_trackball_class_init().
static gboolean ghid_trackball_expose | ( | GtkWidget * | widget, |
GdkEventExpose * | ev | ||
) | [static] |
Definition at line 146 of file gui-trackball.c.
References FALSE, M_PI, and MIN.
Referenced by ghid_trackball_constructor().
static void ghid_trackball_finalize | ( | GObject * | object | ) | [static] |
GObject finalise handler.
[in] | widget | The GObject being finalized. |
Definition at line 304 of file gui-trackball.c.
References ghid_trackball_parent_class.
Referenced by ghid_trackball_class_init().
static void ghid_trackball_get_property | ( | GObject * | object, |
guint | property_id, | ||
GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
GObject property getter function.
[in] | object | The GObject whose properties we are getting |
[in] | property_id | The numeric id. under which the property was registered with g_object_class_install_property() |
[out] | value | The GValue in which to return the value of the property |
[in] | pspec | A GParamSpec describing the property being got |
Definition at line 347 of file gui-trackball.c.
Referenced by ghid_trackball_class_init().
GType ghid_trackball_get_type | ( | void | ) |
Function to retrieve GhidTrackball's GType identifier.
Definition at line 417 of file gui-trackball.c.
References ghid_trackball_class_init().
GtkWidget* ghid_trackball_new | ( | void | ) |
Convenience function to create a new trackball widget.
Definition at line 452 of file gui-trackball.c.
References GHID_TYPE_TRACKBALL.
Referenced by ghid_build_pcb_top_window().
static void ghid_trackball_set_property | ( | GObject * | object, |
guint | property_id, | ||
const GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
GObject property setter function.
[in] | object | The GObject whose properties we are setting |
[in] | property_id | The numeric id. under which the property was registered with g_object_class_install_property() |
[in] | value | The GValue the property is being set from |
[in] | pspec | A GParamSpec describing the property being set |
Definition at line 323 of file gui-trackball.c.
Referenced by ghid_trackball_class_init().
static gboolean motion_notify_cb | ( | GtkWidget * | widget, |
GdkEventMotion * | ev, | ||
gpointer | userdata | ||
) | [static] |
Definition at line 116 of file gui-trackball.c.
References add_quats(), _GhidTrackball::dragging, GHID_TRACKBALL, ghid_trackball_signals, _GhidTrackball::quart1, _GhidTrackball::quart2, ROTATION_CHANGED, trackball(), TRUE, _GhidTrackball::x1, and _GhidTrackball::y1.
Referenced by ghid_trackball_constructor().
static gboolean view_2d_toggled_cb | ( | GtkToggleButton * | toggle, |
gpointer | userdata | ||
) | [static] |
Definition at line 207 of file gui-trackball.c.
References axis_to_quat(), _GhidTrackball::drawing_area, FALSE, GHID_TRACKBALL, ghid_trackball_signals, _GhidTrackball::quart1, ROTATION_CHANGED, TRUE, and VIEW_2D_CHANGED.
Referenced by ghid_trackball_constructor().
GObjectClass* ghid_trackball_parent_class = NULL [static] |
Definition at line 56 of file gui-trackball.c.
Referenced by ghid_trackball_class_init(), ghid_trackball_constructor(), and ghid_trackball_finalize().
guint ghid_trackball_signals[LAST_SIGNAL] = { 0 } [static] |
Definition at line 55 of file gui-trackball.c.
Referenced by button_press_cb(), ghid_trackball_class_init(), motion_notify_cb(), and view_2d_toggled_cb().