Faith::Style Class Reference

#include <faith/style.h>

List of all members.

Public Types

 Style_Default = 0
 Style_Enabled = 1<< 0
 Style_HasFocus = 1<< 1
 Style_Raised = 1<< 2
 Style_Sunken = 1<< 3
 Style_ButtonDefault = 1<< 4
 Style_On = 1<< 5
 Style_Off = 1<< 6
 Style_Down = 1<< 7
 Style_MouseOver = 1<< 8
 Style_Active = 1<< 9
 Style_Horizontal = 1<< 10
 Style_Vertical = 1<< 11
 PE_ButtonBevel
 PE_PanelLineEdit
 PE_ButtonDefault
 PE_ButtonTool
 PE_WindowFrame
 PE_PanelPopup
 PE_ScrollBarAddPage
 PE_ScrollBarSubPage
 PE_ScrollBarSubLine
 PE_ScrollBarAddLine
 PE_ScrollBarFirst
 PE_ScrollBarLast
 PE_ScrollBarSlider
 PE_FocusRect
 PE_ArrowUp
 PE_ArrowDown
 PE_ArrowLeft
 PE_ArrowRight
 PE_DockWindowHandle
 PE_CheckMark
 PE_SliderHandle
 PE_SliderGroove
 PE_SpinWidgetUp
 PE_SpinWidgetDown
 CE_PushButton
 CE_PushButtonLabel
 CE_ToolButtonLabel
 CE_MenuBarItem
 CE_PopupMenuItem
 CC_ScrollBar
 CC_ToolButton
 CC_Slider
 CC_ComboBox
 SC_None = 0
 SC_ScrollBarAddLine = 1 << 0
 SC_ScrollBarSubLine = 1 << 1
 SC_ScrollBarAddPage = 1 << 2
 SC_ScrollBarSubPage = 1 << 3
 SC_ScrollBarFirst = 1 << 4
 SC_ScrollBarLast = 1 << 5
 SC_ScrollBarSlider = 1 << 6
 SC_ScrollBarGroove = 1 << 7
 SC_ToolButton = 1 << 8
 SC_ToolButtonMenu = 1 << 9
 SC_SliderHandle = 1 << 10
 SC_SliderGroove = 1 << 11
 SC_SliderAddPage = 1 << 12
 SC_SliderSubPage = 1 << 13
 SC_ComboBoxEditField = 1 << 14
 SC_ComboBoxArrow = 1 << 15
 SC_ComboBoxFrame = 1 << 16
 SC_ComboBoxListBoxPopup = 1 << 17
 PM_ButtonMargin
 PM_ButtonShiftVertical
 PM_ButtonShiftHorizontal
 PM_LineEditMargin
 PM_ScrollBarExtent
 PM_ScrollBarSliderMin
 PM_MenuBarItemSpacing
 PM_SliderExtent
 PM_SliderHandleExtent
 PM_DefaultFrameWidth
 SR_PushButtonContents
 SR_ToolButtonContents
 SR_DockWindowHandleRect
 SR_ComboBoxFocusRect
 CT_PopupMenuItem
 CT_ToolButton
