#include <Frame.h>
Inherits Region.
Inherited by ColorPick, Dialog, and GLWindow.
Inheritance diagram for Frame:


Public Methods | |
| Frame (int i=0) | |
| Default contructor. More... | |
| virtual | ~Frame () |
| Destructor. | |
| void | add (Region *region) |
| Add a region to the child collection. More... | |
| Region * | remove (Region *region) |
| Remove a child region. More... | |
| void | enableWidget (int widgetId, bool flag) |
| Find and enables a widget. More... | |
| Region * | find (int id) |
| Finds and returns the region with id. More... | |
| void | refresh () |
| Repaints the region. More... | |
| void | move (short dx, short dy) |
| Move the region. More... | |
| bool | handleEvent (Event &event) |
| Handle window-system events. More... | |
| void | parseSymbol (Token &t, ObjectFile &file) |
| Reads a single parameter sections inside the body of the object description. More... | |
| void | writeParams (ostream &stream) |
| Writes all parameter sections inside the body of the object description. More... | |
Protected Methods | |
| bool | findRegion (Region *region) |
| Non recursive find. More... | |
| void | createSymbols () |
| Creates all parameter symbols that are used within the body of the object description. | |
Protected Attributes | |
| bool | bordered |
| Specifies whether the frame has a border. | |
| vector< Region * > | children |
| Array of child Region instances. | |
A Frame is a collection class of Region instances. The Frame class is owner of the instances and manages them. Refresh and find calls are passed to all child regions.
Format: (see Region)
PARAM ::= BORDERED | OBJECT
BORDERED :== "bordered"
Example: Frame { id 5; NumericField { position 0 0; } }
|
|
Default contructor. Constructs a new Frame with id 'i'. The id must be unique in the current scope.
|
|
|
Add a region to the child collection. Adds a Region to the list of child instances. The new region is placed on top of existing regions.
|
|
||||||||||||
|
Find and enables a widget. This method finds a Widget class with id 'widgetId'. If a widget with this id is found the Widget::enable is called with parameter 'flag'.
|
|
|
Finds and returns the region with id. This method searches the underlying region hierarchy to find a region with id 'i'.
Reimplemented from Region. |
|
|
Non recursive find. Non-recusively find a region pointer in the child array.
|
|
|
Handle window-system events. This method handles keyboard or mouse event from the window system. Window events are handled top down, events that are not consumed are passed to child regions that are willing to accept the event.
Reimplemented from Region. Reimplemented in ColorPick. |
|
||||||||||||
|
Move the region. Moved the region by (dx, dy) including all child regions.
Reimplemented from Region. |
|
||||||||||||
|
Reads a single parameter sections inside the body of the object description. Each object has a set of parameter names associated with it, called symbols. Symbols are declared inside the createSymbols method. The method parseSymbol expects the Token t to be such a symbol and reads the corresponding parameters. Unknown symbols are passed to its super class.
Reimplemented from Region. Reimplemented in ColorPick. |
|
|
Repaints the region. This method is called whenever the screen is repainted. The repaint method uses OpenGL calls to render the region. Currently it is assumed that regions are refreshed automatically so that no refresh notification has to be done when the region changes state i.e. no refresh has to be forced by the region. Region rendering is done back to front.
Reimplemented from Region. Reimplemented in ColorPick. |
|
|
Remove a child region. Non-recursively find and remove 'region' from the list of child instances.
|
|
|
Writes all parameter sections inside the body of the object description. This method writes all object parameters to ostream. Inhereting classes will always call super::writeParams().
Reimplemented from Region. Reimplemented in ColorPick. |