text
stringlengths
0
234
then
Self.Target.Name_is (full_Name);
Self.Target.Package_is (the_Package.all'Access);
elsif Self.Target_2 /= null
then
-- put_Line ("JJJJJ " & String (Self.Target_2.Name));
-- aIDE.Gui.set_selected_Package (to => Self.Target_2);
put_Line ("JJJJJ " & String (the_Package.Name));
aIDE.Gui.set_selected_Package (to => the_Package);
else
raise program_Error with "No target has been set";
end if;
Self.Top.hide;
end choice_is;
procedure show (Self : in out Item; Invoked_by : in Gtk.Button.gtk_Button;
Target : in AdaM.context_Line.view)
is
begin
Self.Invoked_by := Invoked_by;
Self.Target := Target;
Self.Target_2 := null;
Self.Top.show_All;
end show;
procedure show (Self : in out Item; Invoked_by : in Gtk.Button.gtk_Button;
Target : in AdaM.a_Package.view)
is
begin
Self.Invoked_by := Invoked_by;
Self.Target_2 := Target;
Self.Target := null;
Self.freshen;
Self.Top.show_All;
end show;
procedure freshen (Self : in out Item)
is
use AdaM;
-- the_Environ : AdaM.Environment.Item renames aIDE.the_Environ;
begin
-- Clear out old notebook pages.
--
while Self.all_Notebook.Get_N_Pages > 0
loop
Self.all_Notebook.Get_Nth_Page (0).Destroy;
end loop;
-- Build the Gui tree.
--
build_Gui_Tree:
declare
procedure build_Gui_for (the_Package : in AdaM.a_Package.view;
children_Notebook : in gtk_Notebook)
is
the_Children : AdaM.a_Package.Vector renames the_Package.child_Packages;
the_packages_Palette_package : constant Palette.of_packages_subpackages.view
:= aIDE.Palette.of_packages_subpackages.to_packages_Palette_package;
begin
-- Build the package pane.
--
the_packages_Palette_package.Parent_is (Self'unchecked_Access);
the_packages_Palette_package.top_Widget.reparent (children_Notebook);
children_Notebook.set_Tab_Label_Text (the_packages_Palette_package.top_Widget,
+the_Package.Name);
-- Configure event handling.
--
declare
use gtk.Label;
the_tab_Label : constant gtk_Label
:= gtk_Label (children_Notebook.get_tab_Label (the_packages_Palette_package.top_Widget));
begin
the_tab_Label.set_Selectable (True);
label_return_Callbacks.connect (the_tab_Label,
"button-release-event",
on_tab_Label_clicked'Access,
(package_name => +(+the_Package.Name),
palette => Self'unchecked_Access,
the_Package => the_Package));
Function Definition: procedure build_recent_List (Self : in out Item)
Function Body: is
-- the_Recent : constant AdaM.text_Lines := recent_Packages.fetch;
the_Recent : constant AdaM.a_Package.vector := recent_Packages.fetch;
the_Button : gtk_Button;