Dev:Source/Architecture/Event System Refactoring

提供: wiki
< Dev:Source‎ | Architecture
2018年6月29日 (金) 02:45時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

EventSystemRefactoring

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?)

FIFO?

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

struct bEvent {
int			 id;
int			 priority;
EVENT_TYPE	type;
};

Targets

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