gschem

x_pagesel.c File Reference

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

Go to the source code of this file.

Defines

#define DEFINE_POPUP_CALLBACK(name, action)

Enumerations

enum  { COLUMN_PAGE, COLUMN_NAME, COLUMN_CHANGED, NUM_COLUMNS }

Functions

static void x_pagesel_callback_response (GtkDialog *dialog, gint arg1, gpointer user_data)
 Callback for page manager response.
void x_pagesel_open (GSCHEM_TOPLEVEL *w_current)
 Open the page manager dialog.
void x_pagesel_close (GSCHEM_TOPLEVEL *w_current)
 Close the page manager dialog.
void x_pagesel_update (GSCHEM_TOPLEVEL *w_current)
 Update the list and status of toplevel's pages.
static void pagesel_class_init (PageselClass *klass)
static void pagesel_init (Pagesel *pagesel)
static void pagesel_popup_menu (Pagesel *pagesel, GdkEventButton *event)
 Popup context-sensitive menu.
static void pagesel_callback_selection_changed (GtkTreeSelection *selection, gpointer user_data)
static gboolean pagesel_callback_button_pressed (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
static gboolean pagesel_callback_popup_menu (GtkWidget *widget, gpointer user_data)
static void pagesel_callback_popup_new_page (GtkMenuItem *menuitem, gpointer user_data)
static void pagesel_callback_popup_open_page (GtkMenuItem *menuitem, gpointer user_data)
static void pagesel_callback_popup_save_page (GtkMenuItem *menuitem, gpointer user_data)
static void pagesel_callback_popup_close_page (GtkMenuItem *menuitem, gpointer user_data)
static void pagesel_callback_popup_discard_page (GtkMenuItem *menuitem, gpointer user_data)
static void notify_gschem_toplevel_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data)
 Handler for the notify::gschem-toplevel signal of GschemDialog.
GType pagesel_get_type ()
static void add_page (GtkTreeModel *model, GtkTreeIter *parent, GedaPageList *pages, PAGE *page)
 Update tree model of pagesel's treeview.
static void select_page (GtkTreeView *treeview, GtkTreeIter *parent, PAGE *page)
void pagesel_update (Pagesel *pagesel)

Define Documentation

#define DEFINE_POPUP_CALLBACK (   name,
  action 
)
Value:
static void                                                       \
pagesel_callback_popup_ ## name (GtkMenuItem *menuitem,           \
                                 gpointer user_data)              \
{                                                                 \
  i_callback_ ## action (GSCHEM_DIALOG (user_data)->w_current, 0, NULL); \
}

Definition at line 211 of file x_pagesel.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
COLUMN_PAGE 
COLUMN_NAME 
COLUMN_CHANGED 
NUM_COLUMNS 

Definition at line 132 of file x_pagesel.c.


Function Documentation

static void x_pagesel_callback_response ( GtkDialog *  dialog,
gint  arg1,
gpointer  user_data 
) [static]
Function Description
Handles response arg1 of the page manager dialog dialog.
Parameters:
[in]dialogGtkDialog that issues callback.
[in]arg1Response argument of page manager dialog.
[in]user_dataPointer to relevant GSCHEM_TOPLEVEL structure.

Definition at line 110 of file x_pagesel.c.

Here is the call graph for this function:

void x_pagesel_open ( GSCHEM_TOPLEVEL w_current)
Function Description
Opens the page manager dialog for toplevel if it is not already. In this last case, it raises the dialog.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object to open page manager for.

Definition at line 50 of file x_pagesel.c.

Here is the call graph for this function:

void x_pagesel_close ( GSCHEM_TOPLEVEL w_current)
Function Description
Closes the page manager dialog associated with toplevel.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object to close page manager for.

Definition at line 77 of file x_pagesel.c.

void x_pagesel_update ( GSCHEM_TOPLEVEL w_current)
Function Description
Updates the list and status of toplevel\'s pages if the page manager dialog is opened.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL object to update.

Definition at line 94 of file x_pagesel.c.

Here is the call graph for this function:

