00001 #ifndef _LGIWIDGET_H_
00002 #define _LGIWIDGET_H_
00003
00004 G_BEGIN_DECLS
00005
00006 #define LGI_WIDGET(obj) GTK_CHECK_CAST(obj, lgi_widget_get_type(), LgiWidget)
00007 #define LGI_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, lgi_widget_get_type(), LgiWidgetClass)
00008 #define LGI_IS_WIDGET(obj) GTK_CHECK_TYPE(obj, lgi_widget_get_type())
00009
00010 typedef struct _LgiWidget LgiWidget;
00011 typedef struct _LgiWidgetClass LgiWidgetClass;
00012
00013 struct _LgiWidget
00014 {
00015 GtkContainer widget;
00016
00017 GViewI *target;
00018 int w, h;
00019 bool pour_largest;
00020
00021 struct ChildInfo
00022 {
00023 int x;
00024 int y;
00025 GtkWidget *w;
00026 };
00027
00028 ::GArray<ChildInfo> child;
00029 };
00030
00031 struct _LgiWidgetClass
00032 {
00033 GtkContainerClass parent_class;
00034 };
00035
00036 GtkType lgi_widget_get_type();
00037 GtkWidget *lgi_widget_new(GViewI *target, int width, int height, bool pour_largest);
00038
00039
00040 void lgi_widget_add(GtkContainer *wid, GtkWidget *child);
00041 void lgi_widget_remove(GtkContainer *wid, GtkWidget *child);
00042
00043
00044 void lgi_widget_setsize(GtkWidget *wid, int width, int height);
00045 void lgi_widget_setchildpos(GtkWidget *wid, GtkWidget *child, int x, int y);
00046
00047 G_END_DECLS
00048
00049 #endif