enum  StyleFlags {
  Style_Default = 0, Style_Enabled = 1<< 0, Style_HasFocus = 1<< 1, Style_Raised = 1<< 2,
  Style_Sunken = 1<< 3, Style_ButtonDefault = 1<< 4, Style_On = 1<< 5, Style_Off = 1<< 6,
  Style_Down = 1<< 7, Style_MouseOver = 1<< 8, Style_Active = 1<< 9, Style_Horizontal = 1<< 10,
  Style_Vertical = 1<< 11
}
enum  PrimitiveElement {
  PE_ButtonBevel, PE_PanelLineEdit, PE_ButtonDefault, PE_ButtonTool,
  PE_WindowFrame, PE_PanelPopup, PE_ScrollBarAddPage, PE_ScrollBarSubPage,
  PE_ScrollBarSubLine, PE_ScrollBarAddLine, PE_ScrollBarFirst, PE_ScrollBarLast,
  PE_ScrollBarSlider, PE_FocusRect, PE_ArrowUp, PE_ArrowDown,
  PE_ArrowLeft, PE_ArrowRight, PE_DockWindowHandle, PE_CheckMark,
  PE_SliderHandle, PE_SliderGroove, PE_SpinWidgetUp, PE_SpinWidgetDown
}
enum  ControlElement {
  CE_PushButton, CE_PushButtonLabel, CE_ToolButtonLabel, CE_MenuBarItem,
  CE_PopupMenuItem
}
enum  ComplexControl { CC_ScrollBar, CC_ToolButton, CC_Slider, CC_ComboBox }
enum  SubControl {
  SC_None = 0, SC_ScrollBarAddLine = 1 << 0, SC_ScrollBarSubLine = 1 << 1, SC_ScrollBarAddPage = 1 << 2,
  SC_ScrollBarSubPage = 1 << 3, SC_ScrollBarFirst = 1 << 4, SC_ScrollBarLast = 1 << 5, SC_ScrollBarSlider = 1 << 6,
  SC_ScrollBarGroove = 1 << 7, SC_ToolButton = 1 << 8, SC_ToolButtonMenu = 1 << 9, SC_SliderHandle = 1 << 10,
  SC_SliderGroove = 1 << 11, SC_SliderAddPage = 1 << 12, SC_SliderSubPage = 1 << 13, SC_ComboBoxEditField = 1 << 14,
  SC_ComboBoxArrow = 1 << 15, SC_ComboBoxFrame = 1 << 16, SC_ComboBoxListBoxPopup = 1 << 17
}
enum  PixelMetrics {
  PM_ButtonMargin, PM_ButtonShiftVertical, PM_ButtonShiftHorizontal, PM_LineEditMargin,
  PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_MenuBarItemSpacing, PM_SliderExtent,
  PM_SliderHandleExtent, PM_DefaultFrameWidth
}
enum  SubRect { SR_PushButtonContents, SR_ToolButtonContents, SR_DockWindowHandleRect, SR_ComboBoxFocusRect }
enum  ContentsType { CT_PopupMenuItem, CT_ToolButton }

Public Member Functions

 Style ()
virtual ~Style ()
virtual void polish (Faith::Widget *w)=0
virtual void unpolish (Faith::Widget *w)=0
virtual void drawControl (ControlElement which, Painter *with, const Widget *what, const ColorGroup &cg, const Rect &where, unsigned int flags=0, void *opt=0)=0
virtual void drawComplexControl (ComplexControl which, Painter *with, const Widget *what, const Rect &where, const ColorGroup &cg, unsigned int flags, unsigned int controls, SubControl active, void *opt=0)=0
virtual void drawPrimitive (PrimitiveElement which, Painter *with, const Rect &where, const ColorGroup &cg, unsigned int flags=0, void *opt=0)=0
virtual void drawItem (Painter *with, const Rect &where, int textflags, const ColorGroup &cg, bool enabled, const Pixmap &pixmap, const String &text, int len, const Faith::Color &color)
virtual int pixelMetric (PixelMetrics which, const Widget *what) const =0
virtual Faith::Rect subRect (SubRect subrect, const Widget *widget) const =0
virtual Faith::Style::SubControl querySubControl (ComplexControl control, const Widget *widget, const Point &at, void *opt=0) const =0
virtual Faith::Rect querySubControlMetrics (ComplexControl control, const Widget *widget, SubControl sc, void *opt=0) const =0
virtual Faith::Size sizeFromContents (ContentsType t, const Widget *widget, const Size &s, const void *opt=0) const =0

Static Public Member Functions

static Faith::Rect visualRect (const Rect &rect, const Widget *)


Detailed Description

a Style is a pluggable module for presenting the widgets somehow pretty.


Member Enumeration Documentation

enum Faith::Style::ComplexControl

Enumerator:
CC_ScrollBar 
CC_ToolButton 
CC_Slider 
CC_ComboBox 

enum Faith::Style::ContentsType

Enumerator:
CT_PopupMenuItem 
CT_ToolButton 

enum Faith::Style::ControlElement

A part of a control

Enumerator:
CE_PushButton 
CE_PushButtonLabel 
CE_ToolButtonLabel 
CE_MenuBarItem 
CE_PopupMenuItem 

enum Faith::Style::PixelMetrics

Various measurements of the style

Enumerator:
PM_ButtonMargin 
PM_ButtonShiftVertical 
PM_ButtonShiftHorizontal 
PM_LineEditMargin 
PM_ScrollBarExtent 
PM_ScrollBarSliderMin 
PM_MenuBarItemSpacing 
PM_SliderExtent 
PM_SliderHandleExtent 
PM_DefaultFrameWidth 

