• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_UnixTableWidget.h

Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /*
00003  * xap_TableWidget.h
00004  * Copyright 2002, Joaquin Cuenca Abela
00005  *
00006  * Authors:
00007  *   Joaquin Cuenca Abela (e98cuenc@yahoo.com)
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Library General Public
00011  * License, version 2, as published by the Free Software Foundation.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Library General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Library General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00021  * 02110-1301 USA.
00022  */
00023 
00024 #ifndef ABI_TABLE_H
00025 #define ABI_TABLE_H
00026 
00027 #include <gtk/gtk.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 #define ABITABLE_TYPE_WIDGET     (abi_table_get_type ())
00034 #define ABITABLE_WIDGET(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), ABITABLE_TYPE_WIDGET, AbiTable))
00035 #define IS_ABITABLE_WIDGET(obj)  (G_TYPE_CHECK_INSTANCE_TYPE((obj), ABITABLE_TYPE_WIDGET))
00036 #define IS_ABITABLE_WIDGET_CLASS(obj)  (G_TYPE_CHECK_CLASS_CAST((obj), ABITABLE_TYPE_WIDGET))
00037 #define ABITABLE_WIDGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ABITABLE_TYPE_WIDGET,AbiTableClass))
00038 
00039 typedef struct _AbiTable
00040 {
00041     GtkButton button;
00042 
00043     /*<private>*/
00044     GtkWidget* button_box;
00045     GtkWidget* icon;
00046 
00047     GtkWindow* window;
00048     GtkBox* window_vbox;
00049     GtkDrawingArea* area;
00050     GtkLabel* window_label;
00051     GSList* handlers;
00052 
00053     GtkStyleContext* style_context;
00054 
00055     guint selected_rows;
00056     guint selected_cols;
00057 
00058     guint total_rows;
00059     guint total_cols;
00060 
00061     guint max_rows;
00062     guint max_cols;
00063     gchar * szTable;
00064     gchar * szCancel;
00065 } AbiTable;
00066 
00067 typedef struct
00068 {
00069     GtkButtonClass parent_class;
00070 
00071     /* Signals emited by this widget */
00072     void (* selected) (AbiTable *abi_table, guint rows, guint cols);
00073 } AbiTableClass;
00074 
00075 
00076 GType    abi_table_get_type   (void);
00077 GtkWidget *abi_table_new        (void);
00078 
00079 /* sets the number of selected rows & cols */
00080 void       abi_table_set_selected   (AbiTable* abi_table, guint rows, guint cols);
00081 /* gets the number of selected rows & cols */
00082 void       abi_table_get_selected   (const AbiTable* abi_table, guint* rows, guint* cols);
00083 
00084 /* sets the maximum number of selected rows & cols */
00085 void       abi_table_set_max_size   (AbiTable* abi_table, guint rows, guint cols);
00086 /* gets the maximum number of selected rows & cols */
00087 void       abi_table_get_max_size   (const AbiTable* abi_table, guint* rows, guint* cols);
00088 
00089     /* Sets the labels */
00090     void abi_table_set_labels(AbiTable* abi_table, const gchar * szTable, const gchar * szCancel);
00091 
00092     /* Sets the table icon to the gtk_image cast as GtkWidget */
00093 
00094     void abi_table_set_icon(AbiTable* abi_table, GtkWidget* icon);
00095 
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099 
00100 #endif /* ABI_TABLE_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1