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

The GTK implementation of vgui_adaptor. More...

#include <vgui_gtk2_adaptor.h>

Inheritance diagram for vgui_gtk2_adaptor:
Inheritance graph
[legend]

List of all members.

Classes

struct  internal_timer
 internal struct for timer. More...

Public Types

typedef vgui_adaptor_mixin mixin

Public Member Functions

 vgui_gtk2_adaptor (vgui_gtk2_window *win=0)
 Constructors.
 ~vgui_gtk2_adaptor ()
 Destructor.
void swap_buffers ()
void make_current ()
void post_redraw ()
 Redraw the rendering area.
void post_overlay_redraw ()
void post_timer (float, int)
 timeout is in milliseconds.
void post_destroy ()
void kill_timer (int)
 timeout is in milliseconds.
unsigned get_width () const
 Return width of rendering area.
unsigned get_height () const
 Return height of rendering area.
void bind_popups (vgui_modifier m, vgui_button b)
 Bind the given modifier/button combination to the popup menu.
void get_popup_bindings (vgui_modifier &m, vgui_button &b) const
 Return the modifier/button which pops up the popup menu.
void set_default_popup (vgui_menu)
vgui_menu get_popup ()
 Return the popup menu for this adaptor.
void draw ()
 This is overriding the gtk draw() method.
void reshape ()
bool do_idle ()
void post_idle_request ()
 Flags than a child requests idle processing.
vgui_windowget_window () const
GtkWidget * get_glarea_widget ()
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.
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_message (char const *, void const *)

Public Attributes

unsigned width
 Cached width of adaptor render area.
unsigned height
 Cached height of adaptor render area.
vgui_button popup_button
 Mouse button (used with popup_modifier) which causes the popup menu to appear.
vgui_modifier popup_modifier
 Modifier (used with popup_button) which causes the popup menu to appear.

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.

Static Private Member Functions

static gint handle (const vgui_event &, GtkWidget *, GdkEvent *, gpointer)
static gint handle_configure (GtkWidget *, GdkEvent *, gpointer)
static gint handle_draw (GtkWidget *, GdkEvent *, gpointer)
static gint handle_motion_notify (GtkWidget *, GdkEvent *, gpointer)
static gint handle_button (GtkWidget *, GdkEvent *, gpointer)
static gint handle_key (GtkWidget *, GdkEvent *, gpointer)
static gint handle_enter_leave (GtkWidget *, GdkEvent *, gpointer)
static gint idle_callback_for_redraw (gpointer data)
static gint idle_callback_for_tableaux (gpointer data)
static gint idle_callback_for_destroy (gpointer data)

Private Attributes

bool redraw_requested
bool destroy_requested
bool idle_request_posted_
 True while an idle time has been requested but not implemented.
GtkWidget * widget
vgui_gtk2_windowwin_
vgui_overlay_helperovl_helper
vcl_map< int, internal_timertimers_
int last_mouse_x
int last_mouse_y

Static Private Attributes

static vgui_menu last_popup

Detailed Description

The GTK implementation of vgui_adaptor.

Definition at line 35 of file vgui_gtk2_adaptor.h.


Member Typedef Documentation

Definition at line 38 of file vgui_gtk2_adaptor.h.


Constructor & Destructor Documentation

vgui_gtk2_adaptor::vgui_gtk2_adaptor ( vgui_gtk2_window win = 0)

Constructors.

Definition at line 42 of file vgui_gtk2_adaptor.cxx.

vgui_gtk2_adaptor::~vgui_gtk2_adaptor ( )

Destructor.

Definition at line 128 of file vgui_gtk2_adaptor.cxx.


Member Function Documentation

void vgui_gtk2_adaptor::bind_popups ( vgui_modifier  ,
vgui_button   
) [inline, virtual]

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

Reimplemented from vgui_adaptor.

Definition at line 55 of file vgui_gtk2_adaptor.h.

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.

bool vgui_gtk2_adaptor::do_idle ( )

Definition at line 445 of file vgui_gtk2_adaptor.cxx.

void vgui_gtk2_adaptor::draw ( )

This is overriding the gtk draw() method.

Definition at line 454 of file vgui_gtk2_adaptor.cxx.

GtkWidget* vgui_gtk2_adaptor::get_glarea_widget ( ) [inline]

Definition at line 77 of file vgui_gtk2_adaptor.h.

