[gtkada] Generic enum combobox
Dmitry A. Kazakov
mailbox at dmitry-kazakov.de
Wed Jan 5 20:20:14 CET 2011
On Wed, 05 Jan 2011 18:43:21 +0100, you wrote:
> On Wed, 2011-01-05 at 13:28 +0100, Dmitry A. Kazakov wrote:
>> On Tue, 04 Jan 2011 13:36:42 +0100, you wrote:
>>
>>> I have not yet decided where to put it (GtkAda? Contributions?)
>>> Please advise.
>>
>> If you mean GtkAda contributions and have nothing against the GM GPL
>> license, under which the contributions are distributed, you are welcome.
>>
>> Drop me an E-mail if you make your mind.
>
> Yes, this sounds like a good place to put it.
>
> I have already included the GMGPL at the beginning of the package spec
> and body; only the line
> -- GtkAda - Ada95 binding for Gtk+/Gnome --
> would need to be changed to GtkAda Contributions. Feel free to change
> it.
> Also I am not sure about the package naming: Perhaps it should be
> changed to a child package of Gtk?
I would use:
package: Gtk.Generic_Enum_Combo_Box
object: Gtk_Enum_Combo_Box_Record
pointer: Gtk_Enum_Combo_Box
I would also move the type Style_Type and No_Selection exception somewhere
else (to make them same for all instances). E.g. to Gtk.Missed. Style type
should likely be renamed then (e.g. Enum_Syle_Type) + Capitalize_First
style.
Also, I would add an argument
Mapping : Character_Mapping := To_Mapping ("_", " ")
The idea is to replace '_' with space.
and Gtk_New:
procedure Gtk_New (Combo : out Gtk_Enum_Combo_Box, ....) is
begin
Combo := new Gtk_Enum_Combo_Box_Record;
Initialize (Combo, ...);
exception
when others =>
Destroy (Combo);
raise;
end Gtk_New;
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
More information about the gtkada
mailing list