- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo_types.hpp

00001 /*************************************************************************** 00002 LibUFO - UI For OpenGL 00003 copyright : (C) 2001-2005 by Johannes Schmidt 00004 email : schmidtjf at users.sourceforge.net 00005 ------------------- 00006 00007 file : include/ufo/ufo_types.hpp 00008 begin : Sat Jul 7 2001 00009 $Id: ufo_types.hpp,v 1.12 2005/06/21 09:26:56 schmidtjf Exp $ 00010 ***************************************************************************/ 00011 00012 /*************************************************************************** 00013 * This library is free software; you can redistribute it and/or * 00014 * modify it under the terms of the GNU Lesser General Public * 00015 * License as published by the Free Software Foundation; either * 00016 * version 2.1 of the License, or (at your option) any later version. * 00017 * * 00018 * This library is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00021 * Lesser General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU Lesser General Public * 00024 * License along with this library; if not, write to the Free Software * 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00026 ***************************************************************************/ 00027 00028 #ifndef UFO_TYPES_HPP 00029 #define UFO_TYPES_HPP 00030 00031 // C99 integer types 00032 00033 #ifdef HAVE_STDINT_H 00034 #include <stdint.h> 00035 00036 #else // HAVE_STDINT_H 00037 00038 // taken gratefully from the SDL 2.0 sources (SDL_stdint.h) 00039 #if SIZEOF_CHAR == 1 00040 typedef signed char int8_t; 00041 typedef unsigned char uint8_t; 00042 #endif 00043 00044 #if SIZEOF_SHORT == 2 00045 typedef signed short int16_t; 00046 typedef unsigned short uint16_t; 00047 #else 00048 # if SIZEOF_INT == 2 00049 typedef signed int int16_t; 00050 typedef unsigned int uint16_t; 00051 # endif 00052 #endif 00053 00054 #if SIZEOF_INT == 4 00055 typedef signed int int32_t; 00056 typedef unsigned int uint32_t; 00057 #else 00058 # if SIZEOF_LONG == 4 00059 typedef signed long int32_t; 00060 typedef unsigned long uint32_t; 00061 # endif 00062 #endif 00063 00064 #if SIZEOF_LONG == 8 00065 typedef signed long int64_t; 00066 typedef unsigned long uint64_t; 00067 #else 00068 # if SIZEOF_LONG_LONG == 8 00069 typedef signed long long int int64_t; 00070 typedef unsigned long long int uint64_t; 00071 # endif 00072 #endif 00073 00074 #endif // HAVE_STDINT_H 00075 00076 00077 // some environments ( mingw32 ) donīt have the STL string stream 00078 #ifdef HAVE_SSTREAM 00079 #include <sstream> 00080 namespace ufo { 00081 typedef std::stringstream UStringStream; 00082 typedef std::ostringstream UOStringStream; 00083 typedef std::istringstream UIStringStream; 00084 } // namespace ufo 00085 #else 00086 # include <strstream> 00087 namespace ufo { 00088 typedef std::strstream UStringStream; 00089 typedef std::ostrstream UOStringStream; 00090 typedef std::istrstream UIStringStream; 00091 } // namespace ufo 00092 #endif 00093 00094 00095 namespace ufo { 00096 00098 enum Orientation { 00099 NoOrientation = 0, 00100 Horizontal, 00101 Vertical 00102 }; 00103 00104 enum Direction { 00105 NoDirection = 0, 00106 Up, 00107 Down, 00108 Left, 00109 Right, 00110 LeftToRight = Right, 00111 RightToLeft = Left 00112 }; 00113 00115 enum Relief { 00116 Raised = 0, 00117 Lowered 00118 }; 00119 00120 // Alignment 00121 enum Alignment { 00122 AlignNone = 0, 00123 AlignStart, 00124 AlignEnd, 00125 AlignCenter, 00126 AlignStretch, 00127 AlignLeft = AlignStart, 00128 AlignRight = AlignEnd, 00129 AlignTop = AlignStart, 00130 AlignBottom = AlignEnd 00131 }; 00132 00133 enum BorderType { 00134 NoBorder = 0, 00135 LineBorder, 00136 BottomLineBorder, 00137 RaisedBevelBorder, 00138 LoweredBevelBorder, 00139 StyleBorder = 100, 00140 CssBorder, 00141 BorderLast = 199 00142 }; 00143 00144 enum BorderStyle { 00145 NoBorderStyle = 0, 00146 BorderSolid, 00147 BorderDotted, 00148 BorderDashed, 00149 BorderDouble, 00150 BorderGroove, 00151 BorderRidge, 00152 BorderInset, 00153 BorderOutset, 00154 BorderStyleLast = BorderOutset 00155 }; 00156 00158 enum WidgetState { 00159 WidgetNoState = 0x000000, 00160 WidgetVisible = 0x000001, 00161 WidgetForceInvisible = 0x000002, 00162 WidgetDisabled = 0x000004, 00163 WidgetForceDisabled = 0x000008, 00164 WidgetEditable = 0x000010, 00165 WidgetFocusable = 0x000020, 00166 WidgetHasFocus = 0x000040, 00167 WidgetHasMouseFocus = 0x000080, 00168 WidgetSelected = 0x000100, 00169 WidgetPressed = 0x000200, 00170 WidgetRaised = 0x000400, 00171 WidgetToggable = 0x000800, 00172 WidgetHighlighted = 0x001000, 00173 WidgetEditing = 0x002000 00174 }; 00175 00176 enum FrameStyle { 00177 FrameDefault = 0, 00178 FrameNoBorder = 1 << 0, 00179 FrameNormalBorder = 1 << 1, 00180 FrameTitleBar = 1 << 2, 00181 FrameSysMenu = 1 << 3, 00182 FrameMinimizeBox = 1 << 4, 00183 FrameMaximizeBox = 1 << 5, 00184 FrameMinMaxBox = FrameMinimizeBox | FrameMaximizeBox, 00185 FrameCloseBox = 1 << 6, 00186 FrameResizable = 1 << 7, 00187 FrameStyleLast = FrameResizable, 00188 FrameStyleFlags = FrameNoBorder | FrameNormalBorder | FrameTitleBar | 00189 FrameSysMenu | FrameMinMaxBox | FrameCloseBox | FrameResizable 00190 }; 00191 00192 enum FrameState { 00193 FrameModal = FrameStyleLast << 1, 00194 FrameSticky = FrameStyleLast << 2, 00195 FrameStaysOnTop = FrameStyleLast << 3, 00196 FrameSkipTaskBar = FrameStyleLast << 4, 00197 FrameMaximized = FrameStyleLast << 5, 00198 FrameMinimized = FrameStyleLast << 6, 00199 FrameFullScreen = FrameStyleLast << 7, 00200 FrameCreated = FrameStyleLast << 8, 00201 FrameVisible = FrameStyleLast << 9, 00202 FrameActive = FrameStyleLast << 10, 00203 FrameStateLast = FrameActive, 00204 FrameStateFlags = FrameModal | FrameSticky | 00205 FrameStaysOnTop | FrameSkipTaskBar | FrameMaximized | FrameMinimized | 00206 FrameFullScreen | FrameCreated | FrameVisible | FrameActive 00207 }; 00208 00209 enum DockWidgetArea { 00210 LeftDockWidgetArea = 0x01, 00211 RightDockWidgetArea = 0x02, 00212 TopDockWidgetArea = 0x04, 00213 BottomDockWidgetArea = 0x08, 00214 AllDockWidgetAreas = 0xff 00215 }; 00216 00217 // 00218 // disable copy constructor and assignment operator 00219 // 00220 00221 #define UFO_DECLARE_NO_COPY_CLASS(classname) \ 00222 private: \ 00223 classname(const classname&); \ 00224 classname& operator=(const classname&); 00225 00226 } // namespace ufo 00227 00228 #endif // UFO_TYPES_HPP

The libUFO Project - written by Johannes Schmidt