#include "ut_compiler.h"
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdk.h>
#include "xap_GtkUtils.h"
#include "xap_GtkStyle.h"
#include "xap_UnixTableWidget.h"
#include "ut_debugmsg.h"
#include "ut_assert.h"
Enumerations | |
enum | { SELECTED, LAST_SIGNAL } |
Functions | |
ABI_W_NO_CONST_QUAL static ABI_W_POP 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, cairo_t *cr, 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) |
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) |
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.
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, _AbiTable::handlers, _AbiTable::icon, init_cols, init_rows, my_max(), on_button_release_event(), on_drawing_area_event(), on_key_event(), on_leave_event(), on_motion_notify_event(), on_pressed(), _AbiTable::selected_cols, _AbiTable::selected_rows, _AbiTable::style_context, _AbiTable::szCancel, _AbiTable::szTable, text, _AbiTable::total_cols, _AbiTable::total_rows, UT_DEBUGMSG, widget_tb_insert_table_xpm, _AbiTable::window, _AbiTable::window_label, _AbiTable::window_vbox, and XAP_GtkStyle_get_style().
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(), _AbiTable::selected_cols, _AbiTable::selected_rows, size, _AbiTable::szCancel, _AbiTable::szTable, text, _AbiTable::total_cols, _AbiTable::total_rows, UT_return_if_fail, _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().
ABI_W_NO_CONST_QUAL static ABI_W_POP 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, | |
cairo_t * | cr, | |||
gpointer | user_data | |||
) | [static] |
References cell_height, cell_width, cells_to_pixels(), _AbiTable::selected_cols, _AbiTable::selected_rows, _AbiTable::style_context, _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(), 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(), 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, popup_grab_on_window(), 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] |
References XAP_gdk_keyboard_grab(), XAP_gdk_pointer_grab(), and XAP_gdk_pointer_ungrab().
Referenced by on_pressed().
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] |
Referenced by abi_table_init().