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

umodel.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/umodel.hpp 00008 begin : Thu Mar 10 2005 00009 $Id: umodel.hpp,v 1.3 2005/10/24 15:57:31 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 UMODEL_HPP 00029 #define UMODEL_HPP 00030 00031 #include "uobject.hpp" 00032 00033 #include "ukeystroke.hpp" 00034 #include "util/ucolor.hpp" 00035 #include "ui/ustyle.hpp" 00036 00037 namespace ufo { 00038 00039 class UIcon; 00040 class UDocument; 00041 class UTextLayout; 00042 00049 class UWidgetModel { 00050 public: 00051 uint32_t widgetState; 00052 }; 00053 00059 class UBorderModel : public UWidgetModel { 00060 public: 00064 uint32_t borderType; 00067 UColor color[4]; 00071 uint8_t style[4]; 00073 uint8_t width[4]; 00075 uint8_t radius[4]; 00076 }; 00077 00084 class UCompoundModel : public UWidgetModel { 00085 public: 00086 std::string text; 00087 UIcon * icon; 00088 int acceleratorIndex; 00089 }; 00090 00097 class UButtonModel : public UCompoundModel { 00098 public: 00099 enum ButtonFeatures { 00100 None = 0, 00101 Flat = 1, 00102 DefaultButton = 2, 00103 HasMenu = 4 00104 }; 00105 enum CheckType { 00106 NotCheckable = 0, 00107 Exclusive, 00108 NonExclusive 00109 }; 00110 int buttonFeatures; 00111 int checkType; 00112 UKeyStroke shortcut; 00113 }; 00114 00121 class UMenuItemModel : public UButtonModel { 00122 public: 00123 int maxIconWidth; 00124 }; 00125 00131 class UGroupBoxModel : public UWidgetModel { 00132 public: 00133 std::string text; 00134 UIcon * icon; 00135 int acceleratorIndex; 00136 }; 00137 00143 class UTextModel : public UWidgetModel { 00144 public: 00145 UDocument * document; 00146 UTextLayout * textLayout; 00147 }; 00148 00155 class UProgressBarModel : public UWidgetModel { 00156 public: 00157 int minimum; 00158 int maximum; 00159 int value; 00160 std::string text; 00161 bool textVisible; 00162 }; 00163 00170 class UComplexModel : public UWidgetModel { 00171 public: 00172 UStyle::SubControls subControls; 00173 UStyle::SubControls activeSubControls; 00174 }; 00175 00181 class USliderModel : public UComplexModel { 00182 public: 00183 int minimum; 00184 int maximum; 00185 int tickInterval; 00186 int sliderPosition; 00187 int sliderValue; 00188 int unitIncrement; 00189 int blockIncrement; 00190 }; 00191 00197 class USpinBoxModel : public UComplexModel { 00198 public: 00199 float minimum; 00200 float maximum; 00201 float value; 00202 }; 00203 00209 class UTitleBarModel : public UComplexModel { 00210 public: 00211 std::string text; 00212 UIcon * icon; 00213 int frameState; 00214 int frameStyle; 00215 }; 00216 00217 } // namespace ufo 00218 00219 #endif // UMODEL_HPP

The libUFO Project - written by Johannes Schmidt