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

ustylehints.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/ui/ustylehints.hpp 00008 begin : Mon Feb 28 2005 00009 $Id: ustylehints.hpp,v 1.1 2005/05/21 15:28:38 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 USTYLEHINTS_HPP 00029 #define USTYLEHINTS_HPP 00030 00031 #include "../uobject.hpp" 00032 00033 #include "../uicon.hpp" 00034 #include "../udrawable.hpp" 00035 00036 #include "../font/ufont.hpp" 00037 00038 #include "../util/udimension.hpp" 00039 #include "../util/uinsets.hpp" 00040 #include "../util/upalette.hpp" 00041 00042 namespace ufo { 00043 00044 class UBorderModel; 00045 00052 class UFO_EXPORT UStyleHints { 00053 public: 00054 enum StyleHint { 00055 MinimumSizeHint, 00056 MaximumSizeHint, 00057 PreferredSizeHint, 00058 BorderHint, 00059 MarginHint, 00060 HAlignmentHint, 00061 VAlignmentHint, 00062 DirectionHint, 00063 OrientationHint, 00064 FontHint, 00065 PaletteHint, 00066 OpacityHint, 00067 BackgroundHint, 00068 IconHint, 00069 AllHints 00070 }; 00071 public: 00072 UStyleHints(); 00073 ~UStyleHints(); 00079 void transcribe(UStyleHints * hints); 00085 void update(UStyleHints * hints); 00086 00087 UStyleHints * clone() const; 00088 00089 friend std::ostream & operator<<(std::ostream & os, const UStyleHints * hints); 00090 public: 00091 UDimension minimumSize; 00092 UDimension maximumSize; 00093 UDimension preferredSize; 00094 00096 UBorderModel * border; 00098 UInsets margin; 00099 00100 // alignment 00101 Alignment hAlignment : 4; 00102 Alignment vAlignment : 4; 00103 Direction direction : 4; 00104 Orientation orientation : 4; 00105 00107 UFont font; 00108 00109 UPalette palette; 00110 00111 float opacity; 00112 00113 UDrawable * background; 00114 UIcon * icon; 00115 }; 00116 00117 extern std::ostream & 00118 operator<<(std::ostream & os, const UStyleHints * hints); 00119 00120 00121 } // namespace ufo 00122 00123 #endif // USTYLEHINTS_HPP

The libUFO Project - written by Johannes Schmidt