Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
vgui_glut_adaptor Struct Reference

The GLUT (OpenGL Utility Toolkit) implementation of vgui_adaptor. More...

#include <vgui_glut_adaptor.h>

Inheritance diagram for vgui_glut_adaptor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vgui_glut_adaptor (vgui_window *win_, int id_)
 ~vgui_glut_adaptor ()
int get_id () const
vgui_windowget_window () const
void post_redraw ()
 Redraw the rendering area.
void post_overlay_redraw ()
void post_timer (float, int)
 timeout is in milliseconds.
void post_destroy ()
void swap_buffers ()
void make_current ()
void bind_popups (vgui_modifier, vgui_button)
 Bind the given modifier/button combination to the popup menu.
unsigned get_width () const
 Return width of rendering area.
unsigned get_height () const
 Return height of rendering area.
void get_popup_bindings (vgui_modifier &m, vgui_button &b) const
 Return the modifier/button which pops up the popup menu.
vgui_tableau_sptr get_tableau () const
 Get the vgui_tableau associated with this vgui_adaptor.
void set_tableau (vgui_tableau_sptr const &t)
 Set the vgui_tableau associated with this vgui_adaptor.
void set_double_buffering (bool b)
 True to use double buffering, false to not use it.
vgui_menu get_total_popup (vgui_popup_params &) const
 Return the concatenation of the adaptor's menu with the tableau's menu.
void config_dialog ()
 Pop up a dialog for changing the popup modifier and button bindings.
vgui_menuget_popup ()
 Return the popup menu for this adaptor.
void set_popup (vgui_menu const &m)
 Set the popup menu for this adaptor.
void include_in_popup (vgui_menu const &m)
 Add the given menu to the popup menu for this adaptor.
bool dispatch_to_tableau (vgui_event const &)
 Dispatches the given event to the tableau.
int post_timer (float)
virtual void post_idle_request ()
virtual void post_message (char const *, void const *)
virtual void kill_timer (int)
 kill an existing timer.

Static Public Attributes

static vgui_DLLDATA vgui_adaptorcurrent = 0
 This static datum points to the adaptor that last received a mouse event.

Protected Attributes

bool nested_popups
 Parameters controlling the popup menu style.
bool default_items
bool use_double_buffering
 Whether or not to use double buffering.

Private Member Functions

void establish_overlays ()
bool glut_dispatch (vgui_event &e)
void register_static_callbacks ()
void make_popup ()
virtual void display ()
virtual void overlay_display ()
virtual void reshape (int width, int height)
virtual void keyboard (unsigned char, int, int)
virtual void mouse (int button, int state, int x, int y)
virtual void motion (int x, int y)
virtual void passive_motion (int x, int y)
virtual void entry (int)
virtual void visibility (int state)
virtual void timer (int)
virtual void special (int, int, int)
virtual void keyboard_up (unsigned char, int, int)
virtual void special_up (int, int, int)

Static Private Member Functions

static void pre_menu_hook (int)
static vcl_vector
< vgui_glut_adaptor * > & 
all ()
static vgui_glut_adaptorget_adaptor (int window_id)
static void display_callback ()
static void overlay_display_callback ()
static void reshape_callback (int width, int height)
static void keyboard_callback (unsigned char, int, int)
static void mouse_callback (int button, int state, int x, int y)
static void motion_callback (int x, int y)
static void passive_motion_callback (int x, int y)
static void entry_callback (int)
static void visibility_callback (int state)
static void timer_callback (int)
static void special_callback (int, int, int)
static void keyboard_up_callback (unsigned char, int, int)
static void special_up_callback (int, int, int)
static void menustatus_callback (int, int, int)
 called when the menu status changes.

Private Attributes

int id
vgui_windowwin
vgui_modifier popup_modifier
vgui_button popup_button
bool ovl_established
vgui_overlay_helperovl_helper
vgui_glut_adaptorsuper
vcl_vector< vgui_glut_adaptor * > sub_contexts
vgui_glut_popup_implpopup

Friends

struct vgui_glut_popup_impl

Detailed Description

The GLUT (OpenGL Utility Toolkit) implementation of vgui_adaptor.

Definition at line 21 of file vgui_glut_adaptor.h.


Constructor & Destructor Documentation

vgui_glut_adaptor::vgui_glut_adaptor ( vgui_window win_,
int  id_ 
)

Definition at line 23 of file vgui_glut_adaptor.cxx.

vgui_glut_adaptor::~vgui_glut_adaptor ( )

Definition at line 44 of file vgui_glut_adaptor.cxx.


Member Function Documentation

vcl_vector< vgui_glut_adaptor * > & vgui_glut_adaptor::all ( ) [static, private]

Definition at line 309 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::bind_popups ( vgui_modifier  ,
vgui_button   
) [virtual]

Bind the given modifier/button combination to the popup menu.

Reimplemented from vgui_adaptor.

Definition at line 632 of file vgui_glut_adaptor.cxx.

void vgui_adaptor::config_dialog ( ) [inherited]

Pop up a dialog for changing the popup modifier and button bindings.

