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

ufo::UBasicStyle Class Reference

Default implementation of a UFO style. More...

#include <ubasicstyle.hpp>

Inheritance diagram for ufo::UBasicStyle:

ufo::UStyle ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

virtual void paintComponent (UGraphics *g, ComponentElement elem, const URectangle &rect, const UStyleHints *hints, const UWidgetModel *model, UWidget *w=NULL)
virtual void paintPrimitive (UGraphics *g, PrimitiveElement elem, const URectangle &rect, const UStyleHints *hints, uint32_t widgetState)
virtual void paintBorder (UGraphics *g, uint32_t borderType, const URectangle &rect, const UStyleHints *hints, uint32_t widgetState)
virtual UInsets getBorderInsets (ComponentElement elem, const UStyleHints *hints)
virtual UInsets getInsets (ComponentElement elem, const UStyleHints *hints, const UWidgetModel *model, UWidget *w=NULL)
virtual SubControls getSubControlAt (ComponentElement elem, const URectangle &rect, const UStyleHints *hints, const UWidgetModel *model, const UPoint &pos, UWidget *w=NULL)
virtual URectangle getSubControlBounds (ComponentElement elem, const URectangle &rect, const UStyleHints *hints, const UWidgetModel *model, SubControls subElem, UWidget *w=NULL)
virtual UDimension getSizeFromContents (ComponentElement elem, const UDimension &contentsSize, const UStyleHints *hints, const UWidgetModel *model, UWidget *w=NULL)
virtual void paintCompound (UGraphics *g, const UStyleHints *hints, const std::string &text, UIcon *icon, const URectangle &rect, uint32_t widgetState, int acceleratorIndex=-1)
virtual UDimension getCompoundPreferredSize (const UStyleHints *hints, const std::string &text, UIcon *icon)
virtual void layoutCompound (const UStyleHints *hints, const std::string &text, UIcon *icon, const URectangle &viewRect, URectangle *textRect, URectangle *iconRect)
virtual void install (UWidget *w)
virtual void uninstall (UWidget *w)

Detailed Description

Default implementation of a UFO style.

Author:
Johannes Schmidt


Member Function Documentation

virtual UInsets ufo::UBasicStyle::getBorderInsets (  ComponentElement  elem,
const UStyleHints *  hints
)  [virtual]
 

Returns:
The insets used by a border.

Implements ufo::UStyle.

virtual UDimension ufo::UBasicStyle::getCompoundPreferredSize (  const UStyleHints *  hints,
const std::string &  text,
UIcon *  icon
)  [virtual]
 

Returns:
The preferred size for an icon with text

Implements ufo::UStyle.

virtual UInsets ufo::UBasicStyle::getInsets (  ComponentElement  elem,
const UStyleHints *  hints,
const UWidgetModel *  model,
UWidget *  w = NULL
)  [virtual]
 

Returns:
The insets used between content (like icons, text) and the actual widget bounds.

Implements ufo::UStyle.

virtual UDimension ufo::UBasicStyle::getSizeFromContents (  ComponentElement  elem,
const UDimension &  contentsSize,
const UStyleHints *  hints,
const UWidgetModel *  model,
UWidget *  w = NULL
)  [virtual]
 

May return a slightly enlarged dimension to add space for focus, styled borders or icons.

Implements ufo::UStyle.

virtual SubControls ufo::UBasicStyle::getSubControlAt (  ComponentElement  elem,
const URectangle &  rect,
const UStyleHints *  hints,
const UWidgetModel *  model,
const UPoint &  pos,
UWidget *  w = NULL
)  [virtual]
 

Returns:
The sub control at the given position or SC_None.

Implements ufo::UStyle.

virtual URectangle ufo::UBasicStyle::getSubControlBounds (  ComponentElement  elem,
const URectangle &  rect,
const UStyleHints *  hints,
const UWidgetModel *  model,
SubControls  subElem,
UWidget *  w = NULL
)  [virtual]
 

Returns:
The bounding rectangle of a sub control .

Implements ufo::UStyle.

virtual void ufo::UBasicStyle::install (  UWidget *  w  )  [virtual]
 

Stub method. Configures a widget to be used with this style. Not yet implementd.

Implements ufo::UStyle.

virtual void ufo::UBasicStyle::layoutCompound (  const UStyleHints *  hints,
const std::string &  text,
UIcon *  icon,
const URectangle &  viewRect,
URectangle *  textRect,
URectangle *  iconRect
)  [virtual]
 

Lays out an icon with text.

Implements ufo::UStyle.

virtual void ufo::UBasicStyle::paintBorder (  UGraphics *  g,
uint32_t  borderType,
const URectangle &  rect,
const UStyleHints *  hints,
uint32_t  widgetState
)  [virtual]
 

Paints a border.

Implements ufo::UStyle.

virtual void ufo::UBasicStyle::paintComponent (  UGraphics *  g,
ComponentElement  elem,
const URectangle &  rect,
const UStyleHints *  hints,
const UWidgetModel *  model,
UWidget *  w = NULL
)  [virtual]
 

Paints a component of a widget resp. the whole widget. For most components, this is only a call to paintModelBackground and paintModel.

Implements ufo::UStyle.

virtual void ufo::UBasicStyle::paintCompound (  UGraphics *  g,
const UStyleHints *  hints,
const std::string &  text,
UIcon *  icon,
const URectangle &  rect,
uint32_t  widgetState,
int  acceleratorIndex = -1
)  [virtual]
 

Paints an icon with text.

Implements ufo::UStyle.

virtual void ufo::UBasicStyle::paintPrimitive (  UGraphics *  g,
PrimitiveElement  elem,
const URectangle &  rect,
const UStyleHints *  hints,
uint32_t  widgetState
)  [virtual]
 

Paints a primitive element like arrows and frames.

Implements ufo::UStyle.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt