[gtkada] Dialogs package
Preben Randhol
randhol at pvv.org
Fri Sep 13 13:04:34 CEST 2002
I'm working on my Common_Dialogs[1] package again. I decided to rewrite
and I'm following the "GNOME Human Interface Guidelines (1.0)" [2].
But I was thinking that in stead of having to make dialogs like:
Do you want to save your data before exiting?
If you do not save your data will be lossed
when the program exits.
[Don't Save] [Cancel] [Save]
in every program I was thinking to supply this as a special dialog in a
child package. The call will be so that you can change the text of the
title and description. Now the problem is how to deal with the buttons.
Generally I have an Add_Button function where you supply the button
object and it gets added to the dialog, but here I was thinking to make
the buttons in the child pack and have the user only specify which
procedures the buttons should be connected to through callbacks. Does
this makes sense or not?
A typical call would then look like:
Common_Dialogs.Dialog.Unsaved_Data
(Title => -"Do you want to save your data before exiting?",
Description => -"If you do not save your data will be lossed " &
"when the program exits.",
Dont_Save => Somepackage.on_click_dont_save'Access,
Cancel => null,
Save => Somepackage.on_click_save_then_quit'Access
Title_Font => Big_Font,
Modal => True);
Thanks in advance.
[1] Working name
[2] Should have been called Human-Computer Interface I guess :-)
--
Preben Randhol «For me, Ada95 puts back the joy in programming.»
More information about the gtkada
mailing list