Pops up a dialog for changing the popup modifier and button bindings.

Definition at line 102 of file vgui_adaptor.cxx.

bool vgui_adaptor::dispatch_to_tableau ( vgui_event const &  e) [inherited]

Dispatches the given event to the tableau.

This method performs various checks which can be performed generically for all tableaux. It is not the responsibility of this method to take care of overlay handling - the derived class must sort that out.

This method performs various checks which can be performed generically for all tableaux. It is not the responsibility of this method to take care of overlay handling - the derived class must sort that out. The derived class must also ensure that the correct draw buffer is set.

Reimplemented in vgui_qt_adaptor, and vgui_qt_adaptor.

Definition at line 182 of file vgui_adaptor.cxx.

void vgui_glut_adaptor::display ( ) [private, virtual]

Definition at line 332 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::display_callback ( ) [static, private]
void vgui_glut_adaptor::entry ( int  state) [private, virtual]

Definition at line 504 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::entry_callback ( int  ) [static, private]
void vgui_glut_adaptor::establish_overlays ( ) [private]

Definition at line 142 of file vgui_glut_adaptor.cxx.

vgui_glut_adaptor * vgui_glut_adaptor::get_adaptor ( int  window_id) [static, private]

Definition at line 317 of file vgui_glut_adaptor.cxx.

unsigned vgui_glut_adaptor::get_height ( ) const [virtual]

Return height of rendering area.

*Not* the height of the viewport. There seems to be no OpenGL mechanism for doing this.

Implements vgui_adaptor.

Definition at line 97 of file vgui_glut_adaptor.cxx.

int vgui_glut_adaptor::get_id ( ) const [inline]

Definition at line 26 of file vgui_glut_adaptor.h.

vgui_menu& vgui_adaptor::get_popup ( ) [inline, inherited]

Return the popup menu for this adaptor.

Reimplemented in vgui_mfc_adaptor, vgui_qt_adaptor, vgui_qt_adaptor, vgui_gtk2_adaptor, and vgui_gtk_adaptor.

Definition at line 75 of file vgui_adaptor.h.

void vgui_glut_adaptor::get_popup_bindings ( vgui_modifier ,
vgui_button  
) const [inline, virtual]

Return the modifier/button which pops up the popup menu.

Reimplemented from vgui_adaptor.

Definition at line 40 of file vgui_glut_adaptor.h.

vgui_tableau_sptr vgui_adaptor::get_tableau ( ) const [inherited]

Get the vgui_tableau associated with this vgui_adaptor.

Get the vgui_tableau associated with this adaptor.

Definition at line 64 of file vgui_adaptor.cxx.

vgui_menu vgui_adaptor::get_total_popup ( vgui_popup_params params) const [inherited]

Return the concatenation of the adaptor's menu with the tableau's menu.

Returns concatenation of the adaptor's menu with the tableau's menu.

Definition at line 78 of file vgui_adaptor.cxx.

unsigned vgui_glut_adaptor::get_width ( ) const [virtual]

Return width of rendering area.

*Not* the width of the viewport. There seems to be no OpenGL mechanism for doing this.

Implements vgui_adaptor.

Definition at line 88 of file vgui_glut_adaptor.cxx.

vgui_window* vgui_glut_adaptor::get_window ( ) const [inline, virtual]

Reimplemented from vgui_adaptor.

Definition at line 29 of file vgui_glut_adaptor.h.

bool vgui_glut_adaptor::glut_dispatch ( vgui_event e) [private]

Definition at line 183 of file vgui_glut_adaptor.cxx.

void vgui_adaptor::include_in_popup ( vgui_menu const &  m) [inline, inherited]

Add the given menu to the popup menu for this adaptor.

Definition at line 81 of file vgui_adaptor.h.

void vgui_glut_adaptor::keyboard ( unsigned char  key,
int  x,
int  y 
) [private, virtual]

Definition at line 421 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::keyboard_callback ( unsigned  char,
int  ,
int   
) [static, private]
void vgui_glut_adaptor::keyboard_up ( unsigned char  key,
int  x,
int  y 
) [private, virtual]

Definition at line 431 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::keyboard_up_callback ( unsigned  char,
int  ,
int   
) [static, private]
void vgui_adaptor::kill_timer ( int  ) [virtual, inherited]

kill an existing timer.

Reimplemented in vgui_mfc_adaptor, vgui_wx_adaptor, vgui_win32_adaptor, vgui_qt_adaptor, vgui_gtk2_adaptor, and vgui_gtk_adaptor.

Definition at line 260 of file vgui_adaptor.cxx.

void vgui_glut_adaptor::make_current ( ) [virtual]

Reimplemented from vgui_adaptor.

Definition at line 83 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::make_popup ( ) [private]

Definition at line 574 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::menustatus_callback ( int  status,
int  x,
int  y 
) [static, private]

called when the menu status changes.

Definition at line 696 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::motion ( int  x,
int  y 
) [private, virtual]

Definition at line 488 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::motion_callback ( int  x,
int  y 
) [static, private]
void vgui_glut_adaptor::mouse ( int  button,
int  state,
int  x,
int  y 
) [private, virtual]

