On Sat, 14 Apr 2001, Asger K. Alstrup Nielsen wrote:
[...]
> In other words, maybe we indeed have discovered a good point to draw a
> line in the sand: As long as a controller abstracts both across different
> dialogs within the same toolkit, and across different toolkits, it
> probably is a good idea to introduce it.
[...]
> In conclusion: As long as the current proposal still extends the framework
> in the direction of abstraction along both the dialog axis and the toolkit
> axis, you are on the right track.

In ButtonController Mark XXIII which will be renamed DialogController and
will result in a shuffling of existing classes -- they're reused but their
inheritance trees look a little different -- we'll have the ultimate
controller anyone could wish for.  The idea being to consolidate all
dialog control functions into a single class before merging that with the
dialog view.  No not one big class, in fact, DialogController is a
template class with no members.  It just collects all the necessary stuff
from a group of policy classes -- policies for button control, dialog
connections, Okay-Apply-Cancel-Restore connections and the like.

Any group can have any arbitrary action taken upon it so long as that
action can be defined by a std::unary_function<Item, void> where Item is
whatever is in the groups -- in this case Item will be a Widget.

I have designed a very simple state machine engine that does anything you
want it to.  Policies, like the ButtonPolicy family, are used to program
the engine and then someone else drives the input and everything runs like
clockwork.  The hard part is writing the program for the engine, that is,
designing your state machine abstraction.

I have most of the design written up -- documented design before code
how's that for a first?  Okay, so Asger documented his new kernel first
also so I'm second :-) -- which is why ButtonController is at Mark XXIII
and being renamed DialogController.

I should have the rest of the design doc finished tomorrow and then you
can look at the doxygen-produced specifications.

Allan. (ARRae)

Reply via email to