GTKMainWindowWidget.h
Go to the documentation of this file.
00001 // ****************************************************************************
00002 // Filename:  GTKMainWindowWidget.h
00003 // Author:    Florian Hecht
00004 // Date:      2009
00005 // ****************************************************************************
00006 
00007 
00008 #ifndef _GTK_MAIN_WINDOW_WIDGET_H_
00009 #define _GTK_MAIN_WINDOW_WIDGET_H_
00010 
00011 
00012 // ****************************************************************************
00013 // Necessary includes
00014 // ****************************************************************************
00015 
00016 #include <gtk/gtk.h>
00017 
00018 
00019 // ****************************************************************************
00020 // Forward declarations
00021 // ****************************************************************************
00022 
00023 class CGTKMainWindow;
00024 class CByteImage;
00025 
00026 
00027 // ****************************************************************************
00028 // Enums
00029 // ****************************************************************************
00030 
00031 enum GTKWidgetType
00032 {
00033         eImage = 0,
00034         eButton,
00035         eLabel,
00036         eCheckBox,
00037         eTextEdit,
00038         eSlider,
00039         eComboBox,
00040         eGLWidget
00041 };
00042 
00043 
00044 
00045 // ****************************************************************************
00046 // CGTKMainWindowWidget
00047 // ****************************************************************************
00048 
00049 class CGTKMainWindowWidget
00050 {
00051 public:
00052         CGTKMainWindowWidget(CGTKMainWindow *main_window, GTKWidgetType type);
00053         ~CGTKMainWindowWidget();
00054 
00055 public:
00056         void Clicked();
00057         void ValueChanged(int value);
00058         void Toggled(bool flag);
00059         void TextChanged(const char *str);
00060         
00061 public:
00062         CGTKMainWindow  *m_main_window;
00063         GTKWidgetType   m_type;
00064         GtkWidget       *m_widget;
00065         GtkObject       *m_obj;
00066 };
00067 
00068 // *****************************************************************
00069 // New GTK classes: IVTImage and IVTGLWidget
00070 // *****************************************************************
00071 
00072 #include <glib.h>
00073 
00074 G_BEGIN_DECLS
00075 
00076 // *****************************************************************
00077 // IVTImage
00078 // *****************************************************************
00079 
00080 #define IVTIMAGE_TYPE            (ivtimage_get_type ())
00081 #define IVTIMAGE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), IVTIMAGE_TYPE, IVTImage))
00082 #define IVTIMAGE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), IVTIMAGE_TYPE, IVTImageClass))
00083 #define IS_IVTIMAGE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IVTIMAGE_TYPE))
00084 #define IS_IVTIMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IVTIMAGE_TYPE))
00085 
00086 
00087 typedef struct _IVTImage       IVTImage;
00088 typedef struct _IVTImageClass  IVTImageClass;
00089 
00090 struct _IVTImage
00091 {
00092         GtkDrawingArea parent;
00093 
00094         GdkPixmap *pixmap;
00095         CByteImage *image;
00096         CGTKMainWindowWidget *main_window_widget;
00097 
00098         int mouse_down;
00099         int mouse_start_x;
00100         int mouse_start_y;
00101         int mouse_x;
00102         int mouse_y;
00103 };
00104 
00105 struct _IVTImageClass
00106 {
00107         GtkDrawingAreaClass parent_class;
00108 
00109         void (* ivtimage) (IVTImage *ttt);
00110 };
00111 
00112 GType          ivtimage_get_type        (void);
00113 GtkWidget*     ivtimage_new             (void);
00114 
00115 #ifdef USE_OPENGL
00116 
00117 // *****************************************************************
00118 // IVTGLWidget
00119 // *****************************************************************
00120 
00121 class CGTKGLContext;
00122 
00123 #define IVTGLWIDGET_TYPE            (ivtglwidget_get_type ())
00124 #define IVTGLWIDGET(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), IVTGLWIDGET_TYPE, IVTGLWidget))
00125 #define IVTGLWIDGET_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), IVTGLWIDGET_TYPE, IVTGLWidgetClass))
00126 #define IS_IVTGLWIDGET(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IVTGLWIDGET_TYPE))
00127 #define IS_IVTGLWIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IVTGLWIDGET_TYPE))
00128 
00129 
00130 typedef struct _IVTGLWidget       IVTGLWidget;
00131 typedef struct _IVTGLWidgetClass  IVTGLWidgetClass;
00132 
00133 struct _IVTGLWidget
00134 {
00135         GtkDrawingArea parent;
00136 
00137         CGTKGLContext *glcontext;
00138         CGTKMainWindowWidget *main_window_widget;
00139 };
00140 
00141 struct _IVTGLWidgetClass
00142 {
00143         GtkDrawingAreaClass parent_class;
00144 
00145         void (* ivtglwidget) (IVTGLWidget *ttt);
00146 };
00147 
00148 GType          ivtglwidget_get_type        (void);
00149 GtkWidget*     ivtglwidget_new             (void);
00150 
00151 #endif /* USE_OPENGL */
00152 
00153 G_END_DECLS
00154 
00155 #endif /* _GTK_MAIN_WINDOW_WIDGET_H_ */


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:57