#include <scrollbar.h>
Definition at line 28 of file scrollbar.h.
Public Member Functions | |
bool | CastEvent (glictEvents evt, void *wparam, long lparam, void *returnvalue) |
Casts an event to the class, so it can process it. Example is mouseclick or mousedown. | |
int | GetMax () |
int | GetMin () |
unsigned int | GetStep () |
int | GetValue () |
glictScrollbar () | |
virtual void | Paint () |
Renders the element. Should contain call to CPaint(). | |
void | SetBGColor (float r, float g, float b, float a) |
void | SetMax (int newmax) |
void | SetMin (int newmin) |
void | SetStep (unsigned int newstep) |
How much is increased/decreased by each step. | |
void | SetValue (int val) |
virtual | ~glictScrollbar () |
Private Attributes | |
glictColor | bgcolor |
bool | highlightdn |
bool | highlightup |
int | max |
int | min |
unsigned int | step |
int | value |
Friends | |
class | glictContainer |
bool glictScrollbar::CastEvent | ( | glictEvents | evt, | |
void * | wparam, | |||
long | lparam, | |||
void * | returnvalue | |||
) | [virtual] |
Casts an event to the class, so it can process it. Example is mouseclick or mousedown.
evt | Event that occured | |
*wparam | Any kind of value that needs to be passed on to the function. (For example if a structure needs to be passed.) | |
lparam | Numeric value that needed to be passed for event processing. | |
*returnvalue | Return value, if any, will be stored here. If NULL, no return value shall be stored. |
The thing is, this CastEvent function first tries to tell its children that the event happened, and upon being told by each of them that they didn't do anything with the event, goes on with processing it itself.
Container class does not do anything except pushing events on to DefaultCastEvent.
Reimplemented from glictContainer.
Definition at line 167 of file scrollbar.cpp.
References glictContainer::DefaultCastEvent(), glictContainer::Focus(), glictContainer::GetVisible(), GLICT_MOUSECLICK, GLICT_MOUSEDOWN, GLICT_MOUSEUP, highlightdn, highlightup, max, min, step, value, glictContainer::x, and glictContainer::y.
Referenced by glictPanel::CastEvent().
void glictScrollbar::Paint | ( | ) | [virtual] |
Renders the element. Should contain call to CPaint().
(This description applies for the glictContainer::Paint(). If you are reading it for some other class, then its documentation is not written yet for this function.)
In glictContainer class, Paint does nothing except calling SetScissor() and CPaint(). This is because as a widget the container class does not render anything; it serves as a point of divergence for other classes. Other widgets should define their own procedure with these two calls as a minimum.
When writing a widget, put SetScissor() on the beginning of this function, and CPaint() on the end.
Reimplemented from glictContainer.
Definition at line 59 of file scrollbar.cpp.
References glictColor::a, glictColor::b, bgcolor, glictContainer::CPaint(), glictColor::g, glictContainer::GetVisible(), glictFontRender(), glictFontSize(), highlightdn, highlightup, glictGlobalsClass::PaintRect(), glictColor::r, glictGlobalsClass::SetColor(), glictContainer::SetScissor(), glictGlobalsClass::translation, glictContainer::width, glictPos::x, and glictPos::y.
int glictScrollbar::value [private] |
Definition at line 52 of file scrollbar.h.
Referenced by CastEvent(), GetValue(), glictScrollbar(), and SetValue().