text
stringlengths
0
234
return False;
end on_is_Label_clicked;
package Label_return_Callbacks is new Gtk.Handlers.User_Return_Callback (Gtk_Label_Record,
Boolean,
aIDE.Editor.of_enumeration_type.view);
package body Forge
is
function to_Editor (the_Target : in AdaM.a_Type.enumeration_type.view) return View
is
use AdaM,
Glib;
Self : constant Editor.of_enumeration_type.view := new Editor.of_enumeration_type.item;
the_Builder : Gtk_Builder;
Error : aliased GError;
Result : Guint;
pragma Unreferenced (Result);
begin
Self.Target := the_Target;
Gtk_New (the_Builder);
Result := the_Builder.Add_From_File ("glade/editor/enumeration_type_editor.glade", Error'Access);
if Error /= null then
raise Program_Error with "Error: adam.Editor.of_enumeration_type ~ " & Get_Message (Error);
end if;
Self.top_Box := gtk_Box (the_Builder.get_Object ("top_Box"));
Self.name_Entry := Gtk_Entry (the_Builder.get_Object ("name_Entry"));
Self.is_Label := Gtk_Label (the_Builder.get_Object ("is_Label"));
Self.literals_Box := gtk_Box (the_Builder.get_Object ("literals_Box"));
Self.rid_Button := gtk_Button (the_Builder.get_Object ("rid_Button"));
Self.open_parenthesis_Label := Gtk_Label (the_Builder.get_Object ("open_parenthesis_Label"));
Self.close_parenthesis_Label := Gtk_Label (the_Builder.get_Object ("close_parenthesis_Label"));
Self.name_Entry.Set_Text (+Self.Target.Name);
declare
use type Ada.Containers.Count_Type;
Attributes : Pango.Attributes.Pango_Attr_List := Pango.Attributes.Pango_Attr_List_New;
Scale : gDouble := Gdouble (2 * Self.Target.Literals.Length);
begin
Attributes.Change (pango.Attributes.Attr_Scale_New (Scale));
Self. open_parenthesis_Label.set_Attributes (Attributes);
Self.close_parenthesis_Label.set_Attributes (Attributes);
-- Self.close_parenthesis_Label.Set_Size_Request (Height => 10);
Function Definition: procedure Context_is (Self : in out Item; Now : in AdaM.Context.view)
Function Body: is
begin
Self.Context := Now;
Self.freshen;
end Context_is;
overriding function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget
is
begin
return gtk.Widget.Gtk_Widget (Self.Top);
end top_Widget;
overriding
procedure freshen (Self : in out Item)
is
the_Lines : constant AdaM.context_Line.Vector := Self.Context.Lines;
begin
loop
declare
the_Child : constant gtk_Widget := Self.context_lines_Box.Get_Child (0);
begin
exit when the_Child = null;
the_Child.destroy;
Function Definition: procedure register_Usage (the_Exception : in AdaM.Declaration.of_exception.view);
Function Body: function fetch return AdaM.Declaration.of_exception.vector;
end recent_Exceptions;
package body recent_Exceptions
is
type exception_Usage is
record
the_Exception : AdaM.Declaration.of_exception.view;
Count : Natural;
end record;
function "<" (L, R : in exception_Usage) return Boolean
is