static void pagesel_class_init ( PageselClass klass) [static]
Todo:
Finish function documentation!!!
Function Description

Definition at line 347 of file x_pagesel.c.

static void pagesel_init ( Pagesel pagesel) [static]
Todo:
Finish function documentation!!!
Function Description

Definition at line 356 of file x_pagesel.c.

Here is the call graph for this function:

static void pagesel_popup_menu ( Pagesel pagesel,
GdkEventButton *  event 
) [static]
Function Description
Pops up a context-sensitive menu.

event can be NULL if the popup is triggered by a key binding instead of a mouse click.

Parameters:
[in]pageselThe Pagesel object.
[in]eventMouse click event info.

Definition at line 236 of file x_pagesel.c.

Here is the call graph for this function:

static void pagesel_callback_selection_changed ( GtkTreeSelection *  selection,
gpointer  user_data 
) [static]
Todo:
Finish function documentation!!!
Function Description

Definition at line 151 of file x_pagesel.c.

Here is the call graph for this function:

static gboolean pagesel_callback_button_pressed ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  user_data 
) [static]
Todo:
Finish function documentation!!!
Function Description

Definition at line 181 of file x_pagesel.c.

Here is the call graph for this function:

static gboolean pagesel_callback_popup_menu ( GtkWidget *  widget,
gpointer  user_data 
) [static]
Todo:
Finish function documentation!!!
Function Description

Definition at line 201 of file x_pagesel.c.

Here is the call graph for this function:

static void pagesel_callback_popup_new_page ( GtkMenuItem *  menuitem,
gpointer  user_data 
) [static]

Definition at line 219 of file x_pagesel.c.

static void pagesel_callback_popup_open_page ( GtkMenuItem *  menuitem,
gpointer  user_data 
) [static]

Definition at line 220 of file x_pagesel.c.

static void pagesel_callback_popup_save_page ( GtkMenuItem *  menuitem,
gpointer  user_data 
) [static]

Definition at line 221 of file x_pagesel.c.

static void pagesel_callback_popup_close_page ( GtkMenuItem *  menuitem,
gpointer  user_data 
) [static]

Definition at line 222 of file x_pagesel.c.

static void pagesel_callback_popup_discard_page ( GtkMenuItem *  menuitem,
gpointer  user_data 
) [static]

Definition at line 223 of file x_pagesel.c.

static void notify_gschem_toplevel_cb ( GObject *  gobject,
GParamSpec *  arg1,
gpointer  user_data 
) [static]
Function Description

When the gschem-toplevel property is set on the parent GschemDialog, we should update the pagesel dialog.

Parameters:
[in]gobjectthe object which received the signal.
[in]arg1the GParamSpec of the property which changed
[in]user_datauser data set when the signal handler was connected.

Definition at line 302 of file x_pagesel.c.

Here is the call graph for this function:

GType pagesel_get_type ( void  )
Todo:
Finish function documentation!!!
Function Description

Definition at line 317 of file x_pagesel.c.

Here is the call graph for this function:

static void add_page ( GtkTreeModel *  model,
GtkTreeIter *  parent,
GedaPageList *  pages,
PAGE *  page 
) [static]
Function Description
Updates the tree model of pagesel\'s treeview.

Right now, each time it is called, it rebuilds all the model from the list of pages passed in. It is a recursive function to populate the tree store

Parameters:
[in]modelGtkTreeModel to update.
[in]parentGtkTreeIter pointer to tree root.
[in]pagesGedaPageList of pages for this toplevel.
[in]pageThe PAGE object to update tree model from.

Definition at line 499 of file x_pagesel.c.

static void select_page ( GtkTreeView *  treeview,
GtkTreeIter *  parent,
PAGE *  page 
) [static]
Todo:
Finish function documentation!!!
Function Description
Recursive function to select the current page in the treeview

Definition at line 535 of file x_pagesel.c.

void pagesel_update ( Pagesel pagesel)
Todo:
Finish function documentation!!!
Function Description

Definition at line 569 of file x_pagesel.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines