![]() |
nomlib
|
Public Types | |
| enum | FocusPolicy { NONE = rocket::ElementDocument::FocusFlags::NONE , FOCUS = rocket::ElementDocument::FocusFlags::FOCUS , MODAL = rocket::ElementDocument::FocusFlags::MODAL } |
| typedef UIWidget | self_type |
| typedef self_type * | raw_ptr |
Public Member Functions | |
| UIWidget () | |
| Default constructor; initialize default title element ID. | |
| virtual | ~UIWidget () |
| Destructor. | |
| virtual Point2i | position () const |
| Get the position of the widget. | |
| virtual Size2i | size () const |
| Get the size of the widget. | |
| virtual void | set_position (const Point2i &pos) |
| Set the position of the widget. | |
| virtual void | set_size (const Size2i &dims) |
| Set the size of the widget. | |
| UIContext * | context () const |
| rocket::ElementDocument * | document () const |
| bool | valid () const |
| bool | valid (rocket::Element *target) const |
| bool | visible () const |
| const std::string & | title_id () const |
| std::string | title () const |
| uint32 | text_alignment (rocket::Element *target) const |
| Get an element's text alignment. | |
| bool | set_context (UIContext *ctx) |
| bool | load_document_file (const std::string &filename) |
| void | show () |
| void | hide () |
| void | close () |
| void | set_focus (uint32 focus=FocusPolicy::FOCUS) |
| Set the focus policy. | |
| bool | hit_test (rocket::Element *target, const Point2i &pt) |
| Perform a bounds coordinates collision test. | |
| void | set_title (const std::string &text) |
| void | set_title_id (const std::string &id) |
| void | set_font (rocket::Element *target, const std::string &font) |
| void | set_font_size (rocket::Element *target, int point_size) |
| bool | set_alignment (uint32 alignment) |
| void | set_text_alignment (rocket::Element *element, uint32 alignment) |
| void | register_event_listener (rocket::Element *element, const std::string &ev, UIEventListener *observer, bool interruptible=false) |
| Register an event listener for an element. | |
Private Attributes | |
| UIContext * | ctx_ |
| rocket::ElementDocument * | document_ |
| std::string | title_id_ |
Definition at line 46 of file UIWidget.hpp.
| typedef self_type* nom::UIWidget::raw_ptr |
Definition at line 50 of file UIWidget.hpp.
| typedef UIWidget nom::UIWidget::self_type |
Definition at line 49 of file UIWidget.hpp.
| enum nom::UIWidget::FocusPolicy |
Definition at line 52 of file UIWidget.hpp.
| nom::UIWidget::UIWidget | ( | ) |
Default constructor; initialize default title element ID.
| UIContext * nom::UIWidget::context | ( | ) | const |
| rocket::ElementDocument * nom::UIWidget::document | ( | ) | const |
|
virtual |
Get the position of the widget.
| void nom::UIWidget::register_event_listener | ( | rocket::Element * | element, |
| const std::string & | ev, | ||
| UIEventListener * | observer, | ||
| bool | interruptible = false ) |
Register an event listener for an element.
| element | The document's element to listen on behalf of. |
| ev | The event name to listen for, i.e.: 'mouseup'; must use libRocket event names. |
| void nom::UIWidget::set_focus | ( | uint32 | focus = FocusPolicy::FOCUS | ) |
Set the focus policy.
|
virtual |
Set the position of the widget.
| pos | The X, Y coordinates used for document positioning; these will be relative to the context in use. |
|
virtual |
Set the size of the widget.
| dims | The width and height to use for document dimensions; these will be relative to the context in use. |
| void nom::UIWidget::set_text_alignment | ( | rocket::Element * | element, |
| uint32 | alignment ) |
| alignment | One of the following Anchor enumerations: Anchor::Left, Anchor::Center, Anchor::Right. |
|
virtual |
Get the size of the widget.
| uint32 nom::UIWidget::text_alignment | ( | rocket::Element * | target | ) | const |
Get an element's text alignment.
|
private |
Definition at line 173 of file UIWidget.hpp.
|
private |
Definition at line 176 of file UIWidget.hpp.
|
private |
Definition at line 178 of file UIWidget.hpp.