MainWindowInterface.h
Go to the documentation of this file.
00001 // ****************************************************************************
00002 // This file is part of the Integrating Vision Toolkit (IVT).
00003 //
00004 // The IVT is maintained by the Karlsruhe Institute of Technology (KIT)
00005 // (www.kit.edu) in cooperation with the company Keyetech (www.keyetech.de).
00006 //
00007 // Copyright (C) 2014 Karlsruhe Institute of Technology (KIT).
00008 // All rights reserved.
00009 //
00010 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are met:
00012 //
00013 // 1. Redistributions of source code must retain the above copyright
00014 //    notice, this list of conditions and the following disclaimer.
00015 //
00016 // 2. Redistributions in binary form must reproduce the above copyright
00017 //    notice, this list of conditions and the following disclaimer in the
00018 //    documentation and/or other materials provided with the distribution.
00019 //
00020 // 3. Neither the name of the KIT nor the names of its contributors may be
00021 //    used to endorse or promote products derived from this software
00022 //    without specific prior written permission.
00023 //
00024 // THIS SOFTWARE IS PROVIDED BY THE KIT AND CONTRIBUTORS “AS IS” AND ANY
00025 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00026 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00027 // DISCLAIMED. IN NO EVENT SHALL THE KIT OR CONTRIBUTORS BE LIABLE FOR ANY
00028 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00029 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00030 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00031 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00032 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00033 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034 // ****************************************************************************
00035 // ****************************************************************************
00036 // Filename:  MainWindowInterface.h
00037 // Author:    Florian Hecht
00038 // Date:      2008
00039 // ****************************************************************************
00040 
00044 #ifndef _MAIN_WINDOW_INTERFACE_H_
00045 #define _MAIN_WINDOW_INTERFACE_H_
00046 
00047 
00048 // ****************************************************************************
00049 // Forward declarations
00050 // ****************************************************************************
00051 
00052 class CByteImage;
00053 class CMainWindowEventInterface;
00054 
00055 
00056 // ****************************************************************************
00057 // Typedefs
00058 // ****************************************************************************
00059 
00060 typedef void* WIDGET_HANDLE;
00061 
00062 
00063 // ****************************************************************************
00064 // Defines
00065 // ****************************************************************************
00066 
00067 #define IVT_SHIFT_KEY           1
00068 #define IVT_CONTROL_KEY         2
00069 #define IVT_ALT_KEY             4
00070 
00071 
00072 
00073 // ****************************************************************************
00074 // CMainWindowInterface
00075 // ****************************************************************************
00076 
00081 class CMainWindowInterface
00082 {
00083 public:
00084         // destructor
00085         virtual ~CMainWindowInterface() { }
00086 
00087 
00088         // public methods
00089 
00090         // create widgets
00091         virtual WIDGET_HANDLE AddImage(int x, int y, int width, int height, WIDGET_HANDLE parent = 0) = 0;
00092         virtual WIDGET_HANDLE AddButton(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0) = 0;
00093         virtual WIDGET_HANDLE AddLabel(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0) = 0;
00094         virtual WIDGET_HANDLE AddCheckBox(int x, int y, int width, int height, const char *text, bool checked, WIDGET_HANDLE parent = 0) = 0;
00095         virtual WIDGET_HANDLE AddTextEdit(int x, int y, int width, int height, const char *text, WIDGET_HANDLE parent = 0) = 0;
00096         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;
00097         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;
00098         virtual WIDGET_HANDLE AddGLWidget(int x, int y, int width, int height, WIDGET_HANDLE parent = 0) = 0;
00099 
00100         // access to widget attributes
00101         virtual bool GetText(WIDGET_HANDLE widget, char *text, int len) = 0;
00102         virtual bool SetText(WIDGET_HANDLE widget, const char *text) = 0;
00103 
00104         virtual bool SetImage(WIDGET_HANDLE widget, const CByteImage *pImage) = 0;
00105 
00106         virtual bool GetValue(WIDGET_HANDLE widget, int &value) = 0;
00107         virtual bool SetValue(WIDGET_HANDLE widget, int value) = 0;
00108 
00109         virtual bool SwapBuffersGLWidget(WIDGET_HANDLE widget) = 0;
00110         virtual bool MakeCurrentGLWidget(WIDGET_HANDLE widget) = 0;
00111 
00112         // window control
00113         virtual void Show(WIDGET_HANDLE widget = 0) = 0;
00114         virtual void Hide(WIDGET_HANDLE widget = 0) = 0;
00115 
00116         virtual void SetSize(int width, int height, WIDGET_HANDLE widget = 0) { }
00117         
00118         virtual int GetModifierKeyState() = 0;
00119 
00120         virtual void SetEventCallback(CMainWindowEventInterface *callback) = 0;
00121 };
00122 
00123 
00124 
00125 #endif /* _MAIN_WINDOW_INTERFACE_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