GTKMainWindow.h
Go to the documentation of this file.
1 // ****************************************************************************
2 // Filename: GTKMainWindow.h
3 // Author: Florian Hecht
4 // Date: 2009
5 // ****************************************************************************
6 
7 
8 #ifndef _GTK_MAIN_WINDOW_H_
9 #define _GTK_MAIN_WINDOW_H_
10 
11 
12 // ****************************************************************************
13 // Necessary includes
14 // ****************************************************************************
15 
17 #include <vector>
18 #include <gtk/gtk.h>
19 
20 
21 // ****************************************************************************
22 // Forward declarations
23 // ****************************************************************************
24 
26 
27 
28 
29 // ****************************************************************************
30 // CQtMainWindow
31 // ****************************************************************************
32 
34 {
35 public:
36  CGTKMainWindow(int x, int y, int width, int height, const char *title);
37  virtual ~CGTKMainWindow();
38 
39  // create widgets
40  WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
41  WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
42  WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
43  WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent = 0);
44  WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
45  WIDGET_HANDLE AddSlider(int x, int y, int width, int height, int min_value, int max_value, int step, int value, WIDGET_HANDLE parent = 0);
46  WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent = 0);
47  WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
48 
49  // access to widget attributes
50  bool GetText(WIDGET_HANDLE widget, char *text, int len);
51  bool SetText(WIDGET_HANDLE widget, const char *text);
52 
53  bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage);
54 
55  bool GetValue(WIDGET_HANDLE widget, int &value);
56  bool SetValue(WIDGET_HANDLE widget, int value);
57 
60 
61  // window control
62  void Show(WIDGET_HANDLE widget = 0);
63  void Hide(WIDGET_HANDLE widget = 0);
64 
65  int GetModifierKeyState();
66 
68 
69 
71 
72 public:
73  void Destroy(GtkWidget *widget);
74 
75 private:
77 
78  std::vector<CGTKMainWindowWidget*> m_widgets;
79 
80  GtkWidget *m_main_window;
81  GtkWidget *m_fixed_container;
82 
83  static int m_ref_count;
84 
86 };
87 
88 
89 
90 #endif /* _GTK_MAIN_WINDOW_H_ */
GtkWidget * m_fixed_container
Definition: GTKMainWindow.h:81
void Destroy(GtkWidget *widget)
WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)
GtkWidget * m_main_window
Definition: GTKMainWindow.h:80
CMainWindowEventInterface * m_event_callback
Definition: GTKMainWindow.h:76
CGTKMainWindow(int x, int y, int width, int height, const char *title)
bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage)
virtual ~CGTKMainWindow()
WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent=0)
WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent=0)
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
Definition: ByteImage.h:80
GLenum GLsizei len
Definition: glext.h:3940
WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)
WIDGET_HANDLE AddSlider(int x, int y, int width, int height, int min_value, int max_value, int step, int value, WIDGET_HANDLE parent=0)
GLenum GLint x
Definition: glext.h:3125
void SetEventCallback(CMainWindowEventInterface *callback)
Definition: GTKMainWindow.h:67
void * WIDGET_HANDLE
GLsizei const GLfloat * value
Definition: glext.h:3538
bool SetText(WIDGET_HANDLE widget, const char *text)
bool GetText(WIDGET_HANDLE widget, char *text, int len)
Interface for the creation of GUIs with the GUI toolkit of the IVT.
bool GetValue(WIDGET_HANDLE widget, int &value)
GLenum GLsizei width
Definition: glext.h:3122
GLenum GLsizei GLsizei height
Definition: glext.h:3132
CMainWindowEventInterface * GetEventCallback()
Definition: GTKMainWindow.h:70
void Hide(WIDGET_HANDLE widget=0)
GLenum GLint GLint y
Definition: glext.h:3125
bool SetValue(WIDGET_HANDLE widget, int value)
bool SwapBuffersGLWidget(WIDGET_HANDLE widget)
bool MakeCurrentGLWidget(WIDGET_HANDLE widget)
void Show(WIDGET_HANDLE widget=0)
Interface for the event mechanism of GUIs using the GUI toolkit of the IVT.
static void callback(IplImage *pIplImage)
WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent=0)
std::vector< CGTKMainWindowWidget * > m_widgets
Definition: GTKMainWindow.h:78
WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)
WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent=0)
static int m_ref_count
Definition: GTKMainWindow.h:83


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28