• 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: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
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., 59 Temple Place - Suite 330, Boston, MA
00021  * 02111-1307, 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     GtkStockItem stock_item;
00045 
00046     GtkWidget* button_box;
00047     GtkWidget* label;
00048     GtkWidget* icon;
00049 
00050     GtkWindow* window;
00051     GtkVBox* window_vbox;
00052     GtkDrawingArea* area;
00053     GtkLabel* window_label;
00054     GSList* handlers;
00055     
00056     GdkGC* selected_gc;
00057     
00058     guint selected_rows;
00059     guint selected_cols;
00060 
00061     guint total_rows;
00062     guint total_cols;
00063 
00064     guint max_rows;
00065     guint max_cols;
00066     gchar * szTable;
00067     gchar * szCancel;
00068 } AbiTable;
00069 
00070 typedef struct
00071 {
00072     GtkButtonClass parent_class;
00073 
00074     /* Signals emited by this widget */
00075     void (* selected) (AbiTable *abi_table, guint rows, guint cols);
00076 } AbiTableClass;
00077 
00078 
00079 GType    abi_table_get_type   (void);
00080 GtkWidget *abi_table_new        (void);
00081 
00082 /* sets the number of selected rows & cols */
00083 void       abi_table_set_selected   (AbiTable* abi_table, guint rows, guint cols);
00084 /* gets the number of selected rows & cols */
00085 void       abi_table_get_selected   (const AbiTable* abi_table, guint* rows, guint* cols);
00086 
00087 /* sets the maximum number of selected rows & cols */
00088 void       abi_table_set_max_size   (AbiTable* abi_table, guint rows, guint cols);
00089 /* gets the maximum number of selected rows & cols */
00090 void       abi_table_get_max_size   (const AbiTable* abi_table, guint* rows, guint* cols);
00091 
00092     /* Sets the labels */
00093     void abi_table_set_labels(AbiTable* abi_table, const gchar * szTable, const gchar * szCancel);
00094 
00095     /* Returns the label widget */
00096 
00097     GtkWidget * abi_table_get_label(AbiTable* abi_table);
00098 
00099     /* Sets the table icon to the gtk_image cast as GtkWidget */
00100 
00101     void abi_table_set_icon(AbiTable* abi_table, GtkWidget* icon);
00102 
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106 
00107 #endif /* ABI_TABLE_H */

Generated on Sat Dec 3 2011 for AbiWord by  doxygen 1.7.1