Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::FGEvent Class Reference

#include <fastgl.h>

Collaboration diagram for fgl::FGEvent:

Collaboration graph
[legend]
List of all members.

Detailed Description

System event object. The events are presents in many types. By example event is key pressing, mouse move, click on the mouse button, window move etc.
Examples:

bgroup.cpp, bitmap.cpp, buttons.cpp, calc.cpp, events.cpp, gears16.cpp, geartrain.cpp, gradient.cpp, listbox.cpp, mandel.cpp, tabpage.cpp, timer.cpp, and updown.cpp.


Public Member Functions

int GetObjectType (void) const
 FGEvent (int T=NOEVENT, int K=0, int X=0, int Y=0, int W=0, int H=0)
int GetKey (void) const
const char * GetName (void) const
int GetType (void) const
int GetButtons (void) const
int GetX (void) const
int GetY (void) const
int GetW (void) const
int GetH (void) const

Static Public Member Functions

static const char * GetKeySymbolName (unsigned int code)

Public Attributes

FGWindowwnd
FGControlaccel


Constructor & Destructor Documentation

fgl::FGEvent::FGEvent int  T = NOEVENT,
int  K = 0,
int  X = 0,
int  Y = 0,
int  W = 0,
int  H = 0
[inline]
 

Create the event of appropriate type. In the most cases, you will parse system events only. Creating of the events by the hand and sending them to other windows is less frequently. The response to the system events is adjusted into separate window procedures, each per window. This procedure is fact a one big switch statement with many cases.


Member Function Documentation

int fgl::FGEvent::GetButtons void   )  const [inline]
 

Returns an OR-ed value of the all mouse's buttons that are pushed. There are these symbolic values for buttons:

  • FG_BUTTON_LEFT
  • FG_BUTTON_RIGHT
  • FG_BUTTON_MIDDLE

int fgl::FGEvent::GetH void   )  const [inline]
 

Returns a width.

int fgl::FGEvent::GetKey void   )  const [inline]
 

Returns the value of key member of class FGEvent. As for event KEYEVENT, it return a key code.

const char * fgl::FGEvent::GetKeySymbolName unsigned int  code  )  [static]
 

Returns symbolic name of keycode as ASCIIZ string.

const char* fgl::FGEvent::GetName void   )  const [inline]
 

Return a text string, which identified the name of events, or string "NONSENSE".

int fgl::FGEvent::GetObjectType void   )  const [inline]
 

This is assigned for ACCELEVENT only. It contains the type of controls. Normally it is unnecessary. The types are enum ObjectType { WINDOW, CHECKBUTTON, e.g.

int fgl::FGEvent::GetType void   )  const [inline]
 

Returns type of the event.

int fgl::FGEvent::GetW void   )  const [inline]
 

Returns a width.

int fgl::FGEvent::GetX void   )  const [inline]
 

Returns x co-ordination for events that initialise this member (MOVEEVENT, CLICKLEFTEVENT).

int fgl::FGEvent::GetY void   )  const [inline]
 

Returns y co-ordination for events that initialise this member (MOVEEVENT, CLICKLEFTEVENT).


Member Data Documentation

FGControl* fgl::FGEvent::accel
 

This is a public member of FGEvent class and it is initialised for window procedures only and ACCELEVENT only. It contains the pointer at the Controls that emit this event.

FGWindow* fgl::FGEvent::wnd
 

This is a public member of FGEvent class and it is initialised for window procedures only. It contains the pointer at the target window. It is useful when one procedure is assigned to more windows. Using of this member is in general better, than global pointers.


Generated on Wed Feb 9 11:31:39 2005 for OpenGUI by  doxygen 1.4.0