#include <gtk/gtk.h>#include <gdk/gdkkeysyms.h>#include <gdk/gdk.h>#include <stdio.h>#include <stdlib.h>#include "xap_Gtk2Compat.h"#include "xap_UnixTableWidget.h"#include "ut_debugmsg.h"#include "ut_assert.h"#include "ut_string_class.h"Enumerations | |
| enum | { SELECTED, LAST_SIGNAL } |
Functions | |
| static void | g_cclosure_user_marshal_VOID__UINT_UINT (GClosure *closure, GValue *, guint n_param_values, const GValue *param_values, gpointer, gpointer marshal_data) |
| static void | cells_to_pixels (guint cols, guint rows, guint *w, guint *h) |
| static void | pixels_to_cells (guint w, guint h, guint *cols, guint *rows) |
| static void | abi_table_resize (AbiTable *table) |
| void | abi_table_set_selected (AbiTable *abi_table, guint rows, guint cols) |
| void | abi_table_get_selected (const AbiTable *abi_table, guint *rows, guint *cols) |
| void | abi_table_set_max_size (AbiTable *abi_table, guint rows, guint cols) |
| void | abi_table_set_labels (AbiTable *abi_table, const gchar *szTable, const gchar *szCancel) |
| void | abi_table_get_max_size (const AbiTable *abi_table, guint *rows, guint *cols) |
| static gboolean | on_drawing_area_event (GtkWidget *area, GdkEventExpose *, gpointer user_data) |
| static guint | my_max (guint a, guint b) |
| static gboolean | on_motion_notify_event (GtkWidget *window, GdkEventMotion *ev, gpointer user_data) |
| static void | restart_widget (AbiTable *table) |
| static void | emit_selected (AbiTable *table) |
| static gboolean | on_button_release_event (GtkWidget *, GdkEventButton *ev, gpointer user_data) |
| static gboolean | on_leave_event (GtkWidget *area, GdkEventCrossing *event, gpointer user_data) |
| static gboolean | popup_grab_on_window (GdkWindow *window, guint32 activate_time) |
| static void | on_pressed (GtkButton *button, gpointer user_data) |
| gboolean | on_key_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) |
| static void | register_stock_icon (void) |
| void | abi_table_set_icon (AbiTable *abi_table, GtkWidget *gtkImageIcon) |
| static void | abi_table_dispose (GObject *instance) |
| static void | abi_table_class_init (AbiTableClass *klass) |
| static void | abi_table_init (AbiTable *table) |
| GType | abi_table_get_type (void) |
| GtkWidget * | abi_table_new (void) |
| GtkWidget * | abi_table_get_label (AbiTable *abi_table) |
Variables | |
| static gint | abi_table_signals [LAST_SIGNAL] = { 0 } |
| static GtkWidgetClass * | abi_table_parent_class |
| static const guint | cell_width = 24 |
| static const guint | cell_height = 24 |
| static const guint | cell_spacing = 4 |
| static const guint | init_rows = 0 |
| static const guint | init_cols = 0 |
| static const char * | widget_tb_insert_table_xpm [] |
| static void abi_table_class_init | ( | AbiTableClass * | klass | ) | [static] |
References abi_table_parent_class, abi_table_signals, and g_cclosure_user_marshal_VOID__UINT_UINT().
Referenced by abi_table_get_type().
| static void abi_table_dispose | ( | GObject * | instance | ) | [static] |
References abi_table_parent_class, and ABITABLE_WIDGET.
| GtkWidget* abi_table_get_label | ( | AbiTable * | abi_table | ) |
References _AbiTable::label.
| void abi_table_get_max_size | ( | const AbiTable * | abi_table, | |
| guint * | rows, | |||
| guint * | cols | |||
| ) |
References _AbiTable::total_cols, _AbiTable::total_rows, and UT_return_if_fail.
| void abi_table_get_selected | ( | const AbiTable * | abi_table, | |
| guint * | rows, | |||
| guint * | cols | |||
| ) |
References _AbiTable::selected_cols, _AbiTable::selected_rows, and UT_return_if_fail.
| GType abi_table_get_type | ( | void | ) |
References abi_table_class_init(), abi_table_init(), and type.
Referenced by abi_table_new().
| static void abi_table_init | ( | AbiTable * | table | ) | [static] |
References abi_table_resize(), _AbiTable::area, _AbiTable::button_box, gtk_box_new(), _AbiTable::handlers, _AbiTable::icon, init_cols, init_rows, _AbiTable::label, my_max(), on_button_release_event(), on_drawing_area_event(), on_key_event(), on_leave_event(), on_motion_notify_event(), on_pressed(), register_stock_icon(), _AbiTable::selected_cols, _AbiTable::selected_rows, _AbiTable::stock_item, _AbiTable::szCancel, _AbiTable::szTable, _AbiTable::total_cols, _AbiTable::total_rows, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, UT_UTF8String::utf8_str(), _AbiTable::window, _AbiTable::window_label, and _AbiTable::window_vbox.
Referenced by abi_table_get_type().
| GtkWidget* abi_table_new | ( | void | ) |
References abi_table_get_type(), and UT_DEBUGMSG.
Referenced by EV_UnixToolbar::synthesize().
| static void abi_table_resize | ( | AbiTable * | table | ) | [static] |
References cells_to_pixels(), s, _AbiTable::selected_cols, _AbiTable::selected_rows, size, _AbiTable::szCancel, _AbiTable::szTable, _AbiTable::total_cols, _AbiTable::total_rows, UT_return_if_fail, UT_UTF8String::utf8_str(), _AbiTable::window, and _AbiTable::window_label.
Referenced by abi_table_init(), abi_table_set_max_size(), abi_table_set_selected(), on_key_event(), on_leave_event(), on_motion_notify_event(), and on_pressed().
| void abi_table_set_icon | ( | AbiTable * | abi_table, | |
| GtkWidget * | gtkImageIcon | |||
| ) |
References _AbiTable::icon.
| void abi_table_set_labels | ( | AbiTable * | abi_table, | |
| const gchar * | szTable, | |||
| const gchar * | szCancel | |||
| ) |
References _AbiTable::szCancel, and _AbiTable::szTable.
Referenced by EV_UnixToolbar::synthesize().
| void abi_table_set_max_size | ( | AbiTable * | abi_table, | |
| guint | rows, | |||
| guint | cols | |||
| ) |
References abi_table_resize(), _AbiTable::total_cols, _AbiTable::total_rows, and UT_return_if_fail.
| void abi_table_set_selected | ( | AbiTable * | abi_table, | |
| guint | rows, | |||
| guint | cols | |||
| ) |
References abi_table_resize(), _AbiTable::selected_cols, _AbiTable::selected_rows, and UT_return_if_fail.
| static void cells_to_pixels | ( | guint | cols, | |
| guint | rows, | |||
| guint * | w, | |||
| guint * | h | |||
| ) | [inline, static] |
References cell_height, cell_spacing, cell_width, and UT_return_if_fail.
Referenced by abi_table_resize(), and on_drawing_area_event().
| static void emit_selected | ( | AbiTable * | table | ) | [static] |
References abi_table_signals, restart_widget(), SELECTED, _AbiTable::selected_cols, _AbiTable::selected_rows, and _AbiTable::window.
Referenced by on_button_release_event(), and on_key_event().
| static void g_cclosure_user_marshal_VOID__UINT_UINT | ( | GClosure * | closure, | |
| GValue * | , | |||
| guint | n_param_values, | |||
| const GValue * | param_values, | |||
| gpointer | , | |||
| gpointer | marshal_data | |||
| ) | [static] |
References cc, UT_DEBUGMSG, UT_return_if_fail, and void().
Referenced by abi_table_class_init().
| static guint my_max | ( | guint | a, | |
| guint | b | |||
| ) | [inline, static] |
Referenced by abi_table_init(), on_key_event(), on_leave_event(), on_motion_notify_event(), and restart_widget().
| static gboolean on_button_release_event | ( | GtkWidget * | , | |
| GdkEventButton * | ev, | |||
| gpointer | user_data | |||
| ) | [static] |
References emit_selected(), and size.
Referenced by abi_table_init().
| static gboolean on_drawing_area_event | ( | GtkWidget * | area, | |
| GdkEventExpose * | , | |||
| gpointer | user_data | |||
| ) | [static] |
References cell_height, cell_width, cells_to_pixels(), _AbiTable::selected_cols, _AbiTable::selected_gc, _AbiTable::selected_rows, _AbiTable::total_cols, and _AbiTable::total_rows.
Referenced by abi_table_init().
| gboolean on_key_event | ( | GtkWidget * | widget, | |
| GdkEventKey * | event, | |||
| gpointer | user_data | |||
| ) |
References abi_table_resize(), emit_selected(), GDK_KEY_3270_Enter, GDK_KEY_Down, GDK_KEY_Escape, GDK_KEY_ISO_Enter, GDK_KEY_KP_Down, GDK_KEY_KP_Enter, GDK_KEY_KP_Left, GDK_KEY_KP_Right, GDK_KEY_KP_Space, GDK_KEY_KP_Up, GDK_KEY_Left, GDK_KEY_Return, GDK_KEY_Right, GDK_KEY_space, GDK_KEY_Up, my_max(), restart_widget(), _AbiTable::selected_cols, _AbiTable::selected_rows, _AbiTable::total_cols, and _AbiTable::total_rows.
Referenced by abi_table_init().
| static gboolean on_leave_event | ( | GtkWidget * | area, | |
| GdkEventCrossing * | event, | |||
| gpointer | user_data | |||
| ) | [static] |
References abi_table_resize(), gtk_widget_get_visible(), my_max(), _AbiTable::selected_cols, _AbiTable::selected_rows, _AbiTable::total_cols, _AbiTable::total_rows, and _AbiTable::window.
Referenced by abi_table_init().
| static gboolean on_motion_notify_event | ( | GtkWidget * | window, | |
| GdkEventMotion * | ev, | |||
| gpointer | user_data | |||
| ) | [static] |
References abi_table_resize(), my_max(), pixels_to_cells(), _AbiTable::selected_cols, _AbiTable::selected_rows, _AbiTable::total_cols, and _AbiTable::total_rows.
Referenced by abi_table_init().
| static void on_pressed | ( | GtkButton * | button, | |
| gpointer | user_data | |||
| ) | [static] |
References abi_table_resize(), _AbiTable::area, gtk_widget_get_allocation(), gtk_widget_get_window(), popup_grab_on_window(), _AbiTable::selected_gc, style, and _AbiTable::window.
Referenced by abi_table_init().
| static void pixels_to_cells | ( | guint | w, | |
| guint | h, | |||
| guint * | cols, | |||
| guint * | rows | |||
| ) | [inline, static] |
References cell_height, cell_spacing, cell_width, and UT_return_if_fail.
Referenced by on_motion_notify_event().
| static gboolean popup_grab_on_window | ( | GdkWindow * | window, | |
| guint32 | activate_time | |||
| ) | [static] |
Referenced by on_pressed().
| static void register_stock_icon | ( | void | ) | [static] |
References gchar, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
Referenced by abi_table_init().
| static void restart_widget | ( | AbiTable * | table | ) | [static] |
References init_cols, init_rows, my_max(), _AbiTable::selected_cols, _AbiTable::selected_rows, _AbiTable::total_cols, _AbiTable::total_rows, and _AbiTable::window.
Referenced by emit_selected(), and on_key_event().
GtkWidgetClass* abi_table_parent_class [static] |
Referenced by abi_table_class_init(), and abi_table_dispose().
gint abi_table_signals[LAST_SIGNAL] = { 0 } [static] |
Referenced by abi_table_class_init(), and emit_selected().
const guint cell_height = 24 [static] |
Referenced by cells_to_pixels(), on_drawing_area_event(), and pixels_to_cells().
const guint cell_spacing = 4 [static] |
Referenced by cells_to_pixels(), and pixels_to_cells().
const guint cell_width = 24 [static] |
Referenced by cells_to_pixels(), on_drawing_area_event(), and pixels_to_cells().
const guint init_cols = 0 [static] |
Referenced by abi_table_init(), and restart_widget().
const guint init_rows = 0 [static] |
Referenced by abi_table_init(), and restart_widget().
const char* widget_tb_insert_table_xpm[] [static] |
1.7.1