00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
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 } 
00123 
00124 
#endif // UBASICSTYLE_HPP