enum Faith::Style::PrimitiveElement

Enumerator:
PE_ButtonBevel 
PE_PanelLineEdit 
PE_ButtonDefault 
PE_ButtonTool 
PE_WindowFrame 
PE_PanelPopup 
PE_ScrollBarAddPage 
PE_ScrollBarSubPage 
PE_ScrollBarSubLine 
PE_ScrollBarAddLine 
PE_ScrollBarFirst 
PE_ScrollBarLast 
PE_ScrollBarSlider 
PE_FocusRect 
PE_ArrowUp 
PE_ArrowDown 
PE_ArrowLeft 
PE_ArrowRight 
PE_DockWindowHandle 
PE_CheckMark 
PE_SliderHandle 
PE_SliderGroove 
PE_SpinWidgetUp 
PE_SpinWidgetDown 

enum Faith::Style::StyleFlags

How the things are drawn:

Enumerator:
Style_Default 
Style_Enabled 
Style_HasFocus 
Style_Raised 
Style_Sunken 
Style_ButtonDefault 
Style_On 
Style_Off 
Style_Down 
Style_MouseOver 
Style_Active 
Style_Horizontal 
Style_Vertical 

enum Faith::Style::SubControl

Enumerator:
SC_None 
SC_ScrollBarAddLine 
SC_ScrollBarSubLine 
SC_ScrollBarAddPage 
SC_ScrollBarSubPage 
SC_ScrollBarFirst 
SC_ScrollBarLast 
SC_ScrollBarSlider 
SC_ScrollBarGroove 
SC_ToolButton 
SC_ToolButtonMenu 
SC_SliderHandle 
SC_SliderGroove 
SC_SliderAddPage 
SC_SliderSubPage 
SC_ComboBoxEditField 
SC_ComboBoxArrow 
SC_ComboBoxFrame 
SC_ComboBoxListBoxPopup 

enum Faith::Style::SubRect

Enumerator:
SR_PushButtonContents 
SR_ToolButtonContents 
SR_DockWindowHandleRect 
SR_ComboBoxFocusRect 


Constructor & Destructor Documentation

Faith::Style::Style (  ) 

virtual Faith::Style::~Style (  )  [virtual]


Member Function Documentation

virtual void Faith::Style::drawComplexControl ( ComplexControl  which,
Painter with,
const Widget what,
const Rect where,
const ColorGroup cg,
unsigned int  flags,
unsigned int  controls,
SubControl  active,
void *  opt = 0 
) [pure virtual]

virtual void Faith::Style::drawControl ( ControlElement  which,
Painter with,
const Widget what,
const ColorGroup cg,
const Rect where,
unsigned int  flags = 0,
void *  opt = 0 
) [pure virtual]

virtual void Faith::Style::drawItem ( Painter with,
const Rect where,
int  textflags,
const ColorGroup cg,
bool  enabled,
const Pixmap pixmap,
const String text,
int  len,
const Faith::Color color 
) [virtual]

virtual void Faith::Style::drawPrimitive ( PrimitiveElement  which,
Painter with,
const Rect where,
const ColorGroup cg,
unsigned int  flags = 0,
void *  opt = 0 
) [pure virtual]

virtual int Faith::Style::pixelMetric ( PixelMetrics  which,
const Widget what 
) const [pure virtual]

get the metrics for this widget

virtual void Faith::Style::polish ( Faith::Widget w  )  [pure virtual]

virtual Faith::Style::SubControl Faith::Style::querySubControl ( ComplexControl  control,
const Widget widget,
const Point at,
void *  opt = 0 
) const [pure virtual]

virtual Faith::Rect Faith::Style::querySubControlMetrics ( ComplexControl  control,
const Widget widget,
SubControl  sc,
void *  opt = 0 
) const [pure virtual]

virtual Faith::Size Faith::Style::sizeFromContents ( ContentsType  t,
const Widget widget,
const Size s,
const void *  opt = 0 
) const [pure virtual]

virtual Faith::Rect Faith::Style::subRect ( SubRect  subrect,
const Widget widget 
) const [pure virtual]

get the rectangle defined by subrect

virtual void Faith::Style::unpolish ( Faith::Widget w  )  [pure virtual]

static Faith::Rect Faith::Style::visualRect ( const Rect rect,
const Widget  
) [inline, static]


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 00:23:09 2006 for Faith by  doxygen 1.4.7