<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>Le 2 juil. 07 à 09:19, joe a écrit :</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">There are different ways to do a non-modal system.<SPAN class="Apple-converted-space">  </SPAN>One is where you</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">implement a generic "state" system that you can plug into a hierarchal</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">event system.<SPAN class="Apple-converted-space">  </SPAN>It also not all *that* difficult to hack things in if</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">you have a fully state-based, generic UI system (in fact, if you</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">follow specific code patterns it wouldn't really be hackish at all).</FONT></P> </BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV>the most straightforward way with a MVC system is simply to plug<DIV>another controller on top of the current stack. We then use the main loop</DIV><DIV>only.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>that controller can even forbid events handled by lower controllers. mouse </DIV><DIV>dragging usually need that</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BLOCKQUOTE type="cite"><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">One very *VERY* important thing we need is a generic UI widget/element</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">structure, that you can build new/custom widgets from, and that also</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">acts as a container of other widgets.  This just makes things so much</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">easier (I have some practical experience in this area).</DIV></BLOCKQUOTE><BR></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>While handy, not really needed in a MVC system.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What is needed is a protocol :</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>- all controllers follow the same set of functions</DIV><DIV>- all views ditto.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>each set is stored in a struct of function pointers.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>that means that with controller * p,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>p-&gt;signalViews(message) for example is always defined.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If this sound object, this is indeed object in C.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>but the structs themselves can vary, iow, the struct for a button will be different </DIV><DIV>from the one of a panel. The protocol is the same.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>ideally the protocol should be opaque (no access to the inner components of</DIV><DIV> structs, only messages). However in C, for shear efficiency, we may bypass </DIV><DIV>that.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>i will try to publish my complete analysis till end of week.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>It is still my views on doing that, please state other ideas so that we choose the</DIV><DIV>best</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>-- <BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Jean-Luc Peurière</DIV><DIV><A href="mailto:jlp@nerim.net">jlp@nerim.net</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>