Definition at line 441 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::mouse_callback ( int  button,
int  state,
int  x,
int  y 
) [static, private]
void vgui_glut_adaptor::overlay_display ( ) [private, virtual]

Definition at line 342 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::overlay_display_callback ( ) [static, private]
void vgui_glut_adaptor::passive_motion ( int  x,
int  y 
) [private, virtual]

Definition at line 479 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::passive_motion_callback ( int  x,
int  y 
) [static, private]
void vgui_glut_adaptor::post_destroy ( void  ) [virtual]

Reimplemented from vgui_adaptor.

Definition at line 128 of file vgui_glut_adaptor.cxx.

void vgui_adaptor::post_idle_request ( void  ) [virtual, inherited]
void vgui_adaptor::post_message ( char const *  ,
void const *   
) [virtual, inherited]

Reimplemented in vgui_wx_adaptor.

Definition at line 242 of file vgui_adaptor.cxx.

void vgui_glut_adaptor::post_overlay_redraw ( void  ) [virtual]

Implements vgui_adaptor.

Definition at line 114 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::post_redraw ( ) [virtual]

Redraw the rendering area.

Implements vgui_adaptor.

Definition at line 106 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::post_timer ( float  timeout,
int  name 
) [virtual]

timeout is in milliseconds.

Reimplemented from vgui_adaptor.

Definition at line 657 of file vgui_glut_adaptor.cxx.

int vgui_adaptor::post_timer ( float  t) [inherited]

Definition at line 266 of file vgui_adaptor.cxx.

void vgui_glut_adaptor::pre_menu_hook ( int  menu_id) [static, private]

Definition at line 560 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::register_static_callbacks ( ) [private]

Definition at line 283 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::reshape ( int  width,
int  height 
) [private, virtual]

Definition at line 462 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::reshape_callback ( int  width,
int  height 
) [static, private]
void vgui_adaptor::set_double_buffering ( bool  b) [inline, inherited]

True to use double buffering, false to not use it.

Definition at line 66 of file vgui_adaptor.h.

void vgui_adaptor::set_popup ( vgui_menu const &  m) [inline, inherited]

Set the popup menu for this adaptor.

Definition at line 78 of file vgui_adaptor.h.

void vgui_adaptor::set_tableau ( vgui_tableau_sptr const &  t) [inherited]

Set the vgui_tableau associated with this vgui_adaptor.

Set the vgui_tableau associated with this adaptor.

Definition at line 71 of file vgui_adaptor.cxx.

void vgui_glut_adaptor::special ( int  key,
int  x,
int  y 
) [private, virtual]

Definition at line 535 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::special_callback ( int  ,
int  ,
int   
) [static, private]
void vgui_glut_adaptor::special_up ( int  key,
int  x,
int  y 
) [private, virtual]

Definition at line 545 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::special_up_callback ( int  ,
int  ,
int   
) [static, private]
void vgui_glut_adaptor::swap_buffers ( ) [virtual]

Reimplemented from vgui_adaptor.

Definition at line 74 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::timer ( int  value) [private, virtual]

Definition at line 497 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::timer_callback ( int  value) [static, private]

Definition at line 676 of file vgui_glut_adaptor.cxx.

void vgui_glut_adaptor::visibility ( int  state) [private, virtual]

Definition at line 510 of file vgui_glut_adaptor.cxx.

static void vgui_glut_adaptor::visibility_callback ( int  state) [static, private]

Friends And Related Function Documentation

friend struct vgui_glut_popup_impl [friend]

Definition at line 71 of file vgui_glut_adaptor.h.


Member Data Documentation

vgui_adaptor * vgui_adaptor::current = 0 [static, inherited]

This static datum points to the adaptor that last received a mouse event.

It is set to zero if its pointer receives a LEAVE event. It will often point to the adaptor which was current when a popup menu was triggered, which is often what one wants it for.

Definition at line 93 of file vgui_adaptor.h.

bool vgui_adaptor::default_items [protected, inherited]

Definition at line 143 of file vgui_adaptor.h.

int vgui_glut_adaptor::id [private]

Definition at line 44 of file vgui_glut_adaptor.h.

bool vgui_adaptor::nested_popups [protected, inherited]

Parameters controlling the popup menu style.

These are put onto a popup_params object and passed to tableau::get_popup()

Definition at line 142 of file vgui_adaptor.h.

Definition at line 54 of file vgui_glut_adaptor.h.

Definition at line 55 of file vgui_glut_adaptor.h.

Definition at line 72 of file vgui_glut_adaptor.h.

Definition at line 48 of file vgui_glut_adaptor.h.

Definition at line 47 of file vgui_glut_adaptor.h.

Definition at line 68 of file vgui_glut_adaptor.h.

Definition at line 67 of file vgui_glut_adaptor.h.

bool vgui_adaptor::use_double_buffering [protected, inherited]

Whether or not to use double buffering.

Definition at line 146 of file vgui_adaptor.h.

Definition at line 45 of file vgui_glut_adaptor.h.


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