Hello David,

My need is to emulate a text console, here is the interface:
   procedure Window (X1, Y1, X2, Y2 : Byte);
   procedure GotoXY (X, Y : Byte);
   function WhereX return Byte;
   function WhereY return Byte;
   procedure ClrScr;
   procedure ClrEol;
   procedure InsLine;
   procedure DelLine;
   procedure TextColor (Color : Byte);
   procedure TextBackground (Color : Byte);
   procedure Write (S : String);
   procedure Write (I : Integer; MinWidth : Integer := 0);
   procedure Write (R : Real; MinWidth : Integer := 0; DecPlaces : Integer := 
0);
   procedure Writeln (S : String);
   procedure Writeln;
   procedure Read (C : out Char);
   procedure Read (S : out String);
   procedure Readln (C : out Char);
   procedure Readln (S : out String);
   procedure Readln (I : out Integer);
   procedure Readln (R : out Real);
   procedure Readln;

Code exemple for Write String with GTKAda:
      Gtk.Text_Buffer.Get_Iter_At_Mark
        (Gtk.Text_View.Get_Buffer (Aera_Text),
         Index,
         IntCursorMark);
      Gtk.Text_Buffer.Insert_With_Tags
        (Gtk.Text_View.Get_Buffer (Aera_Text),
         Index,
         Glib.Convert.Locale_To_UTF8 (To_String (S)),
         IntTag);
      Gtk.Text_View.Scroll_Mark_Onscreen (Aera_Text, IntCursorMark);
      Gtk.Text_Buffer.Place_Cursor (Gtk.Text_View.Get_Buffer (Aera_Text), 
Index);

The main functionalities are text buffering with access to a location of text 
in term of line and column, rich tags, display text buffer in a scrolling 
window, input text...

Thanks for taken in account this in Gnoga.

HTH, Pascal.
http://blady.pagesperso-orange.fr


Le 28 déc. 2014 à 14:27, Rabbi David Botton <[email protected]> a écrit :

> I think I need to understand better how you will use it to figure out what 
> makes the most sense to bind.
> 
> Are you just outputting or will you be changing what you write to the console?
> 
> Will users be editing what you output?
> 
> If you are just outputting use View_Console_Type you can choose the font, 
> output images, etc.
> 
> David Botton
> 
> 
>  
> 
> I need something else closer to GTKAda TextView API with a specified size, a 
> rich text buffer with cursor...
> 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to