[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Window with toolbar and redraw messages
On Sun, 2013-12-01 at 16:51 +0100, Jean-François Lemaire wrote:
> However, there seems to be a limitation to this: since there is no workarea as
> such for those widows, they never receive a WM_REDRAW message, and sometimes
> they are needed to redraw specific elements of the toolbar.
You are describing the reason why toolbars are hardly ever used by GEM
programs. IMO it's better to create your dialog the old-fashioned way
(which really isn't that complicated when you get into it) and forget
about working around the AES.
XaAES toolbars are much more advanced than standard toolbars as found in
MultiTOS, N.AES and MagiC!. Traditional toolbars are very limited, when
a TOUCHEXIT object is clicked on a message (WM_TOOLBAR) is sent to the
application. That's it. It's very hard to create functional dialogs just
by using toolbars and not go insane.
Toolbars in XaAES are similar, but the TOUCHEXIT restriction is gone.
However, redrawing is still handled by the AES itself. Your application
will never receive redraw-messages for window-widgets, and the toolbar
is a widget.
I'm not sure if I understand why you need to know when the AES redraws
the toolbar. How does the functionality of your dialog depend on this? A
change in state usually follows some interaction with a toolbar object,
and you will be notified when this happens.
Hmm... Is the problem that some parts of the toolbar/dialog actually
isn't a toolbar at all but something you draw yourself with the VDI? If
that's the case then a userdef is the only solution if you want to stick
with the toolbar. If you don't want a userdef you must handle the dialog
the traditional way.
Jo Even