MainWindowInterface.h
Go to the documentation of this file.
1 // ****************************************************************************
2 // This file is part of the Integrating Vision Toolkit (IVT).
3 //
4 // The IVT is maintained by the Karlsruhe Institute of Technology (KIT)
5 // (www.kit.edu) in cooperation with the company Keyetech (www.keyetech.de).
6 //
7 // Copyright (C) 2014 Karlsruhe Institute of Technology (KIT).
8 // All rights reserved.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are met:
12 //
13 // 1. Redistributions of source code must retain the above copyright
14 // notice, this list of conditions and the following disclaimer.
15 //
16 // 2. Redistributions in binary form must reproduce the above copyright
17 // notice, this list of conditions and the following disclaimer in the
18 // documentation and/or other materials provided with the distribution.
19 //
20 // 3. Neither the name of the KIT nor the names of its contributors may be
21 // used to endorse or promote products derived from this software
22 // without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE KIT AND CONTRIBUTORS “AS IS” AND ANY
25 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 // DISCLAIMED. IN NO EVENT SHALL THE KIT OR CONTRIBUTORS BE LIABLE FOR ANY
28 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 // ****************************************************************************
35 // ****************************************************************************
36 // Filename: MainWindowInterface.h
37 // Author: Florian Hecht
38 // Date: 2008
39 // ****************************************************************************
40 
44 #ifndef _MAIN_WINDOW_INTERFACE_H_
45 #define _MAIN_WINDOW_INTERFACE_H_
46 
47 
48 // ****************************************************************************
49 // Forward declarations
50 // ****************************************************************************
51 
52 class CByteImage;
54 
55 
56 // ****************************************************************************
57 // Typedefs
58 // ****************************************************************************
59 
60 typedef void* WIDGET_HANDLE;
61 
62 
63 // ****************************************************************************
64 // Defines
65 // ****************************************************************************
66 
67 #define IVT_SHIFT_KEY 1
68 #define IVT_CONTROL_KEY 2
69 #define IVT_ALT_KEY 4
70 
71 
72 
73 // ****************************************************************************
74 // CMainWindowInterface
75 // ****************************************************************************
76 
82 {
83 public:
84  // destructor
85  virtual ~CMainWindowInterface() { }
86 
87 
88  // public methods
89 
90  // create widgets
91  virtual WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent = 0) = 0;
92  virtual WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0) = 0;
93  virtual WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0) = 0;
94  virtual WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent = 0) = 0;
95  virtual WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0) = 0;
96  virtual 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) = 0;
97  virtual WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent = 0) = 0;
98  virtual WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent = 0) = 0;
99 
100  // access to widget attributes
101  virtual bool GetText(WIDGET_HANDLE widget, char *text, int len) = 0;
102  virtual bool SetText(WIDGET_HANDLE widget, const char *text) = 0;
103 
104  virtual bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage) = 0;
105 
106  virtual bool GetValue(WIDGET_HANDLE widget, int &value) = 0;
107  virtual bool SetValue(WIDGET_HANDLE widget, int value) = 0;
108 
109  virtual bool SwapBuffersGLWidget(WIDGET_HANDLE widget) = 0;
110  virtual bool MakeCurrentGLWidget(WIDGET_HANDLE widget) = 0;
111 
112  // window control
113  virtual void Show(WIDGET_HANDLE widget = 0) = 0;
114  virtual void Hide(WIDGET_HANDLE widget = 0) = 0;
115 
116  virtual void SetSize(int width, int height, WIDGET_HANDLE widget = 0) { }
117 
118  virtual int GetModifierKeyState() = 0;
119 
121 };
122 
123 
124 
125 #endif /* _MAIN_WINDOW_INTERFACE_H_ */
virtual bool SetValue(WIDGET_HANDLE widget, int value)=0
virtual WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent=0)=0
virtual bool GetValue(WIDGET_HANDLE widget, int &value)=0
virtual bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage)=0
virtual WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent=0)=0
virtual int GetModifierKeyState()=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
virtual WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)=0
virtual 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)=0
virtual void SetEventCallback(CMainWindowEventInterface *callback)=0
virtual WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent=0)=0
GLenum GLint x
Definition: glext.h:3125
void * WIDGET_HANDLE
virtual void Hide(WIDGET_HANDLE widget=0)=0
GLsizei const GLfloat * value
Definition: glext.h:3538
virtual bool GetText(WIDGET_HANDLE widget, char *text, int len)=0
virtual WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)=0
virtual bool SwapBuffersGLWidget(WIDGET_HANDLE widget)=0
Interface for the creation of GUIs with the GUI toolkit of the IVT.
virtual void SetSize(int width, int height, WIDGET_HANDLE widget=0)
GLenum GLsizei width
Definition: glext.h:3122
GLenum GLsizei GLsizei height
Definition: glext.h:3132
virtual void Show(WIDGET_HANDLE widget=0)=0
GLenum GLint GLint y
Definition: glext.h:3125
virtual bool MakeCurrentGLWidget(WIDGET_HANDLE widget)=0
virtual WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent=0)=0
virtual bool SetText(WIDGET_HANDLE widget, const char *text)=0
Interface for the event mechanism of GUIs using the GUI toolkit of the IVT.
virtual WIDGET_HANDLE AddComboBox(int x, int y, int width, int height, int num_entries, const char **entries, int current_entry, WIDGET_HANDLE parent=0)=0
static void callback(IplImage *pIplImage)


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