DarkRadiant EventManager

From The DarkMod Wiki
Revision as of 11:16, 12 January 2007 by Greebo (talk | contribs)
Jump to navigationJump to search

The EventManager plugin provides methods to define events and connect them to (member) functions that are called upon connect. This document is WIP.

Connecting Widgets

The events can be connected to certain GtkWidgets (like GtkMenuItems, GtkCheckMenuItems and GtkToolButtons/GtkToggleToolButtons). The events recognise the supported widet types and connect the callbacks automatically. For example, a "Toggle" event can of course be connected to a GtkCheckMenuItem or a GtkToggleToolButton, whereas a "Command" event cannot (connect it to a GtkMenuItem instead).

Event Types

The interface of an event (IEvent) is defined in ieventmanager.h.

  • (Event) - this is the basic, empty implementation of an event. It is used internally by the EventManager only.
  • Command - this is a single-fire command that can be connected to a GtkMenuItem or a GtkToolButton widget.
  • Toggle
  • KeyEvent

Accelerators