unsigned vgui_gtk2_adaptor::get_height ( ) const [inline, 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 54 of file vgui_gtk2_adaptor.h.

vgui_menu vgui_gtk2_adaptor::get_popup ( )

Return the popup menu for this adaptor.

Reimplemented from vgui_adaptor.

Definition at line 241 of file vgui_gtk2_adaptor.cxx.

void vgui_gtk2_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 57 of file vgui_gtk2_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_gtk2_adaptor::get_width ( ) const [inline, 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 53 of file vgui_gtk2_adaptor.h.

vgui_window * vgui_gtk2_adaptor::get_window ( ) const [virtual]

Reimplemented from vgui_adaptor.

Definition at line 140 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::handle ( const vgui_event event,
GtkWidget *  widget,
GdkEvent *  gev,
gpointer  context 
) [static, private]

Definition at line 397 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::handle_button ( GtkWidget *  widget,
GdkEvent *  gev,
gpointer  context 
) [static, private]

Definition at line 308 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::handle_configure ( GtkWidget *  widget,
GdkEvent *  gev,
gpointer  context 
) [static, private]

Definition at line 249 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::handle_draw ( GtkWidget *  widget,
GdkEvent *  gev,
gpointer  context 
) [static, private]

Definition at line 268 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::handle_enter_leave ( GtkWidget *  widget,
GdkEvent *  gev,
gpointer  context 
) [static, private]

Definition at line 376 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::handle_key ( GtkWidget *  widget,
GdkEvent *  gev,
gpointer  context 
) [static, private]

Definition at line 353 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::handle_motion_notify ( GtkWidget *  widget,
GdkEvent *  gev,
gpointer  context 
) [static, private]

Definition at line 278 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::idle_callback_for_destroy ( gpointer  data) [static, private]

Definition at line 496 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::idle_callback_for_redraw ( gpointer  data) [static, private]

Definition at line 482 of file vgui_gtk2_adaptor.cxx.

gint vgui_gtk2_adaptor::idle_callback_for_tableaux ( gpointer  data) [static, private]

Definition at line 474 of file vgui_gtk2_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_gtk2_adaptor::kill_timer ( int  name) [virtual]

timeout is in milliseconds.

Reimplemented from vgui_adaptor.

Definition at line 207 of file vgui_gtk2_adaptor.cxx.

void vgui_gtk2_adaptor::make_current ( ) [virtual]

Reimplemented from vgui_adaptor.

Definition at line 151 of file vgui_gtk2_adaptor.cxx.

void vgui_gtk2_adaptor::post_destroy ( void  ) [virtual]

Reimplemented from vgui_adaptor.

Definition at line 225 of file vgui_gtk2_adaptor.cxx.

void vgui_gtk2_adaptor::post_idle_request ( void  ) [virtual]

Flags than a child requests idle processing.

Reimplemented from vgui_adaptor.

Definition at line 175 of file vgui_gtk2_adaptor.cxx.

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_gtk2_adaptor::post_overlay_redraw ( void  ) [virtual]

Implements vgui_adaptor.

Definition at line 168 of file vgui_gtk2_adaptor.cxx.

void vgui_gtk2_adaptor::post_redraw ( ) [virtual]

Redraw the rendering area.

Implements vgui_adaptor.

Definition at line 159 of file vgui_gtk2_adaptor.cxx.

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

timeout is in milliseconds.

Reimplemented from vgui_adaptor.

Definition at line 191 of file vgui_gtk2_adaptor.cxx.

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

Definition at line 266 of file vgui_adaptor.cxx.

void vgui_gtk2_adaptor::reshape ( )

Definition at line 428 of file vgui_gtk2_adaptor.cxx.

void vgui_gtk2_adaptor::set_default_popup ( vgui_menu  )

Definition at line 234 of file vgui_gtk2_adaptor.cxx.

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_gtk2_adaptor::swap_buffers ( ) [virtual]

Reimplemented from vgui_adaptor.

Definition at line 145 of file vgui_gtk2_adaptor.cxx.


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.

Definition at line 96 of file vgui_gtk2_adaptor.h.

unsigned vgui_adaptor_mixin::height [inherited]

Cached height of adaptor render area.

Definition at line 29 of file vgui_adaptor_mixin.h.

True while an idle time has been requested but not implemented.

Definition at line 99 of file vgui_gtk2_adaptor.h.

Definition at line 128 of file vgui_gtk2_adaptor.h.

Definition at line 128 of file vgui_gtk2_adaptor.h.

Definition at line 125 of file vgui_gtk2_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 108 of file vgui_gtk2_adaptor.h.

Mouse button (used with popup_modifier) which causes the popup menu to appear.

Definition at line 34 of file vgui_adaptor_mixin.h.

Modifier (used with popup_button) which causes the popup menu to appear.

Definition at line 36 of file vgui_adaptor_mixin.h.

Definition at line 95 of file vgui_gtk2_adaptor.h.

vcl_map<int, internal_timer> vgui_gtk2_adaptor::timers_ [private]

Definition at line 121 of file vgui_gtk2_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.

GtkWidget* vgui_gtk2_adaptor::widget [private]

Definition at line 102 of file vgui_gtk2_adaptor.h.

unsigned vgui_adaptor_mixin::width [inherited]

Cached width of adaptor render area.

Definition at line 27 of file vgui_adaptor_mixin.h.

Definition at line 105 of file vgui_gtk2_adaptor.h.


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