FlexiWidget Class Reference
Base element for the gui.
More...
#include <FlexiWidget.h>
List of all members.
Detailed Description
Base element for the gui.
- Author:
- Alessandro Rasulo (mailto: alex9978@gmail.com)
Constructor & Destructor Documentation
Constructor
- Parameters:
-
| p | position |
| s | size |
| prnt | parent widget |
FlexiWidget::~FlexiWidget |
( |
|
) |
[virtual] |
Member Function Documentation
void FlexiWidget::setName |
( |
const std::string & |
newName |
) |
[inline] |
Sets the name of the widget
- Parameters:
-
| newName | The new name of the widget |
const std::string & FlexiWidget::getName |
( |
|
) |
const [inline] |
Gets the name of the widget
- Returns:
- the name
Gets the parent of the widget
- Returns:
- the parent
Reparents the widget to another parent
- Parameters:
-
| newparent | the new parent widget |
- Returns:
- true if success
bool FlexiWidget::isContainer |
( |
|
) |
[inline] |
Return if the widget is a container
- Returns:
- true if is a container
Add a child to the widget, if this widget is a container
- Parameters:
-
const std::list< FlexiWidget * > FlexiWidget::getChildren |
( |
|
) |
const |
Return the list of all children
- Returns:
- the list of all children
Gets the position of the widget
- Returns:
- the position
const FlexiSize & FlexiWidget::getSize |
( |
|
) |
[inline] |
Gets the size of the widget
- Returns:
- the size
Gets the absolute position of the widget (not relative to parent)
- Returns:
- the absolute position on the screen
const FlexiPosition FlexiWidget::getOriginalPosition |
( |
|
) |
[inline] |
Gets the original position of the widget (without any translation)
- Returns:
- the original position
void FlexiWidget::setPosition |
( |
const FlexiPosition & |
p |
) |
[inline] |
Sets the widget's position
- Parameters:
-
void FlexiWidget::setSize |
( |
const FlexiSize & |
s |
) |
[inline] |
Sets the widget's size
- Parameters:
-
void FlexiWidget::show |
( |
|
) |
|
void FlexiWidget::hide |
( |
|
) |
|
void FlexiWidget::activate |
( |
|
) |
|
void FlexiWidget::deactivate |
( |
|
) |
|
bool FlexiWidget::isVisible |
( |
|
) |
[inline] |
Returns if the widget is visible
- Returns:
- true if is visible
bool FlexiWidget::isActive |
( |
|
) |
[inline] |
Returns if the widget is active
- Returns:
- true if is active
void FlexiWidget::setFocusable |
( |
bool |
focusable |
) |
[inline] |
Set if a widget can receive focus
- Parameters:
-
| focuseable | true if the widget can get focused |
void FlexiWidget::setFocus |
( |
|
) |
[inline] |
Sets the focus to the widget
bool FlexiWidget::isFocusable |
( |
|
) |
[inline] |
Gets if the widget can receive focus
- Returns:
- true if is focusable
bool FlexiWidget::isFocused |
( |
|
) |
[inline] |
Returns if the widget is focused
- Returns:
- true if the widget is focused
void FlexiWidget::setHilighted |
( |
bool |
hilight |
) |
[inline] |
Sets the widget hilight status
- Parameters:
-
| hilight | true if hilighted |
bool FlexiWidget::isHilighted |
( |
|
) |
[inline] |
Returns if the widget is hilighted
- Returns:
- true if hilighted
void FlexiWidget::dispatchFocusEvent |
( |
FlexiFocusEvent * |
event |
) |
|
Dispatch a focus event to all the children
- Parameters:
-
void FlexiWidget::dispatchMouseEvent |
( |
FlexiMouseEvent * |
event |
) |
|
Dispatch a mouse event to all the children
- Parameters:
-
void FlexiWidget::setFlags |
( |
int |
flags, |
|
|
bool |
value | |
|
) |
| | |
Sets the one or more flags of the widget
- Parameters:
-
| flags | the flags to be set |
| value | true or false |
bool FlexiWidget::getFlags |
( |
int |
flags |
) |
|
Gets one or more flags of the widget
- Parameters:
-
| flags | the flags to be read |
- Returns:
- flags status
void FlexiWidget::setBackImage |
( |
FlexiImage * |
image, |
|
|
int |
gridBagType = FlexiGridBag::FLX_GRIDBAG_1X1 | |
|
) |
| | |
Sets the background image of the widget
- Parameters:
-
| image | the image |
| gridBagType | the type of gridbag to use |
- See also:
- FlexiGridBag
Set the sensitive area of the widget
- Parameters:
-
| sensitive_area | the sensitive area |
- Returns:
- true if success
bool FlexiWidget::isMouseOver |
( |
int |
mouseX, |
|
|
int |
mouseY | |
|
) |
| | |
Tells if mouse is over the sensitive area of the widget
- Returns:
- true if the mouse is over
void FlexiWidget::setTag |
( |
long |
value |
) |
[inline] |
Sets the widget's tag data
- Parameters:
-
long FlexiWidget::getTag |
( |
|
) |
[inline] |
Gets the widget's tag data
- Returns:
- the tag
Add a default action listener to the widget
- Parameters:
-
| listener | an action listener |
Add a default focus listener to the widget
- Parameters:
-
| listener | a focus listener |
Add a default key listener to the widget
- Parameters:
-
Add a default mouse listener to the widget
- Parameters:
-
| listener | a mouse listener |
Add an user defined action listener to the widget
- Parameters:
-
| listener | an action listener |
Add an user defined focus listener to the widget
- Parameters:
-
| listener | a focus listener |
Add an user defined key listener to the widget
- Parameters:
-
Add an user defined mouse listener to the widget
- Parameters:
-
| listener | a mouse listener |
void FlexiWidget::callActionListener |
( |
FlexiActionEvent * |
event |
) |
|
Calls the associated action listener of this widget
- Parameters:
-
void FlexiWidget::callFocusListener |
( |
FlexiFocusEvent * |
event |
) |
|
Calls the associated focus listener of this widget
- Parameters:
-
void FlexiWidget::callKeyListener |
( |
FlexiKeyEvent * |
event |
) |
|
Calls the associated key listener of this widget
- Parameters:
-
void FlexiWidget::callMouseListener |
( |
FlexiMouseEvent * |
event |
) |
|
Calls the associated mouse listener of this widget
- Parameters:
-
void FlexiWidget::paint |
( |
|
) |
[virtual] |
The documentation for this class was generated from the following files:
- include/FlexiSense/FlexiWidget.h
- src/FlexiWidget.cpp