GUI container. More...
#include <gui_frame.hpp>
Classes | |
struct | script_info |
Public Types | |
typedef std::function< void(frame *, event *) | handler ) |
Public Member Functions | |
frame (manager *pManager) | |
Constructor. | |
virtual | ~frame () |
Destructor. | |
virtual void | render () |
Renders this widget on the current render target. | |
virtual void | update (float fDelta) |
updates this widget's logic. | |
virtual std::string | serialize (const std::string &sTab) const |
Prints all relevant information about this widget in a string. | |
virtual bool | can_use_script (const std::string &sScriptName) const |
Returns 'true' if this frame can use a script. | |
void | check_position () const |
Checks if this frame's position is valid. | |
virtual void | copy_from (uiobject *pObj) |
Copies an uiobject's parameters into this frame (inheritance). | |
void | create_title_region () |
Creates a new title region for this frame. | |
void | disable_draw_layer (layer_type mLayerID) |
Disables a layer. | |
void | enable_draw_layer (layer_type mLayerID) |
Enables a layer. | |
virtual void | enable_keyboard (bool bIsKeyboardEnabled) |
Sets if this frame can receive keyboard input. | |
virtual void | enable_mouse (bool bIsMouseEnabled, bool bAllowWorldInput=false) |
Sets if this frame can receive mouse input. | |
virtual void | enable_mouse_wheel (bool bIsMouseWheelEnabled) |
Sets if this frame can receive mouse wheel input. | |
bool | has_script (const std::string &sScriptName) const |
Checks if this frame has a script defined. | |
void | add_region (layered_region *pRegion) |
Adds a layered_region to this frame's children. | |
void | remove_region (layered_region *pRegion) |
Removes a layered_region from this frame's children. | |
layered_region * | create_region (layer_type mLayer, const std::string &sClassName, const std::string &sName, const std::string &sInheritance="") |
Creates a new region as child of this frame. | |
frame * | create_child (const std::string &sClassName, const std::string &sName, const std::string &sInheritance="") |
Creates a new frame as child of this frame. | |
void | add_child (frame *pChild) |
Adds a frame to this frame's children. | |
void | remove_child (frame *pChild) |
Removes a frame from this frame's children. | |
const std::map< uint, frame * > & | get_children () const |
Returns the child list. | |
frame * | get_child (const std::string &sName) const |
Returns one of this frame's children. | |
layered_region * | get_region (const std::string &sName) const |
Returns one of this frame's region. | |
float | get_effective_alpha () const |
Calculates effective alpha. | |
float | get_effective_scale () const |
Calculates effective scale. | |
int | get_frame_level () const |
Returns this frame's level. | |
frame_strata | get_frame_strata () const |
Returns this frame's strata. | |
utils::wptr< backdrop > | get_backdrop () const |
Returns this frame's backdrop. | |
const std::string & | get_frame_type () const |
Returns this frame's type. | |
const std::array< int, 4 > & | get_abs_hit_rect_insets () const |
Returns this frame's absolute hit rect insets. | |
const std::array< float, 4 > & | get_rel_hit_rect_insets () const |
Returns this frame's relative hit rect insets. | |
std::array< uint, 2 > | get_max_resize () const |
Returns this frame's max dimensions. | |
std::array< uint, 2 > | get_min_resize () const |
Returns this frame's min dimensions. | |
uint | get_num_children () const |
Returns the number of children of this frame. | |
uint | get_num_regions () const |
Returns the number of region of this frame. | |
float | get_scale () const |
Returns this frame's scale. | |
region * | get_title_region () const |
Returns this frame's title region. | |
bool | is_clamped_to_screen () const |
Checks if this frame is clamped to screen. | |
virtual bool | is_in_frame (int iX, int iY) const |
Checks if the provided coordinates are in the frame. | |
bool | is_keyboard_enabled () const |
Checks if this frame can receive keyboard input. | |
bool | is_mouse_enabled () const |
Checks if this frame can receive mouse input. | |
bool | is_world_input_allowed () const |
Checks if this frame allows world input. | |
bool | is_mouse_wheel_enabled () const |
Checks if this frame can receive mouse wheel input. | |
bool | is_movable () const |
Checks if this frame can be moved. | |
bool | is_resizable () const |
Checks if this frame can be resized. | |
bool | is_top_level () const |
Checks if this frame is at top level. | |
bool | is_user_placed () const |
Checks if this frame has been moved by the user. | |
void | define_script (const std::string &sScriptName, const std::string &sContent, const std::string &sFile, uint uiLineNbr) |
Registers a handler script to this frame. | |
void | define_script (const std::string &sScriptName, handler mHandler) |
Registers a handler script to this frame. | |
void | notify_script_defined (const std::string &sScriptName, bool bDefined) |
Tells this frame that a script has been defined. | |
virtual void | on (const std::string &sScriptName, event *pEvent=nullptr) |
Calls a script. | |
virtual void | on_event (const event &mEvent) |
Calls the on_event script. | |
void | register_all_events () |
Tells this frame to react to every event in the game. | |
void | register_event (const std::string &sEventName) |
Tells this frame to react to a certain event. | |
void | register_for_drag (const std::vector< std::string > &lButtonList) |
Tells this frame to react to mouse drag. | |
void | set_clamped_to_screen (bool bIsClampedToScreen) |
Sets if this frame is clamped to screen. | |
void | set_frame_strata (frame_strata mStrata) |
Sets this frame's strata. | |
void | set_frame_strata (const std::string &sStrata) |
Sets this frame's strata. | |
void | set_backdrop (utils::refptr< backdrop > pBackdrop) |
Sets this frames' backdrop. | |
void | set_abs_hit_rect_insets (int iLeft, int iRight, int iTop, int iBottom) |
Sets this frame's absolute hit rect insets. | |
void | set_rel_hit_rect_insets (float fLeft, float fRight, float fTop, float fBottom) |
Sets this frame's relative hit rect insets. | |
void | set_level (int iLevel) |
Sets this frame's level. | |
void | set_max_resize (uint uiMaxWidth, uint uiMaxHeight) |
set_ this frame's maximum size. | |
void | set_min_resize (uint uiMinWidth, uint uiMinHeight) |
set_ this frame's minimum size. | |
void | set_max_height (uint uiMaxHeight) |
set_ this frame's maximum height. | |
void | set_max_width (uint uiMaxWidth) |
set_ this frame's maximum width. | |
void | set_min_height (uint uiMinHeight) |
set_ this frame's minimum height. | |
void | set_min_width (uint uiMinWidth) |
set_ this frame's minimum width. | |
void | set_movable (bool bIsMovable) |
Sets if this frame can be moved by the user. | |
void | set_parent (uiobject *pParent) |
Changes this widget's parent. | |
void | set_resizable (bool bIsResizable) |
Sets if this frame can be resized by the user. | |
void | set_scale (float fScale) |
Sets this frame's scale. | |
void | set_top_level (bool bIsTopLevel) |
Sets if this frame is at top level. | |
void | raise () |
Increases this frame's level so it's the highest of the strata. | |
void | set_user_placed (bool bIsUserPlaced) |
Sets if this frame has been moved by the user. | |
void | start_moving () |
Starts moving this frame with the mouse. | |
void | stop_moving () |
ends moving this frame. | |
void | start_sizing (const anchor_point &mPoint) |
Starts resizing this frame with the mouse. | |
void | stop_sizing () |
ends resizing this frame. | |
virtual void | show () |
shows this widget. | |
virtual void | hide () |
hides this widget. | |
virtual void | set_shown (bool bIsShown) |
shows/hides this widget. | |
virtual void | set_manually_rendered (bool bManuallyRendered, uiobject *pRenderer=nullptr) |
Flags this object as "manually rendered". | |
virtual void | set_abs_width (uint uiAbsWidth) |
Changes this widget's absolute width (in pixels). | |
virtual void | set_abs_height (uint uiAbsHeight) |
Changes this widget's absolute height (in pixels). | |
virtual void | notify_mouse_in_frame (bool bMouseInFrame, int iX, int iY) |
Tells this frame it is being overed by the mouse. | |
virtual void | notify_child_strata_changed (frame *pChild) |
Tells this frame that at least one of its children has modified its strata or level. | |
virtual void | notify_renderer_need_redraw () const |
Notifies the renderer of this widget that it needs to be redrawn. | |
virtual void | notify_loaded () |
Notifies this widget that it has been fully loaded. | |
void | fire_build_layer_list () |
Tells this frame to rebuilt the layer list. | |
void | unregister_all_events () |
Tells the frame not to react to all events. | |
void | unregister_event (const std::string &sEventName) |
Tells the frame not to react to a certain event. | |
void | set_addon (addon *pAddOn) |
Sets the addon this frame belongs to. | |
addon * | get_addon () const |
Returns this frame's addon. | |
virtual std::vector< uiobject * > | clear_links () |
Removes all anchors that point to this widget and all other kind of links. | |
virtual void | create_glue () |
Creates the associated Lua glue. | |
virtual void | parse_block (xml::block *pBlock) |
Parses data from an xml::block. | |
Protected Member Functions | |
virtual void | parse_attributes_ (xml::block *pBlock) |
virtual void | parse_resize_bounds_block_ (xml::block *pBlock) |
virtual void | parse_title_region_block_ (xml::block *pBlock) |
virtual void | parse_backdrop_block_ (xml::block *pBlock) |
virtual void | parse_hit_rect_insets_block_ (xml::block *pBlock) |
virtual void | parse_layers_block_ (xml::block *pBlock) |
virtual void | parse_frames_block_ (xml::block *pBlock) |
virtual void | parse_scripts_block_ (xml::block *pBlock) |
virtual void | notify_visible_ (bool bTriggerEvents=true) |
virtual void | notify_invisible_ (bool bTriggerEvents=true) |
virtual void | notify_strata_changed_ () |
virtual void | notify_top_level_parent_ (bool bTopLevel, frame *pParent) |
void | add_level_ (int iAmount) |
virtual void | update_borders_ () const |
Protected Attributes | |
std::map< uint, frame * > | lChildList_ |
std::map< uint, layered_region * > | lRegionList_ |
std::map< layer_type, layer > | lLayerList_ |
std::map< std::string, std::string > | lDefinedScriptList_ |
std::map< std::string, script_info > | lXMLScriptInfoList_ |
std::vector< std::string > | lQueuedEventList_ |
std::set< std::string > | lRegEventList_ |
std::set< std::string > | lRegDragList_ |
std::map< std::string, handler > | lDefinedHandlerList_ |
addon * | pAddOn_ |
int | iLevel_ |
frame_strata | mStrata_ |
bool | bIsTopLevel_ |
frame * | pTopLevelParent_ |
utils::refptr< backdrop > | pBackdrop_ |
bool | bHasAllEventsRegistred_ |
bool | bIsKeyboardEnabled_ |
bool | bIsMouseEnabled_ |
bool | bAllowWorldInput_ |
bool | bIsMouseWheelEnabled_ |
bool | bIsMovable_ |
bool | bIsClampedToScreen_ |
bool | bIsResizable_ |
bool | bIsUserPlaced_ |
bool | bBuildLayerList_ |
std::array< int, 4 > | lAbsHitRectInsetList_ |
std::array< float, 4 > | lRelHitRectInsetList_ |
uint | uiMinWidth_ |
uint | uiMaxWidth_ |
uint | uiMinHeight_ |
uint | uiMaxHeight_ |
float | fScale_ |
bool | bMouseInFrame_ |
bool | bMouseInTitleRegion_ |
int | iMousePosX_ |
int | iMousePosY_ |
region * | pTitleRegion_ |
frame * | pParentFrame_ |
std::vector< std::string > | lMouseButtonList_ |
bool | bMouseDragged_ |
GUI container.
Can contain other frames, or layered_regions (text, images, ...).
Definition at line 27 of file gui_frame.hpp.
typedef std::function<void(frame*, event*) gui::frame::handler) |
Definition at line 297 of file gui_frame.hpp.
gui::frame::frame | ( | manager * | pManager | ) | [explicit] |
Constructor.
Definition at line 23 of file gui_frame.cpp.
gui::frame::~frame | ( | ) | [virtual] |
Destructor.
Definition at line 37 of file gui_frame.cpp.
void gui::frame::add_child | ( | frame * | pChild | ) |
Adds a frame to this frame's children.
pChild | The frame to add |
Definition at line 747 of file gui_frame.cpp.
void gui::frame::add_level_ | ( | int | iAmount | ) | [protected] |
Definition at line 1577 of file gui_frame.cpp.
void gui::frame::add_region | ( | layered_region * | pRegion | ) |
Adds a layered_region to this frame's children.
pRegion | The layered_region to add |
Definition at line 632 of file gui_frame.cpp.
bool gui::frame::can_use_script | ( | const std::string & | sScriptName | ) | const [virtual] |
Returns 'true' if this frame can use a script.
sScriptName | The name of the script |
Reimplemented in gui::button, gui::edit_box, gui::scroll_frame, gui::slider, and gui::status_bar.
Definition at line 213 of file gui_frame.cpp.
void gui::frame::check_position | ( | ) | const |
Checks if this frame's position is valid.
Definition at line 452 of file gui_frame.cpp.
std::vector< uiobject * > gui::frame::clear_links | ( | ) | [virtual] |
Removes all anchors that point to this widget and all other kind of links.
Reimplemented from gui::uiobject.
Definition at line 1870 of file gui_frame.cpp.
void gui::frame::copy_from | ( | uiobject * | pObj | ) | [virtual] |
Copies an uiobject's parameters into this frame (inheritance).
pObj | The uiobject to copy |
Reimplemented in gui::button, gui::check_button, gui::edit_box, gui::focus_frame, gui::scroll_frame, gui::slider, and gui::status_bar.
Definition at line 236 of file gui_frame.cpp.
frame * gui::frame::create_child | ( | const std::string & | sClassName, | |
const std::string & | sName, | |||
const std::string & | sInheritance = "" | |||
) |
Creates a new frame as child of this frame.
sClassName | The name of the frame class ("Button", ...) | |
sName | The name of the frame | |
sInheritance | The name of the frame to inherit from (empty if none) |
Definition at line 742 of file gui_frame.cpp.
void gui::frame::create_glue | ( | ) | [virtual] |
Creates the associated Lua glue.
Reimplemented from gui::region.
Reimplemented in gui::button, gui::check_button, gui::edit_box, gui::focus_frame, gui::scroll_frame, gui::slider, and gui::status_bar.
Definition at line 76 of file gui_frame.cpp.
layered_region * gui::frame::create_region | ( | layer_type | mLayer, | |
const std::string & | sClassName, | |||
const std::string & | sName, | |||
const std::string & | sInheritance = "" | |||
) |
Creates a new region as child of this frame.
mLayer | The layer on which to create the region | |
sClassName | The name of the region class ("FontString", ...) | |
sName | The name of the region | |
sInheritance | The name of the region to inherit from (empty if none) |
Definition at line 685 of file gui_frame.cpp.
void gui::frame::create_title_region | ( | ) |
Creates a new title region for this frame.
Definition at line 384 of file gui_frame.cpp.
void gui::frame::define_script | ( | const std::string & | sScriptName, | |
handler | mHandler | |||
) |
Registers a handler script to this frame.
sScriptName | The name of the script | |
mHandler | The handler ot the script |
Definition at line 1027 of file gui_frame.cpp.
void gui::frame::define_script | ( | const std::string & | sScriptName, | |
const std::string & | sContent, | |||
const std::string & | sFile, | |||
uint | uiLineNbr | |||
) |
Registers a handler script to this frame.
sScriptName | The name of the script | |
sContent | The content ot the script | |
sFile | The file in which this script has been found | |
uiLineNbr | The line number at which this script is located in the file |
Definition at line 952 of file gui_frame.cpp.
void gui::frame::disable_draw_layer | ( | layer_type | mLayerID | ) |
Disables a layer.
mLayerID | The id of the layer to disable |
Definition at line 537 of file gui_frame.cpp.
void gui::frame::enable_draw_layer | ( | layer_type | mLayerID | ) |
Enables a layer.
mLayerID | The id of the layer to enable |
Definition at line 547 of file gui_frame.cpp.
void gui::frame::enable_keyboard | ( | bool | bIsKeyboardEnabled | ) | [virtual] |
Sets if this frame can receive keyboard input.
bIsKeyboardEnabled | 'true' to enable |
Reimplemented in gui::edit_box.
Definition at line 557 of file gui_frame.cpp.
void gui::frame::enable_mouse | ( | bool | bIsMouseEnabled, | |
bool | bAllowWorldInput = false | |||
) | [virtual] |
Sets if this frame can receive mouse input.
bIsMouseEnabled | 'true' to enable | |
bAllowWorldInput | 'true' to allow world input |
Definition at line 576 of file gui_frame.cpp.
void gui::frame::enable_mouse_wheel | ( | bool | bIsMouseWheelEnabled | ) | [virtual] |
Sets if this frame can receive mouse wheel input.
bIsMouseWheelEnabled | 'true' to enable |
Definition at line 600 of file gui_frame.cpp.
void gui::frame::fire_build_layer_list | ( | ) |
Tells this frame to rebuilt the layer list.
Definition at line 621 of file gui_frame.cpp.
const std::array< int, 4 > & gui::frame::get_abs_hit_rect_insets | ( | ) | const |
Returns this frame's absolute hit rect insets.
Definition at line 851 of file gui_frame.cpp.
addon * gui::frame::get_addon | ( | ) | const |
Returns this frame's addon.
Definition at line 1752 of file gui_frame.cpp.
utils::wptr< backdrop > gui::frame::get_backdrop | ( | ) | const |
Returns this frame's backdrop.
Definition at line 841 of file gui_frame.cpp.
frame * gui::frame::get_child | ( | const std::string & | sName | ) | const |
Returns one of this frame's children.
sName | The name of the child |
Definition at line 414 of file gui_frame.cpp.
const std::map< uint, frame * > & gui::frame::get_children | ( | ) | const |
float gui::frame::get_effective_alpha | ( | ) | const |
Calculates effective alpha.
Definition at line 815 of file gui_frame.cpp.
float gui::frame::get_effective_scale | ( | ) | const |
Calculates effective scale.
Definition at line 823 of file gui_frame.cpp.
int gui::frame::get_frame_level | ( | ) | const |
Returns this frame's level.
Definition at line 831 of file gui_frame.cpp.
frame_strata gui::frame::get_frame_strata | ( | ) | const |
Returns this frame's strata.
Definition at line 836 of file gui_frame.cpp.
const std::string & gui::frame::get_frame_type | ( | ) | const |
Returns this frame's type.
Definition at line 846 of file gui_frame.cpp.
std::array< uint, 2 > gui::frame::get_max_resize | ( | ) | const |
Returns this frame's max dimensions.
Definition at line 861 of file gui_frame.cpp.
std::array< uint, 2 > gui::frame::get_min_resize | ( | ) | const |
Returns this frame's min dimensions.
Definition at line 866 of file gui_frame.cpp.
uint gui::frame::get_num_children | ( | ) | const |
Returns the number of children of this frame.
Definition at line 871 of file gui_frame.cpp.
uint gui::frame::get_num_regions | ( | ) | const |
layered_region * gui::frame::get_region | ( | const std::string & | sName | ) | const |
Returns one of this frame's region.
sName | The name of the region |
Definition at line 428 of file gui_frame.cpp.
const std::array< float, 4 > & gui::frame::get_rel_hit_rect_insets | ( | ) | const |
Returns this frame's relative hit rect insets.
Definition at line 856 of file gui_frame.cpp.
float gui::frame::get_scale | ( | ) | const |
Returns this frame's scale.
Definition at line 881 of file gui_frame.cpp.
region * gui::frame::get_title_region | ( | ) | const |
Returns this frame's title region.
Definition at line 886 of file gui_frame.cpp.
bool gui::frame::has_script | ( | const std::string & | sScriptName | ) | const |
Checks if this frame has a script defined.
sScriptName | The name of the script to check |
Definition at line 626 of file gui_frame.cpp.
void gui::frame::hide | ( | ) | [virtual] |
hides this widget.
Reimplemented from gui::uiobject.
Definition at line 1711 of file gui_frame.cpp.
bool gui::frame::is_clamped_to_screen | ( | ) | const |
Checks if this frame is clamped to screen.
Definition at line 891 of file gui_frame.cpp.
bool gui::frame::is_in_frame | ( | int | iX, | |
int | iY | |||
) | const [virtual] |
Checks if the provided coordinates are in the frame.
iX | The horizontal coordinate | |
iY | The vertical coordinate |
Reimplemented in gui::scroll_frame, and gui::slider.
Definition at line 896 of file gui_frame.cpp.
bool gui::frame::is_keyboard_enabled | ( | ) | const |
bool gui::frame::is_mouse_enabled | ( | ) | const |
bool gui::frame::is_mouse_wheel_enabled | ( | ) | const |
bool gui::frame::is_movable | ( | ) | const |
Checks if this frame can be moved.
Definition at line 932 of file gui_frame.cpp.
bool gui::frame::is_resizable | ( | ) | const |
Checks if this frame can be resized.
Definition at line 937 of file gui_frame.cpp.
bool gui::frame::is_top_level | ( | ) | const |
bool gui::frame::is_user_placed | ( | ) | const |
Checks if this frame has been moved by the user.
Definition at line 947 of file gui_frame.cpp.
bool gui::frame::is_world_input_allowed | ( | ) | const |
void gui::frame::notify_child_strata_changed | ( | frame * | pChild | ) | [virtual] |
Tells this frame that at least one of its children has modified its strata or level.
pChild | The child that has changed its strata (can also be a child of this child) |
Definition at line 1627 of file gui_frame.cpp.
void gui::frame::notify_invisible_ | ( | bool | bTriggerEvents = true |
) | [protected, virtual] |
Reimplemented in gui::edit_box.
Definition at line 1660 of file gui_frame.cpp.
void gui::frame::notify_loaded | ( | ) | [virtual] |
Notifies this widget that it has been fully loaded.
Reimplemented from gui::uiobject.
Definition at line 613 of file gui_frame.cpp.
void gui::frame::notify_mouse_in_frame | ( | bool | bMouseInFrame, | |
int | iX, | |||
int | iY | |||
) | [virtual] |
Tells this frame it is being overed by the mouse.
bMouseInFrame | 'true' if the mouse is above this frame | |
iX | The horizontal mouse coordinate | |
iY | The vertical mouse coordinate |
Reimplemented in gui::scroll_frame, and gui::slider.
Definition at line 1757 of file gui_frame.cpp.
void gui::frame::notify_renderer_need_redraw | ( | ) | const [virtual] |
Notifies the renderer of this widget that it needs to be redrawn.
Reimplemented from gui::uiobject.
Definition at line 1689 of file gui_frame.cpp.
void gui::frame::notify_script_defined | ( | const std::string & | sScriptName, | |
bool | bDefined | |||
) |
Tells this frame that a script has been defined.
sScriptName | The name of the script | |
bDefined | 'true' if the script is defined |
Definition at line 1039 of file gui_frame.cpp.
void gui::frame::notify_strata_changed_ | ( | ) | [protected, virtual] |
Definition at line 1635 of file gui_frame.cpp.
void gui::frame::notify_top_level_parent_ | ( | bool | bTopLevel, | |
frame * | pParent | |||
) | [protected, virtual] |
Definition at line 1677 of file gui_frame.cpp.
void gui::frame::notify_visible_ | ( | bool | bTriggerEvents = true |
) | [protected, virtual] |
Definition at line 1643 of file gui_frame.cpp.
void gui::frame::on | ( | const std::string & | sScriptName, | |
event * | pEvent = nullptr | |||
) | [virtual] |
Calls a script.
sScriptName | The name of the script | |
pEvent | Stores scripts arguments |
Reimplemented in gui::button, gui::edit_box, and gui::scroll_frame.
Definition at line 1225 of file gui_frame.cpp.
void gui::frame::on_event | ( | const event & | mEvent | ) | [virtual] |
Calls the on_event script.
mEvent | The Event that occured |
Implements gui::event_receiver.
Reimplemented in gui::button, gui::edit_box, and gui::slider.
Definition at line 1059 of file gui_frame.cpp.
void gui::frame::parse_attributes_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Reimplemented from gui::region.
Definition at line 27 of file gui_frame_parser.cpp.
void gui::frame::parse_backdrop_block_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Definition at line 246 of file gui_frame_parser.cpp.
void gui::frame::parse_block | ( | xml::block * | pBlock | ) | [virtual] |
Parses data from an xml::block.
pBlock | The frame's xml::block |
Reimplemented from gui::region.
Reimplemented in gui::button, gui::check_button, gui::edit_box, gui::focus_frame, gui::scroll_frame, gui::slider, and gui::status_bar.
Definition at line 11 of file gui_frame_parser.cpp.
void gui::frame::parse_frames_block_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Definition at line 420 of file gui_frame_parser.cpp.
void gui::frame::parse_hit_rect_insets_block_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Definition at line 356 of file gui_frame_parser.cpp.
void gui::frame::parse_layers_block_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Definition at line 383 of file gui_frame_parser.cpp.
void gui::frame::parse_resize_bounds_block_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Definition at line 191 of file gui_frame_parser.cpp.
void gui::frame::parse_scripts_block_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Definition at line 453 of file gui_frame_parser.cpp.
void gui::frame::parse_title_region_block_ | ( | xml::block * | pBlock | ) | [protected, virtual] |
Definition at line 234 of file gui_frame_parser.cpp.
void gui::frame::raise | ( | ) |
Increases this frame's level so it's the highest of the strata.
Definition at line 1555 of file gui_frame.cpp.
void gui::frame::register_all_events | ( | ) |
Tells this frame to react to every event in the game.
Definition at line 1347 of file gui_frame.cpp.
void gui::frame::register_event | ( | const std::string & | sEventName | ) | [virtual] |
Tells this frame to react to a certain event.
sEventName | The name of the event |
Reimplemented from gui::event_receiver.
Definition at line 1353 of file gui_frame.cpp.
void gui::frame::register_for_drag | ( | const std::vector< std::string > & | lButtonList | ) |
Tells this frame to react to mouse drag.
lButtonList | The list of mouse button allowed |
Definition at line 1359 of file gui_frame.cpp.
void gui::frame::remove_child | ( | frame * | pChild | ) |
Removes a frame from this frame's children.
pChild | The frame to remove |
Definition at line 791 of file gui_frame.cpp.
void gui::frame::remove_region | ( | layered_region * | pRegion | ) |
Removes a layered_region from this frame's children.
pRegion | The layered_region to remove |
Definition at line 665 of file gui_frame.cpp.
void gui::frame::render | ( | ) | [virtual] |
Renders this widget on the current render target.
Reimplemented from gui::region.
Definition at line 50 of file gui_frame.cpp.
std::string gui::frame::serialize | ( | const std::string & | sTab | ) | const [virtual] |
Prints all relevant information about this widget in a string.
sTab | The offset to give to all lines |
Reimplemented from gui::uiobject.
Reimplemented in gui::button, gui::check_button, gui::slider, and gui::status_bar.
Definition at line 96 of file gui_frame.cpp.
void gui::frame::set_abs_height | ( | uint | uiAbsHeight | ) | [virtual] |
Changes this widget's absolute height (in pixels).
uiAbsHeight | The new height |
Reimplemented from gui::uiobject.
Definition at line 447 of file gui_frame.cpp.
void gui::frame::set_abs_hit_rect_insets | ( | int | iLeft, | |
int | iRight, | |||
int | iTop, | |||
int | iBottom | |||
) |
Sets this frame's absolute hit rect insets.
iLeft | Offset from the left border | |
iRight | Offset from the right border | |
iTop | Offset from the top border | |
iBottom | Offset from the bottom border |
Definition at line 1438 of file gui_frame.cpp.
void gui::frame::set_abs_width | ( | uint | uiAbsWidth | ) | [virtual] |
Changes this widget's absolute width (in pixels).
uiAbsWidth | The new width |
Reimplemented from gui::uiobject.
Definition at line 442 of file gui_frame.cpp.
void gui::frame::set_addon | ( | addon * | pAddOn | ) |
void gui::frame::set_backdrop | ( | utils::refptr< backdrop > | pBackdrop | ) |
Sets this frames' backdrop.
pBackdrop | The new backdrop |
Definition at line 1432 of file gui_frame.cpp.
void gui::frame::set_clamped_to_screen | ( | bool | bIsClampedToScreen | ) |
Sets if this frame is clamped to screen.
bIsClampedToScreen | 'true' if this frame is clamped to screen |
Definition at line 1367 of file gui_frame.cpp.
void gui::frame::set_frame_strata | ( | const std::string & | sStrata | ) |
Sets this frame's strata.
sStrata | The new strata |
Definition at line 1391 of file gui_frame.cpp.
void gui::frame::set_frame_strata | ( | frame_strata | mStrata | ) |
Sets this frame's strata.
mStrata | The new strata |
Definition at line 1372 of file gui_frame.cpp.
void gui::frame::set_level | ( | int | iLevel | ) |
Sets this frame's level.
iLevel | The new level |
Definition at line 1448 of file gui_frame.cpp.
void gui::frame::set_manually_rendered | ( | bool | bManuallyRendered, | |
uiobject * | pRenderer = nullptr | |||
) | [virtual] |
Flags this object as "manually rendered".
bManuallyRendered | 'true' to flag it as manually rendered | |
pRenderer | The uiobject that will take care of rendering this widget |
Definition at line 1615 of file gui_frame.cpp.
void gui::frame::set_max_height | ( | uint | uiMaxHeight | ) |
set_ this frame's maximum height.
uiMaxHeight | The maximum height this frame can have |
Definition at line 1471 of file gui_frame.cpp.
void gui::frame::set_max_resize | ( | uint | uiMaxWidth, | |
uint | uiMaxHeight | |||
) |
set_ this frame's maximum size.
uiMaxWidth | The maximum width this frame can have | |
uiMaxHeight | The maximum height this frame can have |
Definition at line 1459 of file gui_frame.cpp.
void gui::frame::set_max_width | ( | uint | uiMaxWidth | ) |
set_ this frame's maximum width.
uiMaxWidth | The maximum width this frame can have |
Definition at line 1480 of file gui_frame.cpp.
void gui::frame::set_min_height | ( | uint | uiMinHeight | ) |
set_ this frame's minimum height.
uiMinHeight | The minimum height this frame can have |
Definition at line 1489 of file gui_frame.cpp.
void gui::frame::set_min_resize | ( | uint | uiMinWidth, | |
uint | uiMinHeight | |||
) |
set_ this frame's minimum size.
uiMinWidth | The minimum width this frame can have | |
uiMinHeight | The minimum height this frame can have |
Definition at line 1465 of file gui_frame.cpp.
void gui::frame::set_min_width | ( | uint | uiMinWidth | ) |
set_ this frame's minimum width.
uiMinWidth | The minimum width this frame can have |
Definition at line 1498 of file gui_frame.cpp.
void gui::frame::set_movable | ( | bool | bIsMovable | ) |
Sets if this frame can be moved by the user.
bIsMovable | 'true' to allow the user to move this frame |
Definition at line 1507 of file gui_frame.cpp.
void gui::frame::set_parent | ( | uiobject * | pParent | ) |
Changes this widget's parent.
pParent | The new parent |
Definition at line 1512 of file gui_frame.cpp.
void gui::frame::set_rel_hit_rect_insets | ( | float | fLeft, | |
float | fRight, | |||
float | fTop, | |||
float | fBottom | |||
) |
Sets this frame's relative hit rect insets.
fLeft | Offset from the left border | |
fRight | Offset from the right border | |
fTop | Offset from the top border | |
fBottom | Offset from the bottom border |
Definition at line 1443 of file gui_frame.cpp.
void gui::frame::set_resizable | ( | bool | bIsResizable | ) |
Sets if this frame can be resized by the user.
bIsResizable | 'true' to allow the user to resize this frame |
Definition at line 1531 of file gui_frame.cpp.
void gui::frame::set_scale | ( | float | fScale | ) |
Sets this frame's scale.
fScale | The new scale |
Definition at line 1536 of file gui_frame.cpp.
void gui::frame::set_shown | ( | bool | bIsShown | ) | [virtual] |
shows/hides this widget.
bIsShown | 'true' if you want to show this widget |
Reimplemented from gui::uiobject.
Definition at line 1722 of file gui_frame.cpp.
void gui::frame::set_top_level | ( | bool | bIsTopLevel | ) |
void gui::frame::set_user_placed | ( | bool | bIsUserPlaced | ) |
Sets if this frame has been moved by the user.
bIsUserPlaced | 'true' if this frame has been moved by the user |
Definition at line 1588 of file gui_frame.cpp.
void gui::frame::show | ( | ) | [virtual] |
shows this widget.
Reimplemented from gui::uiobject.
Definition at line 1700 of file gui_frame.cpp.
void gui::frame::start_moving | ( | ) |
Starts moving this frame with the mouse.
Definition at line 1593 of file gui_frame.cpp.
void gui::frame::start_sizing | ( | const anchor_point & | mPoint | ) |
Starts resizing this frame with the mouse.
mPoint | The corner to move |
Definition at line 1604 of file gui_frame.cpp.
void gui::frame::stop_moving | ( | ) |
ends moving this frame.
Definition at line 1599 of file gui_frame.cpp.
void gui::frame::stop_sizing | ( | ) |
ends resizing this frame.
Definition at line 1610 of file gui_frame.cpp.
void gui::frame::unregister_all_events | ( | ) |
Tells the frame not to react to all events.
Definition at line 1733 of file gui_frame.cpp.
void gui::frame::unregister_event | ( | const std::string & | sEventName | ) | [virtual] |
Tells the frame not to react to a certain event.
sEventName | The name of the event |
Reimplemented from gui::event_receiver.
Definition at line 1739 of file gui_frame.cpp.
void gui::frame::update | ( | float | fDelta | ) | [virtual] |
updates this widget's logic.
Reimplemented from gui::uiobject.
Reimplemented in gui::edit_box, gui::scroll_frame, gui::slider, and gui::status_bar.
Definition at line 1790 of file gui_frame.cpp.
void gui::frame::update_borders_ | ( | ) | const [protected, virtual] |
Reimplemented from gui::uiobject.
Definition at line 1781 of file gui_frame.cpp.
bool gui::frame::bAllowWorldInput_ [protected] |
Definition at line 627 of file gui_frame.hpp.
bool gui::frame::bBuildLayerList_ [protected] |
Definition at line 634 of file gui_frame.hpp.
bool gui::frame::bHasAllEventsRegistred_ [protected] |
Definition at line 623 of file gui_frame.hpp.
bool gui::frame::bIsClampedToScreen_ [protected] |
Definition at line 630 of file gui_frame.hpp.
bool gui::frame::bIsKeyboardEnabled_ [protected] |
Definition at line 625 of file gui_frame.hpp.
bool gui::frame::bIsMouseEnabled_ [protected] |
Definition at line 626 of file gui_frame.hpp.
bool gui::frame::bIsMouseWheelEnabled_ [protected] |
Definition at line 628 of file gui_frame.hpp.
bool gui::frame::bIsMovable_ [protected] |
Definition at line 629 of file gui_frame.hpp.
bool gui::frame::bIsResizable_ [protected] |
Definition at line 631 of file gui_frame.hpp.
bool gui::frame::bIsTopLevel_ [protected] |
Definition at line 618 of file gui_frame.hpp.
bool gui::frame::bIsUserPlaced_ [protected] |
Definition at line 632 of file gui_frame.hpp.
bool gui::frame::bMouseDragged_ [protected] |
Definition at line 655 of file gui_frame.hpp.
bool gui::frame::bMouseInFrame_ [protected] |
Definition at line 646 of file gui_frame.hpp.
bool gui::frame::bMouseInTitleRegion_ [protected] |
Definition at line 647 of file gui_frame.hpp.
float gui::frame::fScale_ [protected] |
Definition at line 644 of file gui_frame.hpp.
int gui::frame::iLevel_ [protected] |
Definition at line 615 of file gui_frame.hpp.
int gui::frame::iMousePosX_ [protected] |
Definition at line 648 of file gui_frame.hpp.
int gui::frame::iMousePosY_ [protected] |
Definition at line 648 of file gui_frame.hpp.
std::array<int, 4> gui::frame::lAbsHitRectInsetList_ [protected] |
Definition at line 636 of file gui_frame.hpp.
std::map<uint, frame*> gui::frame::lChildList_ [protected] |
Definition at line 602 of file gui_frame.hpp.
std::map<std::string, handler> gui::frame::lDefinedHandlerList_ [protected] |
Definition at line 611 of file gui_frame.hpp.
std::map<std::string, std::string> gui::frame::lDefinedScriptList_ [protected] |
Definition at line 605 of file gui_frame.hpp.
std::map<layer_type, layer> gui::frame::lLayerList_ [protected] |
Definition at line 604 of file gui_frame.hpp.
std::vector<std::string> gui::frame::lMouseButtonList_ [protected] |
Definition at line 654 of file gui_frame.hpp.
std::vector<std::string> gui::frame::lQueuedEventList_ [protected] |
Definition at line 607 of file gui_frame.hpp.
std::set<std::string> gui::frame::lRegDragList_ [protected] |
Definition at line 609 of file gui_frame.hpp.
std::set<std::string> gui::frame::lRegEventList_ [protected] |
Definition at line 608 of file gui_frame.hpp.
std::map<uint, layered_region*> gui::frame::lRegionList_ [protected] |
Definition at line 603 of file gui_frame.hpp.
std::array<float,4> gui::frame::lRelHitRectInsetList_ [protected] |
Definition at line 637 of file gui_frame.hpp.
std::map<std::string, script_info> gui::frame::lXMLScriptInfoList_ [protected] |
Definition at line 606 of file gui_frame.hpp.
frame_strata gui::frame::mStrata_ [protected] |
Definition at line 617 of file gui_frame.hpp.
addon* gui::frame::pAddOn_ [protected] |
Definition at line 613 of file gui_frame.hpp.
utils::refptr<backdrop> gui::frame::pBackdrop_ [protected] |
Definition at line 621 of file gui_frame.hpp.
frame* gui::frame::pParentFrame_ [protected] |
Definition at line 652 of file gui_frame.hpp.
region* gui::frame::pTitleRegion_ [protected] |
Definition at line 650 of file gui_frame.hpp.
frame* gui::frame::pTopLevelParent_ [protected] |
Definition at line 619 of file gui_frame.hpp.
uint gui::frame::uiMaxHeight_ [protected] |
Definition at line 642 of file gui_frame.hpp.
uint gui::frame::uiMaxWidth_ [protected] |
Definition at line 640 of file gui_frame.hpp.
uint gui::frame::uiMinHeight_ [protected] |
Definition at line 641 of file gui_frame.hpp.
uint gui::frame::uiMinWidth_ [protected] |
Definition at line 639 of file gui_frame.hpp.