Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Attributes
vgui_viewer3D_tableau Class Reference

Tableau with functions to view 3D objects (eg, rotate, zoom, etc). More...

#include <vgui_viewer3D_tableau.h>

Inheritance diagram for vgui_viewer3D_tableau:
Inheritance graph
[legend]

List of all members.

Classes

struct  token_t
 Data on the current state of vgui_viewer3D_tableau (eg, the amount we are zoomed). More...

Public Types

enum  { wireframe, shaded, textured }

Public Member Functions

 vgui_viewer3D_tableau (vgui_tableau_sptr const &)
 Constructor - don't use this, use vgui_viewer3D_tableau_new.
void draw_before_child ()
virtual bool handle (const vgui_event &event)
 Look for drag events and pass them to mouse_drag().
vcl_string type_name () const
 Returns the type of tableau ('vgui_wrapper_tableau').
bool key_press (int, int, vgui_key, vgui_modifier)
 Called by default handle when it receives a key-press event.
bool help ()
 Called by default handle when it receives a '?' pressed event.
bool mouse_up (int x, int y, vgui_button button, vgui_modifier modifier)
 Called by default handle when it receives a mouse up event.
bool mouse_drag (int x, int y, vgui_button button, vgui_modifier modifier)
 Called when the user is dragging the mouse.
bool mouse_down (int x, int y, vgui_button button, vgui_modifier modifier)
 Called by default handle when it receives a mouse down event.
void setup_gl_matrices ()
bool add_child (vgui_tableau_sptr const &)
 Adds given tableau as child if none exists, else causes error.
bool remove_child (vgui_tableau_sptr const &)
 The child tableau is removed if it is the same as the given tableau.
vcl_string file_name () const
 Returns the child's file_name if it exists.
vcl_string pretty_name () const
 Returns nice version of the name which also includes details of the child.
bool get_bounding_box (float low[3], float high[3]) const
 Get the bounding box for this tableau.
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 get_popup (vgui_popup_params const &, vgui_menu &)
 Get the default 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 an overlay-redraw event.
virtual void post_idle_request ()
 Post an idle request event.
virtual bool draw ()
 Called by default handle when it receives a draw 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_event_condition c_mouse_rotate
vgui_event_condition c_mouse_translate
vgui_event_condition c_mouse_zoom
vgui_event_condition c_lock_dolly
vgui_event_condition c_lock_zoom
vgui_event_condition c_lighting
vgui_event_condition c_shading
vgui_event_condition c_spinning
vgui_event_condition c_render_mode
vgui_event_condition c_niceness
vgui_event_condition c_headlight
vgui_event_condition c_save_home
vgui_event_condition c_restore_home
token_t token
token_t home
enum vgui_viewer3D_tableau:: { ... }  gl_mode
bool spinning
bool allow_spinning
bool lighting
bool smooth_shading
bool high_quality
bool headlight
vgui_parent_child_link child
 The single child of this tableau.

Static Public Attributes

static vgui_DLLDATA const void
*const 
SPIN_EVENT = "x"

Protected Member Functions

 ~vgui_viewer3D_tableau ()

Private Attributes

vgui_event event
vgui_event last
vgui_viewer3D_tableauviewer
float beginx
float beginy
token_t lastpos
float prevx
float prevy
bool lock_dolly
bool lock_zoom
vgui_viewer3D_tableau_spinspin_data

Detailed Description

Tableau with functions to view 3D objects (eg, rotate, zoom, etc).

Definition at line 31 of file vgui_viewer3D_tableau.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
wireframe 
shaded 
textured 

Definition at line 88 of file vgui_viewer3D_tableau.h.


Constructor & Destructor Documentation

vgui_viewer3D_tableau::vgui_viewer3D_tableau ( vgui_tableau_sptr const &  s)

Constructor - don't use this, use vgui_viewer3D_tableau_new.

Definition at line 38 of file vgui_viewer3D_tableau.cxx.

vgui_viewer3D_tableau::~vgui_viewer3D_tableau ( ) [protected]

Definition at line 76 of file vgui_viewer3D_tableau.cxx.


Member Function Documentation

bool vgui_wrapper_tableau::add_child ( vgui_tableau_sptr const &  c) [virtual, inherited]

Adds given tableau as child if none exists, else causes error.

Reimplemented from vgui_tableau.

Definition at line 42 of file vgui_wrapper_tableau.cxx.

