Provides a window to render images, as well as simple event management (mouse and keyboard input).
Public Member Functions | |
tlDisplay () | |
tlDisplay (int x, int y) | |
tlDisplay (char *name) | |
tlDisplay (char *name, int x, int y) | |
virtual | ~tlDisplay () |
bool | getVisible () |
int | getID () |
int | getWidth () |
int | getHeight () |
int | setPos (int x, int y) |
int | resize (int width, int height) |
int | close () |
int | show () |
int | hide () |
int | display (tlHist *hist) |
int | display (tlHist2D *hist) |
Static Public Member Functions | |
static int | queryEvent () |
static int | event () |
static int | getLastEvent () |
static tlDisplay * | getLastDisplay () |
static tlPoint * | getMouse () |
static int | getMouse (tlPoint *point) |
static tlPoint * | getMouseDown () |
static int | getMouseDown (tlPoint *point) |
static tlPoint * | getMouseUp () |
static int | getMouseUp (tlPoint *point) |
static tlPoint * | getMouseDouble () |
static int | getMouseDouble (tlPoint *point) |
static tlRect * | getMouseRect () |
static int | getMouseRect (tlRect *rect) |
static char | getKeyDown () |
static char | getKeyUp () |
static int | setMousePos (int x, int y) |
static char | waitKey () |
static void | waitMouse () |
tlDisplay::tlDisplay | ( | ) |
tlDisplay::tlDisplay | ( | int | x, | |
int | y | |||
) |
Constructor, specifies window position on the screen.
x | initial window X position [pix] | |
y | initial window Y position [pix] |
tlDisplay::tlDisplay | ( | char * | name | ) |
Constructor.
name | window name (displayed in title bar) |
tlDisplay::tlDisplay | ( | char * | name, | |
int | x, | |||
int | y | |||
) |
Constructor, specifies both position and window name.
name | window name (displayed in title bar) | |
x | initial window X position [pix] | |
y | initial window Y position [pix] |
tlDisplay::~tlDisplay | ( | ) | [virtual] |
bool tlDisplay::getVisible | ( | ) | [inline] |
Return window state (visible or hidden).
int tlDisplay::getID | ( | ) | [inline] |
Return window ID tag.
int tlDisplay::getWidth | ( | ) | [inline] |
Return window height (displayable area without borders).
int tlDisplay::getHeight | ( | ) | [inline] |
Return window width (displayable area without borders).
int tlDisplay::setPos | ( | int | x, | |
int | y | |||
) |
Reposition the window and the display area.
x | new display area (upper-left corner) X position | |
y | new display area (upper-left corner) Y position |
int tlDisplay::resize | ( | int | width, | |
int | height | |||
) |
Resize the window and the display area.
width | new display area width | |
height | new display area height |
int tlDisplay::close | ( | ) |
Close and destroys the window.
int tlDisplay::show | ( | ) |
int tlDisplay::hide | ( | ) |
int tlDisplay::display | ( | tlHist * | hist | ) |
Display a histogram in the display area.
hist | the histogram to display |
int tlDisplay::display | ( | tlHist2D * | hist | ) |
Display a 2D histogram in the display area.
hist | the 2D histogram to display |
int tlDisplay::queryEvent | ( | void | ) | [static] |
Check if an event has occured and is in the event queue.
int tlDisplay::event | ( | void | ) | [static] |
Process TL library windows events; result is stored in TL specific data structure. This is a blocking function.
int tlDisplay::getLastEvent | ( | ) | [static] |
Return last received event. Is set to TL_NO_EVENT once called.
tlDisplay * tlDisplay::getLastDisplay | ( | ) | [static] |
Return a pointer to the display that generated the last processed event.
tlPoint * tlDisplay::getMouse | ( | ) | [static] |
Get mouse click coordonates. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
tlDisplay::getMouse | ( | tlPoint * | point | ) | [static] |
Get mouse click coordonates. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
point | [out] a valid pointer to a point structure to receive the coordonates. |
tlPoint * tlDisplay::getMouseDown | ( | ) | [static] |
Get mouse coordonates when button is pressed. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
tlDisplay::getMouseDown | ( | tlPoint * | point | ) | [static] |
Get mouse coordonates when button is pressed. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
point | [out] a valid pointer to a point structure to receive the coordonates. |
tlPoint * tlDisplay::getMouseUp | ( | ) | [static] |
Get mouse coordonates when button is released. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
tlDisplay::getMouseUp | ( | tlPoint * | point | ) | [static] |
Get mouse coordonates when button is released. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
point | [out] a valid pointer to a point structure to receive the coordonates. |
tlPoint * tlDisplay::getMouseDouble | ( | ) | [static] |
Get mouse double click coordonates. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
tlDisplay::getMouseDouble | ( | tlPoint * | point | ) | [static] |
Get mouse double click coordonates. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
point | [out] a valid pointer to a point structure to receive the coordonates. |
tlRect * tlDisplay::getMouseRect | ( | ) | [static] |
Get mouse defined rectangle coordonates. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
tlDisplay::getMouseRect | ( | tlRect * | rect | ) | [static] |
Get mouse defined rectangle coordonates. User can be in *any* TL window. Use tlDisplay::getLastDisplay() to retrieve the window that currently "has" the mouse.
rect | [out] a valid pointer to a point structure to receive the coordonates. |
char tlDisplay::getKeyDown | ( | ) | [static] |
Get keycode for keyboard downstroke.
char tlDisplay::getKeyUp | ( | ) | [static] |
Get keycode for keyboard uptroke.
int tlDisplay::setMousePos | ( | int | x, | |
int | y | |||
) | [static] |
Warp the mouse pointer to an absolute screen position. (x, y) = (0, 0) = top-left corner
x | absolute screen X position | |
y | absolute screen Y position |
char tlDisplay::waitKey | ( | ) | [static] |
Wait for a key to be pressed on the keyboard.
void tlDisplay::waitMouse | ( | ) | [static] |
Wait for the user to click in a window.