JNR
|
GUI Push-button. More...
#include <uiButton.h>
Public Member Functions | |
void | setReceiver (uiWindow *pWnd) |
Set receiver window (fires onCommand when the button is clicked) | |
void | setImage (laTexture img) |
Set image. | |
Constructors and desturctors | |
uiButton (void) | |
Bla. | |
~uiButton (void) | |
Create/destroy | |
virtual void | create (laPoint3 pos, laPoint3 size) |
Create new empty window. | |
void | kill () |
Discard window and all children. | |
Toggle mode | |
void | togglePersistent (M_BOOL bEnable) |
void | toggleRepetitive (M_BOOL bEnable) |
Check/set status | |
M_BOOL | isPressed () |
void | press () |
void | unpress () |
Draw and handle messages | |
void | draw () |
Draw event. | |
void | reply () |
Handle input message. | |
Message handlers | |
virtual void | onDown (unsigned nButton) |
virtual void | onUp (unsigned nButton) |
virtual void | onMouseOut () |
![]() | |
uiLabel (void) | |
Class Constructor. | |
virtual void | load (class laFileParser *fp) |
Load from .cui file. | |
void | kill () |
Discard window and all children. | |
void | setText (const char *text) |
void | getText (char *text) |
void | align (unsigned ha, unsigned va) |
void | size (unsigned size) |
void | font (laFont *pf) |
![]() | |
uiWindow (void) | |
Class constructor. | |
M_BOOL | isMouseInside () |
Helpful function that checks if the mouse pointer is inside the window. | |
virtual void | move (laPoint3 ptNewPos, unsigned nHReference=M_AL, unsigned nVReference=M_AT) |
Change window position. | |
virtual void | show () |
virtual void | hide () |
bool | isVisible () |
void | enable () |
void | disable () |
bool | isEnabled () |
unsigned long | getID () |
void | setID (unsigned long id) |
laPoint3 | getPos () |
Get relative window position with regard to parent. | |
laPoint3 | getAbsolutePos () |
Get absolute window position. | |
laPoint3 | getSize () |
laPoint3 | getDecorationSize () |
virtual void | onMouseIn () |
virtual void | onMouseMove (laPoint3 ptRelativePos) |
virtual void | onClick (unsigned nButton) |
virtual void | onCommand (unsigned long uID, unsigned long nCmd) |
Command event handler. | |
Protected Member Functions | |
void | _drawButton () |
Draw button outline. | |
![]() | |
laPoint3 | getRelativePointerPos () |
Get mouse pointer position relative to window position. | |
Additional Inherited Members | |
![]() | |
static uiPointer * | getMousePointer () |
Enables children to get a pointer to the mouse pointer, but not to change it. | |
![]() | |
char | _strText [256] |
Text string. | |
laFont * | _pFont |
Pointer to active font. | |
M_BOOL | _bCustomColor |
Custom color, or use skin color if not set. | |
laColor | _rgbCustom |
unsigned | _nAlignH |
unsigned | _nAlignV |
unsigned | _nSize |
![]() | |
uiWindow * | _pParent |
Pointer to parent window, if any. | |
bool | _bVisible |
Window visibility flag. | |
bool | _bEnabled |
Window interactivity flag. | |
laPoint3 | _ptPos |
Windos position (relative to parent) | |
laPoint3 | _ptSize |
Window size. | |
laPoint3 | _ptDecorationSize |
Size of border elements; defaults to 0. | |
![]() | |
static uiSkin * | _pSkin = NULL |