#include <Robots/LoBot/ui/LoDrawable.H>
Public Member Functions | |
Geometry (int x=0, int y=0, int width=-1, int height=-1) | |
Default constructor. | |
Geometry (const std::string &geometry) | |
Public Attributes | |
int | x |
int | y |
int | width |
int | height |
Each drawable has a geometry specification read from the lobot config file. A geometry specification consists of the (x,y) coordinates of the drawable's top-left corner within the Robolocust main window and a [width, height] pair in pixels with width going to the right and height going down (exactly like X Window geometry specs).
In some situations, we may want a drawable to be active, i.e., added to the main window, so that it can process keyboard input but not visible, i.e., the drawable doesn't really draw anything (perhaps it simply renders overlays on other drawables). To make a drawable invisible, simply set its dimensions in its geometry to negative quantities.
Definition at line 140 of file LoDrawable.H.
lobot::Drawable::Geometry::Geometry | ( | int | x = 0 , |
|
int | y = 0 , |
|||
int | width = -1 , |
|||
int | height = -1 | |||
) |
Default constructor.
Definition at line 106 of file LoDrawable.C.
lobot::Drawable::Geometry::Geometry | ( | const std::string & | geometry | ) |
A convenience constructor for parsing a geometry spec passed in as a whitespace-separated string (e.g., a geometry spec read from the config file).
Definition at line 110 of file LoDrawable.C.