gschem

x_preview.c File Reference

#include <config.h>
#include <stdio.h>
#include "gschem.h"
Include dependency graph for x_preview.c:

Go to the source code of this file.

Defines

#define OVER_ZOOM_FACTOR   0.1

Enumerations

enum  { PROP_FILENAME = 1, PROP_BUFFER, PROP_ACTIVE }

Functions

static void preview_class_init (PreviewClass *class)
static void preview_init (Preview *preview)
static void preview_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
static void preview_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
static void preview_dispose (GObject *self)
static void preview_callback_realize (GtkWidget *widget, gpointer user_data)
 Completes initialitation of the widget after realization.
static gboolean preview_callback_expose (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 Redraws the view when widget is exposed.
static gboolean preview_callback_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
 Handles the press on a mouse button.
static void preview_update (Preview *preview)
 Updates the preview widget.
GType preview_get_type ()
static gboolean preview_event_configure (GtkWidget *widget, GdkEventConfigure *event, gpointer user_data)
static gboolean preview_event_scroll (GtkWidget *widget, GdkEventScroll *event, GSCHEM_TOPLEVEL *w_current)

Variables

static GObjectClass * preview_parent_class = NULL

Define Documentation

#define OVER_ZOOM_FACTOR   0.1

Definition at line 39 of file x_preview.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
PROP_FILENAME 
PROP_BUFFER 
PROP_ACTIVE 

Definition at line 42 of file x_preview.c.


Function Documentation

static void preview_class_init ( PreviewClass class) [static]

Definition at line 294 of file x_preview.c.

Here is the call graph for this function:

static void preview_init ( Preview preview) [static]

Definition at line 358 of file x_preview.c.

Here is the call graph for this function:

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

Definition at line 431 of file x_preview.c.

Here is the call graph for this function:

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

Definition at line 475 of file x_preview.c.

static void preview_dispose ( GObject *  self) [static]

Definition at line 500 of file x_preview.c.

Here is the call graph for this function:

static void preview_callback_realize ( GtkWidget *  widget,
gpointer  user_data 
) [static]
Function Description
This function terminates the initialization of preview's GSCHEM_TOPLEVEL and TOPLEVEL environments after the widget has been realized.

It creates a preview page in the TOPLEVEL environment.

Parameters:
[in]widgetThe preview widget.
[in]user_dataUnused user data.

Definition at line 74 of file x_preview.c.

Here is the call graph for this function:

static gboolean preview_callback_expose ( GtkWidget *  widget,
GdkEventExpose *  event,
gpointer  user_data 
) [static]
Function Description
It redraws the preview pixmap every time the widget is exposed.
Parameters:
[in]widgetThe preview widget.
[in]eventThe event structure.
[in]user_dataUnused user data.
Returns:
FALSE to propagate the event further.

Definition at line 115 of file x_preview.c.

Here is the call graph for this function:

static gboolean preview_callback_button_press ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  user_data 
) [static]
Function Description
It handles the user inputs.

Three action are available: zoom in, pan and zoom out on preview display.

Parameters:
[in]widgetThe preview widget.
[in]eventThe event structure.
[in]user_dataUnused user data.
Returns:
FALSE to propagate the event further.

Definition at line 157 of file x_preview.c.

Here is the call graph for this function:

static void preview_update ( Preview preview) [static]
Function Description
This function update the preview: if the preview is active and a filename has been given, it opens the file and display it. Otherwise it display a blank page.
Parameters:
[in]previewThe preview widget.

Definition at line 200 of file x_preview.c.

Here is the call graph for this function:

GType preview_get_type ( void  )

Definition at line 268 of file x_preview.c.

Here is the call graph for this function:

static gboolean preview_event_configure ( GtkWidget *  widget,
GdkEventConfigure *  event,
gpointer  user_data 
) [static]

Definition at line 330 of file x_preview.c.

Here is the call graph for this function:

static gboolean preview_event_scroll ( GtkWidget *  widget,
GdkEventScroll *  event,
GSCHEM_TOPLEVEL w_current 
) [static]

Definition at line 347 of file x_preview.c.

Here is the call graph for this function:


Variable Documentation

GObjectClass* preview_parent_class = NULL [static]

Definition at line 48 of file x_preview.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines