CocoaMainWindow.h
Go to the documentation of this file.
1 // ****************************************************************************
2 // Filename: CocoaMainWindow.h
3 // Author: Florian Hecht
4 // Date: 2008
5 // ****************************************************************************
6 
7 
8 #ifndef _COCOA_MAIN_WINDOW_H_
9 #define _COCOA_MAIN_WINDOW_H_
10 
11 
12 // ****************************************************************************
13 // Includes
14 // ****************************************************************************
15 
17 #include <vector>
18 
19 
20 // ****************************************************************************
21 // Forward declarations
22 // ****************************************************************************
23 
25 
26 
27 
28 // ****************************************************************************
29 // CCocoaMainWindow
30 // ****************************************************************************
31 
33 {
34 public:
35  CCocoaMainWindow(int x, int y, int width, int height, const char *title);
37 
38  // create widgets
39  WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
40  WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
41  WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
42  WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent = 0);
43  WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0);
44  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);
45  WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent = 0);
46  WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent = 0);
47 
48  // access to widget attributes
49  bool GetText(WIDGET_HANDLE widget, char *text, int len);
50  bool SetText(WIDGET_HANDLE widget, const char *text);
51 
52  bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage);
53 
54  bool GetValue(WIDGET_HANDLE widget, int &value);
55  bool SetValue(WIDGET_HANDLE widget, int value);
56 
59 
60  // window control
61  void Show(WIDGET_HANDLE widget = 0);
62  void Hide(WIDGET_HANDLE widget = 0);
63 
64  int GetModifierKeyState();
65 
67 
68  void EventCallback(void* widget, int type, int *params);
69 private:
70  void FixPosition(int &x, int &y, int &width, int &height);
71 
73  int m_width;
74  int m_height;
76 
77  std::vector<CCocoaMainWindowWidget*> m_widgets;
78 };
79 
80 
81 
82 #endif /* _COCOA_MAIN_WINDOW_H_ */
bool MakeCurrentGLWidget(WIDGET_HANDLE widget)
bool SetText(WIDGET_HANDLE widget, const char *text)
GLenum const GLfloat * params
Definition: glext.h:3123
bool SetValue(WIDGET_HANDLE widget, int value)
WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent=0)
CMainWindowEventInterface * m_event_callback
bool SwapBuffersGLWidget(WIDGET_HANDLE widget)
WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent=0)
WIDGET_HANDLE AddButton(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)
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
GLuint GLuint GLsizei GLenum type
Definition: glext.h:3121
void EventCallback(void *widget, int type, int *params)
GLenum GLint x
Definition: glext.h:3125
WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent=0)
void * WIDGET_HANDLE
std::vector< CCocoaMainWindowWidget * > m_widgets
WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent=0)
GLsizei const GLfloat * value
Definition: glext.h:3538
bool GetValue(WIDGET_HANDLE widget, int &value)
void Hide(WIDGET_HANDLE widget=0)
void * m_cocoa_main_window
Interface for the creation of GUIs with the GUI toolkit of the IVT.
CCocoaMainWindow(int x, int y, int width, int height, const char *title)
GLenum GLsizei width
Definition: glext.h:3122
GLenum GLsizei GLsizei height
Definition: glext.h:3132
GLenum GLint GLint y
Definition: glext.h:3125
WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)
void SetEventCallback(CMainWindowEventInterface *callback)
bool GetText(WIDGET_HANDLE widget, char *text, int len)
void FixPosition(int &x, int &y, int &width, int &height)
void Show(WIDGET_HANDLE widget=0)
Interface for the event mechanism of GUIs using the GUI toolkit of the IVT.
bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage)
static void callback(IplImage *pIplImage)
WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)


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:27