[Opengc-devel] opengc message passing
Status: Pre-Alpha
Brought to you by:
madmartigan
From: Damion S. <dam...@ho...> - 2002-09-07 18:22:33
|
Hi, An early version of message passing in OpenGC is now working. Messages are of type ogcMessage, an enumerated type defined in ogcMessages.h. A message may be dispatched by the appobject and consists of an ogcMessage defined in the messages header and a void pointer to an arbitrary piece of data. Many times the void pointer will just be null. This is loosely similar to the message passing style in many windowing interfaces. Messages can be generated in a variety of ways, including (but not limited to): 1) Keyboard events 2) Mouse click events 3) Internal events within gauges (if a gauge does processing of some sort and decides it needs to inform the world of the results). 4) Other internal events within OpenGC (RenderWindow, App, etc.) I have not yet implemented the ability to read text file definitions for mapping key presses to messages, although I hope to by early next week. For now, I've implemented a simple gauge called ogcKeypad which consists of a numerical keypad (telephone style) and calculator style display. Hitting buttons with the mouse fires off messages to the application, and these eventually percolate back down to the display and cause it to update. It's important to note that the display need not be a member of the ogcKeypad gauge for this to work; the connection between buttons and keypad is handled entirely through messages. To try out the gauge, use the following opengc.ini fragment: NEWGAUGE Keypad 10 10 1.0 1.0 ENDGAUGE None of this code affects the function of existing gauges, however I've modified the CMakeLists.txt file so you should re-run CMake prior to building. Cheers, -Damion- _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |