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

ustylemanager.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/ustylemanager.hpp 00008 begin : Mon Feb 28 2005 00009 $Id: ustylemanager.hpp,v 1.2 2005/09/02 14: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 USTYLEMANAGER_HPP 00029 #define USTYLEMANAGER_HPP 00030 00031 #include "../uobject.hpp" 00032 #include "../font/ufont.hpp" 00033 #include "../util/upalette.hpp" 00034 00035 namespace ufo { 00036 00037 class UStyle; 00038 class UStyleHints; 00039 class UWidget; 00040 00049 class UFO_EXPORT UStyleManager : public UObject { 00050 public: 00051 UStyleManager(); 00052 UStyleManager(UStyle * style, 00053 std::map<std::string, UStyleHints*> hints); 00055 virtual ~UStyleManager(); 00056 00058 UStyle * getStyle(); 00060 void setStyle(UStyle * style); 00061 00063 UPalette getPalette(); 00067 void setPalette(const UPalette & palette); 00068 00070 UFont getFont(); 00074 void setFont(const UFont & font); 00075 00077 void loadStyleSheet(const std::string & fileName); 00078 00080 void putStyleHints(const std::string & classid, UStyleHints * styleHints); 00081 void putStyleHints( 00082 const std::string & type, 00083 const std::string & classId, 00084 const std::string & name, 00085 UStyleHints * styleHints 00086 ); 00090 UStyleHints * getStyleHints( 00091 const std::string & type, 00092 const std::string & classId = "", 00093 const std::string & name = "" 00094 ); 00095 std::map<std::string, UStyleHints*> & getStyleHints() { return m_hints; } 00096 00097 private: // Private attributes 00098 UStyle * m_style; 00099 std::map<std::string, UStyleHints*> m_hints; 00100 }; 00101 00102 } // namespace ufo 00103 00104 #endif // USTYLEMANAGER_HPP

The libUFO Project - written by Johannes Schmidt