[Bf-committers] New event system

Jean-Luc Peurière jlp at nerim.net
Mon Jul 2 19:46:31 CEST 2007


Le 2 juil. 07 à 09:19, joe a écrit :

> There are different ways to do a non-modal system.  One is where you
> implement a generic "state" system that you can plug into a hierarchal
> event system.  It also not all *that* difficult to hack things in if
> you have a fully state-based, generic UI system (in fact, if you
> follow specific code patterns it wouldn't really be hackish at all).

the most straightforward way with a MVC system is simply to plug
another controller on top of the current stack. We then use the main  
loop
only.

that controller can even forbid events handled by lower controllers.  
mouse
dragging usually need that

>
> One very *VERY* important thing we need is a generic UI widget/element
> structure, that you can build new/custom widgets from, and that also
> acts as a container of other widgets.  This just makes things so much
> easier (I have some practical experience in this area).


While handy, not really needed in a MVC system.

What is needed is a protocol :

- all controllers follow the same set of functions
- all views ditto.

each set is stored in a struct of function pointers.

that means that with controller * p,

p->signalViews(message) for example is always defined.

If this sound object, this is indeed object in C.

but the structs themselves can vary, iow, the struct for a button  
will be different
from the one of a panel. The protocol is the same.

ideally the protocol should be opaque (no access to the inner  
components of
  structs, only messages). However in C, for shear efficiency, we may  
bypass
that.

i will try to publish my complete analysis till end of week.

It is still my views on doing that, please state other ideas so that  
we choose the
best

-- 
Jean-Luc Peurière
jlp at nerim.net



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20070702/f92dd5a1/attachment.htm 


More information about the Bf-committers mailing list