void vgui_tableau::add_popup ( vgui_menu ) [virtual, inherited]

Add the given menu to the popup menu for the tableau.

Add given menu to the tableau popup menu.

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_satellite_tableau_t< object, data >, vgui_active_tableau, and vgui_clear_tableau.

Definition at line 316 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.

void vgui_viewer3D_tableau::draw_before_child ( )

Definition at line 146 of file vgui_viewer3D_tableau.cxx.

bool vgui_tableau::exists ( vgui_tableau_sptr const &  ptr) [static, inherited]

Returns true if the given address points to a valid tableau.

Definition at line 385 of file vgui_tableau.cxx.

vcl_string vgui_wrapper_tableau::file_name ( ) const [virtual, inherited]

Returns the child's file_name if it exists.

Reimplemented from vgui_tableau.

Definition at line 37 of file vgui_wrapper_tableau.cxx.

void vgui_tableau::get_all ( vcl_vector< vgui_tableau_sptr > *  out) [static, inherited]

Push all tableaux onto the given vector.

Definition at line 376 of file vgui_tableau.cxx.

bool vgui_wrapper_tableau::get_bounding_box ( float  low[3],
float  high[3] 
) const [virtual, inherited]

Get the bounding box for this tableau.

Defaults to getting the bounding box of the child.

Reimplemented from vgui_tableau.

Definition at line 71 of file vgui_wrapper_tableau.cxx.

vgui_tableau_sptr vgui_tableau::get_child ( unsigned  i) const [inherited]

Get the ith child or return 0.

Get the ith child, or return 0.

Definition at line 274 of file vgui_tableau.cxx.

void vgui_tableau::get_children ( vcl_vector< vgui_tableau_sptr > *  out) const [inherited]

Get the child tableaux for this tableau.

Push children onto the given vcl_vector.

Definition at line 267 of file vgui_tableau.cxx.

void vgui_tableau::get_parents ( vcl_vector< vgui_tableau_sptr > *  out) const [inherited]

Get the parent tableaux for this tableau.

Push parents onto the given vcl_vector.

Definition at line 260 of file vgui_tableau.cxx.

void vgui_tableau::get_popup ( vgui_popup_params const &  params,
vgui_menu menu 
) [virtual, inherited]

Get the default popup menu for the tableau.

Gets popup menu for this tableau.

If recurse is, true, recursively add the popup menus for children and children's children etc.

** this is a mixin method. it does some work for you. **

Reimplemented in vgui_image_tableau, vgui_shell_tableau, vgui_deck_tableau, vgui_poly_tableau, vgui_selector_tableau, vgui_tview_launcher_tableau, and vgui_tview_tableau.

Definition at line 327 of file vgui_tableau.cxx.

bool vgui_viewer3D_tableau::handle ( const vgui_event event) [virtual]

Look for drag events and pass them to mouse_drag().

Reimplemented from vgui_drag_mixin.

Definition at line 208 of file vgui_viewer3D_tableau.cxx.

bool vgui_viewer3D_tableau::help ( ) [virtual]

Called by default handle when it receives a '?' pressed event.

Reimplemented from vgui_tableau.

Definition at line 401 of file vgui_viewer3D_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.

bool vgui_viewer3D_tableau::key_press ( int  x,
int  y,
vgui_key  ,
vgui_modifier   
) [virtual]

Called by default handle when it receives a key-press event.

Caled by default handle when it receives a key press event.

Reimplemented from vgui_tableau.

Definition at line 422 of file vgui_viewer3D_tableau.cxx.

bool vgui_tableau::motion ( int  x,
int  y 
) [virtual, inherited]

Called by handle when it receives a mouse motion event.

Called by default handle when it receives a mouse motion event.

Reimplemented in vgui_listmanager2D_tableau, vgui_function_tableau, and vgui_displaylist2D_tableau.

Definition at line 146 of file vgui_tableau.cxx.

bool vgui_viewer3D_tableau::mouse_down ( int  x,
int  y,
vgui_button  ,
vgui_modifier   
) [virtual]

Called by default handle when it receives a mouse down event.

Reimplemented from vgui_tableau.

Definition at line 266 of file vgui_viewer3D_tableau.cxx.

bool vgui_viewer3D_tableau::mouse_drag ( int  ,
int  ,
vgui_button  ,
vgui_modifier   
) [virtual]

Called when the user is dragging the mouse.

Reimplemented from vgui_drag_mixin.

