Berkelium::Widget Class Reference
A widget is a rectangular canvas which can be painted to.
More...
#include <Widget.hpp>
List of all members.
Public Member Functions |
virtual | ~Widget () |
| Deprecated virtual destructor.
|
void | destroy () |
| Safe destructor for widget.
|
virtual int | getId () const =0 |
| Gets a unique id for this widget.
|
virtual void | focus ()=0 |
virtual void | unfocus ()=0 |
virtual bool | hasFocus () const =0 |
virtual void | mouseMoved (int xPos, int yPos)=0 |
virtual void | mouseButton (unsigned int buttonID, bool down, int clickCount=1)=0 |
virtual void | mouseWheel (int xScroll, int yScroll)=0 |
virtual void | textEvent (const wchar_t *evt, size_t evtLength)=0 |
virtual void | keyEvent (bool pressed, int mods, int vk_code, int scancode)=0 |
virtual Rect | getRect () const =0 |
virtual void | setPos (int x, int y)=0 |
virtual void | textEvent (WideString text)=0 |
Detailed Description
A widget is a rectangular canvas which can be painted to.
A Widget maintains its own focus state, and can accept input just like a Window. Widgets have very limited use in practice--mostly just dropdowns.
Constructor & Destructor Documentation
virtual Berkelium::Widget::~Widget |
( |
|
) |
[inline, virtual] |
Member Function Documentation
void Berkelium::Widget::destroy |
( |
|
) |
|
virtual void Berkelium::Widget::focus |
( |
|
) |
[pure virtual] |
virtual int Berkelium::Widget::getId |
( |
|
) |
const [pure virtual] |
Gets a unique id for this widget.
- Returns:
- the widget's routing id
virtual Rect Berkelium::Widget::getRect |
( |
|
) |
const [pure virtual] |
virtual bool Berkelium::Widget::hasFocus |
( |
|
) |
const [pure virtual] |
virtual void Berkelium::Widget::keyEvent |
( |
bool |
pressed, |
|
|
int |
mods, |
|
|
int |
vk_code, |
|
|
int |
scancode | |
|
) |
| | [pure virtual] |
virtual void Berkelium::Widget::mouseButton |
( |
unsigned int |
buttonID, |
|
|
bool |
down, |
|
|
int |
clickCount = 1 | |
|
) |
| | [pure virtual] |
virtual void Berkelium::Widget::mouseMoved |
( |
int |
xPos, |
|
|
int |
yPos | |
|
) |
| | [pure virtual] |
virtual void Berkelium::Widget::mouseWheel |
( |
int |
xScroll, |
|
|
int |
yScroll | |
|
) |
| | [pure virtual] |
virtual void Berkelium::Widget::setPos |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [pure virtual] |
virtual void Berkelium::Widget::textEvent |
( |
WideString |
text |
) |
[pure virtual] |
virtual void Berkelium::Widget::textEvent |
( |
const wchar_t * |
evt, |
|
|
size_t |
evtLength | |
|
) |
| | [pure virtual] |
virtual void Berkelium::Widget::unfocus |
( |
|
) |
[pure virtual] |
The documentation for this class was generated from the following file: