#include <ustyle.hpp>
Inheritance diagram for ufo::UStyle:
Public Types | |
enum | PrimitiveElement { PE_IndicatorArrowUp, PE_IndicatorArrowDown, PE_IndicatorArrowLeft, PE_IndicatorArrowRight, PE_IndicatorCheckBox, PE_IndicatorCheckBoxMask, PE_IndicatorRadioButton, PE_IndicatorRadioButtonMask, PE_IndicatorButtonDropDown, PE_TextCaret, PE_PanelButtonBevel, PE_PanelButtonTool, PE_PanelToolBar, PE_PanelWidget, PE_Frame, PE_FrameWindow, PE_FrameMenu, PE_FrameButtonBevel, PE_FrameDefaultButton, PE_FrameTabWidget, PE_FrameStatusBar, PE_FrameLineEdit, PE_FrameFocusRect, PE_Gripper } |
enum | ComponentElement { CE_Widget, CE_Compound, CE_Label, CE_StaticText, CE_Button, CE_ToolButton, CE_CheckBox, CE_RadioButton, CE_MenuItem, CE_MenuBarItem, CE_MenuTearOff, CE_ListBox, CE_LineEdit, CE_TextEdit, CE_TextWidget, CE_Separator, CE_ProgressBar, CE_ProgressBarGroove, CE_ProgressBarContents, CE_TabBarTab, CE_Splitter, CE_ComboBox, CE_SpinBox, CE_Slider, CE_TitleBar, CE_InternalFrame, CE_ScrollBar, CE_GroupBox } |
enum | SubControls { SC_None = 0, SC_ScrollBarHome = 1 << 0, SC_ScrollBarAddLine = 1 << 1, SC_ScrollBarSubLine = 1 << 2, SC_ScrollBarAddPage = 1 << 3, SC_ScrollBarSubPage = 1 << 4, SC_ScrollBarSlider = 1 << 5, SC_ScrollBarGroove = 1 << 6, SC_ScrollBarEnd = 1 << 7, SC_ScrollBarFirst = SC_ScrollBarHome, SC_ScrollBarLast = SC_ScrollBarEnd, SC_SpinBoxUp = 1 << 0, SC_SpinBoxDown = 1 << 1, SC_SpinBoxFrame = 1 << 2, SC_SpinBoxEditField = 1 << 3, SC_SpinBoxFirst = SC_SpinBoxUp, SC_SpinBoxLast = SC_SpinBoxEditField, SC_ComboBoxEditField = 1 << 0, SC_ComboBoxArrow = 1 << 1, SC_ComboBoxFrame = 1 << 2, SC_ComboBoxListBoxPopup = 1 << 3, SC_ComboBoxFirst = SC_ComboBoxEditField, SC_ComboBoxLast = SC_ComboBoxListBoxPopup, SC_SliderGroove = 1 << 0, SC_SliderHandle = 1 << 1, SC_SliderTickmarks = 1 << 2, SC_SliderFirst = SC_SliderGroove, SC_SliderLast = SC_SliderTickmarks, SC_ToolButton = 1 << 0, SC_ToolButtonMenu = 1 << 1, SC_TitleBarSysMenu = 1 << 0, SC_TitleBarMinButton = 1 << 1, SC_TitleBarMaxButton = 1 << 2, SC_TitleBarCloseButton = 1 << 3, SC_TitleBarLabel = 1 << 4, SC_TitleBarFirst = SC_TitleBarSysMenu, SC_TitleBarLast = SC_TitleBarLabel } |
Public Member Functions | |
virtual void | paintPrimitive (UGraphics *g, PrimitiveElement elem, const URectangle &rect, const UStyleHints *hints, uint32_t widgetState)=0 |
virtual void | paintComponent (UGraphics *g, ComponentElement elem, const URectangle &rect, const UStyleHints *hints, const UWidgetModel *model, UWidget *w=NULL)=0 |
virtual void | paintBorder (UGraphics *g, uint32_t borderType, const URectangle &rect, const UStyleHints *hints, uint32_t widgetState)=0 |
virtual UInsets | getBorderInsets (ComponentElement elem, const UStyleHints *hints)=0 |
virtual SubControls | getSubControlAt (ComponentElement elem, const URectangle &rect, const UStyleHints *hints, const UWidgetModel *model, const UPoint &pos, UWidget *w=NULL)=0 |
virtual URectangle | getSubControlBounds (ComponentElement elem, const URectangle &rect, const UStyleHints *hints, const UWidgetModel *model, SubControls subElem, UWidget *w=NULL)=0 |
virtual UInsets | getInsets (ComponentElement elem, const UStyleHints *hints, const UWidgetModel *model, UWidget *w=NULL)=0 |
virtual UDimension | getSizeFromContents (ComponentElement elem, const UDimension &contentsSize, const UStyleHints *hints, const UWidgetModel *model, UWidget *w=NULL)=0 |
virtual void | paintCompound (UGraphics *g, const UStyleHints *hints, const std::string &text, UIcon *icon, const URectangle &rect, uint32_t widgetState, int acceleratorIndex=-1)=0 |
virtual UDimension | getCompoundPreferredSize (const UStyleHints *hints, const std::string &text, UIcon *icon)=0 |
virtual void | layoutCompound (const UStyleHints *hints, const std::string &text, UIcon *icon, const URectangle &viewRect, URectangle *textRect, URectangle *iconRect)=0 |
virtual void | install (UWidget *w)=0 |
virtual void | uninstall (UWidget *w)=0 |
Actually you do not have to have a certain widget for painting, just a model which describe its contents.
|
Implemented in ufo::UBasicStyle.
|
|
Implemented in ufo::UBasicStyle.
|
|
Implemented in ufo::UBasicStyle.
|
|
May return a slightly enlarged dimension to add space for focus, styled borders or icons. Implemented in ufo::UBasicStyle.
|
|
Implemented in ufo::UBasicStyle.
|
|
Implemented in ufo::UBasicStyle.
|
|
Stub method. Configures a widget to be used with this style. Not yet implementd. Implemented in ufo::UBasicStyle.
|
|
Lays out an icon with text. Implemented in ufo::UBasicStyle.
|
|
Paints a border. Implemented in ufo::UBasicStyle.
|
|
Paints a component of a widget resp. the whole widget. For most components, this is only a call to paintModelBackground and paintModel. Implemented in ufo::UBasicStyle.
|
|
Paints an icon with text. Implemented in ufo::UBasicStyle.
|
|
Paints a primitive element like arrows and frames. Implemented in ufo::UBasicStyle.
|