#include <vgui_deck_tableau.h>
Inheritance diagram for vgui_deck_tableau:

vgui_deck_tableau holds an ordered collection of child tableaux, only one of which is passed all events that the vgui_deck_tableau receives. The effect is a flick-book of tableaux where the currently active tableau can be changed using PageUp and PageDown
Definition at line 33 of file vgui_deck_tableau.h.
Public Member Functions | |
| vgui_deck_tableau () | |
| Constructor - don't use this, use vgui_deck_tableau_new. | |
| vgui_deck_tableau (vgui_tableau_sptr const &child0, vgui_tableau_sptr const &child1) | |
| Constructor - don't use this, use vgui_deck_tableau_new. | |
| vgui_deck_tableau (vgui_tableau_sptr const &child0, vgui_tableau_sptr const &child1, vgui_tableau_sptr const &child2) | |
| Constructor - don't use this, use vgui_deck_tableau_new. | |
| void | add (vgui_tableau_sptr const &t) |
| Add a tableau to the deck. | |
| void | remove (vgui_tableau_sptr const &p) |
| Remove the tableau pointed to by P. | |
| vgui_tableau_sptr | current () |
| Return a pointer to the current tableau. | |
| vgui_tableau_sptr | get_tableau_at (int) |
| Return a pointer to the tableau at a given location. | |
| int | size () |
| Return number of child tableaux in the deck. | |
| int | index () const |
| Say which tableau is current. | |
| void | index (int) |
| Make a particular tableau current. | |
| void | begin () |
| Make the top tableau current. | |
| void | next () |
| Make the next tableau down the list current. | |
| void | prev () |
| Make the next higher tableau current. | |
| virtual vcl_string | file_name () const |
| Returns the file_name of the active child. | |
| virtual vcl_string | pretty_name () const |
| Returns a nice version of the name, including info on the active child. | |
| virtual vcl_string | type_name () const |
| Returns the type of this tableau ('vgui_deck_tableau'). | |
| virtual void | get_popup (const vgui_popup_params &, vgui_menu &m) |
| Builds a popup menu for the user to select the active child. | |
| bool | help () |
| Send info to cerr - called when user presses '?' in the rendering area. | |
| bool | key_press (int x, int y, vgui_key key, vgui_modifier) |
| Uses PageUp and PageDown events - called when user presses a key. | |
| virtual vcl_string | name () const |
| Return the name of the tableau. | |
| void | get_parents (vcl_vector< vgui_tableau_sptr > *out) const |
| Get the parent tableaux for this tableau. | |
| void | get_children (vcl_vector< vgui_tableau_sptr > *out) const |
| Get the child tableaux for this tableau. | |
| vgui_tableau_sptr | get_child (unsigned i) const |
| Get the ith child or return 0. | |
| virtual bool | notify_replaced_child (vgui_tableau_sptr const &old_child, vgui_tableau_sptr const &new_child) |
| Called whenever a child of this tableau is about to be forcibly replaced. | |
| virtual void | add_popup (vgui_menu &) |
| Add the given menu to the popup menu for the tableau. | |
| virtual void | post_message (char const *, void const *) |
| Post a message event. | |
| virtual void | post_redraw () |
| Post a draw event. | |
| virtual void | post_overlay_redraw () |
| Post a overlay-redraw event. | |
| virtual void | post_idle_request () |
| Post an idle request event. | |
| virtual bool | get_bounding_box (float low[3], float high[3]) const |
| Get the bounding box of this tableau. | |
| virtual bool | draw () |
| Called by default handle when it receives a draw event. | |
| virtual bool | mouse_down (int x, int y, vgui_button, vgui_modifier) |
| Called by default handle when it receives a mouse down event. | |
| virtual bool | mouse_up (int x, int y, vgui_button, vgui_modifier) |
| Called by default handle when it receives a mouse up event. | |
| virtual bool | motion (int x, int y) |
| Called by handle when it receives a mouse motion event. | |
| virtual bool | idle () |
| Called when the application is otherwise idle. | |
| void | ref () const |
| Increase the reference count by one (for smart pointers). | |
| void | unref () const |
| Decrease the reference count by one (for smart pointers). | |
Static Public Member Functions | |
| static void | get_all (vcl_vector< vgui_tableau_sptr > *out) |
| Push all tableaux onto the given vector. | |
| static bool | exists (vgui_tableau_sptr const &) |
| Returns true if the given address points to a valid tableau. | |
Public Attributes | |
| vgui_observable | observers |
| Conceptually, this is a list on which observers can put themselves. | |
Protected Member Functions | |
| virtual | ~vgui_deck_tableau () |
| Destructor - called by vgui_deck_tableau_sptr. | |
| virtual bool | handle (const vgui_event &) |
| Handle events by passing to the current child tableau. | |
| bool | add_child (vgui_tableau_sptr const &t) |
| Add a tableau to the deck. | |
| bool | remove_child (vgui_tableau_sptr const &) |
| Remove the given child tableau from the deck. | |
| bool | index_ok (int) const |
| Returns true if given integer could be an index to the list of children. | |
Protected Attributes | |
| vcl_vector< vgui_parent_child_link > | children |
| List of child tableaux. | |
| int | index_ |
| Currently active child tableau. | |
| vgui_deck_tableau::vgui_deck_tableau | ( | ) | [inline] |
Constructor - don't use this, use vgui_deck_tableau_new.
Make an empty deck
Definition at line 38 of file vgui_deck_tableau.h.
| vgui_deck_tableau::vgui_deck_tableau | ( | vgui_tableau_sptr const & | child0, | |
| vgui_tableau_sptr const & | child1 | |||
| ) |
Constructor - don't use this, use vgui_deck_tableau_new.
Make a deck with two children, listed top to bottom
Definition at line 26 of file vgui_deck_tableau.cxx.
| vgui_deck_tableau::vgui_deck_tableau | ( | vgui_tableau_sptr const & | child0, | |
| vgui_tableau_sptr const & | child1, | |||
| vgui_tableau_sptr const & | child2 | |||
| ) |
Constructor - don't use this, use vgui_deck_tableau_new.
Make a deck with three children, listed top to bottom
Definition at line 36 of file vgui_deck_tableau.cxx.
| vgui_deck_tableau::~vgui_deck_tableau | ( | ) | [protected, virtual] |
| void vgui_deck_tableau::add | ( | vgui_tableau_sptr const & | t | ) | [inline] |
Add a tableau to the deck.
It is placed on top, and made current.
Definition at line 50 of file vgui_deck_tableau.h.
| void vgui_deck_tableau::remove | ( | vgui_tableau_sptr const & | p | ) |
Remove the tableau pointed to by P.
The one below is then made current.
Definition at line 130 of file vgui_deck_tableau.cxx.
| vgui_tableau_sptr vgui_deck_tableau::current | ( | ) |
| vgui_tableau_sptr vgui_deck_tableau::get_tableau_at | ( | int | ) |
Return a pointer to the tableau at a given location.
Definition at line 166 of file vgui_deck_tableau.cxx.
| int vgui_deck_tableau::size | ( | ) |
| int vgui_deck_tableau::index | ( | ) | const [inline] |
| void vgui_deck_tableau::index | ( | int | ) |
| void vgui_deck_tableau::begin | ( | ) |
| void vgui_deck_tableau::next | ( | ) |
| void vgui_deck_tableau::prev | ( | ) |
| vcl_string vgui_deck_tableau::file_name | ( | ) | const [virtual] |
Returns the file_name of the active child.
Over-rides function in vgui_tableau.
Reimplemented from vgui_tableau.
Definition at line 253 of file vgui_deck_tableau.cxx.
| vcl_string vgui_deck_tableau::pretty_name | ( | ) | const [virtual] |
Returns a nice version of the name, including info on the active child.
Over-rides function in vgui_tableau.
Reimplemented from vgui_tableau.
Definition at line 263 of file vgui_deck_tableau.cxx.
| vcl_string vgui_deck_tableau::type_name | ( | ) | const [virtual] |
Returns the type of this tableau ('vgui_deck_tableau').
Over-rides function in vgui_tableau.
Reimplemented from vgui_tableau.
Definition at line 249 of file vgui_deck_tableau.cxx.
| void vgui_deck_tableau::get_popup | ( | const vgui_popup_params & | , | |
| vgui_menu & | m | |||
| ) | [virtual] |
Builds a popup menu for the user to select the active child.
Over-rides function in vgui_tableau.
Reimplemented from vgui_tableau.
Definition at line 288 of file vgui_deck_tableau.cxx.
| bool vgui_deck_tableau::help | ( | ) | [virtual] |
Send info to cerr - called when user presses '?' in the rendering area.
Over-rides function in vgui_tableau. This function is called by the default handle() function in vgui_tableau.
Reimplemented from vgui_tableau.
Definition at line 69 of file vgui_deck_tableau.cxx.
| bool vgui_deck_tableau::key_press | ( | int | x, | |
| int | y, | |||
| vgui_key | key, | |||
| vgui_modifier | ||||
| ) | [virtual] |
Uses PageUp and PageDown events - called when user presses a key.
Over-rides function in vgui_tableau. This function is called by the default handle() function in vgui_tableau.
Reimplemented from vgui_tableau.
Definition at line 83 of file vgui_deck_tableau.cxx.
| bool vgui_deck_tableau::handle | ( | const vgui_event & | ) | [protected, virtual] |
Handle events by passing to the current child tableau.
Reimplemented from vgui_tableau.
Definition at line 51 of file vgui_deck_tableau.cxx.
| bool vgui_deck_tableau::add_child | ( | vgui_tableau_sptr const & | t | ) | [protected, virtual] |
Add a tableau to the deck.
It is placed on top, and made current. Overrides virtual base class method.
Reimplemented from vgui_tableau.
Definition at line 119 of file vgui_deck_tableau.cxx.
| bool vgui_deck_tableau::remove_child | ( | vgui_tableau_sptr const & | t | ) | [protected, virtual] |
Remove the given child tableau from the deck.
Override virtual base class method
Reimplemented from vgui_tableau.
Definition at line 139 of file vgui_deck_tableau.cxx.
| bool vgui_deck_tableau::index_ok | ( | int | ) | const [protected] |
Returns true if given integer could be an index to the list of children.
Definition at line 242 of file vgui_deck_tableau.cxx.
| virtual vcl_string vgui_tableau::name | ( | void | ) | const [inline, virtual, inherited] |
Return the name of the tableau.
Reimplemented in vgui_easy2D_tableau.
Definition at line 90 of file vgui_tableau.h.
| void vgui_tableau::get_parents | ( | vcl_vector< vgui_tableau_sptr > * | out | ) | const [inherited] |
| void vgui_tableau::get_children | ( | vcl_vector< vgui_tableau_sptr > * | out | ) | const [inherited] |
| vgui_tableau_sptr vgui_tableau::get_child | ( | unsigned | i | ) | const [inherited] |
| void vgui_tableau::get_all | ( | vcl_vector< vgui_tableau_sptr > * | out | ) | [static, inherited] |
| bool vgui_tableau::exists | ( | vgui_tableau_sptr const & | ) | [static, inherited] |
Returns true if the given address points to a valid tableau.
Definition at line 385 of file vgui_tableau.cxx.
| bool vgui_tableau::notify_replaced_child | ( | vgui_tableau_sptr const & | old_child, | |
| vgui_tableau_sptr const & | new_child | |||
| ) | [virtual, inherited] |
Called whenever a child of this tableau is about to be forcibly replaced.
This method is called when some part of the program (typically the parent_child_link mechanism) is about to forcibly replace a child of this tableau. The canonical reason to override this is in order to invalidate caches.
Definition at line 302 of file vgui_tableau.cxx.
| void vgui_tableau::add_popup | ( | vgui_menu & | ) | [virtual, inherited] |
Add the given menu to the popup menu for the tableau.
This method is for tableaux to implement if they want to _add_ some items to the popup menu. They can assign to or clear 'menu', but that is not recommended as it would remove what other tableaux put there. The recommended usage is to .add() items or to .include() another menu.
** This is an interface method. it abstracts a behaviour. **
Reimplemented in vgui_active_tableau, vgui_clear_tableau, and vgui_satellite_tableau_t< object, data >.
Definition at line 316 of file vgui_tableau.cxx.
| void vgui_tableau::post_message | ( | char const * | , | |
| void const * | ||||
| ) | [virtual, inherited] |
Post a message event.
The fact that this is virtual does not imply that you should go and override it.
Reimplemented in vgui_adaptor_tableau.
Definition at line 205 of file vgui_tableau.cxx.
| void vgui_tableau::post_redraw | ( | ) | [virtual, inherited] |
Post a draw event.
The fact that this is virtual does not imply that you should go and override it.
Reimplemented in vgui_adaptor_tableau.
Definition at line 215 of file vgui_tableau.cxx.
| void vgui_tableau::post_overlay_redraw | ( | ) | [virtual, inherited] |
Post a overlay-redraw event.
The fact that this is virtual does not imply that you should go and override it.
Reimplemented in vgui_adaptor_tableau.
Definition at line 225 of file vgui_tableau.cxx.
| void vgui_tableau::post_idle_request | ( | ) | [virtual, inherited] |
Post an idle request event.
The fact that this is virtual does not imply that you should go and override it.
Posting an idle event request means that your tableau has some idle processing that it'd like to do. This means that your tableau will continue to receive vgui_IDLE events until the event handler returns false (i.e. all idle processing is complete). The idle event handler should return false when it has no idle processing, or has completed its idle processing. It may return true if has only partially completed its idle processing; in this case, it will receive more idle event to allow it to complete processing.
Reimplemented in vgui_adaptor_tableau.
Definition at line 235 of file vgui_tableau.cxx.
| bool vgui_tableau::get_bounding_box | ( | float | low[3], | |
| float | high[3] | |||
| ) | const [virtual, inherited] |
Get the bounding box of this tableau.
If infinite in extent, or nothing is drawn, or you can't be bothered to implement it, return false. const. if you need to cache, cast away const.
Reimplemented in vgui_composite_tableau, vgui_image_tableau, vgui_roi_tableau, and vgui_wrapper_tableau.
Definition at line 198 of file vgui_tableau.cxx.
| bool vgui_tableau::draw | ( | ) | [virtual, inherited] |
Called by default handle when it receives a draw event.
Reimplemented in vgui_function_tableau.
Definition at line 176 of file vgui_tableau.cxx.
| bool vgui_tableau::mouse_down | ( | int | x, | |
| int | y, | |||
| vgui_button | , | |||
| vgui_modifier | ||||
| ) | [virtual, inherited] |
Called by default handle when it receives a mouse down event.
Reimplemented in vgui_displaylist2D_tableau, vgui_displaylist3D_tableau, vgui_function_tableau, vgui_listmanager2D_tableau, vgui_viewer2D_tableau, and vgui_viewer3D_tableau.
Definition at line 126 of file vgui_tableau.cxx.
| bool vgui_tableau::mouse_up | ( | int | x, | |
| int | y, | |||
| vgui_button | , | |||
| vgui_modifier | ||||
| ) | [virtual, inherited] |
Called by default handle when it receives a mouse up event.
Reimplemented in vgui_function_tableau, vgui_viewer2D_tableau, and vgui_viewer3D_tableau.
Definition at line 136 of file vgui_tableau.cxx.
| bool vgui_tableau::motion | ( | int | x, | |
| int | y | |||
| ) | [virtual, inherited] |
Called by handle when it receives a mouse motion event.
Reimplemented in vgui_displaylist2D_tableau, vgui_function_tableau, and vgui_listmanager2D_tableau.
Definition at line 146 of file vgui_tableau.cxx.
| bool vgui_tableau::idle | ( | ) | [virtual, inherited] |
Called when the application is otherwise idle.
Override if you want to do idle processing. Return false once your idle processing is complete, or if you have no need for more idle processing. Return true if you need more idle processing time.
Definition at line 185 of file vgui_tableau.cxx.
| void vgui_tableau::ref | ( | ) | const [inherited] |
Increase the reference count by one (for smart pointers).
"const" is for convenience, it is cast away internally.
Definition at line 79 of file vgui_tableau.cxx.
| void vgui_tableau::unref | ( | ) | const [inherited] |
Decrease the reference count by one (for smart pointers).
"const" is for convenience, it is cast away internally. If the reference count reaches zero then delete the object.
Definition at line 87 of file vgui_tableau.cxx.
Conceptually, this is a list on which observers can put themselves.
Definition at line 107 of file vgui_deck_tableau.h.
vcl_vector<vgui_parent_child_link> vgui_deck_tableau::children [protected] |
int vgui_deck_tableau::index_ [protected] |
1.5.1