Definition at line 280 of file vgui_viewer3D_tableau.cxx.

bool vgui_viewer3D_tableau::mouse_up ( int  x,
int  y,
vgui_button  ,
vgui_modifier   
) [virtual]

Called by default handle when it receives a mouse up event.

Reimplemented from vgui_tableau.

Definition at line 360 of file vgui_viewer3D_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.

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.

Called when a child of this tableau is 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::post_idle_request ( void  ) [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.

void vgui_tableau::post_message ( char const *  msg,
void const *  data 
) [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_overlay_redraw ( void  ) [virtual, inherited]

Post an overlay-redraw event.

Post an 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_redraw ( void  ) [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.

vcl_string vgui_wrapper_tableau::pretty_name ( ) const [virtual, inherited]

Returns nice version of the name which also includes details of the child.

Reimplemented from vgui_tableau.

Definition at line 32 of file vgui_wrapper_tableau.cxx.

void vgui_tableau::ref ( ) const [inherited]

Increase the reference count by one (for smart pointers).

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.

bool vgui_wrapper_tableau::remove_child ( vgui_tableau_sptr const &  c) [virtual, inherited]

The child tableau is removed if it is the same as the given tableau.

Reimplemented from vgui_tableau.

Definition at line 54 of file vgui_wrapper_tableau.cxx.

void vgui_viewer3D_tableau::setup_gl_matrices ( )

Definition at line 114 of file vgui_viewer3D_tableau.cxx.

vcl_string vgui_viewer3D_tableau::type_name ( ) const [virtual]

Returns the type of tableau ('vgui_wrapper_tableau').

Reimplemented from vgui_wrapper_tableau.

Definition at line 80 of file vgui_viewer3D_tableau.cxx.

void vgui_tableau::unref ( ) const [inherited]

Decrease the reference count by one (for smart pointers).

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.

If the reference count reaches zero then delete the object.

Definition at line 87 of file vgui_tableau.cxx.


Member Data Documentation

Definition at line 91 of file vgui_viewer3D_tableau.h.

Definition at line 105 of file vgui_viewer3D_tableau.h.

Definition at line 106 of file vgui_viewer3D_tableau.h.

Definition at line 60 of file vgui_viewer3D_tableau.h.

Definition at line 55 of file vgui_viewer3D_tableau.h.

Definition at line 53 of file vgui_viewer3D_tableau.h.

Definition at line 54 of file vgui_viewer3D_tableau.h.

Definition at line 50 of file vgui_viewer3D_tableau.h.

Definition at line 51 of file vgui_viewer3D_tableau.h.

Definition at line 52 of file vgui_viewer3D_tableau.h.

Definition at line 59 of file vgui_viewer3D_tableau.h.

Definition at line 58 of file vgui_viewer3D_tableau.h.

Definition at line 62 of file vgui_viewer3D_tableau.h.

Definition at line 61 of file vgui_viewer3D_tableau.h.

Definition at line 56 of file vgui_viewer3D_tableau.h.

Definition at line 57 of file vgui_viewer3D_tableau.h.

The single child of this tableau.

Definition at line 65 of file vgui_wrapper_tableau.h.

Definition at line 101 of file vgui_viewer3D_tableau.h.

Definition at line 95 of file vgui_viewer3D_tableau.h.

Definition at line 94 of file vgui_viewer3D_tableau.h.

Definition at line 83 of file vgui_viewer3D_tableau.h.

Definition at line 102 of file vgui_viewer3D_tableau.h.

Definition at line 107 of file vgui_viewer3D_tableau.h.

Definition at line 92 of file vgui_viewer3D_tableau.h.

Definition at line 111 of file vgui_viewer3D_tableau.h.

Definition at line 112 of file vgui_viewer3D_tableau.h.

Definition at line 108 of file vgui_viewer3D_tableau.h.

Definition at line 109 of file vgui_viewer3D_tableau.h.

Definition at line 93 of file vgui_viewer3D_tableau.h.

Definition at line 114 of file vgui_viewer3D_tableau.h.

const void *const vgui_viewer3D_tableau::SPIN_EVENT = "x" [static]

Definition at line 85 of file vgui_viewer3D_tableau.h.

Definition at line 90 of file vgui_viewer3D_tableau.h.

Definition at line 82 of file vgui_viewer3D_tableau.h.

Definition at line 104 of file vgui_viewer3D_tableau.h.


The documentation for this class was generated from the following files: