Public Member Functions | Protected Member Functions | Private Attributes | Friends
vgui_event_server Class Reference

Procedural event grabbing from a tableau. More...

#include <vgui_event_server.h>

List of all members.

Public Member Functions

 vgui_event_server (vgui_tableau_sptr const &)
 Constructor - collects events from the given tableau.
void reset ()
bool next ()
 Move on to the next event in the event queue.
void set_popup (const vgui_menu &)
vgui_event last_event ()
 Returns the last event.

Protected Member Functions

 ~vgui_event_server ()

Private Attributes

vgui_event_server_interpose_tableaugrabber_
vgui_tableau_sptr grabber_reference_
vgui_event last_event_
bool use_event_
vgui_menu menu

Friends

class vgui_event_server_interpose_tableau

Detailed Description

Procedural event grabbing from a tableau.

vgui_event_server allows you to grab events intended for a tableau in a procedural way, (i.e. in a "for" loop), in order to temporarily take control of a tableau's event stream. This is useful for modal operations such as picking (- or maybe not, see below).

WARNING: This class is not as useful as it first appears!! If we look at events outside the handle function of a tableau (e.g. by using a vgui_event_server) then the gl state associated with those events will have changed. This means for a draw_overlay event we would end up drawing into the wrong buffer. For a mouse event we may not be able to get the position in the image using the projection_inspector (if e.g. the image was zoomed) since all the gl matrices would have been reset. I guess you could use it to get key presses! - kym

Definition at line 42 of file vgui_event_server.h.


Constructor & Destructor Documentation

vgui_event_server::vgui_event_server ( vgui_tableau_sptr const &  t)

Constructor - collects events from the given tableau.

Construct a vgui_event_server, which grabs all events intended for tableau t.

Definition at line 50 of file vgui_event_server.cxx.

vgui_event_server::~vgui_event_server ( ) [protected]

Definition at line 64 of file vgui_event_server.cxx.


Member Function Documentation

vgui_event vgui_event_server::last_event ( ) [inline]

Returns the last event.

Definition at line 56 of file vgui_event_server.h.

bool vgui_event_server::next ( )

Move on to the next event in the event queue.

Definition at line 74 of file vgui_event_server.cxx.

void vgui_event_server::reset ( )

Definition at line 70 of file vgui_event_server.cxx.

void vgui_event_server::set_popup ( const vgui_menu )

Friends And Related Function Documentation

friend class vgui_event_server_interpose_tableau [friend]

Definition at line 62 of file vgui_event_server.h.


Member Data Documentation

Definition at line 63 of file vgui_event_server.h.

Definition at line 64 of file vgui_event_server.h.

Definition at line 65 of file vgui_event_server.h.

Definition at line 67 of file vgui_event_server.h.

Definition at line 66 of file vgui_event_server.h.


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