[lazarus] LCL circles
Andrew Johnson
acjgenius at earthlink.net
Fri Oct 25 11:13:19 EDT 2002
Andrew Johnson wrote:
[SNIP]
> As for the TMessageBox vs. TPromptDialog, I am actually almost done
> doing this. The whole point behind PromptDialog was to have an Interface
> dependant way of handling messages, so that for instance GNOME dialogs
> could use the GNOME routines, thus making GNOME enabled Lazarus apps
> more GNOME'ish. ShowMessage already usess NotifyUser(atXY), which are
> really wrappers around promptuser(AtXY) themselves. I Just realizsed
> that since we do not have Dynamic arrays my current Implementation would
> make the MessageDlg wrappers a bit more difficult to write, so I
> resesigned the PromptUser routines to use a PLongint to handle the
> Buttons, instead of an array. Now that I have that I have started
> testing out versions of MessageDlg's that use these instead. When I am
> done TMessageBox can be deleted altogether, and we will only need
> TPromptDialog.
Sort of off topic:
I have now finished the switch. This takes care of the duplicate
TMessageBox, simplifies actual messages code, and ensures that Message
dialogs can be overriden by interfaces to match the system. I have done
this already for GNOME, so if Lazarus is compiled with GNOME, all
dialogs will now match the GNOME default. woohoo! Oh, and I have also
switched to use a more intelligent way of determining what the default
button should be, and what the escape value should be. Feel free to
change if things don't act the way you expect.
There may be issues yet, but there are two that might want to be
considered -
1.) the actual order of buttons cannot be determined, for instance
[mbyestoall, mbyes,mbno,mbnotoall]
or any other order therein will always display as [mbyes, mbno,
mbyestoall, mbnotoall], I feel the programmer
should have full control over layout if wanted. Also we need to
create a better way of determining what the default
order should be.
2.)Gnome & Gnome enabled WM (often) automaticaly place the Message
Dialogs over the main form. For most
programs this will be fine and normal, but for Lazarus it makes
more sense to center on screen. So it may make
sense to use MessageDlgPos instead within Lazarus code, so as to
accomplish this.
Andrew
More information about the Lazarus
mailing list