gschem

x_event.c File Reference

#include <config.h>
#include <stdio.h>
#include <math.h>
#include "gschem.h"
#include <gdk/gdkkeysyms.h>
Include dependency graph for x_event.c:

Go to the source code of this file.

Functions

gint x_event_expose (GtkWidget *widget, GdkEventExpose *event, GSCHEM_TOPLEVEL *w_current)
gint x_event_button_pressed (GtkWidget *widget, GdkEventButton *event, GSCHEM_TOPLEVEL *w_current)
gint x_event_button_released (GtkWidget *widget, GdkEventButton *event, GSCHEM_TOPLEVEL *w_current)
gint x_event_motion (GtkWidget *widget, GdkEventMotion *event, GSCHEM_TOPLEVEL *w_current)
gboolean x_event_configure (GtkWidget *widget, GdkEventConfigure *event, gpointer user_data)
 Updates the GSCHEM_TOPLEVEL and display when drawing area is configured.
void x_manual_resize (GSCHEM_TOPLEVEL *w_current)
void x_event_hschanged (GtkAdjustment *adj, GSCHEM_TOPLEVEL *w_current)
void x_event_vschanged (GtkAdjustment *adj, GSCHEM_TOPLEVEL *w_current)
gint x_event_enter (GtkWidget *widget, GdkEventCrossing *event, GSCHEM_TOPLEVEL *w_current)
static void get_snapped_pointer (GSCHEM_TOPLEVEL *w_current, int *wx, int *wy)
 Get a snapped pointer position in world coordinates.
gboolean x_event_key (GtkWidget *widget, GdkEventKey *event, GSCHEM_TOPLEVEL *w_current)
gint x_event_scroll (GtkWidget *widget, GdkEventScroll *event, GSCHEM_TOPLEVEL *w_current)
gboolean x_event_get_pointer_position (GSCHEM_TOPLEVEL *w_current, gboolean snapped, gint *wx, gint *wy)
 get the pointer position of a given GSCHEM_TOPLEVEL

Variables

int start_pan_x
int start_pan_y
int throttle = 0

Function Documentation

gint x_event_expose ( GtkWidget *  widget,
GdkEventExpose *  event,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 50 of file x_event.c.

Here is the call graph for this function:

gint x_event_button_pressed ( GtkWidget *  widget,
GdkEventButton *  event,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Todo:
change state name?

Definition at line 93 of file x_event.c.

Here is the call graph for this function:

gint x_event_button_released ( GtkWidget *  widget,
GdkEventButton *  event,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 525 of file x_event.c.

Here is the call graph for this function:

gint x_event_motion ( GtkWidget *  widget,
GdkEventMotion *  event,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 727 of file x_event.c.

Here is the call graph for this function:

gboolean x_event_configure ( GtkWidget *  widget,
GdkEventConfigure *  event,
gpointer  user_data 
)
Function Description
This is the callback function connected to the configure event of the drawing area of the main window.

It updates the size of the backingstore for the associated toplevel structure (creates a new pixmap) and re-pans each of its pages to keep their contents centered in the drawing area.

When the window is maximised, the zoom of every page is changed to best fit the previously displayed area of the page in the new area. Otherwise the current zoom level is left unchanged.

Parameters:
[in]widgetThe drawing area which received the signal.
[in]eventThe event structure of signal configure-event.
[in]user_dataThe toplevel environment as user data.
Returns:
FALSE to propagate the event further.

Definition at line 933 of file x_event.c.

Here is the call graph for this function:

void x_manual_resize ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description
Note:
this is used during an open command to setup the correct sizes

Definition at line 1022 of file x_event.c.

void x_event_hschanged ( GtkAdjustment *  adj,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 1058 of file x_event.c.

Here is the call graph for this function:

void x_event_vschanged ( GtkAdjustment *  adj,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 1090 of file x_event.c.

Here is the call graph for this function:

gint x_event_enter ( GtkWidget *  widget,
GdkEventCrossing *  event,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 1129 of file x_event.c.

static void get_snapped_pointer ( GSCHEM_TOPLEVEL w_current,
int *  wx,
int *  wy 
) [static]
Function Description
Queries GTK for the mouse location in world coordinates, then snaps it to the grid.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object.
[out]wxReturn location for the snapped X coordinate.
[out]wyReturn location for the snapped Y coordiante.

Definition at line 1147 of file x_event.c.

Here is the call graph for this function:

gboolean x_event_key ( GtkWidget *  widget,
GdkEventKey *  event,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Definition at line 1163 of file x_event.c.

Here is the call graph for this function:

gint x_event_scroll ( GtkWidget *  widget,
GdkEventScroll *  event,
GSCHEM_TOPLEVEL w_current 
)
Todo:
Finish function documentation!!!
Function Description

Todo:
Change "HOTKEY" TO new "MOUSE" specifier?

Definition at line 1270 of file x_event.c.

Here is the call graph for this function:

gboolean x_event_get_pointer_position ( GSCHEM_TOPLEVEL w_current,
gboolean  snapped,
gint *  wx,
gint *  wy 
)
Function Description
This function gets the pointer position of the drawing area of the current workspace GSCHEM_TOPLEVEL. The flag snapped specifies whether the pointer position should be snapped to the current grid.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object.
[in]snappedAn option flag to specify the wished coords
[out]wxsnapped/unsnapped world x coordinate
[out]wysnapped/unsnapped world y coordinate
Returns:
Returns TRUE if the pointer position is inside the drawing area.

Definition at line 1369 of file x_event.c.

Here is the call graph for this function:


Variable Documentation

Definition at line 37 of file x_event.c.

Definition at line 37 of file x_event.c.

int throttle = 0

Definition at line 38 of file x_event.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines