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

ubasicstyle.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/gl/ubasicstyle.hpp 00008 begin : Sat Mar 5 2005 00009 $Id: ubasicstyle.hpp,v 1.2 2005/06/21 09:27:15 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 UBASICSTYLE_HPP 00029 #define UBASICSTYLE_HPP 00030 00031 #include "../ui/ustyle.hpp" 00032 00033 namespace ufo { 00034 00041 class UFO_EXPORT UBasicStyle : public UStyle { 00042 public: 00043 UBasicStyle(); 00044 virtual void paintComponent(UGraphics * g, 00045 ComponentElement elem, 00046 const URectangle & rect, 00047 const UStyleHints * hints, 00048 const UWidgetModel * model, 00049 UWidget * w = NULL); 00050 00051 virtual void paintPrimitive(UGraphics * g, 00052 PrimitiveElement elem, 00053 const URectangle & rect, 00054 const UStyleHints * hints, 00055 uint32_t widgetState); 00056 00057 virtual void paintBorder(UGraphics * g, 00058 uint32_t borderType, 00059 const URectangle & rect, 00060 const UStyleHints * hints, 00061 uint32_t widgetState); 00062 00063 virtual UInsets getBorderInsets( 00064 ComponentElement elem, 00065 const UStyleHints * hints); 00066 00067 virtual UInsets getInsets( 00068 ComponentElement elem, 00069 const UStyleHints * hints, 00070 const UWidgetModel * model, 00071 UWidget * w = NULL); 00072 00073 virtual SubControls getSubControlAt( 00074 ComponentElement elem, 00075 const URectangle & rect, 00076 const UStyleHints * hints, 00077 const UWidgetModel * model, 00078 const UPoint & pos, 00079 UWidget * w = NULL); 00080 00081 virtual URectangle getSubControlBounds( 00082 ComponentElement elem, 00083 const URectangle & rect, 00084 const UStyleHints * hints, 00085 const UWidgetModel * model, 00086 SubControls subElem, 00087 UWidget * w = NULL); 00088 00089 virtual UDimension getSizeFromContents( 00090 ComponentElement elem, 00091 const UDimension & contentsSize, 00092 const UStyleHints * hints, 00093 const UWidgetModel * model, 00094 UWidget * w = NULL); 00095 00096 virtual void paintCompound( 00097 UGraphics * g, 00098 const UStyleHints * hints, 00099 const std::string & text, 00100 UIcon * icon, 00101 const URectangle & rect, 00102 uint32_t widgetState, 00103 int acceleratorIndex = -1); 00104 00105 virtual UDimension getCompoundPreferredSize( 00106 const UStyleHints * hints, 00107 const std::string & text, 00108 UIcon * icon); 00109 00110 virtual void layoutCompound( 00111 const UStyleHints * hints, 00112 const std::string & text, 00113 UIcon * icon, 00114 const URectangle & viewRect, 00115 URectangle * textRect, 00116 URectangle * iconRect); 00117 00118 virtual void install(UWidget * w); 00119 virtual void uninstall(UWidget * w); 00120 }; 00121 00122 } // namespace ufo 00123 00124 #endif // UBASICSTYLE_HPP

The libUFO Project - written by Johannes Schmidt