Dev:Source/Architecture/Event System Refactoring

提供: wiki
移動先: 案内検索


Some quick random notes (still very tentative!):

Event Types

  • Object Transform Events
  • Editmode Transform Events
  • Windowing Events (split screen, button presses etc).
  • Low-level events (handled by GHOST)

Event Originators

  • User Interaction
  • Python
  • Object (expressions?)


Prioritise Events? -- (user highest, python lowest)

struct bEvent {
int			 id;
int			 priority;


Python hooks

It should be possible for python to have influence over the event queue -- adding events and processing (callbacks).

3D Transform 'Widget'

Non-Modal events

Many tools that require user interaction are currently handled inside while() subloops. Ideally, these operations should not be modal.

They require polling the mouse frequently, checking for cancel, etc. Therefore, break event queue into two parts? -- mouse events (queue up currently running events that require mouse input like grab, scale, rot), other events.

-- SimonClitherow - 25 Aug 2004


Modules (or for now, just functions) should register with the event system, telling it what events they are interested in. Event system then dispatches events. Events can be added to the event queue in principle anywhere in the code.

Also dynamically creation of new events could be possible.

-- Nathan Letwory (27Aug104 NL)

Even modal mode can be used with registered events by locking the queue to drop any other event

-- JLucPeuriere#01Sep104