sptk2 logo
SPTK Home Page
Static Public Member Functions | Static Public Attributes | List of all members
sptk::CThemeScrollBar Class Reference
Inheritance diagram for sptk::CThemeScrollBar:
sptk::CThemes

Static Public Member Functions

static void loadGtkScrollbarButtons (xdoc::Document &xml, const String &orientation, CThemeImageCollection &buttonImages)
 Loads GTK theme scrollbar button images from 'style' node. More...
 
static void loadGtkScrollbarTroughs (xdoc::Document &xml)
 Loads GTK theme scrollbar troughs. More...
 
static void loadGtkScrollbarSliders (xdoc::Document &xml)
 Loads GTK theme scrollbar sliders. More...
 
static void loadGtkScrollbars (xdoc::Document &xml)
 Loads GTK theme scrollbar button images from GTK theme. More...
 
static bool sizeScrollBar (int &w, int &h)
 Computes and returns the minimum size of the scroll bar. More...
 
static bool drawScrollBar (int x, int y, int w, int h, float minimum, float maximum, float value, float size, int activeZone, bool active)
 Draws a scroll bar image. More...
 

Static Public Attributes

static CScrollBarImages m_scrollBar [2]
 Images for painting a scroll bar (horizontal and vertical) More...
 
static int m_scrollBarTroughBorder
 
static int m_scrollBarSliderWidth
 
static int m_scrollBarStepperSize
 

Member Function Documentation

◆ drawScrollBar()

static bool sptk::CThemeScrollBar::drawScrollBar ( int  x,
int  y,
int  w,
int  h,
float  minimum,
float  maximum,
float  value,
float  size,
int  activeZone,
bool  active 
)
static

Draws a scroll bar image.

The type of the scroll bar is defined by max of (w,h).

Returns
false, if theme has no pixmaps for the scroll bar, or true otherwise
Parameters
xint, x-coordinate of the scroll bar
yint, y-coordinate of the scroll bar
wint, width of the scroll bar
hint, width of the scroll bar
minimumfloat, minimum value of the scroll bar
maximumfloat, maximum value of the scroll bar
valuefloat, value of the scroll bar
sizefloat, size of the scroll bar
activeZoneint, 0 - no active zone, 1 - button 1, 2 - button 2, 3 - slider, +8 - pushed
activebool, true if scrollbar is active (enabled)

◆ loadGtkScrollbarButtons()

static void sptk::CThemeScrollBar::loadGtkScrollbarButtons ( xdoc::Document xml,
const String orientation,
CThemeImageCollection buttonImages 
)
static

Loads GTK theme scrollbar button images from 'style' node.

Parameters
xmlXMLDoc&, GTK theme converted to XML
orientationstd::string, scrollbar button orientation ("UP","DOWN","LEFT","RIGHT")
buttonImagesCThemeImageCollection&, output button images

◆ loadGtkScrollbars()

static void sptk::CThemeScrollBar::loadGtkScrollbars ( xdoc::Document xml)
static

Loads GTK theme scrollbar button images from GTK theme.

Parameters
xmlXMLDoc&, GTK theme converted to XML

◆ loadGtkScrollbarSliders()

static void sptk::CThemeScrollBar::loadGtkScrollbarSliders ( xdoc::Document xml)
static

Loads GTK theme scrollbar sliders.

Parameters
xmlXMLDoc&, GTK theme converted to XML

◆ loadGtkScrollbarTroughs()

static void sptk::CThemeScrollBar::loadGtkScrollbarTroughs ( xdoc::Document xml)
static

Loads GTK theme scrollbar troughs.

Parameters
xmlXMLDoc&, GTK theme converted to XML

◆ sizeScrollBar()

static bool sptk::CThemeScrollBar::sizeScrollBar ( int &  w,
int &  h 
)
static

Computes and returns the minimum size of the scroll bar.

Parameters
wint&, scroll bar width, may be altered by scroll bar to meet the scroll bar size requirements
hint&, scroll bar height, may be altered by scroll bar to meet the scroll bar size requirements
Returns
false, if theme has no pixmaps for the scroll bar, or true otherwise

Member Data Documentation

◆ m_scrollBar

CScrollBarImages sptk::CThemeScrollBar::m_scrollBar[2]
static

Images for painting a scroll bar (horizontal and vertical)

Images should have the compatible size. If you put the slider image on top its frame - they should show a picture of 100% progress

◆ m_scrollBarSliderWidth

int sptk::CThemeScrollBar::m_scrollBarSliderWidth
static

Slider width

◆ m_scrollBarStepperSize

int sptk::CThemeScrollBar::m_scrollBarStepperSize
static

Button width

◆ m_scrollBarTroughBorder

int sptk::CThemeScrollBar::m_scrollBarTroughBorder
static

Trough border width


The documentation for this class was generated from the following file:

Fri Oct 14 2022 09:58:40: SPTK 5.4.1