gschem
|
#include <config.h>
#include <stdio.h>
#include "gschem.h"
#include <gdk/gdkkeysyms.h>
Go to the source code of this file.
Defines | |
#define | DIALOG_DATA_SELECTION "current-selection" |
#define | CELL_RENDERER_MULTI_LINE_TEXT_PATH "cell-renderer-multi-line-text-path" |
Enumerations | |
enum | { PROP_EDIT_CANCELED = 1 } |
enum | { PROP_OBJECT = 1 } |
enum | { COLUMN_ATTRIBUTE, NUM_COLUMNS } |
Functions | |
static void | callback_selection_changed (SELECTION *selection, gpointer user_data) |
Update the multiattrib editor dialog when the page's selection changes. | |
static void | callback_selection_finalized (gpointer data, GObject *where_the_object_was) |
Update the dialog when the current page's SELECTION object is destroyed. | |
static void | connect_selection (Multiattrib *multiattrib, SELECTION *selection) |
Add link between multiattrib dialog and current selection. | |
static void | disconnect_selection (Multiattrib *multiattrib) |
Remove the link between multiattrib dialog and selection. | |
static void | multiattrib_callback_response (GtkDialog *dialog, gint arg1, gpointer user_data) |
Process the response returned by the multi-attribte dialog. | |
void | x_multiattrib_open (GSCHEM_TOPLEVEL *w_current) |
Open multiple attribute editor dialog. | |
void | x_multiattrib_close (GSCHEM_TOPLEVEL *w_current) |
Close the multiattrib dialog. | |
void | x_multiattrib_update (GSCHEM_TOPLEVEL *w_current) |
Update the multiattrib editor dialog for a GSCHEM_TOPLEVEL. | |
static void | celltextview_class_init (CellTextViewClass *klass) |
static void | celltextview_init (CellTextView *celltextview) |
static void | celltextview_cell_editable_init (GtkCellEditableIface *iface) |
static void | celltextview_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) |
static void | celltextview_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) |
static gboolean | celltextview_key_press_event (GtkWidget *widget, GdkEventKey *key_event, gpointer data) |
static void | celltextview_start_editing (GtkCellEditable *cell_editable, GdkEvent *event) |
GType | celltextview_get_type () |
static void | cellrenderermultilinetext_class_init (CellRendererMultiLineTextClass *klass) |
static void | cellrenderermultilinetext_editing_done (GtkCellEditable *cell_editable, gpointer user_data) |
static gboolean | cellrenderermultilinetext_focus_out_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) |
static GtkCellEditable * | cellrenderermultilinetext_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *background_area, GdkRectangle *cell_area, GtkCellRendererState flags) |
GType | cellrenderermultilinetext_get_type () |
static void | multiattrib_class_init (MultiattribClass *klass) |
GType class initialiser for Multiattrib. | |
static void | multiattrib_init (Multiattrib *multiattrib) |
GType instance initialiser for Multiattrib. | |
static void | multiattrib_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) |
GObject property setter function. | |
static void | multiattrib_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) |
GObject property getter function. | |
static void | multiattrib_popup_menu (Multiattrib *multiattrib, GdkEventButton *event) |
Popup a context-sensitive menu. | |
static void | multiattrib_action_add_attribute (GSCHEM_TOPLEVEL *w_current, OBJECT *object, Multiattrib *multiattrib, const gchar *name, const gchar *value, gint visible, gint show_name_value) |
static void | multiattrib_action_duplicate_attribute (GSCHEM_TOPLEVEL *w_current, OBJECT *object, OBJECT *o_attrib) |
static void | multiattrib_action_promote_attribute (GSCHEM_TOPLEVEL *w_current, OBJECT *object, OBJECT *o_attrib) |
static void | multiattrib_action_delete_attribute (GSCHEM_TOPLEVEL *w_current, OBJECT *o_attrib) |
static void | multiattrib_column_set_data_name (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) |
static void | multiattrib_column_set_data_value (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) |
static void | multiattrib_column_set_data_visible (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) |
static void | multiattrib_column_set_data_show_name (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) |
static void | multiattrib_column_set_data_show_value (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) |
static void | update_row_display (GtkTreeModel *model, GtkTreeIter *iter) |
Requests an update of the display of a row. | |
static void | multiattrib_callback_edited_name (GtkCellRendererText *cellrenderertext, gchar *arg1, gchar *arg2, gpointer user_data) |
static void | multiattrib_callback_edited_value (GtkCellRendererText *cell_renderer, gchar *arg1, gchar *arg2, gpointer user_data) |
static void | multiattrib_callback_toggled_visible (GtkCellRendererToggle *cell_renderer, gchar *path, gpointer user_data) |
static void | multiattrib_callback_toggled_show_name (GtkCellRendererToggle *cell_renderer, gchar *path, gpointer user_data) |
static void | multiattrib_callback_toggled_show_value (GtkCellRendererToggle *cell_renderer, gchar *path, gpointer user_data) |
static gboolean | multiattrib_callback_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data) |
static gboolean | multiattrib_callback_button_pressed (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
static gboolean | multiattrib_callback_popup_menu (GtkWidget *widget, gpointer user_data) |
static void | multiattrib_callback_popup_duplicate (GtkMenuItem *menuitem, gpointer user_data) |
static void | multiattrib_callback_popup_promote (GtkMenuItem *menuitem, gpointer user_data) |
static void | multiattrib_callback_popup_delete (GtkMenuItem *menuitem, gpointer user_data) |
static gboolean | multiattrib_callback_value_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data) |
static void | multiattrib_callback_value_grab_focus (GtkWidget *widget, gpointer user_data) |
GtkWidget "grab-focus" signal handler. | |
static void | multiattrib_callback_button_add (GtkButton *button, gpointer user_data) |
static void | multiattrib_init_attrib_names (GtkCombo *combo) |
static void | multiattrib_init_visible_types (GtkOptionMenu *optionmenu) |
static void | multiattrib_geometry_save (GschemDialog *dialog, GKeyFile *key_file, gchar *group_name) |
GschemDialog "geometry_save" class method handler. | |
static void | multiattrib_geometry_restore (GschemDialog *dialog, GKeyFile *key_file, gchar *group_name) |
GschemDialog "geometry_restore" class method handler. | |
GType | multiattrib_get_type () |
Function to retrieve Multiattrib's GType identifier. | |
static void | multiattrib_show_inherited_toggled (GtkToggleButton *button, gpointer user_data) |
Regenerate the attribute list when the visibility setting for inherited attributes changes. | |
void | multiattrib_update (Multiattrib *multiattrib) |
Update the multiattrib editor dialog's interface. | |
Variables | |
static GObjectClass * | multiattrib_parent_class = NULL |
#define DIALOG_DATA_SELECTION "current-selection" |
Definition at line 91 of file x_multiattrib.c.
#define CELL_RENDERER_MULTI_LINE_TEXT_PATH "cell-renderer-multi-line-text-path" |
Definition at line 465 of file x_multiattrib.c.
anonymous enum |
Definition at line 290 of file x_multiattrib.c.
anonymous enum |
Definition at line 624 of file x_multiattrib.c.
anonymous enum |
Definition at line 628 of file x_multiattrib.c.
static void callback_selection_changed | ( | SELECTION * | selection, |
gpointer | user_data | ||
) | [static] |
[in] | selection | The SELECTION object of page being edited. |
[in] | user_data | The multi-attribute editor dialog. |
Definition at line 49 of file x_multiattrib.c.
static void callback_selection_finalized | ( | gpointer | data, |
GObject * | where_the_object_was | ||
) | [static] |
[in] | data | Pointer to the multi-attrib dialog |
[in] | where_the_object_was | Pointer to where the object was just destroyed |
Definition at line 109 of file x_multiattrib.c.
static void connect_selection | ( | Multiattrib * | multiattrib, |
SELECTION * | selection | ||
) | [static] |
[in] | multiattrib | The Multiattrib dialog. |
[in] | selection | The selection to watch. |
Definition at line 128 of file x_multiattrib.c.
static void disconnect_selection | ( | Multiattrib * | multiattrib | ) | [static] |
[in] | multiattrib | The Multiattrib dialog. |
Definition at line 153 of file x_multiattrib.c.
static void multiattrib_callback_response | ( | GtkDialog * | dialog, |
gint | arg1, | ||
gpointer | user_data | ||
) | [static] |
[in] | dialog | The multi-attribute editor dialog. |
[in] | arg1 | The response ID. |
[in] | user_data | A pointer on the GSCHEM_TOPLEVEL environment. |
Definition at line 188 of file x_multiattrib.c.
void x_multiattrib_open | ( | GSCHEM_TOPLEVEL * | w_current | ) |
[in] | w_current | The GSCHEM_TOPLEVEL object. |
Definition at line 211 of file x_multiattrib.c.
void x_multiattrib_close | ( | GSCHEM_TOPLEVEL * | w_current | ) |
Closes the multiattrib dialog associated with w_current.
[in] | w_current | The GSCHEM_TOPLEVEL object. |
Definition at line 248 of file x_multiattrib.c.
void x_multiattrib_update | ( | GSCHEM_TOPLEVEL * | w_current | ) |
If the GSCHEM_TOPLEVEL has an open multiattrib dialog, switch to watching the current page's SELECTION object for changes.
[in] | w_current | The GSCHEM_TOPLEVEL object. |
Definition at line 267 of file x_multiattrib.c.
static void celltextview_class_init | ( | CellTextViewClass * | klass | ) | [static] |
This widget makes a 'GtkTextView' widget implements the 'GtkCellEditable' interface. It can then be used to renderer multi-line texts inside tree views ('GtkTreeView').
Definition at line 415 of file x_multiattrib.c.
static void celltextview_init | ( | CellTextView * | celltextview | ) | [static] |
Definition at line 437 of file x_multiattrib.c.
static void celltextview_cell_editable_init | ( | GtkCellEditableIface * | iface | ) | [static] |
Definition at line 447 of file x_multiattrib.c.
static void celltextview_set_property | ( | GObject * | object, |
guint | property_id, | ||
const GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
Definition at line 294 of file x_multiattrib.c.
static void celltextview_get_property | ( | GObject * | object, |
guint | property_id, | ||
GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
Definition at line 310 of file x_multiattrib.c.
static gboolean celltextview_key_press_event | ( | GtkWidget * | widget, |
GdkEventKey * | key_event, | ||
gpointer | data | ||
) | [static] |
Definition at line 332 of file x_multiattrib.c.
static void celltextview_start_editing | ( | GtkCellEditable * | cell_editable, |
GdkEvent * | event | ||
) | [static] |
Definition at line 361 of file x_multiattrib.c.
GType celltextview_get_type | ( | void | ) |
Definition at line 376 of file x_multiattrib.c.
static void cellrenderermultilinetext_class_init | ( | CellRendererMultiLineTextClass * | klass | ) | [static] |
GTK has no multi-line text cell renderer. This code adds one to be used in gschem code. It is inspired by the 'GtkCellRendererCombo' renderer of GTK 2.4 (LGPL).
Definition at line 614 of file x_multiattrib.c.
static void cellrenderermultilinetext_editing_done | ( | GtkCellEditable * | cell_editable, |
gpointer | user_data | ||
) | [static] |
Definition at line 530 of file x_multiattrib.c.
static gboolean cellrenderermultilinetext_focus_out_event | ( | GtkWidget * | widget, |
GdkEvent * | event, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 568 of file x_multiattrib.c.
static GtkCellEditable* cellrenderermultilinetext_start_editing | ( | GtkCellRenderer * | cell, |
GdkEvent * | event, | ||
GtkWidget * | widget, | ||
const gchar * | path, | ||
GdkRectangle * | background_area, | ||
GdkRectangle * | cell_area, | ||
GtkCellRendererState | flags | ||
) | [static] |
Definition at line 473 of file x_multiattrib.c.
GType cellrenderermultilinetext_get_type | ( | void | ) |
Definition at line 583 of file x_multiattrib.c.
static void multiattrib_class_init | ( | MultiattribClass * | klass | ) | [static] |
GType class initialiser for Multiattrib. We override our parent virtual class methods as needed and register our GObject properties.
[in] | klass | The MultiattribClass we are initialising |
Definition at line 1706 of file x_multiattrib.c.
static void multiattrib_init | ( | Multiattrib * | multiattrib | ) | [static] |
GType instance initialiser for Multiattrib. Create and setup the widgets which make up the dialog.
[in] | multiattrib | The Multiattrib we are initialising |
Forcing the size request is a horrible band-aid and should be replaced by a better heuristic.
Definition at line 1749 of file x_multiattrib.c.
static void multiattrib_set_property | ( | GObject * | object, |
guint | property_id, | ||
const GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
[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 2090 of file x_multiattrib.c.
static void multiattrib_get_property | ( | GObject * | object, |
guint | property_id, | ||
GValue * | value, | ||
GParamSpec * | pspec | ||
) | [static] |
[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 2119 of file x_multiattrib.c.
static void multiattrib_popup_menu | ( | Multiattrib * | multiattrib, |
GdkEventButton * | event | ||
) | [static] |
[in] | multiattrib | The Multiattrib object. |
[in] | event | Mouse event. |
Definition at line 1533 of file x_multiattrib.c.
static void multiattrib_action_add_attribute | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | object, | ||
Multiattrib * | multiattrib, | ||
const gchar * | name, | ||
const gchar * | value, | ||
gint | visible, | ||
gint | show_name_value | ||
) | [static] |
Definition at line 655 of file x_multiattrib.c.
static void multiattrib_action_duplicate_attribute | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | object, | ||
OBJECT * | o_attrib | ||
) | [static] |
Definition at line 688 of file x_multiattrib.c.
static void multiattrib_action_promote_attribute | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | object, | ||
OBJECT * | o_attrib | ||
) | [static] |
Definition at line 710 of file x_multiattrib.c.
static void multiattrib_action_delete_attribute | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | o_attrib | ||
) | [static] |
Definition at line 744 of file x_multiattrib.c.
static void multiattrib_column_set_data_name | ( | GtkTreeViewColumn * | tree_column, |
GtkCellRenderer * | cell, | ||
GtkTreeModel * | tree_model, | ||
GtkTreeIter * | iter, | ||
gpointer | data | ||
) | [static] |
Definition at line 758 of file x_multiattrib.c.
static void multiattrib_column_set_data_value | ( | GtkTreeViewColumn * | tree_column, |
GtkCellRenderer * | cell, | ||
GtkTreeModel * | tree_model, | ||
GtkTreeIter * | iter, | ||
gpointer | data | ||
) | [static] |
Definition at line 791 of file x_multiattrib.c.
static void multiattrib_column_set_data_visible | ( | GtkTreeViewColumn * | tree_column, |
GtkCellRenderer * | cell, | ||
GtkTreeModel * | tree_model, | ||
GtkTreeIter * | iter, | ||
gpointer | data | ||
) | [static] |
Definition at line 824 of file x_multiattrib.c.
static void multiattrib_column_set_data_show_name | ( | GtkTreeViewColumn * | tree_column, |
GtkCellRenderer * | cell, | ||
GtkTreeModel * | tree_model, | ||
GtkTreeIter * | iter, | ||
gpointer | data | ||
) | [static] |
Definition at line 854 of file x_multiattrib.c.
static void multiattrib_column_set_data_show_value | ( | GtkTreeViewColumn * | tree_column, |
GtkCellRenderer * | cell, | ||
GtkTreeModel * | tree_model, | ||
GtkTreeIter * | iter, | ||
gpointer | data | ||
) | [static] |
Definition at line 884 of file x_multiattrib.c.
static void update_row_display | ( | GtkTreeModel * | model, |
GtkTreeIter * | iter | ||
) | [static] |
It emits the 'row_changed' signal on the pointed row.
[in] | model | A GtkTreeModel. |
[in] | iter | A valid GtkTreeIter pointing to the changed row. |
Definition at line 920 of file x_multiattrib.c.
static void multiattrib_callback_edited_name | ( | GtkCellRendererText * | cellrenderertext, |
gchar * | arg1, | ||
gchar * | arg2, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 935 of file x_multiattrib.c.
static void multiattrib_callback_edited_value | ( | GtkCellRendererText * | cell_renderer, |
gchar * | arg1, | ||
gchar * | arg2, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 999 of file x_multiattrib.c.
static void multiattrib_callback_toggled_visible | ( | GtkCellRendererToggle * | cell_renderer, |
gchar * | path, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 1053 of file x_multiattrib.c.
static void multiattrib_callback_toggled_show_name | ( | GtkCellRendererToggle * | cell_renderer, |
gchar * | path, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 1096 of file x_multiattrib.c.
static void multiattrib_callback_toggled_show_value | ( | GtkCellRendererToggle * | cell_renderer, |
gchar * | path, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 1144 of file x_multiattrib.c.
static gboolean multiattrib_callback_key_pressed | ( | GtkWidget * | widget, |
GdkEventKey * | event, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 1192 of file x_multiattrib.c.
static gboolean multiattrib_callback_button_pressed | ( | GtkWidget * | widget, |
GdkEventButton * | event, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 1238 of file x_multiattrib.c.
static gboolean multiattrib_callback_popup_menu | ( | GtkWidget * | widget, |
gpointer | user_data | ||
) | [static] |
Definition at line 1258 of file x_multiattrib.c.
static void multiattrib_callback_popup_duplicate | ( | GtkMenuItem * | menuitem, |
gpointer | user_data | ||
) | [static] |
Definition at line 1273 of file x_multiattrib.c.
static void multiattrib_callback_popup_promote | ( | GtkMenuItem * | menuitem, |
gpointer | user_data | ||
) | [static] |
Definition at line 1310 of file x_multiattrib.c.
static void multiattrib_callback_popup_delete | ( | GtkMenuItem * | menuitem, |
gpointer | user_data | ||
) | [static] |
Definition at line 1345 of file x_multiattrib.c.
static gboolean multiattrib_callback_value_key_pressed | ( | GtkWidget * | widget, |
GdkEventKey * | event, | ||
gpointer | user_data | ||
) | [static] |
Definition at line 1380 of file x_multiattrib.c.
static void multiattrib_callback_value_grab_focus | ( | GtkWidget * | widget, |
gpointer | user_data | ||
) | [static] |
Definition at line 1416 of file x_multiattrib.c.
static void multiattrib_callback_button_add | ( | GtkButton * | button, |
gpointer | user_data | ||
) | [static] |
Definition at line 1435 of file x_multiattrib.c.
static void multiattrib_init_attrib_names | ( | GtkCombo * | combo | ) | [static] |
Definition at line 1484 of file x_multiattrib.c.
static void multiattrib_init_visible_types | ( | GtkOptionMenu * | optionmenu | ) | [static] |
Definition at line 1507 of file x_multiattrib.c.
static void multiattrib_geometry_save | ( | GschemDialog * | dialog, |
GKeyFile * | key_file, | ||
gchar * | group_name | ||
) | [static] |
[in] | dialog | The GschemDialog to save the geometry of. |
[in] | key_file | The GKeyFile to save the geometry data to. |
[in] | group_name | The group name in the key file to store the data under. |
Definition at line 1619 of file x_multiattrib.c.
static void multiattrib_geometry_restore | ( | GschemDialog * | dialog, |
GKeyFile * | key_file, | ||
gchar * | group_name | ||
) | [static] |
[in] | dialog | The GschemDialog to restore the geometry of. |
[in] | key_file | The GKeyFile to save the geometry data to. |
[in] | group_name | The group name in the key file to store the data under. |
Definition at line 1644 of file x_multiattrib.c.
GType multiattrib_get_type | ( | void | ) |
Function to retrieve Multiattrib's GType identifier. Upon first call, this registers Multiattrib in the GType system. Subsequently it returns the saved value from its first execution.
Definition at line 1672 of file x_multiattrib.c.
static void multiattrib_show_inherited_toggled | ( | GtkToggleButton * | button, |
gpointer | user_data | ||
) | [static] |
void multiattrib_update | ( | Multiattrib * | multiattrib | ) |
Update the dialog to reflect the attributes of the object. If there is no object set, the dialog's controls are set insensitive.
[in] | multiattrib | The multi-attribute editor dialog. |
Definition at line 2146 of file x_multiattrib.c.
GObjectClass* multiattrib_parent_class = NULL [static] |
Definition at line 633 of file x_multiattrib.c.