Code :
procedure Project_Info_Draw (Info : in Project_Info_Record; Line_Pos : in Line_Range; Width : in Column_Range; Top : in Natural := 0) is Win : Window_Record := (Line_Pos, Top + 2, 5, Width, Cyan, The_Window); begin Initialize(Win, Line_Pos, Top + 2, 5, Width, Cyan, White); Draw_Window(Win); Draw_Text(Win, 1, 1, White, "Project Name : " & Handling.To_Wide_String(Info.Project_Name.all)); Draw_Text(Win, 2, 1, White, "Version : " & Handling.To_Wide_String(Version_io.To_String(Info.Version))); Draw_Text(Win, 3, 1, White, "Project path : " & Handling.To_Wide_String(Info.Source_Path.all)); end Project_Info_Draw; procedure Enlight_Project_Info_Draw (Info : in Project_Info_Record; Line_Pos : in Line_Range; Width : in Column_Range; Top : in Natural := 0) is Win : Window_Record := (Line_Pos, Top + 2, 5, Width, Cyan, The_Window); begin Initialize(Win, Line_Pos, Top + 2, 5, Width, Cyan, White); enlight_Window(Win); Put(Normal_Mode); Draw_Text(Win, 1, 1, White, "Project Name : " & Handling.To_Wide_String(Info.Project_Name.all)); Draw_Text(Win, 2, 1, White, "Version : " & Handling.To_Wide_String(Version_Io.To_String(Info.Version))); Draw_Text(Win, 3, 1, White, "Project path : " & Handling.To_Wide_String(Info.Source_Path.all)); end Enlight_Project_Info_Draw; procedure Projects_Print(Projects : in Projects_Record; Project_Index : in Natural; Highlighted : in Project_Num_Range; lines : in Line_Range; columns : in Column_Range; Top : in Natural := 0) is Curs : Projects_Dll.Cursor; First : Projects_Dll.Cursor; Line_Pos : Line_Range := 7; begin if Projects_Dll.Length(Projects.List) /= 0 then Curs := Projects_Dll.First(Projects.List); First := Curs; for I in 1..Project_Index loop Curs := Projects_Dll.Next(Curs); end loop; loop declare The_Project : constant Project.Project_Access := Projects_Dll.Element(Curs); begin if The_Project /= null then if The_Project.Project_Num = Highlighted then Enlight_Project_Info_Draw(Project_Info_Record(The_Project.all), Line_Pos, Columns/2-2, top); Put(Normal_Mode); else Project_Info_Draw(Project_Info_Record(The_Project.all), Line_Pos, Columns/2-2, top); end if; Line_Pos := Line_Pos + 5; exit when Line_Pos >= Lines; end if; end; if Curs /= Last(Projects.List) then Curs := Projects_Dll.Next(Curs); else exit; end if; end loop; end if; end Projects_Print;
|