Bonjour,
Je souhaiterais avoir votre aide pour résoudre un problème algorithmique avec GtkAda.

Le code ci- dessous, est sensé insérer une ligne puis scroller puis ajouter plusieurs une ligne et scroller.
Je cherche le code qui me permettrait de scoller d'input en input, c'est a dire passer les output après coup donc à l'appel suivant.

Je devrai donc commencer par un scroll et enlever mon scroll dans la boucle mais ça ne scroll plus du tout.

Code ada : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
 
 
   declare
        Input : Os_Lib.String_Access;
 
   begin
      Input := new String ' (Glib.Convert.Locale_From_Utf8(Get_Text
                                                             (GtkAda_Interface_Record(Main_Surface.all).Main_window.Main_Input_Line_Entry)));
 
      if OS_Lib."/="(Input, null) and then (Input'Length /= 0) then
 
 
         --GtkAda_Interface_Record(Main_Surface.all).Angel.Receive(Input.all);                                                                                  
         GtkAda_Interface_Record(Main_Surface.All).Main_Window.Outputs_Buffer := Get_Buffer(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Text)\
;
 
         Get_Start_iter(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, Top_Iter);
 
         Get_End_iter(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, End_Iter);
 
         Set_text(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, Gtk.Text_Buffer.Get_Text(GtkAda_Interface_Record(Main_Surface.all).Main\
_Window.Outputs_Buffer, Top_Iter, End_Iter) & Glib.Convert.Locale_To_Utf8(Input(Input'First..Fixed.Index_Non_Blank(Input.all, Backward)) & Character'Val(10)));
 
         Set_buffer(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Text, GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer);
         Get_End_iter(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, End_Iter);
         Mark := Create_Mark(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, Where => End_Iter);
         Scroll_To_Mark(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Text, mark);
         Set_Text(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Main_Input_Line_Entry, "");
 
 
         for I in 1..GtkAda_Interface_Record(Main_Surface.all).Spawn_Result.File_Content'Length loop
               declare
                  tmp : constant String := (-GtkAda_Interface_Record(Main_Surface.all).Spawn_Result.File_Content(I));
                  Line : constant String := Tmp(Tmp'First..Fixed.Index_Non_Blank(tmp, Backward));
 
               begin
 
                  declare
 
                  begin
                     GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer := Get_Buffer(GtkAda_Interface_Record(Main_Surface.all).Main_Window.O\
utputs_Text);
 
 
 
 
                     Get_Start_iter(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, Top_Iter);
                     Get_End_iter(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, End_Iter);
                     Set_text(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, Get_text(GtkAda_Interface_Record(Main_Surface.all).Main_Win\
dow.Outputs_Buffer, Top_Iter, End_Iter) & Glib.Convert.Locale_to_Utf8(Line & Character'Val(10)));
                     Set_buffer(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_text, GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outpu\
ts_Buffer);
                     Get_End_iter(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, End_Iter);
                     Mark := Create_Mark(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Buffer, Where => End_Iter);
                     Scroll_To_Mark(GtkAda_Interface_Record(Main_Surface.all).Main_Window.Outputs_Text, mark);
 
 
 
                end;
             end;
 
         end loop;
    end;


Merci pour vos lumière.