GtkAda Reference Manual
***********************

Package Glib
************

This package provides definitions for the basic types used in Glib,
Gdk and Gtk.

Types
=====

type Boolean_Array is array (Natural range <>) of Boolean;

type C_Proxy is access C_Dummy;

General proxy for C structures.   This type is used instead of
System.Address so that the variables are  automatically initialized to
'null'.   The value pointed to is irrelevant, and in fact should not be
accessed.   It has thus been made limited private with no subprogram to
access it.   C_Proxy is a public type so that one can compare directly
the value  of the variables with 'null'.
type GQuark is new Guint32;

Represents a string internally in GtkAda. Once you know the  equivalent
for a string, you can always use it instead of the string,  which
provides a faster access for all the functions that use htables  in
GtkAda.   There is a global htable that contains all the quarks defined
in  your application and GtkAda itself.
type Gboolean is new Gint;

type Gboolean_Array is array (Natural range <>) of Gboolean;

type Gchar is new C.char;

type Gdouble is new C.double;

type Gdouble_Array is array (Natural range <>) of Gdouble;

type Gfloat is new C.C_float;

type Gfloat_Array is array (Natural range <>) of Gfloat;

type Gint is new C.int;

subtype Gint16 is Gint range -(2 ** 15) .. (2 ** 15 - 1);

subtype Gint32 is Gint range -(2 ** 31) .. (2 ** 31 - 1);

subtype Gint8 is Gint range -(2 ** 7) .. (2 ** 7 - 1);

type Gint_Array is array (Natural range <>) of Gint;

type Glong is new C.long;

type Glong_Array is array (Natural range <>) of Glong;

type Gshort is new C.short;

type Gshort_Array is array (Natural range <>) of Gshort;

type Guchar is new C.unsigned_char;

type Guchar_Array is array (Natural range <>) of Guchar;

type Guchar_Array_Access is access Guchar_Array;

type Guint is new C.unsigned;

subtype Guint16 is Guint range Guint'First .. (2 ** 16 - 1);

subtype Guint32 is Guint range Guint'First .. (2 ** 32 - 1);

type Guint32_Array is array (Natural range <>) of Guint32;

subtype Guint8 is Guint range Guint'First .. (2 ** 8 - 1);

type Guint_Array is array (Natural range <>) of Guint;

type Gulong is new C.unsigned_long;

type Gulong_Array is array (Natural range <>) of Gulong;

type Gushort is new C.unsigned_short;

type Gushort_Array is array (Natural range <>) of Gushort;

type Long_Array is array (Natural range <>) of C.long;

type Short_Array is array (Natural range <>) of C.short;

type String_Ptr is access all String;

Subprograms
===========

Conversion services
-------------------

function To_Boolean_Array
     (A                  : in     Gboolean_Array)
        return Boolean_Array;

Convert a C-style boolean array into an Ada-style array.
function To_Boolean
     (Value              : in     Gboolean)
        return Boolean;

Convert a C boolean into an Ada boolean.
function To_Boolean
     (Value              : in     Gint)
        return Boolean;

Convert a C int into an Ada boolean.
function To_Boolean
     (Value              : in     Guint)
        return Boolean;

Convert a C uint into an Ada boolean.
function To_Gboolean
     (Bool               : in     Boolean)
        return Gboolean;

Convert an Ada boolean into a C boolean.
function To_Gint
     (Bool               : in     Boolean)
        return Gint;

Convert an Ada boolean into a C int.
Quarks
------

function Quark_From_String
     (Id                 : in     String)
        return GQuark;

Return, or create the quark associated with the string.
Note that if the quark does not already exist, an entry is created for
it in the global htable for quarks.
function Quark_Try_String
     (Id                 : in     String)
        return GQuark;

Return the quark associated with the string, if it exists.
If it does not exist, return Unknown_Quark.
Package Glib.GSlist
*******************

This packages provides the implementation of a generic single-linked
list.   One instantiation is found in Gtk.Widget.Widget_Slist for a
list of  widgets.

   See the documentation of Glib.Glist for more information, it provides
the same API as this package.   Single linked lists are traversed the
same way as double-linked lists,  even though most subprograms are less
efficient than their  double-linked counterparts.

Package Glib.Glist
******************

This package implements a generic double-linked list.   Such lists are
used throughout GtkAda to contain lists of widgets  (for the children
of containers, or for the list of selected widgets  in a Gtk_Clist for
instance), list of strings (for Gtk_Combo_Box),...

   They provide a common interface to traverse these lists.

   One useful note: you should only Free the lists that you have
allocated  yourself, and not the lists that are returned by the
subprograms in  GtkAda and should be left under GtkAda's control.

   See the example below for an example on how to traverse a list.

   Instantiating the package Generic_List requires two functions to
convert  back and forth between your data type and a System.Address
which is the  type stored at the C level.   Note that the lists used in
GtkAda already have associated packages, like  Gtk.Enums.Gint_List,
Gtk.Enums.String_List or Gtk.Widget.Widget_List.

Types
=====

type Glist is private;

This type is both a list and an item in the list.   Each item points to
its successor.
Subprograms
===========

procedure Alloc
     (List               : out    Glist);

Allocate a new item in the list.
This item isn't associated with any data.   You probably don't have to
use this subprogram, since Append,  Insert, Prepend, etc. already
handle the allocation for you and  give a new value to the item.
procedure Append
     (List               : in out Glist;
        Data               : in     Gpointer);

Add a new item at the end of the list, and stores the new list
directly back in List.   The complexity of this operation is O(n)
function Concat
     (List1              : in     Glist;
        List2              : in     Glist)
        return Glist;

Concatenate two lists, and return the result.
List2 is added at the end of List1.   The complexity is O(n1) (depends
on the size of List1).
procedure Insert
     (List               : in out Glist;
        Data               : in     Gpointer;
        Position           : in     Gint);

Insert an item in the middle of a list.
If Position is 0, the item is added at the beginning of the list, if
it is negative the item is added at the end.   The complexity is
O(Position).
function Find
     (List               : in     Glist;
        Data               : in     Gpointer)
        return Glist;

Find a value in the list, and return the first item that contains it.
Note that this function will not work if the function Convert does  not
return the same value for two identical values.
function First
     (List               : in     Glist)
        return Glist;

Return the first item in the list.
Note that if List is in fact an item of a larger list, the return
value is the first item in the larger list itself.
procedure Free
     (List               : in out Glist);

Free the list (but does not free the data in each of its elements).
This only frees the memory associated with the list itself.   You
should only use this function on the lists that  you have created
yourself, not on the list that are returned by some  functions in
GtkAda (like Gtk.Clist.Get_Selection). These functions  return directly
the list managed by the underlying C widget, and you  should never free
the result yourself.

   Note also that the memory might not be actually freed. For efficiency
reasons, GtkAda will keep the memory allocated and try to reuse it as
much as possible.
function Get_Data
     (List               : in     Glist)
        return Gpointer;

Return the value pointed to by List.
The System.Address container in the C list is converted to a Gpointer
through a call to Convert.
function Get_Data_Address
     (List               : in     Glist)
        return System.Address;

Return directly the System.Address contained in the C list.
This is used mainly internally in GtkAda to implement String lists,
and you should not have to use this subprogram yourself.
function Index
     (List               : in     Glist;
        Data               : in     Gpointer)
        return Gint;

Return the index of the first element in LIST that contains Data.
Note that this function is irrelevant if Convert does not return the
same value for two identical data.
function Last
     (List               : in     Glist)
        return Glist;

Return the last element in the list.
function Length
     (List               : in     Glist)
        return Guint;

Return the number of elements in the list.
The last item's index is Length - 1.
procedure List_Reverse
     (List               : in out Glist);

Reverse the order of the list (the last item becomes the first, etc.)
function Next
     (List               : in     Glist)
        return Glist;

Returns the Item following LIST in the global list that contains
both.   If there is no such item, return Null_List. This is how you
stop iterating over a list.
function Nth
     (List               : in     Glist;
        N                  : in     Guint)
        return Glist;

Give the nth item following LIST in the global list that
contains both.   If there is no such item, return Null_List.
function Nth_Data
     (List               : in     Glist;
        N                  : in     Guint)
        return Gpointer;

Return the Data contained in the N-th item of List.
The result is undefined if there is no such item in the list.   The
actual result in that case is the result of      Convert
(System.Null_Address);  which might not mean anything.
function Position
     (List               : in     Glist;
        Link               : in     Glist)
        return Gint;

Return the position of Link in the List.
If Link is not contained in the list, -1 is returned.
procedure Prepend
     (List               : in out Glist;
        Data               : in     Gpointer);

Add an item at the beginning of the list.
This operation always succeed.
function Prev
     (List               : in     Glist)
        return Glist;

Return the item before List in the global list that contains both.
Return Null_List if there is no such item.
procedure Remove
     (List               : in out Glist;
        Data               : in     Gpointer);

Remove the first item in List that contains Data.
Note that this operation can succeed only if Convert always return  the
same address for a given value.
procedure Remove_Link
     (List               : in out Glist;
        Link               : in     Glist);

Remove Link from the list to which it belongs.
If that list is not List, no error is returned, but Link is removed
anyway.
function Is_Created
     (List               : in     Glist)
        return Boolean;

Return True if there is a C widget associated with List.
Example
=======


      with Glib, Glib.Glist, Gtk.Enums, Ada.Text_IO;
      use  Glib, Ada.Text_IO;
     
      procedure Glist_Traverse is
         use Gtk.Enums.Gint_List;
         List : Gtk.Enums.Gint_List.Glist;
         Temp : Gtk.Enums.Gint_List.Glist;
      begin
     
         --  First step: create a new list.
     
         Prepend (List, 2);                       -- add at the beginning of the list
         Append (List, 3);                        -- add at the end of the list
         Insert (List, Data => 1, Position => 1); -- in the middle of the list
     
         --  Traverse the list (first way)
     
         Temp := First (List);
         while Temp /= Null_List loop
            Put_Line (Gint'Image (Get_Data (Temp)));
            Temp := Next (Temp);
         end loop;
     
         --  Traverse the list (second way)
     
         for I in 1 .. Length (List) loop
            Put_Line (Gint'Image (Nth_Data (List, I - 1)));
         end loop;
     
      end Glist_Traverse;

Package Glib.Module
*******************

This package provides wrapper code for dynamic module loading

Types
=====

type G_Module is new C_Proxy;

type Module_Flags is mod 2 ** 32;

type Pointer is private;

This is typically a pointer to procedure/function.
Subprograms
===========

function Module_Supported      return Boolean;

Return True if dynamic module loading is supported
function Module_Open
     (File_Name          :        String;
        Flags              :        Module_Flags
                            := Module_Bind_Lazy)
        return G_Module;

Open a module `file_name' and return handle, which is null on error.
function Module_Close
     (Module             :        G_Module)
        return Boolean;

Close a previously opened module, return True on success.
procedure Module_Make_Resident
     (Module             :        G_Module);

Make a module resident so Module_Close on it will be ignored
function Module_Error          return String;

Query the last module error as a string
procedure Generic_Module_Symbol
     (Module             :        G_Module;
        Symbol_Name        :        String;
        Symbol             : out    Pointer;
        Success            : out    Boolean);

Retrieve a symbol pointer from `module'.
Success is set to True on success.
function Module_Name
     (Module             :        G_Module)
        return String;

Retrieve the file name from an existing module
function Module_Build_Path
     (Directory          :        String;
        Module_Name        :        String)
        return String;

Build the actual file name containing a module.
`directory' is the directory where the module file is supposed to be, or
the null string in which case it should either be in the current
directory or, on some operating systems, in some standard place, for
instance on the PATH. Hence, to be absolutely sure to get the correct
module, always pass in a directory. The file name consists of the
directory, if supplied, and `module_name' suitably decorated accoring to
the operating system's conventions (for instance lib*.so or *.dll).

   No checks are made that the file exists, or is of correct type.
Package Glib.XML
****************

This package provides a simple minded XML parser to be used with  Gate.

Types
=====

type Free_Specific_Data is access procedure
     (Data : in out XML_Specific_Data);

type Node is record
     Tag   : String_Ptr;
           -- The name of this node
     
         Attributes   : String_Ptr;
           -- The attributes of this node
     
         Value : String_Ptr;
           -- The value, or null is not relevant
     
         Parent : Node_Ptr;
           -- The parent of this Node.
     
         Child : Node_Ptr;
           -- The first Child of this Node. The next child is Child.Next
     
         Next  : Node_Ptr;
           -- Next "brother" node.
     
         Specific_Data : XML_Specific_Data;
           -- Use to store data specific to each implementation (e.g a boolean
           -- indicating whether this node has been accessed)
         end record;

A node of the XML tree.   Each time a tag is found in the XML file, a
new node is created, that  points to its parent, its children and its
siblings (nodes at the same  level in the tree and with the same
parent).
type Node_Ptr is access all Node;

Pointer to a node of the XML tree.
type XML_Specific_Data is private;

The type of the extra data that can be attached to each node of the
XML tree. See for instance the package Glib.Glade.
Subprograms
===========

function Parse
     (File               :        String)
        return Node_Ptr;

Parse File and return the first node representing the XML file.
procedure Print
     (N                  :        Node_Ptr;
        Indent             :        Natural := 0;
        File_Name          :        String := "");

Write the tree starting with N into a file File_Name. The generated
file is valid XML, and can be parsed with the Parse function.   If
File_Name is the empty string, then the tree is printed on the
standard output
function Find_Tag
     (N                  :        Node_Ptr;
        Tag                :        String)
        return Node_Ptr;

Find a tag Tag in N and its brothers.
function Get_Field
     (N                  :        Node_Ptr;
        Field              :        String)
        return String_Ptr;

Return the value of the field 'Field' if present in the children of N.
Return null otherwise.
procedure Add_Child
     (N                  :        Node_Ptr;
        Child              :        Node_Ptr);

Add a new child to a node.
function Deep_Copy
     (N                  :        Node_Ptr)
        return Node_Ptr;

Return a deep copy of the tree starting with N. N can then be freed
without affecting the copy.
procedure Free
     (N                  : in out Node_Ptr;
        Free_Data          :        Free_Specific_Data := null);

Free the memory allocated for a node and its children.
It also disconnects N from its parent.   If Free_Data is not null, it
is used to free the memory occupied by  the Specific_Data for each node.
function Get_Attribute
     (N                  : in     Node_Ptr;
        Attribute_Name     : in     String)
        return String_Ptr;

Return the value of the attribute 'Attribute_Name' if present.
Return null otherwise.
Package Gtkada
**************

This is the parent package for the GtkAda specific units.

Package Gtkada.Canvas
*********************

This package provides an interactive canvas, on which the user can put
items, move them with the mouse, etc. The items can be connected
together,  and the connections remain active while the items are moved.

   It also supports scrolling if put in a Gtk_Scrolled_Window.

   All items put in this canvas must inherit from the type
Canvas_Item_Record.   However, it is your responsability, as a
programmer, to provide drawing  routines. In fact, all these items
should draw in a pixmap, which is then  copied automatically to the
screen whenever the canvas needs to redraw  itself.

   The items can also react to mouse events: mouse clicks are
transmitted to  the item if the mouse did not move more than a given
amount of pixels.   To decide what their reaction should be, you should
override the  On_Button_Click subprogram.

   This canvas is not intended for cases where you want to put hundreds
of  items on the screen. For instance, it does not provide any smart
double-buffering, and thus you would get some flicker if there are too
many items.

Signals
=======

   * "background_click"

     procedure Handler (Canvas : access Interactive_Canvas_Record'Class;
     Event  : Gdk.Event.Gdk_Event);
     Called every time the user clicks in the background (ie not on an
     item, or On_Button_Click would be called).  This is called both on
     Button_Release and Button_Press events.  The coordinates (X, Y) in
     the Event are relative to the top-left corner of Canvas.

   * "item_selected"

     procedure Handler (Canvas : access Interactive_Canvas_Record'Class;
     Item   : Canvas_Item);
     Called when the user has clicked on an item to select it, ie
     before any drag even has occured. This is a good time to add other
     items to the selection if you need.

   * "zoomed"

     procedure Handler (Canvas : access
     Interactive_Canvas_Record'Class);
     Emitted when the canvas has been zoomed in or out. You must resize
     the items as needed, and possibily refresh their internal
     double-pixmap.  However, you do not need to redraw them on the
     screen, this will be handled by separate calls to Draw.


Types
=====

type Arrow_Type is
     (No_Arrow,
             -- the link does not have an arrow
     
          Start_Arrow,
             -- the link has an arrow at its beginning
     
          End_Arrow,
             -- the link has an arrow at the end
     
          Both_Arrow
             -- the link has an arrow on both sides
          );

Indicate whether the links have an arrow or not.
type Item_Processor is access function
     (Canvas : access Interactive_Canvas_Record'Class;

type Link_Processor is access function
     (Canvas : access Interactive_Canvas_Record'Class;

Subprograms
===========

Creating a canvas
-----------------

procedure Gtk_New
     (Canvas             : out    Interactive_Canvas);

Create a new empty Canvas.
The canvas includes a grid in its background.
procedure Configure
     (Canvas             : access Interactive_Canvas_Record;
        Grid_Size          :        Glib.Guint
                            := Default_Grid_Size;
        Annotation_Font    :        String
                            := Default_Annotation_Font;
        Annotation_Height  :        Glib.Gint
                            := Default_Annotation_Height;
        Arc_Link_Offset    :        Glib.Gint
                            := Default_Arc_Link_Offset;
        Arrow_Angle        :        Glib.Gint
                            := Default_Arrow_Angle;
        Arrow_Length       :        Glib.Gint
                            := Default_Arrow_Length;
        Motion_Threshold   :        Glib.Gint
                            := Default_Motion_Threshold);

Change the parameters for the canvas.
A Grid_Size of 0 means than no grid should be drawn in the background of
canvas. Note that in that case you can never activate Align_On_Grid.
procedure Align_On_Grid
     (Canvas             : access Interactive_Canvas_Record;
        Align              :        Boolean := True);

Choose whether the items should be aligned on the grid when moved.
Existing items are not moved even if you set this parameter to True,
this will only take effect the next time the items are moved.
function Get_Align_On_Grid
     (Canvas             : access Interactive_Canvas_Record)
        return Boolean;

Return True if items are currently aligned on grid.
procedure Move_To
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class;
        X, Y               :        Glib.Gint := Glib.Gint'First);

Move the item in the canvas.
Item is assumed to be already in the canvas.   If at least one of X or
Y has the default value, then the item  is placed automatically in a
free area of the canvas.   Its new position depends on whether it has
links to other existing  items (in which case it is placed to the right
of it), or not (in which  case it is placed at the bottom of the
leftmost column).
procedure Put
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class;
        X, Y               :        Glib.Gint := Glib.Gint'First);

Add a new item to the canvas.
The item is added at a specific location.   If at least one of X or Y
has the default value, then the item  is placed automatically in a free
area of the canvas.   Its new position depends on whether it has links
to other existing  items (in which case it is placed to the right of
it), or not (in which  case it is placed at the bottom of the leftmost
column).   Note also that the current size of the item is used to
compute the new  location, so it should depend on the current zoom.
procedure Remove
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class);

Remove an item and all the links to and from it from the canvas.
The item itself is not freed, but the links are.   Nothing is done if
the item is not part of the canvas.
procedure Item_Updated
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class);

This should be called when Item has changed the contents of its
pixmap, and thus the Canvas should be updated.
procedure Refresh_Canvas
     (Canvas             : access Interactive_Canvas_Record);

Redraw the whole canvas (both in the double buffer and on the screen).
procedure For_Each_Item
     (Canvas             : access Interactive_Canvas_Record;
        Execute            :        Item_Processor);

Execute an action on each of the items contained in the canvas.
If Execute returns False, we stop traversing the list of children.   It
is safe to remove the items in Item_Processor.
function Has_Link
     (Canvas             : access Interactive_Canvas_Record;
        From, To           : access Canvas_Item_Record'Class;
        Name               :        String := "")
        return Boolean;

Test whether there is a link from From to To, with the same name.
If Name is the empty string "", then no check is done on the name,  and
True if returned if there is any link between the two items.
procedure Raise_Item
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class);

Raise the item so that it is displayed on top of all the others
The canvas is refreshed as needed to reflect the change.   Nothing
happens if Item is not part of the canvas.
procedure Lower_Item
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class);

Lower the item so that it is displayed below all the others.
The canvas is refreshed as needed to reflect the change.   Nothing
happens if Item is not part of the canvas.
function Is_On_Top
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class)
        return Boolean;

Return True if Item is displayed on top of all the others in the canvas.
procedure Show_Item
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class);

Scroll the canvas so that Item is visible.
procedure Zoom
     (Canvas             : access Interactive_Canvas_Record;
        Percent            :        Glib.Guint := 100;
        Steps              :        Glib.Guint := 1);

Zoom in or out in the canvas. All items are resized, and their contents
is then random.   You must either redraw them systematically
afterwards, or connect to the  "zoomed" signal which is emitted
automatically by this subprogram.

   Steps is the number of successive zooms that will be done to provide
smooth scrolling.

   Note that one possible use for this function is to refresh the canvas
and emit the "zoomed" signal, which might redraw all the items. This
can  be accomplished by keeping the default 100 value for Percent.
function Get_Zoom
     (Canvas             : access Interactive_Canvas_Record)
        return Glib.Guint;

Return the current zoom level
function To_Canvas_Coordinates
     (Canvas             : access Interactive_Canvas_Record'Class;
        X                  :        Glib.Gint)
        return Glib.Gint;

Scale the scalar X depending by the zoom level (map from world
coordinates to canvas coordinates)
function To_World_Coordinates
     (Canvas             : access Interactive_Canvas_Record'Class;
        X                  :        Glib.Gint)
        return Glib.Gint;

Scale the scalar X depending by the zoom level (map from canvas
coordinates to world coordinates)
Links
-----

procedure Configure
     (Link               : access Canvas_Link_Record;
        Src                : access Canvas_Item_Record'Class;
        Dest               : access Canvas_Item_Record'Class;
        Arrow              : in     Arrow_Type := End_Arrow;
        Descr              : in     String := "");

Configure a link.
The link is an oriented bound between two items on the canvas.   If
Descr is not the empty string, it will be displayed in the middle  of
the link, and should indicate what the link means.   Arrow indicates
whether some arrows should be printed as well.
function Get_Src
     (Link               : access Canvas_Link_Record)
        return Canvas_Item;

Return the source item for the link
function Get_Dest
     (Link               : access Canvas_Link_Record)
        return Canvas_Item;

Return the destination item for the link
function Get_Descr
     (Link               : access Canvas_Link_Record)
        return String;

Return the description for the link, or "" if there is none
procedure Set_Src_Pos
     (Link               : access Canvas_Link_Record;
        X_Pos, Y_Pos       :        Glib.Gfloat := 0.5);

Set the position of the link's attachment in its source item.
X_Pos and Y_Pos should be given between 0 and 100 (from left to right
or top to bottom).
procedure Set_Dest_Pos
     (Link               : access Canvas_Link_Record;
        X_Pos, Y_Pos       :        Glib.Gfloat := 0.5);

Same as Set_Src_Pos for the destination item
procedure Add_Link
     (Canvas             : access Interactive_Canvas_Record;
        Link               : access Canvas_Link_Record'Class);

Add a link to the canvas. The link must have been created first.
procedure Add_Link
     (Canvas             : access Interactive_Canvas_Record;
        Src                : access Canvas_Item_Record'Class;
        Dest               : access Canvas_Item_Record'Class;
        Arrow              : in     Arrow_Type := End_Arrow;
        Descr              : in     String := "");

Create and add a link between two items.
Simpler procedure to add a standard link.   This takes care of memory
allocation, as well as adding the link to  the canvas.
procedure Remove_Link
     (Canvas             : access Interactive_Canvas_Record;
        Link               : access Canvas_Link_Record'Class);

Remove a link from the canvas.
It also destroys the link itself, and free the memory allocated to it.
Nothing is done if Link does not belong to canvas.
procedure For_Each_Link
     (Canvas             : access Interactive_Canvas_Record;
        Execute            :        Link_Processor);

Execute an action on each of the links contained in the canvas.
If Execute returns False, we stop traversing the list of links.   It is
safe to remove the link from the list in Link_Processor.
procedure Destroy
     (Link               : access Canvas_Link_Record);

Method called every time a link is destroyed. You should override this
if you define your own link types.   Note that the link might already
have been removed from the canvas  when this subprogram is called.
This shouldn't free the link itself, only its fields.
Selection
---------

procedure Clear_Selection
     (Canvas             : access Interactive_Canvas_Record);

Clear the list of currently selected items.
procedure Add_To_Selection
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class);

Add Item to the selection.  This is only meaningful during a drag
operation (ie during a button press and the matching button  release).
Item will be moved at the same time that the selection is  moved.
Item is not added again if it is already in the selection.   This
function can be called from the Button_Click subprogram to force
moving items.
procedure Remove_From_Selection
     (Canvas             : access Interactive_Canvas_Record;
        Item               : access Canvas_Item_Record'Class);

Remove Item from the selection.
Items manipulation
------------------

procedure Set_Screen_Size
     (Item               : access Canvas_Item_Record;
        Width              :        Glib.Gint;
        Height             :        Glib.Gint);

Set the size that the items occupies on the screen. You must call this
subprogram every time the zoom level changes, since Width and Height
must reflect the current size of the item in the current zoom level,
not an absolute size that is automatically scaled.
procedure Draw
     (Item               : access Canvas_Item_Record;
        Canvas             : access Interactive_Canvas_Record'Class;
        Dest               :        Gdk.Pixmap.Gdk_Pixmap;
        Xdest, Ydest       :        Glib.Gint);

This subprogram, that must be overridden, should draw the item on
the pixmap Dest, at the specific location (At_X, At_Y).
procedure Destroy
     (Item               : access Canvas_Item_Record);

Free the memory occupied by the item (not the item itself). You should
override this function if you define your own widget type.
procedure On_Button_Click
     (Item               : access Canvas_Item_Record;
        Event              :        Gdk.Event.Gdk_Event_Button);

Function called whenever the item was clicked on.
Note that this function is not called when the item is moved, and thus
is only called when the click was short.   If it returns True, the
canvas it redrawn afterwards (in case the item  has changed for
instance).   This procedure is never called for events that are used to
move the  item in the canvas.   The coordinates (X, Y) in the Event are
relative to the top-left corner  of Item.
function Get_Coord
     (Item               : access Canvas_Item_Record)
        return Gdk.Rectangle.Gdk_Rectangle;

Return the coordinates and size of the item.
procedure Set_Visibility
     (Item               : access Canvas_Item_Record;
        Visible            :        Boolean);

Set the visibility status of the item.
The canvas is not refreshed (this is your responsibility to do it after
you have finished doing all the modifications).
function Is_Visible
     (Item               : access Canvas_Item_Record)
        return Boolean;

Return True if the item is currently visible.
Buffered items
--------------

procedure Draw
     (Item               : access Buffered_Item_Record;
        Canvas             : access Interactive_Canvas_Record'Class;
        Dest               :        Gdk.Pixmap.Gdk_Pixmap;
        Xdest, Ydest       :        Glib.Gint);

Draw the item's double-buffer onto Dest.
procedure Destroy
     (Item               : access Buffered_Item_Record);

Free the double-buffer allocated for the item
procedure Set_Screen_Size_And_Pixmap
     (Item               : access Buffered_Item_Record;
        Win                :        Gdk.Window.Gdk_Window;
        Width, Height      :        Glib.Gint);

Sets the size used on the screen by item, and reallocate the pixmap
if needed
function Pixmap
     (Item               : access Buffered_Item_Record)
        return Gdk.Pixmap.Gdk_Pixmap;

Return the double-buffer that must be updated every time the canvas
is scrolled.
Package Gtkada.Dialogs
**********************

This package provides a ready to use high level dialog capability.

Types
=====

type Button_Range is range 0 .. 8;

The range of valid buttons.
type Message_Dialog_Buttons is mod 2 ** 32;

Define the set of values a button in a message dialog box can have.
type Message_Dialog_Type is
     (Warning,
             -- Message box with a yellow exclamation point.
     
          Error,
             -- Message box with a red stop sign.
     
          Information,
             -- Message box with a blue "i".
     
          Confirmation,
             -- Message box with a blue question mark.
     
          Custom
             -- Message box with no pixmap. The caption of the box should be set by
             -- the user.
          );

Define the values describing the type of message box.   Used by the
Message_Dialog function.
Subprograms
===========

function Message_Dialog
     (Msg                :        String;
        Dialog_Type        :        Message_Dialog_Type
                            := Information;
        Buttons            :        Message_Dialog_Buttons
                            := Button_OK or Button_Help;
        Default_Button     :        Message_Dialog_Buttons
                            := Button_OK;
        Help_Msg           :        String := "";
        Title              :        String := "";
        Justification      :        Gtk_Justification
                            := Justify_Center)
        return Message_Dialog_Buttons;

Display a message dialog box centered on the mouse.
This will create a dialog box containing the specified message.
Dialog_Type indicates the purpose of the dialog.   Buttons indicates
which buttons should appear in the dialog.   Help_Msg is the message
displayed in a separate dialog box when the help  button is pressed
while the dialog is displayed.   If Help_Msg is null, a dialog
containing the message  "No help available" will be displayed. In both
cases, the dialog  displayed will only have a OK button.   If Title is
null, a default title will be chosen depending on the value  of
Dialog_Type.

   This function will return only after the user pressed one of the
buttons  or deleted the dialog, by running an additional level of main
loop.   One of the following values will be returned:
   * Button_None

   * Button_Abort

   * Button_Yes

   * Button_Ok

   * Button_Retry

   * Button_No

   * Button_Cancel

   * Button_Ignore

   * Button_All

Package Gtkada.File`_'Selection
*******************************

This package provides a high level support for creating file selection
dialogs by handling the signals internally.

Subprograms
===========

function File_Selection_Dialog
     (Title              :        String := "Select File";
        Default_Dir        :        String := "";
        Dir_Only           :        Boolean := False;
        Must_Exist         :        Boolean := False)
        return String;

Open a file selection dialog and make it modal.
Return when either the Cancel button is clicked or when a file is
selected.   Default_Dir is the directory to display in dialog
initially. Note that  it must end with a directory separator ('/' or
'\', depending on your  system). You can use
GNAT.Os_Lib.Directory_Separator to get the correct  value for your
system.   If Must_Exist is True, then the file (or directory if
Dir_Only is True)  must exist.   If Dir_Only is True, then the dialog
is modified so that the user can  only choose a directory name, but not
a file name.   The value returned is the name of the file selected, or
"" if none.
Package Gtkada.Handlers
***********************

This package provides the most commonly used instantiations of
Gtk.Handlers

   Gate takes advantage of these pre-instantiated packages.

Package Gtkada.Intl
*******************

This package provides support for string internationalization using the
libintl library.

   To change the current locale setting, use on the environment
variables  "LANG" or "LC_MESSAGES". For example, to switch to the
french locale using  bash:

   $ export LANG=fr

   Depending on the specific implementation of gettext, the following
environment variables may be set to change the default settings of
locale  parameters:

   * LANG Specifies locale name.

   * LC_MESSAGES          Specifies messaging locale, and if present
     overrides          LANG for messages.

   * TEXTDOMAIN          Specifies the text domain name, which is
     identical to          the message object filename without .mo
     suffix.

   * TEXTDOMAINDIR          Specifies the pathname to the message
     database, and  if          present replaces the default (e.g
     /usr/lib/locale on Solaris,          /usr/share/locale on Linux).

    See the gettext documentation of your specific OS for more details.

   The recommended way to use the gettext capability in your
application is  to use Dgettext with your own domain, and define the
following shortcut:

   function "-" (Msg : String) return String;  -  Convenient shortcut
to the Gettext function.

   function "-" (Msg : String) return String is  begin     return
Dgettext ("my_domain", Msg);  end "-";

   Do not forget to call Bind_Text_Domain ("my_domain", "my locale
prefix")  at the beginning of your program. For example, if the prefix
of your  application is /usr, the standard location of the locale would
be /usr/share/locale, e.g:    Bind_Text_Domain ("GtkAda",
"/usr/share/locale");

   Under this locale directory, the functions provided by this package
will look for the directory $LANG/LC_MESSAGES,
/usr/share/locale/fr/LC_MESSAGES in our example; and in this directory,
the file <domain>.mo will be used, e.g
/usr/share/locale/fr/LC_MESSAGES/GtkAda.mo

   The .mo files can be generated using the GNU tool msgfmt that takes a
text file containing for each string the original and the translation.
See msgfmt documentation for more details.   Here is a sample
translation file that can be used as an input for msgfmt:

   # gtkada-fr.po  msgid  "Help"  msgstr "Aide"

   msgid  "Yes"  msgstr "Oui"

   $ msgfmt gtkada-fr.po -o gtkada-fr.gmo  $ cp gtkada-fr.gmo
/usr/share/locale/fr/LC_MESSAGES/GtkAda.mo

   Then, to enable the string translation in your application, use the
"-"  function defined above, e.g:

   Gtk_New (Label, -"Help");  Gtk_New (Label, -("Help ?") & ASCII.LF &
-("Yes"));

Subprograms
===========

function Gettext
     (Msg                :        String)
        return String;

Look up Msg in the current default message catalog.
Use the current locale as specified by LC_MESSAGES. If not found, return
Msg itself (the default text).
function Dgettext
     (Domain             :        String;
        Msg                :        String)
        return String;

Look up Msg in the Domain message catalog for the current locale.
function "-"
     (Msg                :        String)
        return String;

Shortcut for Dgettext ("GtkAda", Msg)
function Dcgettext
     (Domain             :        String;
        Msg                :        String;
        Category           :        Integer)
        return String;

Look up Msg in the Domain message catalog for the Category locale.
function Default_Text_Domain   return String;

Return the current default message catalog.
procedure Text_Domain
     (Domain             :        String := "");

Set the current default message catalog to Domain.
If Domain is "", reset to the default of "messages".
procedure Bind_Text_Domain
     (Domain             :        String;
        Dirname            :        String);

Specify that the Domain message catalog will be found in Dirname.
This overrides the default system locale data base.
Package Gtkada.Pixmaps
**********************

This package provides a collection of "standard" pixmaps

Subprograms
===========

function "+"
     (Str                : in     String)
        return Gtkada.Types.Chars_Ptr;

Package Gtkada.Types
********************

This package provides GtkAda specific types and their associated
functions.

Subprograms
===========

function Null_Array            return Chars_Ptr_Array;

Return a null array.
Handling of arrays of Strings
-----------------------------

The following functions provide a very convenient way to create
C arrays of null terminated strings in Ada.

   You can either create such a String on the fly, or declare a
variable:

   Signals : Chars_Ptr_Array := "clicked" + "missed" + "new signal";

   which corresponds to the C declaration:

   char *signals[] = {"clicked", "missed", "new signal"};

   Note that you still need to manually call Free (Signals) if you want
to  release the memory dynamically allocated by the "+" functions.

function "+"
     (S1, S2             :        String)
        return Chars_Ptr_Array;

Create an array containing S1 and S2.
Note that this function allocates memory to store S1 and S2 as null
terminated Strings. The user is responsible for calling Free on the
resulting array.
function "+"
     (S1                 :        Chars_Ptr_Array;
        S2                 :        String)
        return Chars_Ptr_Array;

Append S2 to S1.
Note that this function allocates memory to store S2 as a null
terminated Strings. The user is responsible for calling Free on the
resulting array.
function "+"
     (S1                 :        Chars_Ptr_Array;
        S2                 :        Chars_Ptr)
        return Chars_Ptr_Array;

Append S2 to S1.
Note that this function allocates memory to store S2 as a null
terminated Strings. The user is responsible for calling Free on the
resulting array.
function "+"
     (S1                 :        Chars_Ptr;
        S2                 :        String)
        return Chars_Ptr_Array;

Create an array containing S1 and S2.
Note that this function allocates memory to store S2 as a null
terminated string. The user is responsible for calling Free on the
resulting array.
procedure Free
     (A                  : in out Chars_Ptr_Array);

Free all the strings in A.
Package Gdk
***********

This is the top level package of the Gdk hierarchy.   It provides the
type definitions used to access underlying C structures.

Types
=====

subtype C_Proxy is Glib.C_Proxy;

subtype Gdk_Bitmap is Gdk_Drawable;

subtype Gdk_Drawable is Gdk_Window;

type Gdk_GC is new C_Proxy;

subtype Gdk_Pixmap is Gdk_Drawable;

type Gdk_Window is new C_Proxy;

Package Gdk.Art
***************

This is the top level package of the Gdk.Art hierarchy.

Package Gdk.Art.Pixbuf
**********************

This package provides a minimal interface to the libart library.   It
gives access to the basic types used by Gdk.Pixbuf.

Types
=====

type Art_Filter_Level is
     (Filter_Nearest,
          Filter_Tiles,
          Filter_Bilinear,
          Filter_Hyper);

Filter_Nearest is nearest neighbor. It is the fastest and lowest
quality.    Filter_Tiles is an accurate simulation of the Postscript
image operator  without any interpolation enabled; each pixel is
rendered as a tiny  parallelogram of solid color, the edges of which
are implemented  with anti-aliasing. It resembles nearest neighbor for
enlargement,  and bilinear for reduction.    Filter_Bilinear is
bilinear interpolation. For enlargement, it is  equivalent to
point-sampling the ideal bilinear-interpolated  image. For reduction,
it is equivalent to laying down small tiles  and integrating over the
coverage area.    Filter_Hyper is the highest quality reconstruction
function. It is  derived from the hyperbolic filters in Wolberg's
"Digital Image  Warping," and is formally defined as the
hyperbolic-filter sampling  the ideal hyperbolic-filter interpolated
image (the filter is designed  to be idempotent for 1:1 pixel mapping).
It is the slowest and highest  quality.    Note: at this stage of
implementation, most filter modes are likely  not to be implemented.
type Art_Pix_Format is
     (Art_Pix_RGB);

type of the image.   The only possible value is currently RGB, but
extensions will  exist with CMYK, Gray, Lab, ...
type Art_Pixbuf is private;

A buffer that contains the image.   It supports alpha channels
(transparency).
subtype Art_U32 is Glib.Guint32;

32 bits unsigned integer used within libart.
Package Gdk.Bitmap
******************

Pixmaps are off-screen drawables. They can be drawn upon with the
standard  drawing primitives, then copied to another drawable (such as
a Gdk_Window)  with Gdk.Pixmap.Draw. The depth of a pixmap is the
number of bits per  pixels. Bitmaps are simply pixmaps with a depth of
1. (That is, they are  monochrome bitmaps - each pixel can be either on
or off).   *note Package_Gdk.Pixmap:: for more details on pixmap
handling.

Types
=====

subtype Gdk_Bitmap is Gdk.Gdk_Bitmap;

A black and white image.   This type is mainly used as a mask when
drawing other colored images.   Each pixel can have two values, 0 or 1.
Subprograms
===========

procedure Gdk_New
     (Bitmap             : out    Gdk_Bitmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Width              : in     Gint;
        Height             : in     Gint);

Create a new bitmap with a given size.
Window is used to determine default values for the new bitmap.   Can be
eventually null in which case the root window is used.   Width is the
width of the new bitmap in pixels.   Height is the height of the new
bitmap in pixels.
procedure Ref
     (Bitmap             : in     Gdk_Bitmap);

Add a reference to a bitmap.
procedure Unref
     (Bitmap             : in     Gdk_Bitmap);

This is the usual way to destroy a bitmap. The memory is freed when
there is no more reference
procedure Create_From_Data
     (Bitmap             : out    Gdk_Bitmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Data               : in     String;
        Width              : in     Gint;
        Height             : in     Gint);

Create a bitmap from data in XBM format.
Window is used to determine default values for the new bitmap, can be
null in which case the root window is used.   Data is the XBM data.
Width is the width of the new bitmap in pixels.   Height is the height
of the new bitmap in pixels.
Package Gdk.Color
*****************

This package provides an interface to the color handling facilities in
gtk+. It is able to handle any kind of visual (monochrome, greyscale,
color with different depths, ...), but provides a common and easy
interface for all of them.   Some of these functions expect a Colormap.
There are two ways you can  get such a colormap, either a system
default colormap or a per-widget  colormap. It is recommended, unless
you are writing your own new widget,  to always use the system default
Colormap. All the functions to get  these colormaps are found in
Gtk.Widget.

   Getting the Red/Green/Blue components can be done through Parse, and
is  actually recommended, since the exact color generally depends on the
visual your application is running on.

Types
=====

type Gdk_Color is private;

A color to be displayed on the screen.   Currently, GtkAda only
supports the RGB standard, ie each color is  set by its red, green and
blue components.   An extra field (Pixel) is the internal
representation of the color,  which is set once the color has been
allocated.
type Gdk_Color_Array is array (Natural range <>) of Gdk_Color;

An array of colors.
type Gdk_Colormap is new C_Proxy;

The set of colors the can be displayed on the screen.   When the screen
is not a true-color screen (ie there is only a limited  number of
possible colors, like 256), the colors are in fact indexes  into a
colormap, which gives the components of the color.   This is the same
concept as a palette.
Subprograms
===========

Creating and Destroying colors
------------------------------

function Parse
     (Spec               : in     String)
        return Gdk_Color;

Parse the string Spec, and get its Red/Green/Blue components.
The color is not allocated, and you need to call Alloc_Color.   If the
string could not be parsed to an existing color, Wrong_Color is  raised.
The string can be one of :

   * "RBG:FF/FF/FF" where the "FF" substrings are respectively the value
       of the red, green and blue components. Some other prefixes than
     RGB    are defined in the X11 definition, please see some X11
     documentation    (or the man page XParseColor on unix systems).

   * "color_name" which can be any color name defined in the file
     rgb.txt    of the user's system. You should always check that
     Wrong_Color was not    raised, in case the color was not known on
     the user's system. This    string is case insensitive.

procedure Alloc_Color
     (Colormap           : in     Gdk_Colormap;
        Color              : in out Gdk_Color;
        Writeable          : in     Boolean := False;
        Best_Match         : in     Boolean := True;
        Success            : out    Boolean);

Allocate a new color.
The fields RGB should have been set before calling this function.   If
Writeable is True, the color will be allocated read/write, that can  be
changed at any time. Not all visuals support this. On modern systems
this usage has become less useful than before, since redrawing the
screen with a new color is about as fast.   If Best_Match is True, and
the exact color can not be allocated, GtkAda  will find the closest
possible match, and modify the fields Red, Green  and Blue of Color.
Note that the allocation has more chances to succeed if Writeable is
False and Best_Match is True.   When you no longer use a color, you
should call Free.
procedure Alloc_Colors
     (Colormap           : in     Gdk_Colormap;
        Colors             : in out Gdk_Color_Array;
        Writeable          : in     Boolean := False;
        Best_Match         : in     Boolean := True;
        Success            : out    Boolean_Array;
        Result             : out    Gint);

Allocate a set of colors.
The parameters are the same as for Alloc_Color  Result is the number of
colors not successfully allocated.

   The size of the Boolean_Array is equal to the length of the
Colors_Array. Usage of an array of a different size will  probably lead
to a Constraint_Error.
procedure Alloc
     (Colormap           : in     Gdk_Colormap;
        Color              : in out Gdk_Color);

Same function as Alloc_Colors above, but for a single color.
The color is allocated non-writeable, and the best-match is taken.
Raises Wrong_Color if the color could not be allocated
function White
     (Colormap           : in     Gdk_Colormap)
        return Gdk_Color;

Return the default white color for the colormap.
If this color was not found or could not be allocated, Wrong_Color is
raised.
function Black
     (Colormap           : in     Gdk_Colormap)
        return Gdk_Color;

Return the default black colors for the colormap.
If this color is not found or could not be allocated, Wrong_Color is
raised.
function Get_System            return Gdk_Colormap;

Get the default colormap for the system.
This is the same function as Gtk.Widget.Get_Default_Colormap.
procedure Get_Visual
     (Colormap           : in     Gdk_Colormap;
        Visual             : out    Gdk.Visual.Gdk_Visual);

Get the visual associated with a colormap.
The main information you can get from there is the depth of the display.
procedure Gdk_New
     (Colormap           : out    Gdk_Colormap;
        Visual             : in     Gdk.Visual.Gdk_Visual;
        Private_Cmap       : in     Boolean);

Create a new colormap for the visual.
If Private_Cmap is true, then the  colormap won't be modifiable outside
this scope. This might result in  some strange colors on the display...
procedure Unref
     (Colormap           : in     Gdk_Colormap);

Unref is the only way to destroy a colormap once you no longer need it.
Note that because gtk+ uses reference counts, the colormap will not  be
actually destroyed while at least one object is using it.
procedure Ref
     (Colormap           : in     Gdk_Colormap);

Increment the ref-count for the color.
You should not have to use this function.
function Get_System_Size       return Gint;

Return the number of entries in the default colormap on the system.
procedure Free_Colors
     (Colormap           : in     Gdk_Colormap;
        Colors             : in     Gdk_Color_Array);

Free Colors, assuming they are allocated in Colormap.
procedure Store
     (Colormap           : in     Gdk_Colormap;
        Colors             : in     Gdk_Color_Array);

Store the Colors in the Colormap
procedure Alloc
     (Colormap           : in     Gdk_Colormap;
        Contiguous         : in     Boolean;
        Planes             : in     Gulong_Array;
        Pixels             : in     Gulong_Array;
        Succeeded          : out    Boolean);

Allocate some Read/Write color cells.
Color cells' values can be changed  dynamically. The pixels allocated
are returned in Pixels.   See XAllocColorCells(3) on Unix systems.
The Planes parameter can be used to nondestructively overlay one  set
of graphics over another. See the X11 manual for more info.   Note that
this is a low-level function which you should rarely  have to use.
procedure Free
     (Colormap           : in     Gdk_Colormap;
        Pixels             : in     Gulong_Array;
        Planes             : in     Gulong);

Free some colors in the colormap.
See XFreeColors(3) on Unix systems.
procedure Change
     (Colormap           : in     Gdk_Colormap;
        Color              : in out Gdk_Color;
        Succeeded          : out    Boolean);

Change the Read/Write colormap cell corresponding to Color.
The new value is the one contained in the Red, Green and Blue  fields
of Color.
procedure Change
     (Colormap           : in     Gdk_Colormap;
        Ncolors            : in     Gint);

Changes the first Ncolors defined in Colormap.
procedure Copy
     (Source             : in     Gdk_Color;
        Destination        : out    Gdk_Color);

Copy the Source color to Destination.
function Equal
     (Colora, Colorb     : in     Gdk_Color)
        return Boolean;

True if the Red, Green and Blue components of both colors are equal.
Setting/Getting the fields of Gdk_Color
---------------------------------------

procedure Set_Rgb
     (Color              : out    Gdk_Color;
        Red, Green, Blue   : in     Gushort);

Modify the fields of the color.
You then have to allocate the color with one of the Alloc* functions
above.
procedure Set_Pixel
     (Color              : in out Gdk_Color;
        Pixel              :        Gulong);

This function should almost never be used. Instead, use Alloc_Color
function Red
     (Color              : in     Gdk_Color)
        return Gushort;

Return the Red field of Color.
function Green
     (Color              : in     Gdk_Color)
        return Gushort;

Return the Green field of Color.
function Blue
     (Color              : in     Gdk_Color)
        return Gushort;

Return the Blue field of Color.
function Pixel
     (Color              : in     Gdk_Color)
        return Gulong;

Return the Pixel field of Color.
Example
=======

      --  Here is an example how you can allocate a new color, when you know
      --  its red/green/blue components: Note that we allocate white in fact
      --  since the maximal value for color components is 65535.
         Color   : Gdk_Color;
         Success : Boolean;
         Set_Rbg (Color, 65535, 65535, 65535);
         Alloc_Color (Colormap   => Gtk.Widget.Get_Default_Colormap,
                      Color      => Color,
                      Writeable  => False,
                      Best_Match => True,
                      Success    => Success);
         if not Success then
             ...;  --  allocation failed
         end if;

Package Gdk.Color`_'Context
***************************

The Gdk_Color_Context type is used for allocating groups of colors.
It is now deprecated in favor of the Gdk.Color.* functions.

Package Gdk.Cursor
******************

This package provides the capability to create predefined mouse cursors
as well as user defined ones.

Types
=====

type Gdk_Cursor is new Gdk.C_Proxy;

Subprograms
===========

procedure Gdk_New
     (Widget             : out    Gdk_Cursor;
        Cursor_Type        : in     Gdk.Types.Gdk_Cursor_Type);

Create a new standard cursor.
procedure Gdk_New
     (Widget             : out    Gdk_Cursor;
        Source             : in     Gdk.Gdk_Pixmap;
        Mask               : in     Gdk.Gdk_Pixmap;
        Fg                 : in     Gdk.Color.Gdk_Color;
        Bg                 : in     Gdk.Color.Gdk_Color;
        X                  : in     Glib.Gint;
        Y                  : in     Glib.Gint);

Create a new cursor from a given pixmap and mask.
Both the pixmap and mask must have a depth of 1 (i.e. each pixel has
only 2 values - on or off). The standard cursor size is 16 by 16 pixels.
   * Source is the pixmap specifying the cursor.

   * Mask is the pixmap specifying the mask, which must be the same size
      as source.

   * Fg is the foreground color, used for the bits in the source which
     are   enabled. The color does not have to be allocated first.

   * Bg is the background color, used for the bits in the source which
     are   disabled. The color does not have to be allocated first.

   * X is the horizontal offset of the 'hotspot' of the cursor.

   * Y is the vertical offset of the 'hotspot' of the cursor.

procedure Destroy
     (Cursor             : in     Gdk_Cursor);

Destroy a cursor, freeing any resources allocated for it.
Package Gdk.Drawable
********************

This package provides support for drawing points, lines, arcs and text
onto  what are called 'drawables'. Drawables, as the name suggests, are
things  which support drawing onto them, and are either Gdk_Window or
Gdk_Pixmap objects.

   Many of the drawing operations take a Gdk_GC argument, which
represents a  graphics context. This Gdk_GC contains a number of
drawing attributes such  as foreground color, background color and line
width, and is used to  reduce the number of arguments needed for each
drawing operation.   *note Package_Gdk.GC:: for more information.

Types
=====

subtype Gdk_Drawable is Gdk.Gdk_Drawable;

A screen area that can be drawn upon.
Subprograms
===========

procedure Copy_Area
     (Dest               : in     Gdk_Drawable;
        GC                 : in     Gdk.GC.Gdk_GC;
        X                  : in     Gint;
        Y                  : in     Gint;
        Source             : in     Gdk.Window.Gdk_Window;
        Source_X           : in     Gint;
        Source_Y           : in     Gint;
        Width              : in     Gint := -1;
        Height             : in     Gint := -1);

Copy a drawing area.
Dest is the Gdk_Drawable to draw.   X is the x coordinate of the
destination within Dest.   X is the y coordinate of the destination
within Dest.   Source_X is the left edge of the source rectangle within
Source.   Source_Y is the top of the source rectangle within Source.
Width is the width of the area to be copied, or -1 to make the area
extend to the right edge of Source.   Height is the height of the area
to be copied, or -1 to make the area  extend to the bottom edge of
Source.
procedure Draw_Point
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        X                  : in     Gint;
        Y                  : in     Gint);

Draw a point, using the foreground color and other attributes of the Gc.
procedure Draw_Points
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Points             : in     Gdk.Types.Gdk_Points_Array);

Draw a number of points.
Use the foreground color and other attributes of the Gc.
procedure Draw_Line
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        X1                 : in     Gint;
        Y1                 : in     Gint;
        X2                 : in     Gint;
        Y2                 : in     Gint);

Draw a line, using the foreground color and other attributes of the Gc.
(X1, Y1) is coordinate of the start point.   (X2, Y2) is coordinate of
the end point.
procedure Draw_Lines
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Points             : in     Gdk.Types.Gdk_Points_Array);

Draw a series of lines connecting the given points.
The way in which joins between lines are drawn is determined by the
Cap_Style value in the Gdk_GC. This can be set with
Gdk.Gc.Set_Line_Attributes.
procedure Draw_Segments
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Segs               : in     Gdk.Types.Gdk_Segments_Array);

Draw a number of unconnected lines.
procedure Draw_Rectangle
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Filled             : in     Boolean := False;
        X                  : in     Gint;
        Y                  : in     Gint;
        Width              : in     Gint;
        Height             : in     Gint);

Draw a rectangular outline or filled rectangle.
Note that a rectangle drawn filled is 1 pixel smaller in both dimensions
than a rectangle outlined. Calling  Draw_Rectangle (Window, Gc, True,
0, 0, 20, 20) results in a filled  rectangle 20 pixels wide and 20
pixels high. Calling  Draw_Rectangle (Window, Gc, False, 0, 0, 20, 20)
results in an outlined  rectangle with corners at (0, 0), (0, 20), (20,
20), and (20, 0), which  makes it 21 pixels wide and 21 pixels high.

   (X, Y) represents the coordinate of the top-left edge of the
rectangle.
procedure Draw_Arc
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Filled             : in     Boolean := False;
        X                  : in     Gint;
        Y                  : in     Gint;
        Width              : in     Gint;
        Height             : in     Gint;
        Angle1             : in     Gint;
        Angle2             : in     Gint);

Draws an arc or a filled 'pie slice'.
The arc is defined by the bounding rectangle of the entire ellipse, and
the start and end angles of the part of the ellipse to be drawn.
Filled is True if the arc should be filled, producing a 'pie slice'.
(X, Y) represent the coordinate of the top-left edge of the bounding
rectangle.   Angle1 is the start angle of the arc, relative to the 3
o'clock  position, counter-clockwise, in 1/64ths of a degree.   Angle2
is the end angle of the arc, relative to angle1, in 1/64ths of a
degree.
procedure Draw_Polygon
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Filled             : in     Boolean;
        Points             : in     Gdk.Types.Gdk_Points_Array);

Draw an outlined or filled polygon.
Filled is True if the polygon should be filled. The polygon is closed
automatically, connecting the last point to the first point if
necessary.   Points is an array of Gdk_Point specifying the points
making up the  polygon.
procedure Draw_Text
     (Drawable           : in     Gdk_Drawable;
        Font               : in     Gdk.Font.Gdk_Font;
        Gc                 : in     Gdk.GC.Gdk_GC;
        X                  : in     Gint;
        Y                  : in     Gint;
        Text               : in     String);

Draw a string in the given font or fontset.
X is the x coordinate of the left edge of the text.   Y is the y
coordinate of the baseline of the text.
procedure Draw_Text
     (Drawable           : in     Gdk_Drawable;
        Font               : in     Gdk.Font.Gdk_Font;
        Gc                 : in     Gdk.GC.Gdk_GC;
        X                  : in     Gint;
        Y                  : in     Gint;
        Wide_Text          : in     Gdk.Types.Gdk_WString);

Draw a wide string in the given font of fontset.
If the font is a 1-byte font, the string is converted into 1-byte
characters (discarding the high bytes) before output.
procedure Draw_Pixmap
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Src                : in     Gdk_Drawable;
        Xsrc               : in     Gint;
        Ysrc               : in     Gint;
        Xdest              : in     Gint;
        Ydest              : in     Gint;
        Width              : in     Gint := -1;
        Height             : in     Gint := -1);

Draw a pixmap, or a part of a pixmap, onto another drawable.
Src is the source GdkPixmap to draw.   Xsrc is the left edge of the
source rectangle within Src.   Ysrc is the top of the source rectangle
within Src.   Xdest is the x coordinate of the destination within Src.
Ydest is the y coordinate of the destination within Src.   Width is
the width of the area to be copied, or -1 to make the area  extend to
the right edge of the source pixmap.   Height is the height of the area
to be copied, or -1 to make the area  extend to the bottom edge of the
source pixmap.
procedure Draw_Image
     (Drawable           : in     Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Image              : in     Gdk.Image.Gdk_Image;
        Xsrc               : in     Gint;
        Ysrc               : in     Gint;
        Xdest              : in     Gint;
        Ydest              : in     Gint;
        Width              : in     Gint := -1;
        Height             : in     Gint := -1);

Draw a Gdk_Image onto a Drawable.
The depth of the Gdk_Image must match the depth of the Gdk_Drawable.
Image is the Gdk_Image to draw.   Xsrc is the left edge of the source
rectangle within Image.   Ysrc is the top of the source rectangle
within Image.   Xdest is the x coordinate of the destination within
Drawable.   Ydest is the y coordinate of the destination within
Drawable.   Width is the width of the area to be copied, or -1 to make
the area  extend to the right edge of image.   Height is the height of
the area to be copied, or -1 to make the area  extend to the bottom
edge of image.
Example
=======


      with Glib;
      with Gdk.Window;
      with Gdk.Drawable;
      with Gdk.GC;
      with Gdk.Font;
      with Gtk.Drawing_Area;
     
      procedure Draw (Drawing : in out Gtk.Drawing_Area.Gtk_Drawing_Area) is
         Gdkw : Gdk.Window.Gdk_Window;
         GC   : Gdk.GC.Gdk_GC;
         Font : Gdk.Font.Gdk_Font;
         use type Glib.Gint;
     
      begin
         -- Get the Gdk window
     
         Gdkw := Gtk.Drawing_Area.Get_Window (Drawing) ;
     
         -- Clear the window
     
         GDK.Window.Clear (Gdkw) ;
     
         -- Create a graphic context associated with this window
     
         Gdk.GC.Gdk_New (GC, Gdkw);
     
         -- Draw a line in this window
     
         Gdk.Drawable.Draw_Line
           (Drawable => Gdkw,
            GC => GC,
            X1 =>   0, Y1 =>   0,
            X2 => 100, Y2 => 100);
     
         -- Draw an arc
     
         Gdk.Drawable.Draw_Arc
           (Drawable => Gdkw,
            Gc       => gc,
            Filled   => True,
            X        => 100,
            Y        => 100,
            Width    => 200,
            Height   => 100,
            Angle1   => 0 * 64,
            Angle2   => 270 * 64);
     
         -- Ask for a given font
     
         Gdk.Font.Load (Font,
                        "-adobe-courier-medium-i-*-*-15-*-*-*-*-*-*-*");
         Gdk.Drawable.Draw_Text
           (Drawable    => Gdkw,
            Font        => Font,
            Gc          => gc,
            X           => 50,
            Y           => 50,
            Text        => "Hello World");
         Gdk.GC.Destroy (GC);
      end Draw;

Package Gdk.Event
*****************

This package provides functions dealing with events from the window
system.   In GtkAda applications, the events are handled automatically
in  Gtk.Main.Do_Event, and passed on to the appropriate widgets, so
these  functions are rarely needed.

   !! Warning !! This is one of the only package that requires manual
memory management in some cases. If you use the function Allocate,  you
have to use the function Free too...

Types
=====

type Event_Handler_Func is access procedure

type Gdk_Event is new Gdk.C_Proxy;

subtype Gdk_Event_Any is Gdk_Event;

Change from GtkAda1.2.3: There is no longer a tagged type  hierarchy,
only one type.   However there are now a few runtime tests for each of
the  function, to check whether a given field is available or not.
Fields common to all events: Window, Send_Event, Event_Type
subtype Gdk_Event_Button is Gdk_Event;

A button was pressed or release. Relevant fields:  Time, X, Y,
Pressure, Xtilt, Ytilt, State, Button, Source,  Device_Id, X_Root,
Y_Root, Window.   Type: Button_Press, Gdk_2Button_Press,
Gdk_3Button_Press or  Button_Release.
subtype Gdk_Event_Client is Gdk_Event;

This is an event used to send arbitrary data from one X application  to
another. This event too is almost never used, and is not documented
here. Please consult an X11 documentation for more information.
Relevant fields: Message_Type, Data  Type: Client_Event
type Gdk_Event_Client_Data_Format is
     (Char_Array, Short_Array, Long_Array);

subtype Gdk_Event_Configure is Gdk_Event;

The window configuration has changed: either it was remapped,  resized,
moved, ...   Note that you usually don't have to redraw your window
when you  receive such an event, since it is followed by an
Gdk_Event_Expose.   Relevant fields: X, Y, Width, Height  Type:
Configure
subtype Gdk_Event_Crossing is Gdk_Event;

The mouse has been moved in or out of the window  Relevant fields:
Time, SubWindow, X, Y, X_Root, Y_Root, Mode,  Detail, Focus, State
Type: Enter_Notify, Leave_Notify
subtype Gdk_Event_Expose is Gdk_Event;

The window needs to be redrawn. For efficiency, gtk gives you the
smallest area that you need to redraw  Relevant fields: Area, Count,
Graphics_Expose  Type: Expose
subtype Gdk_Event_Focus is Gdk_Event;

The focus has changed for a window.   Relevant fields: in  Type:
Focus_Change
subtype Gdk_Event_Key is Gdk_Event;

A keyboard key was pressed  Relevant fields: Time, State, Key_Val,
String  Type: Key_Press, Key_Release
subtype Gdk_Event_Motion is Gdk_Event;

The mouse has moved  Relevant fields: Time, X, Y, Pressure, Xtilt,
Ytilt, State,  Is_Hint, Source, Device_Id, X_Root, Y_Root  Type:
Motion_Notify
subtype Gdk_Event_No_Expose is Gdk_Event;

Indicate that the source region was completely available when parts of
a drawable were copied.   This is also emitted when a gc whose
"exposures" attribute is set to  False in a call to Copy_Area or
Draw_Pixmap. See the documentation for  Gdk.GC.Set_Exposures.   No
Relevent fields except the common ones  Type: No_Expose
subtype Gdk_Event_Property is Gdk_Event;

Some property of the window was modified. GtkAda provides a higher
level interface, and you almost never need to use this event.
Relevent fields: Atom, Time, Property_State  Type: Property_Notify
subtype Gdk_Event_Proximity is Gdk_Event;

from gtk+: "This event type will be used pretty rarely. It only is
important for XInput aware programs that are drawing their own
cursor". This is only used with non standard input devices, like
graphic tablets.   Relevant fields: Time, Source, Device_Id  Type:
Proximity_In, Proximity_Out
subtype Gdk_Event_Selection is Gdk_Event;

This is how X11 implements a simple cut-and-paste mechanism. However,
GtkAda provides a higher level interface to the selection mechanism,
so this event will almost never be used.   Relevant fields: Selection,
Target, Property, Requestor, Time  Type: Selection_Clear,
Selection_Request, Selection_Notify
subtype Gdk_Event_Visibility is Gdk_Event;

The visibility state of the window (partially visibly, fully visible,
hidden). This event almost never need to be used, since other events
are generated at the same time, like expose_events  Relevant fields:
Visibility_State  type: Visibility_Notify
Subprograms
===========

Access to fields of the event
-----------------------------

function Get_Event_Type
     (Event              : in     Gdk_Event)
        return Types.Gdk_Event_Type;

The type of the event.
function Get_Send_Event
     (Event              : in     Gdk_Event)
        return Boolean;

Set to true if the event was generated by the application, False
if generated by the X server/Win32.
function Get_Window
     (Event              : in     Gdk_Event)
        return Gdk.Window.Gdk_Window;

The window the event occured on.
function Get_Time
     (Event              : in     Gdk_Event)
        return Guint32;

Time when the event occured.
function Get_X
     (Event              : in     Gdk_Event)
        return Gdouble;

Horizontal coordinate of the mouse when the event occured.
The coordinates are relative to the parent window.
function Get_Y
     (Event              : in     Gdk_Event)
        return Gdouble;

Vertical coordinate of the mouse when the event occured.
The coordinates are relative to the parent window.
function Get_X_Root
     (Event              : in     Gdk_Event)
        return Gdouble;

Horizontal coordinate of the mouse when the event occured.
Relative to the root window.
function Get_Y_Root
     (Event              : in     Gdk_Event)
        return Gdouble;

Vertical coordinate of the mouse when the event occured.
Relative to the root window.
function Get_Button
     (Event              : in     Gdk_Event)
        return Guint;

Number of the button that was pressed.
function Get_State
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Modifier_Type;

State of the mouse buttons and keyboard keys just prior to the event.
function Get_Subwindow
     (Event              : in     Gdk_Event)
        return Gdk.Window.Gdk_Window;

Child window for the event.
For an Enter_Notify_Event, this is set to the initial window for the
pointer; for an Leave_Notify_Event this is set to the window occupied
by the pointer in its last position.
function Get_Mode
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Crossing_Mode;

Return the mode of an Event.
Set to indicate whether the events are normal events, pseudo-motion
events when a grab activates or pseudo-motion events when a grab
deativates.
function Get_Detail
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Notify_Type;

Set to indicate the notify details.
Most applications can ignore events with a Notify Virtual or a
Notify_Non_Linear_Virtual detail.
function Get_Focus
     (Event              : in     Gdk_Event)
        return Boolean;

Set to true if the window for the event is the focus window.
function Get_Pressure
     (Event              : in     Gdk_Event)
        return Gdouble;

This is set to a constant in the gtk+ code itself, so it
is most probably useless... Its value is 0.5.   It is only used with
some special input devices, like drawing  tablets,...
function Get_Xtilt
     (Event              : in     Gdk_Event)
        return Gdouble;

This is set to a constant in the gtk+ code itself, so it
is most probably useless... Its value is 0.0.   It is only used with
some special input devices, like drawing  tablets,...
function Get_Ytilt
     (Event              : in     Gdk_Event)
        return Gdouble;

This is set to a constant in the gtk+ code itself, so it
is most probably useless... Its value is 0.0.   It is only used with
some special input devices, like drawing  tablets,...
function Get_Width
     (Event              : in     Gdk_Event)
        return Gint16;

Get the width in a configure event.
function Get_Height
     (Event              : in     Gdk_Event)
        return Gint16;

Get the height in a configure event.
function Get_Source
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Input_Source;

Set to a constant for now in the gtk+ source... Probably useless.
function Get_Device_Id
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Device_Id;

Set to a constant for now in the gtk+ source... Probably useless.
Since multiple input devices can be used at the same time, like a mouse
and a graphic tablet, this indicated which one generated the event.
function Get_Area
     (Event              : in     Gdk_Event)
        return Rectangle.Gdk_Rectangle;

The minimal area on which the event applies.
For Expose_Events, this is the minimal area to redraw.
function Get_Count
     (Event              : in     Gdk_Event)
        return Gint;

Number of Expose_Events that are to follow this one.
Most applications can ignore the event if Count is not 0, which also
allows for optimizations.
function Get_In
     (Event              : in     Gdk_Event)
        return Boolean;

True if the window has gained the focus, False otherwise.
function Get_Is_Hint
     (Event              : in     Gdk_Event)
        return Boolean;

???
function Get_Key_Val
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Key_Type;

Code of the key that was pressed (and that generated the event.
function Get_String
     (Event              : in     Gdk_Event)
        return String;

Symbol of the key that was pressed, as a string.
function Get_Atom
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Atom;

Indicate which property has changed.
??? Atom should not be a Guint
function Get_Property_State
     (Event              : in     Gdk_Event)
        return Guint;

??? The return type should be changed.
function Get_Visibility_State
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Visibility_State;

Return the new visibility state for the window.
function Get_Selection
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Atom;

What was selected in the window...
function Get_Target
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Atom;

???
function Get_Property
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Atom;

???
function Get_Requestor
     (Event              : in     Gdk_Event)
        return Guint32;

???
function Get_Message_Type
     (Event              : in     Gdk_Event)
        return Gdk.Types.Gdk_Atom;

???
function Get_Data
     (Event              : in     Gdk_Event)
        return Gdk_Event_Client_Data;

???
Modifying the fields of an event
--------------------------------

procedure Set_Window
     (Event              : in     Gdk_Event;
        Win                :        Gdk.Window.Gdk_Window);

Set the Window field of an event.
procedure Set_X
     (Event              : in     Gdk_Event;
        X                  :        Gdouble);

Set the X field of an event.
procedure Set_Y
     (Event              : in     Gdk_Event;
        Y                  :        Gdouble);

Set the Y field of an event.
procedure Set_Xroot
     (Event              : in     Gdk_Event;
        Xroot              :        Gdouble);

Set the Xroot field of an event.
procedure Set_Yroot
     (Event              : in     Gdk_Event;
        Yroot              :        Gdouble);

Set the Yroot field of an event.
procedure Set_Width
     (Event              : in     Gdk_Event;
        Width              :        Gint16);

Set the Width field of an event.
procedure Set_Height
     (Event              : in     Gdk_Event;
        Height             :        Gint16);

Set the Height field of an event.
procedure Set_Button
     (Event              : in     Gdk_Event;
        Button             :        Guint);

Set the Button field of an event.
procedure Set_Time
     (Event              : in     Gdk_Event;
        Time               :        Guint32);

Set the time for the event.
If Time is 0, then it is set to the current time.
procedure Set_State
     (Event              : in     Gdk_Event;
        State              : in     Gdk.Types.Gdk_Modifier_Type);

Set the State field of an event.
procedure Set_Subwindow
     (Event              : in     Gdk_Event;
        Window             : in     Gdk.Window.Gdk_Window);

Set the Subwindow field of an event.
procedure Set_Mode
     (Event              : in     Gdk_Event;
        Mode               : in     Gdk.Types.Gdk_Crossing_Mode);

Set the Mode field of an event.
procedure Set_Detail
     (Event              : in     Gdk_Event;
        Detail             : in     Gdk.Types.Gdk_Notify_Type);

Set the Detail field of an event.
procedure Set_Focus
     (Event              : in     Gdk_Event;
        Has_Focus          :        Boolean);

Set the Focus field of an event.
procedure Set_Area
     (Event              : in     Gdk_Event;
        Area               :        Rectangle.Gdk_Rectangle);

Set the Area field of an event.
procedure Set_In
     (Event              : in     Gdk_Event;
        Focus_In           :        Boolean);

Set the In field of an event.
procedure Set_Is_Hint
     (Event              : in     Gdk_Event;
        Is_Hint            :        Boolean);

Set the Is_Hint field of an event.
procedure Set_Key_Val
     (Event              : in     Gdk_Event;
        Key                :        Gdk.Types.Gdk_Key_Type);

Set the Key_Val field of an event.
procedure Set_Atom
     (Event              : in     Gdk_Event;
        Atom               :        Gdk.Types.Gdk_Atom);

Set the Atom field of an event.
procedure Set_Property_State
     (Event              : in     Gdk_Event;
        State              :        Guint);

Set the Property_State field of an event.
procedure Set_Visibility_State
     (Event              : in     Gdk_Event;
        State              :        Gdk.Types.Gdk_Visibility_State);

Set the Visibility_State field of an event.
procedure Set_Selection
     (Event              : in     Gdk_Event;
        Selection          :        Gdk.Types.Gdk_Atom);

Set the Selection field of an event.
procedure Set_Target
     (Event              : in     Gdk_Event;
        Target             :        Gdk.Types.Gdk_Atom);

Set the Target field of an event.
procedure Set_Property
     (Event              : in     Gdk_Event;
        Property           :        Gdk.Types.Gdk_Atom);

Set the Property field of an event.
procedure Set_Requestor
     (Event              : in     Gdk_Event;
        Requestor          :        Guint32);

Set the Requestor field of an event.
procedure Set_Message_Type
     (Event              : in     Gdk_Event;
        Typ                :        Gdk.Types.Gdk_Atom);

Set the Message_Type field of an event.
procedure Set_String
     (Event              : in     Gdk_Event;
        Str                :        String);

Set the string associated with an event.
General functions
-----------------

procedure Deep_Copy
     (From               :        Gdk_Event;
        To                 : out    Gdk_Event);

Deep copy for an event. The C structure is itself duplicated.
You need to deallocated it yourself with a call to Free below.
procedure Get_Graphics_Expose
     (Event              : out    Gdk_Event_Expose;
        Window             : in     Gdk.Window.Gdk_Window);

Waits for a GraphicsExpose or NoExpose event
If it gets a GraphicsExpose event, it returns a pointer to it,
otherwise it returns an event for which Is_Created is False.

   This function can be used to implement scrolling: you must call
Gdk.GC.Set_Exposures with True on the GC you are using for the
drawing, so that a events are generated for obscured areas and every
time a new part of the widget is drawn. However, there is a race
condition if multiple scrolls happen before you have finished
processing the first one. A workaround is to call Get_Graphics_Expose
after every scroll until it returns a null event.
function Events_Pending        return Boolean;

Is there any event pending on the queue ?
procedure Get
     (Event              : out    Gdk_Event);

Get the next event on the queue.
procedure Peek
     (Event              : out    Gdk_Event);

Look at the next event on the queue, but leave if there.
procedure Put
     (Event              : in     Gdk_Event);

Add an event on the queue - Better to use Gtk.Signal.Emit_By_Name
procedure Set_Show_Events
     (Show_Events        : in     Boolean := True);

For debug purposes, you can choose whether you want to see the events
GtkAda receives.
function Get_Show_Events       return Boolean;

Return the current state of Show_Events.
procedure Send_Client_Message_To_All
     (Event              : in     Gdk_Event);

Low level routine to send an Event to every window.
function Send_Client_Message
     (Event              : in     Gdk_Event;
        Xid                : in     Guint32)
        return Boolean;

Low level routine to send an Event to a specified X window.
procedure Allocate
     (Event              : out    Gdk_Event;
        Event_Type         : in     Types.Gdk_Event_Type;
        Window             : in     Gdk.Window.Gdk_Window);

Create an event, whose fields are uninitialized.
You need to use the function Set_* above to modify them, before you can
send the event with Emit_By_Name.   !!Note!!: The event has to be
freed if you have called this function.   Use the function Free.
procedure Free
     (Event              : in out Gdk_Event);

Free the memory (and C structure) associated with an event.
You need to call this function only if the event was created through
Allocate, not if it was created by GtkAda itself (or you would get  a
segmentation fault).
procedure Event_Handler_Set
     (Func               :        Event_Handler_Func;
        Data               :        System.Address);

Set up a new event handler.
This handler replaces the default GtkAda event handler, and thus should
make sure that all events are correctly handled.

   Note that managing the memory for Data is your responsability, and
Data is passed as is to Func.
function From_Address
     (C                  :        System.Address)
        return Gdk_Event;

Convert a C handler to the matching Event structure.
function To_Address
     (C                  :        Gdk_Event)
        return System.Address;

Convert an event to the underlying C handler.
function Is_Created
     (E                  :        Gdk_Event)
        return Boolean;

Return True if the underlying C event has been created.
Package Gdk.Font
****************

This is the base package for handling fonts.   GtkAda knows about
bitmap and vectorial fonts, and can draw both.   The list of fonts
available to you depends on what is installed on  your system.

   The name of the font is indicated in the standard X11 fashion,
namely:  (example extracted from the Xlib manual):

   -adobe-courier-bold-o-normal-10-100-75-75-m-60-iso8859-1  where:
   * adobe     : foundry

   * courier   : font family

   * bold      : weight (e.g. bold, medium)

   * o         : slant (e.g. roman, italic, oblique)

   * normal    : set width (e.g. normal, condensed, narrow, double)

   * 10        : pixels

   * 100       : points (in tenths of a point)

   * 75        : horizontal resolution in dpi

   * 75        : vertical resolution in dpi

   * m         : spacing (e.g. monospace or proportional)

   * 60        : average width (in tenths of a pixel)

   * iso8859-1 : character set

    Any of the fields can have a '*' instead, so that the system will
automatically find a font that matches the rest of the string, and won't
care about that specific field.

   But the easiest way to select a font is by using some external
programs,  for instance xfontsel, xlsfont, gfontsel, or even the font
selection  dialog example in the testgtk/ directory of the GtkAda
distribution.

   *note Package_Gtk.Extra.PsFont:: for a package that processes
postscript  fonts, with their more usual names, and can easily convert
them to standard  Gdk_Font structures.

   Some of the functions below should be used only for wide-character
strings.   This is needed for languages with more than 256 characters.

   Wide character values between 0 and 127 are always identical in
meaning to  the ASCII character codes.   An alternative to wide
characters is multi-byte characters, which extend  normal char strings
to cope with larger character sets. As the name  suggests, multi-byte
characters use a different number of bytes to store  different
character codes. For example codes 0-127 (i.e. the ASCII codes)  often
use just one byte of memory, while other codes may use 2, 3 or even  4
bytes. Multi-byte characters have the advantage that they can often be
used in an application with little change, since strings are still
represented as arrays of char values. However multi-byte strings are
much  easier to manipulate since the character are all of the same size.

   On Unix systems, the external utility 'xfd' can be used to display
all  the characters in a font.

Types
=====

type Gdk_Font is new Gdk.C_Proxy;

A font used to draw text.   This can represent a bitmap font, a
scalable (vectorial) font, or  a fontset. A fontset is a list of
comma-separated fonts, that permits  GtkAda to obtain the fonts needed
for a variety of locales from a  single locale-independent base font
name. The single base font name  should name a family of fonts whose
members are encoded in the various  charsets needed by the locales of
interest.   The algorithm used to select the font is described in the
manual page  for XCreateFontSet(3X).
Subprograms
===========

procedure Load
     (Font               : out    Gdk_Font;
        Font_Name          : in     String);

Load a new font, given its name.
This is the first step before using a font.   The font is first looked
up in the cache, and if it was already  loaded, it is not reloaded
again. Thus, it does not harm to call  this function multiple times
with the same Font_Name.   Null_Font is returned if the font could not
be loaded.
procedure Fontset_Load
     (Font               : out    Gdk_Font;
        Fontset_Name       : in     String);

Load a new font set.
Fontset_Name is a comma-separated list of fonts that will be loaded  as
part of the fontset.
procedure Ref
     (Font               : in     Gdk_Font);

Increment the reference counter for the font.
You should not make any assumption of the initial value of the fonts
returned by Load or Fontset_Load, since these can be extracted from a
cache.
procedure Unref
     (Font               : in     Gdk_Font);

Decrement the reference counter for the font.
When this counter reaches 0, the font is deleted from memory.
function Id
     (Font               : in     Gdk_Font)
        return Gint;

Return the X font id for the font.
This Id will only be needed if you want to call directly X11 functions,
you won't need it with GtkAda.
function Equal
     (Fonta, Fontb       : in     Gdk_Font)
        return Boolean;

Compare two fonts or two fontsets for equality.
Two fonts are equal if they have the same font Id.   Two fontsets are
equal if the name given to Fontset_Load was the same.
function Get_Ascent
     (Font               : in     Gdk_Font)
        return Gint;

Return the maximal ascent for the font.
This is the logical extent above the baseline for spacing between two
lines.
function Get_Descent
     (Font               : in     Gdk_Font)
        return Gint;

Return the maximal descent for the font.
This is the logical extent below the baseline for spacing between two
lines.
function String_Width
     (Font               : in     Gdk_Font;
        Str                : in     String)
        return Gint;

Return the width in pixels that Str will occupy if drawn with Font.
The value returned is the distance between the origin of the text and
the position at which the next string should be drawn.
function Text_Width
     (Font               : in     Gdk_Font;
        Text               : in     String)
        return Gint;

This is the same function as String_Width.
In C, this function is intended to measure only the width of a part  of
the string, but you can simply pass it a substring in Ada.
function Text_Width
     (Font               : in     Gdk_Font;
        Text               : in     Gdk.Types.Gdk_WString)
        return Gint;

Return the width in pixels that Text will occupy on the screen.
This function should be used with strings that contain Unicode
characters
function Char_Width
     (Font               : in     Gdk_Font;
        Char               : in     Character)
        return Gint;

Return the width in pixels occupied by a single character on the screen.
The value returned is the distance between Char's origin on the screen
and the origin of the next character in the string.
function Char_Width
     (Font               : in     Gdk_Font;
        Char               : in     Gdk.Types.Gdk_WChar)
        return Gint;

Return the width in pixels occupied by a single wide-character.
function String_Measure
     (Font               : in     Gdk_Font;
        Str                : in     String)
        return Gint;

Determine the distance from the origin to the rightmost portion of Str.
This is not the correct value for determining the origin of the next
portion when drawing text in multiple pieces.   See String_Width
instead.
function Text_Measure
     (Font               : in     Gdk_Font;
        Text               : in     String)
        return Gint;

Same function a String_Measure.
In C, this function is intended to measure only the width of a part of
the string, but you can simply pass it a substring in Ada.   This is
also called the right bearing of the string.
function Char_Measure
     (Font               : in     Gdk_Font;
        Char               : in     Character)
        return Gint;

Return the width in pixels of Char.
As opposed to Char_Width, the value returned is not the distance at
which the next character should be drawn.   This is also called the
right bearing of the character.
procedure String_Extents
     (Font               : in     Gdk.Font.Gdk_Font;
        Str                : in     String;
        Lbearing           : out    Gint;
        Rbearing           : out    Gint;
        Width              : out    Gint;
        Ascent             : out    Gint;
        Descent            : out    Gint);

Return the metrics for a given text.
See the picture for more explanations on all the fields.   Lbearing :
Origin to left edge of character.   Rbearing : Origin to right edge of
character.   Width    : Advance to next character's origin.   Ascent
: Baseline to top edge of character.   Descent  : Baseline to bottom
edge of character.
procedure Text_Extents
     (Font               : in     Gdk_Font;
        Text               : in     String;
        Lbearing           : out    Gint;
        Rbearing           : out    Gint;
        Width              : out    Gint;
        Ascent             : out    Gint;
        Descent            : out    Gint);

Return all the metrics for a given text.
See the picture for more explanations on all the fields.   in C, this
function would be used for part of a string, which you can  simulate in
Ada with a substring.
procedure Text_Extents
     (Font               : in     Gdk_Font;
        Text               : in     Gdk.Types.Gdk_WString;
        Lbearing           : out    Gint;
        Rbearing           : out    Gint;
        Width              : out    Gint;
        Ascent             : out    Gint;
        Descent            : out    Gint);

Return all the metrics for a given wide-character string.
See the picture for more explanations on the returned values.
function String_Height
     (Font               : in     Gdk_Font;
        Str                : in     String)
        return Gint;

Return the height in pixels of the string.
This is the total height, and you can not easily tell how this height
is split around the baseline.
function Text_Height
     (Font               : in     Gdk_Font;
        Str                : in     String)
        return Gint;

Same as String_Height.
In C, this function is intended to measure only the width of a part of
the string, but you can simply pass it a substring in Ada.   This is
also called the right bearing of the string.
function Char_Height
     (Font               : in     Gdk_Font;
        Char               : in     Character)
        return Gint;

Return the total height in pixels of a single character.
Package Gdk.GC
**************

A graphic context is a structure that describes all the attributes
used by the drawing functions in Gdk.   The colors, line styles, Fill
styles and so on are defined through  this structure.

   On X11 systems, this structure is stored directly on the XServer,
which speeds up the transfer of the drawing attributes a lot. Instead
of transferring all of them every time you call one of the drawing
functions, you simply specify which GC you want to use.

   Thus, it is recommended to create as many GCs as you need, instead
of creating a single one that is modified every time you need to
modify one of the attributes.

   On Unix machines, you should have a look at the external utility
'xgc'  which demonstrates all the basic settings of the graphic
contexts.

Types
=====

subtype Gdk_GC is Gdk.Gdk_GC;

A graphic context that contain all the information to draw graphics  on
the screen.   Creating these GC is more efficient than passing a lot of
parameters  to each of the drawing functions, since these GC are stored
on the  server side and do not need to be pass through the network.
type Gdk_GC_Values is new Gdk.C_Proxy;

A structure used on the client side to store the same information  as
the GC. Creating a GC from this structure is more efficient than
calling a lot of functions to modify the GC directly, since there is  a
single call to the server.
Subprograms
===========

Gdk_GC
------

procedure Gdk_New
     (GC                 : out    Gdk_GC;
        Window             : in     Gdk.Window.Gdk_Window);

Create a new graphic context.
The window must have been realized first (so that it is associated
with some resources on the Xserver).   The GC can then be used for any
window that has the same root window,  and same color depth as Window.
See the manual page for XCreateGC on Unix systems for more information.
procedure Gdk_New
     (GC                 : out    Gdk_GC;
        Window             : in     Gdk.Window.Gdk_Window;
        Values             : in     Gdk_GC_Values;
        Values_Mask        : in     Types.Gdk_GC_Values_Mask);

Create a new graphic context.
It is directly created with the values set in Values, and whose
associated field has been set in Values_Mask.   This is faster than
calling the simple Gdk_New function and each of  other functions in
this package, since each of them requires a call  to the server.
procedure Destroy
     (GC                 : in     Gdk_GC);

Free the memory allocated on the server for the graphic context.
Graphic contexts are never freed automatically by GtkAda, this is  the
user responsibility to do so.
procedure Ref
     (GC                 : in     Gdk_GC);

Increment the reference counting for the graphic context.
You should usually not have to use it.
procedure Unref
     (GC                 : in     Gdk_GC);

Decrement the reference counting for the graphic context.
When this reaches 0, the graphic context is destroyed.
procedure Get_Values
     (GC                 : in     Gdk_GC;
        Values             : in     Gdk_GC_Values);

Get the values set in the GC.
This copies the values from the server to client, allowing faster
modifications. Values can then be copied back to the server by
creating a new graphic context with the function Gdk_New above.
Values should have been allocated first with a call to Gdk_New.
procedure Set_Foreground
     (GC                 : in     Gdk_GC;
        Color              : in     Gdk.Color.Gdk_Color);

Set the foreground color for the graphic context.
This color is the one that is used by most drawing functions.
procedure Set_Background
     (GC                 : in     Gdk_GC;
        Color              : in     Gdk.Color.Gdk_Color);

Set the background color for the graphic context.
procedure Set_Font
     (GC                 : in     Gdk_GC;
        Font               : in     Gdk.Font.Gdk_Font);

Set the font used by the graphic context.
This font is used by the function Gdk.Drawable.Draw_Text.
procedure Set_Function
     (GC                 : in     Gdk_GC;
        Func               : in     Types.Gdk_Function);

Set the function in the graphic context.
This function specifies how the points are put on the screen, ie  if
GtkAda how GtkAda should mix the point already on the screen  and the
new point being put.   Note that setting the function to Gdk_Xor is not
the right way  to do animation. You should instead save the background
pixmap,  put the image, and then restore the background.

   In general, there are three basic steps to drawing: reading the
source  pixels, reading the destination pixels, and writing the
destination  pixels.  Some functions only perform the third step (Set
and Clear),  some do not need the middle step (Copy), whereas most
require the three  steps, and thus can be much slower.
procedure Set_Fill
     (GC                 : in     Gdk_GC;
        Fill               : in     Types.Gdk_Fill);

Set the pattern used for filling the polygons.
procedure Set_Tile
     (GC                 : in     Gdk_GC;
        Tile               : in     Gdk.Gdk_Pixmap);

procedure Set_Stipple
     (GC                 : in     Gdk_GC;
        Stipple            : in     Gdk.Gdk_Pixmap);

procedure Set_Clip_Mask
     (GC                 : in     Gdk.GC.Gdk_GC;
        Mask               : in     Gdk.Gdk_Bitmap);

If Mask is set to Null_Bitmap, then no clip_mask is used for drawing.
Points will be drawn through this GC only where the bits are set to 1
in the mask. See also the function Set_Clip_Origin for  how to move the
mask inside the GC.
procedure Set_Ts_Origin
     (GC                 : in     Gdk_GC;
        X, Y               : in     Gint);

Set the Tile and Stipple origin in the graphic context.
procedure Set_Clip_Origin
     (GC                 : in     Gdk_GC;
        X, Y               : in     Gint);

Set the origin of the clip mask.
See the functions Set_Clip_Rectangle, Set_Clip_Region and
Gdk.Bitmap.Set_Clip_Mask for more explanation.
procedure Set_Clip_Rectangle
     (GC                 : in     Gdk_GC;
        Rectangle          : in     Gdk.Rectangle.Gdk_Rectangle);

Set the clip rectangle.
Only the points that are drawn inside this rectangle will be displayed
on the screen. Note that you might have to modify the Clip origin first
with Set_Clip_Origin.   See Set_Clip_Mask to delete the current clip
mask.
procedure Set_Clip_Region
     (GC                 : in     Gdk_GC;
        Region             : in     Gdk.Region.Gdk_Region);

Define a clip region on the screen.
This is just like Set_Clip_Rectangle, except that a region is a more
complex region, that can be the intersection or union of multiple
rectangles. Note that the Clip_Origin can have an influence on this
function.
procedure Set_Subwindow
     (GC                 : in     Gdk_GC;
        Mode               : in     Types.Gdk_Subwindow_Mode);

Set the subwindow mode for the graphic context.
This specifies whether the drawing routines should be clipped to  the
specific window they are drawn into, or if they should extend  to
subwindows as well.
procedure Set_Exposures
     (GC                 : in     Gdk_GC;
        Exposures          : in     Boolean);

Exposures indicates whether you want "expose" and "noexpose" events to
be reported when calling Copy_Area and Copy_Plane with this GC.   You
should disable this if you don't need the event and want to optimize
your application.   If Exposures is True, then any call to Copy_Area or
Draw_Pixmap will  generate an expose event. Otherwise, these will
generate a no_expose  event.
procedure Set_Line_Attributes
     (GC                 : in     Gdk_GC;
        Line_Width         : in     Gint;
        Line_Style         : in     Types.Gdk_Line_Style;
        Cap_Style          : in     Types.Gdk_Cap_Style;
        Join_Style         : in     Types.Gdk_Join_Style);

Set the line attributes for this GC.
Line_Width is the width of the line. If its value is 0, the line is as
thin as possible, possibly even more so than if the width is 1. It is
also faster to draw a line with width 0 than any other line width.

   Line_Style specifies whether the line should be solid or dashed.
With Line_On_Off_Dash, the colors are alternatively the foreground
color, and blank. With Line_Double_Dash, the colors are  alternatively
the foreground and background colors.

   Cap_Style specifies how the line should end, either flat or rounded.

   Join_Style specifies how two consecutive lines drawn by Draw_Lines
are  connected.
procedure Set_Dashes
     (Gc                 : in     Gdk_GC;
        Dash_Offset        : in     Gint;
        Dash_List          : in     Guchar_Array);

Specify the dash pattern when the line's style is anything but solid.
The values in the array alternatively give the length (in pixels) of
the plain dash, the empty dash, the second plain dash, ... None of
these values can be 0. If there is an odd number of items in Dash_List,
this is equivalent to giving the array concatenated with itself.
Dash_Offset specifies the phase of the pattern to start with.
procedure Copy
     (Dst_GC             : in     Gdk_GC;
        Src_GC             : in     Gdk_GC);

Copy a Src_GC to Dst_GC.
Gdk_Color_Values
----------------

function Gdk_New               return Gdk_GC_Values;

Allocate a new Values structure on the client.
Note that this function allocates a C structure, and thus needs to  be
freed with a call to Free below.
procedure Free
     (Values             : in     Gdk_GC_Values);

Free the C structure associated with Values.
procedure Set_Foreground
     (Values             : in     Gdk_GC_Values;
        Color              : in     Gdk.Color.Gdk_Color);

Same as Set_Foreground, but on the client side
procedure Set_Background
     (Values             : in     Gdk_GC_Values;
        Color              : in     Gdk.Color.Gdk_Color);

Same as Set_Background, but on the client side
procedure Set_Font
     (Values             : in     Gdk_GC_Values;
        Font               : in     Gdk.Font.Gdk_Font);

Same as Set_Font, but on the client side
procedure Set_Function
     (Values             : in     Gdk_GC_Values;
        Func               : in     Types.Gdk_Function);

Same as Set_Function, but on the client side
procedure Set_Fill
     (Values             : in     Gdk_GC_Values;
        Fill               : in     Types.Gdk_Fill);

Same as Set_Fill, but on the client side
procedure Set_Ts_Origin
     (Values             : in     Gdk_GC_Values;
        X, Y               : in     Gint);

Same as Set_Ts_Origin, but on the client side
procedure Set_Clip_Origin
     (Values             : in     Gdk_GC_Values;
        X, Y               : in     Gint);

Same as Set_Clip_Origin, but on the client side
procedure Set_Subwindow
     (Values             : in     Gdk_GC_Values;
        Mode               : in     Types.Gdk_Subwindow_Mode);

Same as Set_Subwindow, but on the client side
procedure Set_Exposures
     (Values             : in     Gdk_GC_Values;
        Exposures          : in     Boolean);

Same as Set_Exposures, but on the client side
procedure Set_Line_Attributes
     (Values             : in     Gdk_GC_Values;
        Line_Width         : in     Gint;
        Line_Style         : in     Types.Gdk_Line_Style;
        Cap_Style          : in     Types.Gdk_Cap_Style;
        Join_Style         : in     Types.Gdk_Join_Style);

Same as Set_Line_Attributes, but on the client side
Package Gdk.Main
****************

This package provides routines to handle initialization and set up of
the  Gdk library.

Subprograms
===========

procedure Init;

Initialize the library for use.
The command line arguments are modified to reflect any arguments  which
were not handled. (Such arguments should either  be handled by the
application or dismissed).
procedure Gdk_Exit
     (Error_Code         : in     Gint);

Restore the library to an un-itialized state and exits
the program using the "exit" system call.   Error_Code is the error
value to pass to "exit".   Allocated structures are freed and the
program exits cleanly.
function Set_Locale            return String;

Initialize handling of internationalization of strings.
*note Package_Gtkada.Intl:: for more details.
procedure Set_Locale;

Drops the string returned by the Set_Locale function;
procedure Set_Use_Xshm
     (Use_Xshm           : in     Boolean := True);

Set whether shared memory (when supported by the graphic server) should
be used.
function Get_Use_Xshm          return Boolean;

Return whether shared memory on the graphic server is used.
function Get_Display           return String;

Return the name of the display.
function Time_Get              return Guint32;

Get the number of milliseconds since the library was initialized.
This time value is accurate to milliseconds even though  a more
accurate time down to the microsecond could be  returned.   Note that
this function is currently not supported under Win32 systems.
function Timer_Get             return Guint32;

Return the current timer interval.
This interval is in units of milliseconds.
procedure Timer_Set
     (Milliseconds       : in     Guint32);

Set the timer interval.
Milliseconds is the new value for the timer.   As a side effect, calls
to Gdk.Event.Get will last for a maximum  of time of Milliseconds.
However, a value of 0 milliseconds will cause  Gdk.Event.Get to block
indefinitely until an event is received.
procedure Timer_Enable;

Enable the Gdk timer.
procedure Timer_Disable;

Disable the Gdk timer.
function Screen_Width          return Gint;

Return the width of the screen.
function Screen_Height         return Gint;

Return the height of the screen.
function Screen_Width_MM       return Gint;

Return the width of the screen in millimeters.
function Screen_Height_MM      return Gint;

Return the height of the screen in millimeters.
procedure Flush;

Flush the queue of graphic events and then wait
until all requests have been received and processed.
procedure Beep;

Emit a beep.
procedure Key_Repeat_Disable;

Disable the key repeat behavior.
procedure Key_Repeat_Restore;

Restore the key repet behavior.
function Pointer_Grab
     (Window             : in     Gdk.Window.Gdk_Window;
        Owner_Events       : in     Boolean := True;
        Event_Mask         : in     Gdk.Types.Gdk_Event_Mask;
        Confine_To         : in     Gdk.Window.Gdk_Window
                            := Gdk.Window.Null_Window;
        Cursor             : in     Gdk.Cursor.Gdk_Cursor
                            := Gdk.Cursor.Null_Cursor;
        Time               : in     Guint32)
        return Boolean;

Grab the pointer to a specific window.
   * Window is the window which will receive the grab

   * Owner_Events specifies whether events will be reported as is,
     or relative to Window

   * Event_Mask masks only interesting events

   * Confine_To limits the cursor movement to the specified window

   * Cursor changes the cursor for the duration of the grab

   * Time specifies the time  Requires a corresponding call to
     Pointer_Ungrab

procedure Pointer_Ungrab
     (Time               : in     Guint32);

Release any pointer grab.
function Pointer_Is_Grabbed    return Boolean;

Tell wether there is an active pointer grab in effect.
function Keyboard_Grab
     (Window             : in     Gdk.Window.Gdk_Window;
        Owner_Events       : in     Boolean := True;
        Time               : in     Guint32)
        return Boolean;

Grab the keyboard to a specific window.
   * Window is the window which will receive the grab

   * Owner_Events specifies whether events will be reported as is,
     or relative to Window

   * Time specifies the time  Requires a corresponding call to
     Keyboard_Ungrab

procedure Keyboard_Ungrab
     (Time               : in     Guint32);

Release any keyboard grab.
Package Gdk.Pixbuf
******************

This object provides image manipulation routines.

   The following image formats are known, but some depend on external
libraries for the proper loading of files (indicated with * in the
list):     PNG*, JPEG*, TIFF*, GIF, XPM, PNM, Sun raster file (ras),
ico,     bmp.

   With this package, you can load images from file, display them on the
screen, re-scale them and composite them with other images.   All the
functions fully support alpha channels (opacity).

   Different filters are provided, depending on the quality of output
you  expect and the speed you need.

Types
=====

type Alpha_Mode is
     (Alpha_Bilevel, Alpha_Full);

Alpha compositing mode.   This indicates how the alpha channel (for
opacity) is handled when  rendering.
type Gdk_Pixbuf is private;

A very efficient client-side pixmap.   This type can be adapted to all
the possible screen depths (number of  bits per pixel), and the
algorithms are extremely efficient.   You can also load a pixbuf
directly from an external file in one of  the standard image formats.
Subprograms
===========

Accessing the fields
--------------------

function Get_Format
     (Pixbuf             : in     Gdk_Pixbuf)
        return Gdk.Art.Pixbuf.Art_Pix_Format;

Return the format of the image.
This can currently be only RGB, but extensions will be implemented  for
gray, cmyk, lab,...
function Get_N_Channels
     (Pixbuf             : in     Gdk_Pixbuf)
        return Gint;

Number of channels in the image.
function Get_Has_Alpha
     (Pixbuf             : in     Gdk_Pixbuf)
        return Boolean;

Return True if the image has an alpha channel (opacity information).
function Get_Bits_Per_Sample
     (Pixbuf             : in     Gdk_Pixbuf)
        return Gint;

Number of bits per color sample.
function Get_Pixels
     (Pixbuf             : in     Gdk_Pixbuf)
        return Gdk.Rgb.Rgb_Buffer_Access;

Return a pointer to the pixel data of the image.
function Get_Width
     (Pixbuf             : in     Gdk_Pixbuf)
        return Gint;

Return the width of the image in pixels.
function Get_Height
     (Pixbuf             : in     Gdk_Pixbuf)
        return Gint;

Return the height of the image in pixels.
function Get_Rowstride
     (Pixbuf             : in     Gdk_Pixbuf)
        return Gint;

Return the number of bytes between rows in the image data.
Reference counting
------------------

procedure Ref
     (Pixbuf             : in     Gdk_Pixbuf);

Increment the reference counting on the image.
The image is destroyed when its reference counting reaches 0.   Note
also that most of the time you won't have to call this  function
yourself.
procedure Unref
     (Pixbuf             : in     Gdk_Pixbuf);

Decrement the reference counting on the image.
Libart interface
----------------

function New_From_Art_Pixbuf
     (Pixbuf             : in     Gdk.Art.Pixbuf.Art_Pixbuf)
        return Gdk_Pixbuf;

Wrap an art_pixbuf.
The reference counting is initialized to 1.
function Gdk_New
     (Width              : in     Gint;
        Height             : in     Gint;
        Format             : in     Gdk.Art.Pixbuf.Art_Pix_Format
                            := Gdk.Art.Pixbuf.Art_Pix_RGB;
        Has_Alpha          : in     Boolean := False;
        Bits_Per_Sample    : in     Gint := 8)
        return Gdk_Pixbuf;

Create a blank pixbuf with an optimal row stride and a new buffer.
The buffer is allocated, but not cleared.   The reference counting is
initialized to 1.
Creating
--------

function New_From_File
     (Filename           : in     String)
        return Gdk_Pixbuf;

Load an image from file.
function New_From_Xpm_Data
     (Data               : in     Interfaces.C.Strings.chars_ptr_array)
        return Gdk_Pixbuf;

Create an image from a XPM data.
function Add_Alpha
     (Pixbuf             : in     Gdk_Pixbuf;
        Substitute_Color   : in     Boolean;
        Red                : in     Guchar := 0;
        Green              : in     Guchar := 0;
        Blue               : in     Guchar := 0)
        return Gdk_Pixbuf;

Return a newly allocated image copied from Pixbuf, but with an
extra alpha channel.   If Pixbuf already had an alpha channel, the two
images have exactly  the same contents.   If Substitute_Color is True,
the color (Red, Green, Blue) is  substituted for zero opacity.   If
Substitute_Color is False, Red, Green and Blue are ignored, and a  new
color is created with zero opacity.
Rendering
---------

procedure Render_Threshold_Alpha
     (Pixbuf             : in     Gdk_Pixbuf;
        Bitmap             : in     Gdk.Bitmap.Gdk_Bitmap;
        Src_X              : in     Gint;
        Src_Y              : in     Gint;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint;
        Width              : in     Gint;
        Height             : in     Gint;
        Alpha_Threshold    : in     Gint);

Take the opacity values in a rectangular portion of a pixbuf and
thresholds them to produce a bi-level alpha mask that can be used as  a
clipping mask for a drawable.   Bitmap is the bitmap where the bilevel
mask will be painted to.   Alpha_Threshold are the opacity values below
which a pixel will be  painted as zero. All other values will be
painted as one.
procedure Render_To_Drawable
     (Pixbuf             : in     Gdk_Pixbuf;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable;
        Gc                 : in     Gdk.GC.Gdk_GC;
        Src_X              : in     Gint;
        Src_Y              : in     Gint;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint;
        Width              : in     Gint;
        Height             : in     Gint;
        Dither             : in     Gdk.Rgb.Gdk_Rgb_Dither
                            := Gdk.Rgb.Dither_Normal;
        X_Dither           : in     Gint := 0;
        Y_Dither           : in     Gint := 0);

Render a rectangular portion of a pixbuf to a drawable while using the
specified GC. This is done using Gdk.RGB, so the specified drawable
must have the Gdk.RGB visual and colormap.  Note that this function
will ignore the opacity information for images with an alpha channel;
the GC must already have the clipping mask set if you want transparent
regions to show through.

   For an explanation of dither offsets, see the Gdk.RGB documentation.
In  brief, the dither offset is important when re-rendering partial
regions  of an image to a rendered version of the full image, or for
when the  offsets to a base position change, as in scrolling.  The
dither matrix  has to be shifted for consistent visual results.  If you
do not have  any of these cases, the dither offsets can be both zero.
procedure Render_To_Drawable_Alpha
     (Pixbuf             : in     Gdk_Pixbuf;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable;
        Src_X              : in     Gint;
        Src_Y              : in     Gint;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint;
        Width              : in     Gint;
        Height             : in     Gint;
        Alpha              : in     Alpha_Mode;
        Alpha_Threshold    : in     Gint;
        Dither             : in     Gdk.Rgb.Gdk_Rgb_Dither
                            := Gdk.Rgb.Dither_Normal;
        X_Dither           : in     Gint := 0;
        Y_Dither           : in     Gint := 0);

Render a rectangular portion of a pixbuf to a drawable.
This is done using Gdk.RGB, so the specified drawable must have the
GdkRGB visual and colormap. When used with Alpha_Bilevel, this function
has to create a bitmap out of the thresholded alpha channel of the
image and, it has to set this bitmap as the clipping mask for the GC
used for drawing.  This can be a significant performance penalty
depending on the size and the complexity of the alpha channel of the
image.  If performance is crucial, consider handling the alpha channel
yourself (possibly by caching it in your application) and using
Render_To_Drawable or Gdk.RGB directly instead.

   If the image does have opacity information and Alpha_Mode  is
Alpha_Bilevel, specifies the threshold value for opacity values
function Get_From_Drawable
     (Dest               : in     Gdk_Pixbuf;
        Src                : in     Gdk.Drawable.Gdk_Drawable;
        Cmap               : in     Gdk.Color.Gdk_Colormap;
        Src_X              : in     Gint;
        Src_Y              : in     Gint;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint;
        Width              : in     Gint;
        Height             : in     Gint)
        return Gdk_Pixbuf;

Transfer image data from a Gdk drawable and converts it to an RGB(A)
representation inside a Gdk_Pixbuf.

   If the drawable src is a pixmap, then a suitable colormap must be
specified, since pixmaps are just blocks of pixel data without an
associated colormap.   If the drawable is a window, the Cmap argument
will be ignored and the  window's own colormap will be used instead.

   If the specified destination pixbuf Dest is Null_Pixbuf, then this
function will create an RGB pixbuf with 8 bits per channel and no
alpha, with the same size specified by the Width and Height  arguments.
In this case, the Dest_x and Dest_y arguments must be  specified as 0,
otherwise the function will return Null_Pixbuf.  If the  specified
destination pixbuf is not Null_Pixbuf and it contains alpha
information, then the filled pixels will be set to full opacity.

   If the specified drawable is a pixmap, then the requested source
rectangle must be completely contained within the pixmap, otherwise the
function will Null_Pixbuf

   If the specified drawable is a window, then it must be viewable, i.e.
all of its ancestors up to the root window must be mapped.  Also, the
specified source rectangle must be completely contained within the
window and within the screen.  If regions of the window are obscured by
non-inferior windows, the contents of those regions are undefined.
The contents of regions obscured by inferior windows of a different
depth than that of the source window will also be undefined.

   Return value: The same pixbuf as Dest if it was non-NULL, or a
newly-created pixbuf with a reference count of 1 if no destination
pixbuf was specified.
procedure Copy_Area
     (Src_Pixbuf         : in     Gdk_Pixbuf;
        Src_X              : in     Gint;
        Src_Y              : in     Gint;
        Width              : in     Gint;
        Height             : in     Gint;
        Dest_Pixbuf        : in     Gdk_Pixbuf;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint);

Copy a rectangular area from Src_pixbuf to Dest_pixbuf.
Conversion of pixbuf formats is done automatically.
Scaling
-------

procedure Scale
     (Src                : in     Gdk_Pixbuf;
        Dest               : in     Gdk_Pixbuf;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint;
        Dest_Width         : in     Gint;
        Dest_Height        : in     Gint;
        Offset_X           : in     Gdouble := 0.0;
        Offset_Y           : in     Gdouble := 0.0;
        Scale_X            : in     Gdouble := 1.0;
        Scale_Y            : in     Gdouble := 1.0;
        Filter_Level       : in     Gdk.Art.Pixbuf.Art_Filter_Level
                            := Gdk.Art.Pixbuf.Filter_Bilinear);

Transform the source image by scaling by Scale_x and Scale_y then
translating by Offset_x and Offset_y.   The image is then rendered in
the rectangle (Dest_x, Dest_y,  Dest_width, Dest_height) of the
resulting image onto the destination  drawable replacing the previous
contents.
procedure Composite
     (Src                : in     Gdk_Pixbuf;
        Dest               : in     Gdk_Pixbuf;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint;
        Dest_Width         : in     Gint;
        Dest_Height        : in     Gint;
        Offset_X           : in     Gdouble := 0.0;
        Offset_Y           : in     Gdouble := 0.0;
        Scale_X            : in     Gdouble := 1.0;
        Scale_Y            : in     Gdouble := 1.0;
        Filter_Level       : in     Gdk.Art.Pixbuf.Art_Filter_Level
                            := Gdk.Art.Pixbuf.Filter_Bilinear;
        Overall_Alpha      : in     Gint := 128);

Transform the source image by scaling by Scale_x and Scale_y then
translating by Offset_x and Offset_y, then composite the rectangle
(Dest_X, Dest_Y, Dest_Width, Dest_Height) of the resulting image onto
the destination drawable.  Alpha should be in 0 .. 255
procedure Composite_Color
     (Src                : in     Gdk_Pixbuf;
        Dest               : in     Gdk_Pixbuf;
        Dest_X             : in     Gint;
        Dest_Y             : in     Gint;
        Dest_Width         : in     Gint;
        Dest_Height        : in     Gint;
        Offset_X           : in     Gdouble := 0.0;
        Offset_Y           : in     Gdouble := 0.0;
        Scale_X            : in     Gdouble := 1.0;
        Scale_Y            : in     Gdouble := 1.0;
        Filter_Level       : in     Gdk.Art.Pixbuf.Art_Filter_Level
                            := Gdk.Art.Pixbuf.Filter_Bilinear;
        Overall_Alpha      : in     Gint := 128;
        Check_X            : in     Gint := 0;
        Check_Y            : in     Gint := 0;
        Check_Size         : in     Gint := 0;
        Color1             : in     Gdk.Art.Pixbuf.Art_U32 := 0;
        Color2             : in     Gdk.Art.Pixbuf.Art_U32 := 0);

Transform the source image by scaling by Scale_x and Scale_y then
translating by Offset_x and Offset_y, then composites the rectangle
(Dest_X, Dest_Y, Dest_Width, Dest_Height) of the resulting image with
a checkboard of the colors Color1 and Color2 and renders it onto the
destination drawable.   The origin of checkboard is at (Check_x,
Check_y)  Color1 is the color at the upper left of the check.
function Scale_Simple
     (Src                : in     Gdk_Pixbuf;
        Dest_Width         : in     Gint;
        Dest_Height        : in     Gint;
        Filter_Level       : in     Gdk.Art.Pixbuf.Art_Filter_Level
                            := Gdk.Art.Pixbuf.Filter_Bilinear)
        return Gdk_Pixbuf;

Scale the Src image to Dest_width x Dest_height and render the result
into a new pixbuf.
function Composite_Color_Simple
     (Src                : in     Gdk_Pixbuf;
        Dest_Width         : in     Gint;
        Dest_Height        : in     Gint;
        Filter_Level       : in     Gdk.Art.Pixbuf.Art_Filter_Level
                            := Gdk.Art.Pixbuf.Filter_Bilinear;
        Overall_Alpha      : in     Gint := 128;
        Color1             : in     Gdk.Art.Pixbuf.Art_U32 := 0;
        Color2             : in     Gdk.Art.Pixbuf.Art_U32 := 0)
        return Gdk_Pixbuf;

Scale Src to Dest_width x Dest_height and composite the result with
a checkboard of colors Color1 and Color2 and render the result into  a
new pixbuf.
Package Gdk.Pixmap
******************

Pixmaps are off-screen drawables. They can be drawn upon with the
standard  drawing primitives, then copied to another drawable (such as
a Gdk_Window)  with Gdk.Pixmap.Draw. The depth of a pixmap is the
number of bits per  pixels. Bitmaps are simply pixmaps with a depth of
1. (That is, they are  monochrome bitmaps - each pixel can be either on
or off).   *note Package_Gdk.Bitmap:: for more details on bitmap
handling.

Types
=====

subtype Gdk_Pixmap is Gdk.Gdk_Pixmap;

A server-side image.   You can create an empty pixmap, or load if from
external files in  bitmap and pixmap format. See Gdk.Pixbuf if you need
to load  images in other formats.
Subprograms
===========

procedure Gdk_New
     (Pixmap             : out    Gdk_Pixmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Width              : in     Gint;
        Height             : in     Gint;
        Depth              : in     Gint := -1);

Create a new pixmap with a given size.
Window is used to determine default values for the new pixmap.   Can be
eventually null.   Width is the width of the new pixmap in pixels.
Height is the height of the new pixmap in pixels.   Depth is the depth
(number of bits per pixel) of the new pixmap.   If -1, and window is
not null, the depth of the new pixmap will be  equal to that of window.
Automatically reference the pixmap once.
procedure Ref
     (Pixmap             : in     Gdk_Pixmap);

Add a reference to a pixmap.
procedure Unref
     (Pixmap             : in     Gdk_Pixmap);

This is the usual way to destroy a pixmap. The memory is freed when
there is no more reference
procedure Create_From_Data
     (Pixmap             : out    Gdk_Pixmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Data               : in     String;
        Width              : in     Gint;
        Height             : in     Gint;
        Depth              : in     Gint;
        Fg                 : in     Color.Gdk_Color;
        Bg                 : in     Color.Gdk_Color);

Create a pixmap from data in XBM format.
Window is used to determine default values for the new bitmap, can be
null in which case the root window is used.   Data is the XBM data.
Width is the width of the new bitmap in pixels.   Height is the height
of the new bitmap in pixels.   Depth is the depth (number of bits per
pixel) of the new pixmap.   Fg is the foreground color.   Bg is the
background color.
procedure Create_From_Xpm
     (Pixmap             : out    Gdk_Pixmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Mask               : in out Gdk.Bitmap.Gdk_Bitmap;
        Transparent        : in     Gdk.Color.Gdk_Color;
        Filename           : in     String);

Create a pixmap from a XPM file.
Window is used to determine default values for the new pixmap.   Mask
is a pointer to a place to store a bitmap representing the
transparency mask of the XPM file. Can be null, in which case
transparency will be ignored.   Transparent is the color to be used for
the pixels that are transparent  in the input file. Can be null, in
which case a default color will be  used.   Filename is the filename of
a file containing XPM data.
procedure Create_From_Xpm
     (Pixmap             : out    Gdk_Pixmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Colormap           : in     Gdk.Color.Gdk_Colormap;
        Mask               : in out Gdk.Bitmap.Gdk_Bitmap;
        Transparent        : in     Gdk.Color.Gdk_Color;
        Filename           : in     String);

Create a pixmap from a XPM file using a particular colormap.
Window is used to determine default values for the new pixmap. Can be
null if colormap is given.   Colormap is the Gdk_Colormap that the new
pixmap will use. If omitted,  the colormap for window will be used.
Mask is a pointer to a place to store a bitmap representing the
transparency mask of the XPM file. Can be null, in which case
transparency will be ignored.   Transparent is the color to be used for
the pixels that are transparent  in the input file. Can be null, in
which case a default color will be  used.   Filename is the filename of
a file containing XPM data.
procedure Create_From_Xpm_D
     (Pixmap             : out    Gdk_Pixmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Mask               : in out Gdk.Bitmap.Gdk_Bitmap;
        Transparent        : in     Gdk.Color.Gdk_Color;
        Data               : in     Gtkada.Types.Chars_Ptr_Array);

Create a pixmap from data in XPM format.
Window is used to determine default values for the new pixmap.   Mask
is a pointer to a place to store a bitmap representing the
transparency mask of the XPM file. Can be null, in which case
transparency will be ignored.   Transparent will be used for the pixels
that are transparent in the  input file. Can be null in which case a
default color will be used.   Data is a pointer to a string containing
the XPM data.
procedure Create_From_Xpm_D
     (Pixmap             : out    Gdk_Pixmap;
        Window             : in     Gdk.Window.Gdk_Window;
        Colormap           : in     Gdk.Color.Gdk_Colormap;
        Mask               : in out Gdk.Bitmap.Gdk_Bitmap;
        Transparent        : in     Gdk.Color.Gdk_Color;
        Data               : in     Gtkada.Types.Chars_Ptr_Array);

Create a pixmap from data in XPM format using a particular colormap.
Window is used to determine default values for the new pixmap.
Colormap is the Gdk_Colormap that the new pixmap will be use. If
omitted, the colormap for window will be used.   Mask is a pointer to a
place to store a bitmap representing the  transparency mask of the XPM
file. Can be null, in which case  transparency will be ignored.
Transparent will be used for the pixels that are transparent in the
input file. Can be null in which case a default color will be used.
Data is a pointer to a string containing the XPM data.
Package Gdk.Rgb
***************

This package implements a client-side pixmap. As opposed to the pixmaps
found in Gdk.Pixmap, this one simply implements a local buffer, which
can be manipulated at the pixel level easily. This buffer then needs to
be sent to the server.   The major efficiency difference is that the
same amount of data needs  to be sent to the server no matter how much
things were modified.   Gdk.Pixmaps requires one communication with the
server per drawing  function.   Some X servers are also optimized so
that the buffers in this package  can be implemented in shared memory
with the server, which of course  makes it much faster to transfer the
data.   This package is basically an implementation of XImage (on
X-Window),  which means that it handles transparently different depths,
byte  ordering,... It also provides some color dithering functions.

   Note that you need to initialize this package before using it by
calling the Init procedure below.

   See the commands Get_Visual and Get_Cmap below on how to use the
colormaps and visual with this package

   Dithering simulates a higher number of colors than what is available
on  the current visual (only for 8-bit and 16-bit displays).

Types
=====

type Gdk_Rgb_Cmap is new Gdk.C_Proxy;

This is the full colormap, ie a set of 256 Rbg items.   You can extract
values using the functions Get or Set below.
type Gdk_Rgb_Dither is
     (Dither_None, Dither_Normal, Dither_Max);

The three kinds of dithering that are implemented in this package:  -
Dither_None: No dithering will be done  - Dither_Normal: Specifies
dithering on 8 bit displays, but not 16-bit.   Usually the best choice.
- Dither_Max: Specifies dithering on every kind of display
type Rgb_Buffer is array (Natural) of Glib.Guchar;

See Rgb_Buffer_Access.
type Rgb_Buffer_Access is access all Rgb_Buffer;

This is the buffer that will contain the image. You can manipulate each
byte in it independantly, although there is no high level routine  to
draw lines, circles, ...   Once you are done drawing into this buffer,
you can copy it to any  drawable on the screen, *if* the widget was
created with the correct  visual and colormap (see above).    Note also
that this is a flat array, and that you can not check its  ranges.
type Rgb_Cmap_Index is new Natural range 0 .. 255;

subtype Rgb_Item is Glib.Guint32;

This represents the coding for a rbg value. The exact encoding depends
on the visual used and its depth (pseudo-color, true-color, ...)
Subprograms
===========

procedure Init;

This function must be called before using any of the functions below.
It initializes internal data, such as the visual and the colormap that
will be used.
function Get_Visual            return Gdk.Visual.Gdk_Visual;

See Get_Cmap.
function Get_Cmap              return Gdk.Color.Gdk_Colormap;

Return the visual and the color map used internally in this package.
Note that these are not the same as returned by Gtk.Widget or
Gdk.Window, and you should use these if you are using this package.

   The drawable you intend to copy the RBG buffer to must use this
visual  and this colormap. Therefore, before creating the widget, you
need to do  the following:
   * Gtk.Widget.Push_Visual (Gdk.Rgb.Get_Visual);

   * Gtk.Widget.Push_Colormap (Gdk.Rgb.Get_Cmap);

   * Gtk_New (....)

   * Gtk.Widget.Pop_Visual;

   * Gtk.Widget.Pop_Colormap;

Color manipulation
------------------

function Xpixel_From_Rgb
     (Value              : in     Rgb_Item)
        return Glib.Gulong;

Convert the Rgb representation to the usual one found in Gdk.Color.
procedure GC_Set_Foreground
     (GC                 : in     Gdk.GC.Gdk_GC;
        Value              : in     Rgb_Item);

See GC_Set_Background.
procedure GC_Set_Background
     (GC                 : in     Gdk.GC.Gdk_GC;
        Value              : in     Rgb_Item);

Modify the foreground and the background of a graphic context with a
value. These are exactly the same functions has found in Gdk.Gc, but do
not used the same parameters.
Colormap manipulation
---------------------

function Get
     (Cmap               : in     Gdk_Rgb_Cmap;
        Index              : in     Rgb_Cmap_Index)
        return Rgb_Item;

Access an item in a colormap.
function Get_8
     (Cmap               : in     Gdk_Rgb_Cmap;
        Index              : in     Rgb_Cmap_Index)
        return Glib.Guchar;

Same as Get for 8-bit displays.
procedure Set
     (Cmap               : in     Gdk_Rgb_Cmap;
        Index              : in     Rgb_Cmap_Index;
        Value              : in     Rgb_Item);

Set an item in Cmap.
procedure Set_8
     (Cmap               : in     Gdk_Rgb_Cmap;
        Index              : in     Rgb_Cmap_Index;
        Value              : in     Glib.Guchar);

Same as Set for 8-bit displays
procedure Gtk_New
     (Cmap               : out    Gdk_Rgb_Cmap;
        Colors             : in     Glib.Guint32_Array);

Create a colormap.
procedure Free
     (Cmap               : in out Gdk_Rgb_Cmap);

Free a colormap.
Drawing Images
--------------

procedure Draw_Rgb_Image
     (Drawable           : in     Gdk.Drawable.Gdk_Drawable;
        GC                 : in     Gdk.GC.Gdk_GC;
        X, Y               : in     Glib.Gint;
        Width, Height      : in     Glib.Gint;
        Dith               : in     Gdk_Rgb_Dither;
        Rgb_Buf            : in     Rgb_Buffer;
        Rowstride          : in     Glib.Gint);

Render a Gdk buffer with 24 bit Data.
Such a buffer is a one dimensional array of bytes, where every byte
triplet makes up a pixel (byte 0 is red, byte 1 is green and byte 2 is
blue).

   * Width: Number of pixels (byte triplets) per row of the image.

   * Height: Number of rows in the image.

   * RowStride: Number of bytes between rows... (row n+1 will start at
     byte     row n + Rowstride). Gdk.Rgb is faster if both the source
     pointer and     the rowstride are aligned to a 4 byte boundary.

   * (X, Y, Width, Height): Define a region in the target to copy the
      buffer to.

procedure Draw_Rgb_Image_Dithalign
     (Drawable           : in     Gdk.Drawable.Gdk_Drawable;
        GC                 : in     Gdk.GC.Gdk_GC;
        X, Y               : in     Glib.Gint;
        Width, Height      : in     Glib.Gint;
        Dith               : in     Gdk_Rgb_Dither;
        Rgb_Buf            : in     Rgb_Buffer;
        Rowstride          : in     Glib.Gint;
        Xdith, Ydith       : in     Glib.Gint);

Same kind of function as above, but for different buffer types (???).
procedure Draw_Rgb_32_Image
     (Drawable           : in     Gdk.Drawable.Gdk_Drawable;
        GC                 : in     Gdk.GC.Gdk_GC;
        X, Y               : in     Glib.Gint;
        Width, Height      : in     Glib.Gint;
        Dith               : in     Gdk_Rgb_Dither;
        Rgb_Buf            : in     Rgb_Buffer;
        Rowstride          : in     Glib.Gint);

Same kind of function as above, but for different buffer types (???).
procedure Draw_Gray_Image
     (Drawable           : in     Gdk.Drawable.Gdk_Drawable;
        GC                 : in     Gdk.GC.Gdk_GC;
        X, Y               : in     Glib.Gint;
        Width, Height      : in     Glib.Gint;
        Dith               : in     Gdk_Rgb_Dither;
        Rgb_Buf            : in     Rgb_Buffer;
        Rowstride          : in     Glib.Gint);

Same kind of function as above, but for different buffer types (???).
procedure Draw_Indexed_Image
     (Drawable           : in     Gdk.Drawable.Gdk_Drawable;
        GC                 : in     Gdk.GC.Gdk_GC;
        X, Y               : in     Glib.Gint;
        Width, Height      : in     Glib.Gint;
        Dith               : in     Gdk_Rgb_Dither;
        Rgb_Buf            : in     Rgb_Buffer;
        Rowstride          : in     Glib.Gint;
        Cmap               : in     Gdk_Rgb_Cmap);

Same kind of function as above, but for different buffer types (???).
Package Gdk.Threads
*******************

This package provides simple primitives to write multi-threaded
applications with GtkAda. See the GtkAda User's Guide for more details
(section Tasking with GtkAda).

Subprograms
===========

procedure Init
     (Vtable             :        System.Address
                            := System.Null_Address);

Initialize the Gdk internal threading support.
This procedure must be called before any call to Enter or Leave.   The
parameter Vtable should never be used for now.
procedure Enter;

Take the GtkAda global lock.
See the GtkAda User's Guide for more details (section Tasking with
GtkAda).
procedure Leave;

Release the GtkAda global lock.
See the GtkAda User's Guide for more details (section Tasking with
GtkAda).
Package Glade
*************

This package is a binding to the libglade library that provides routines
to create widgets dynamically from an XML definition file.   *note
Package_Glade.XML::.

Subprograms
===========

procedure Init;

must be called before use of libglade
procedure Gnome_Init;

This is defined in libglade-gnome.
It should be used instead of Glade_Init if you want to use the  GNOME
widget set with libglade.
procedure Bonobo_Init;

This is defined in libglade-bonobo
It should be used instead of Glade_Init if you want to use the GNOME
widget set with included Bonobo controls with libglade.
procedure Load_Module
     (Module             :        String);

Load the named dynamic module.
Basically it is loaded, and the glade_init_module function is called.
This function should do any library initialisation and call
glade_register_widgets.
Package Glade.XML
*****************

This package is a binding to the libglade library that provides routines
to create widgets dynamically from an XML definition file.   *note
Package_Glade::.

Types
=====

type Custom_Widget_Handler is access function
     (XML       : access Glade_XML_Record'Class;

Subprograms
===========

procedure Gtk_New
     (XML                : out    Glade_XML;
        Fname              :        String;
        Root               :        String := "";
        Domain             :        String := "");

Create a new Glade_XML.
Fname is the file name of the XML file to load into XML.   Root if not
null is the root widget to start from.   Domain if not null is the
international domain to use for string  translation. *note
Package_Gtkada.Intl:: for more information.
procedure Gtk_New_From_Memory
     (XML                : out    Glade_XML;
        Buffer             :        String;
        Root               :        String := "";
        Domain             :        String := "");

Create a new Glade_XML.
Similar to previous procedure, but the XML contents are read from memory
directly.
procedure Initialize_From_Memory
     (XML                : access Glade_XML_Record'Class;
        Buffer             :        String;
        Root               :        String := "";
        Domain             :        String := "");

Internal initialization function.
See the section "Creating your own widgets" in the documentation.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Glade_XML.
procedure Signal_Connect
     (XML                : access Glade_XML_Record;
        Handlername        :        String;
        Func               :        System.Address;
        User_Data          :        System.Address);

procedure Signal_Autoconnect
     (XML                : access Glade_XML_Record);

Use gmodule to connect signals automatically.
Basically a symbol with the name of the signal handler is searched for,
and that is connected to the associated symbols. So setting
gtk_main_quit as a signal handler for the destroy signal of a window
will do what you expect.
function Get_Widget
     (XML                : access Glade_XML_Record;
        Name               :        String)
        return Gtk_Widget;

function Get_Widget_By_Long_Name
     (XML                : access Glade_XML_Record;
        Longname           :        String)
        return Gtk_Widget;

function Relative_File
     (XML                : access Glade_XML_Record;
        Filename           :        String)
        return String;

function Get_Widget_Name
     (Widget             : access Gtk_Widget_Record'Class)
        return String;

function Get_Widget_Long_Name
     (Widget             : access Gtk_Widget_Record'Class)
        return String;

function Get_Widget_Tree
     (Widget             : access Gtk_Widget_Record'Class)
        return Glade_XML;

procedure Set_Custom_Handler
     (Handler            :        Custom_Widget_Handler);

Package Glade_XML
*****************

Package Gtk
***********

This package provides some basic Gtk+ functionalities such as getting
the  version number. This is the top level package of the Gtk widget
hierarchy.   For general GtkAda initializations, *note
Package_Gtk.Main::.

Types
=====

type Gtk_Notebook_Page is new Gdk.C_Proxy;

A page of the notebook.   It can contain a single child, and is also
associated with a tab  label used to select that page in the notebook.
type Gtk_Rc_Style is new Gdk.C_Proxy;

Type used to handle resource styles.   See package Gtk.Rc for more
details.
type Gtk_Type is new Guint;

This type describes an internal type in Gtk+.   You shouldn't have to
use it in your own applications, however it might  be useful sometimes.
Every widget type is associated with a specific value, created
dynamically at run time the first time you instantiate a widget of that
type (thus if you have never used a Gtk_File_Selection, it won't have
any Gtk_Type associated with it).   You can get the exact type value
for each type by using the functions  Get_Type provided in all the
packages in GtkAda.   You can get the specific value for an existing
widget by using the  function Gtk.Object.Get_Type.
type Root_Type is tagged private;

The base type of the hierarchy in GtkAda. It basically gives access  to
an underlying C object. This is not a controlled type, for efficiency
reasons, and because gtk+ takes care of memory management on its own.
Subprograms
===========

function Major_Version         return Guint;

Return the major version number for Gtk+.
Note that this is not necessarily the same as for GtkAda.   If the
version is 1.2.6, returns 1.
function Minor_Version         return Guint;

Return the minor version number for Gtk+.
Note that this is not necessarily the same as for GtkAda.   If the
version is 1.2.6, returns 2.
function Micro_Version         return Guint;

Return the micro version number for Gtk+.
Note that this is not necessarily the same as for GtkAda.   If the
version is 1.2.6, returns 6.
function Gtk_Type_Gdk_Event    return Gtk_Type;

Return the type corresponding to a Gdk_Event.
Note that this function must be called after Gtk+ has been initialized.
function Type_Name
     (Type_Num           : in     Gtk_Type)
        return String;

Return the type name corresponding to a Gtk_Type.
This might be useful in debug messages.
function Type_From_Name
     (Name               : in     String)
        return Gtk_Type;

Convert a string to the matching type.
Name should be the C widget's name, such as GtkScrollbar or GtkButton,
rather than the Ada name.
function Is_Created
     (Object             : in     Root_Type'Class)
        return Boolean;

Return True if the associated C object has been created, False if no
C object is associated with Object.   This is not the same as testing
whether an access type (for instance  any of the widgets) is "null",
since this relates to the underlying  C object.
Interfacing with C
------------------

The following functions are made public so that one can easily create
new widgets outside the Gtk package hierarchy.   Only experienced users
should make use of these functions.

function Get_Object
     (Object             : access Root_Type'Class)
        return System.Address;

Access the underlying C pointer.
procedure Set_Object
     (Object             : access Root_Type'Class;
        Value              : in     System.Address);

Modify the underlying C pointer.
procedure Initialize_User_Data
     (Obj                : access Root_Type'Class);

Sets a user data field for the C object associated with Obj.
This field will be used so that it is possible, knowing a  C object, to
get the full ada object.
function Get_User_Data
     (Obj                : in     System.Address;
        Stub               : in     Root_Type'Class)
        return Root_Type_Access;

Get the user data that was set by GtkAda.
If the Data is not set, return a new access type, that points to  a
structure with the same tag as Stub.
function Unchecked_Cast
     (Obj                : access Root_Type'Class;
        Stub               :        Root_Type'Class)
        return Root_Type_Access;

Cast Obj in an object of tag Stub'Class.
Return the resulting object and free the memory pointed by Obj.
function Count_Arguments
     (The_Type           :        Gtk_Type;
        Name               : in     String)
        return Guint;

Return the number of arguments used in the handlers for the signal.
Note that in the Connect functions, we always test whether the user
has asked for *at most* the number of arguments defined by gtk+ for the
callback. This is because having less argument is authorized (the
extra parameters passed by gtk+ will simply be ignored), whereas having
more arguments is impossible (they would never be set).   Note that we
provide this procedure here to avoid circularities.
function Argument_Type
     (The_Type           :        Gtk_Type;
        Name               : in     String;
        Num                : in     Gint)
        return Gtk_Type;

Return the type of the num-th argument for the handlers of signal name.
If Num is negative, return the type returned by the handlers for this
signal.   Note that we provide this procedure here to avoid
circularities.
Package Gtk.Accel`_'Label
*************************

The Gtk_Accel_Label widget is a child of Gtk_Label that also displays an
accelerator key on the right of the label text, e.g. 'Ctl+S'. It is
commonly used in menus to show the keyboard short-cuts for commands.

   The accelerator key to display is not set explicitly. Instead, the
Gtk_Accel_Label displays the accelerators which have been added to a
particular widget. This widget is set by calling Set_Accel_Widget.

   For example, a Gtk_Menu_Item widget may have an accelerator added to
emit  the "activate" signal when the 'Ctl+S' key combination is pressed.
A Gtk_Accel_Label is created and added to the Gtk_Menu_Item, and
Set_Accel_Widget is called with the Gtk_Menu_Item as the second
argument.   The Gtk_Accel_Label will now display 'Ctl+S' after its
label.

   Note that creating a Gtk_Menu_Item with Gtk_New and a non null
"label"  parameter (ditto for Gtk_Check_Menu_Item and
Gtk_Radio_Menu_Item)  automatically adds a Gtk_Accel_Label to the
Gtk_Menu_Item and calls  Set_Accel_Widget to set it up for you.

   A Gtk_Accel_Label will only display accelerators which have the
Accel_Visible (see Gtk.Accel_Group) flag set. A Gtk_Accel_Label can
display  multiple accelerators and even signal names, though it is
almost always  used to display just one accelerator key.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Misc           (*note Package_Gtk.Misc::)
              \___ Gtk_Label       (*note Package_Gtk.Label::)
                 \___ Gtk_Accel_Label (*note Package_Gtk.Accel_Label::)

Subprograms
===========

procedure Gtk_New
     (Accel_Label        : out    Gtk_Accel_Label;
        Str                : in     String);

Create a new Gtk_Accel_Label.
Str is the label string.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Accel_Label.
function Get_Accel_Width
     (Accel_Label        : access Gtk_Accel_Label_Record)
        return Guint;

Return the width needed to display the accelerator key(s).
This is used by menus to align all of the Gtk_Menu_Item widgets, and
shouldn't be needed by applications.
procedure Set_Accel_Widget
     (Accel_Label        : access Gtk_Accel_Label_Record;
        Accel_Widget       : access Gtk.Widget.Gtk_Widget_Record'Class);

Set the widget whose accelerators are to be shown.
Accel_Widget is the widget whose accelerators are to be displayed.
function Refetch
     (Accel_Label        : access Gtk_Accel_Label_Record)
        return Boolean;

Recreate the string representing the accelerator keys.
This should not be needed since the string is automatically updated
whenever accelerators are added or removed from the associated widget.
Always return False.
Example
=======

      Creating a simple menu item with an accelerator key.
     
      Save_Item   : Gtk_Menu_Item;
      Accel_Group : Gtk_Accel_Group;
     
      --  Create a Gtk_Accel_Group and add it to the window.
      Gtk_New (Accel_Group);
      Add_Accel_Group (Window, Accel_Group);
     
      --  Create the menu item using the convenience function.
      Gtk_New (Save_Item, "Save");
      Show (Save_Item);
      Add (Menu, Save_Item);
     
      --  Now add the accelerator to the Gtk_Menu_Item. Note that since we called
      --  Gtk_New with a label to create the Gtk_Menu_Item the
      --  Gtk_Accel_Label is automatically set up to display the Gtk_Menu_Item
      --  accelerators. We just need to make sure we use Accel_Visible here.
     
      Add_Accelerator
        (Save_Item, "activate", Accel_Group,
         GDK_S, Control_Mask, Accel_Visible);

Package Gtk.Adjustment
**********************

This object represents an adjustable bounded value.   It is used in
many other widgets that have such internal values,  like Gtk_Scrollbar,
Gtk_Spin_Button, Gtk_Range, ...   Modifying the value of these widgets
is done through their  associated adjustments.

   The modification of the value is left to the user, who should  call
Value_Changed or Changed to emit the relevant signals.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Data              (*note Package_Gtk.Data::)
           \___ Gtk_Adjustment     (*note Package_Gtk.Adjustment::)

Signals
=======

   * "changed"

     procedure Handler (Adjustment : access
     Gtk_Adjustment_Record'Class);
     This signal is emitted every time one of the parameters is
     modified, except the value.

   * "value_changed"

     procedure Handler (Adjustment : access
     Gtk_Adjustment_Record'Class);
     This signal is emitted every time the value of the adjustment is
     modified


Subprograms
===========

procedure Gtk_New
     (Adjustment         : out    Gtk_Adjustment;
        Value              : in     Gfloat;
        Lower              : in     Gfloat;
        Upper              : in     Gfloat;
        Step_Increment     : in     Gfloat;
        Page_Increment     : in     Gfloat;
        Page_Size          : in     Gfloat);

Create a new adjustment.
Value is the initial value of the adjustment. It must be in the  range
(Lower .. Upper) and the adjustment's value will never be  outside this
range.   Step_Increment is the value used to make minor adjustments,
such  as when the user clicks on the arrows of a scrollbar.
Page_Increment is used to make major adjustments, such as when  the
user clicks in the through on a scrollbar.   Page_Size is the size of
the area that is currently visible  (for instance in a
Gtk_Scrolled_Window).
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Adjustment.
Read functions
--------------

function Get_Value
     (Adjustment         : access Gtk_Adjustment_Record)
        return Gfloat;

Return the current value of the adjustment.
function Get_Lower
     (Adjustment         : access Gtk_Adjustment_Record)
        return Gfloat;

Return the lower bound of the adjustment.
function Get_Upper
     (Adjustment         : access Gtk_Adjustment_Record)
        return Gfloat;

Return the upper bound of the adjustment.
function Get_Step_Increment
     (Adjustment         : access Gtk_Adjustment_Record)
        return Gfloat;

Return the step increment of the adjustment.
function Get_Page_Increment
     (Adjustment         : access Gtk_Adjustment_Record)
        return Gfloat;

Return the page increment of the adjustment.
function Get_Page_Size
     (Adjustment         : access Gtk_Adjustment_Record)
        return Gfloat;

Return the page size of the adjustment.
Write functions
---------------

procedure Set_Upper
     (Adjustment         : access Gtk_Adjustment_Record;
        Upper              : in     Gfloat);

Modify the upper bound of the adjustment.
You should call Changed after modifying this value.
procedure Set_Lower
     (Adjustment         : access Gtk_Adjustment_Record;
        Lower              : in     Gfloat);

Modify the lower bound of the adjustment.
You should call Changed after modifying this value.
procedure Set_Value
     (Adjustment         : access Gtk_Adjustment_Record;
        Value              : in     Gfloat);

Modify the current value of the adjustment.
You do not need to call Value_Changed after modifying this value,  this
is done automatically.
procedure Set_Page_Size
     (Adjustment         : access Gtk_Adjustment_Record;
        Page_Size          : in     Gfloat);

Modify the page size of the adjustment.
You should call Changed after modifying this value.
procedure Set_Page_Increment
     (Adjustment         : access Gtk_Adjustment_Record;
        Page_Increment     : in     Gfloat);

Modify the page increment of the adjustment.
You should call Changed after modifying this value.
procedure Set_Step_Increment
     (Adjustment         : access Gtk_Adjustment_Record;
        Step_Increment     : in     Gfloat);

Modify the step increment of the adjustment.
You should call Changed after modifying this value.
Misc functions
--------------

procedure Clamp_Page
     (Adjustment         : access Gtk_Adjustment_Record;
        Lower              : in     Gfloat;
        Upper              : in     Gfloat);

Update the Adjustment value to ensure that the range between Lower and
Upper is in the current page (i.e. between value and value +
page_size). If the range is larger than the page size, then only the
start of it will be in the current page.   A "value_changed" signal
will be emitted if the value is changed.
Signals emission
----------------

procedure Changed
     (Adjustment         : access Gtk_Adjustment_Record);

Emit the "changed" signal on Adjustment.
This warns any listener that some field other than the value has been
changed.
procedure Value_Changed
     (Adjustment         : access Gtk_Adjustment_Record);

Emit the "value_changed" signal on Adjustment.
This warns any listener that the value has been changed.
Example
=======


      The meaning of the most important fields can be explained on the
      following figure (imagine this is a scrollbar):
     
         [------|=================|------------------]
        lower    value        value + page_size       upper

Package Gtk.Alignment
*********************

A Gtk_Alignment controls the size and alignment of its single child
inside  the area allocated to the alignment widget.

   The scale/size settings indicate how much the child will expand to
fill  the container. The values should be in the range 0.0 (no
expansion) to 1.0  (full expansion). Note that the scale only indicates
the minimal size for  the child, it does not force an absolute size.

   The alignment settings indicate where in the alignment widget the
child  should be located. The values are in the range 0.0 (top or left)
to 1.0  (bottom or right). These settings are irrelevant if the child
is fully  expanded.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Alignment (*note Package_Gtk.Alignment::)

Subprograms
===========

procedure Gtk_New
     (Alignment          : out    Gtk_Alignment;
        Xalign             : in     Gfloat;
        Yalign             : in     Gfloat;
        Xscale             : in     Gfloat;
        Yscale             : in     Gfloat);

Create a new alignment widget, with initial values for the settings.
See the description of the settings above.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Alignment.
procedure Set
     (Alignment          : access Gtk_Alignment_Record;
        Xalign             : in     Gfloat;
        Yalign             : in     Gfloat;
        Xscale             : in     Gfloat;
        Yscale             : in     Gfloat);

Modify the settings for the alignment.
See the description of the settings above.
function Get_Xalign
     (Alignment          : access Gtk_Alignment_Record)
        return Gfloat;

Return the X alignment value.
Its value is in the range 0.0 .. 1.0, from left to right.
function Get_Yalign
     (Alignment          : access Gtk_Alignment_Record)
        return Gfloat;

Return the Y alignment value.
Its value is in the range 0.0 .. 1.0, from top to bottom.
function Get_Xscale
     (Alignment          : access Gtk_Alignment_Record)
        return Gfloat;

Return the X expansion value, in the range 0.0 .. 1.0.
0.0 means no expansion while 1.0 means full expansion.
function Get_Yscale
     (Alignment          : access Gtk_Alignment_Record)
        return Gfloat;

Return the Y expansion value, in the range 0.0 .. 1.0
0.0 means no expansion while 1.0 means full expansion.
Package Gtk.Arguments
*********************

This package provides a convenient interface to C, providing easy
conversion from a C's (void*) pointer to any Ada type used in  GtkAda.
Although this package has been designed to be easily  reusable by being
as general as possible, these functions are mainly  used when writing
callbacks and/or marshallers (see Gtk.Marshallers  and Gtk.Handlers).

   Therefore, the main type in this package is Gtk_Args, which is the
equivalent of the C's (GtkArg*) array, i.e an array of unions.  This
package provides functions to extract the values from this type.

Package Gtk.Arrow
*****************

Gtk_Arrow should be used to draw simple arrows that need to point in one
of the four cardinal directions (up, down, left, or right). The style
of  the arrow can be one of shadow in, shadow out, etched in, or etched
out.   Note that these directions and style types may be ammended in
versions of  Gtk to come.

   Gtk_Arrow will fill any space alloted to it, but since it is
inherited from  Gtk_Misc, it can be padded and/or aligned, to fill
exactly the space you  desire.

   Arrows are created with a call to Gtk_New. The direction or style of
an  arrow can be changed after creation by using Set.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Misc           (*note Package_Gtk.Misc::)
              \___ Gtk_Arrow       (*note Package_Gtk.Arrow::)

Subprograms
===========

procedure Gtk_New
     (Arrow              : out    Gtk_Arrow;
        Arrow_Type         : in     Gtk_Arrow_Type;
        Shadow_Type        : in     Gtk_Shadow_Type);

Create a new arrow widget.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Arrow.
procedure Set
     (Arrow              : access Gtk_Arrow_Record;
        Arrow_Type         : in     Gtk_Arrow_Type;
        Shadow_Type        : in     Gtk_Shadow_Type);

Set the direction and style of the Arrow.
Package Gtk.Aspect`_'Frame
**************************

A Gtk_Aspect_Frame is the same type of widget as a frame, but it
constrains its child to a specific aspect ratio between its width  and
its height.

   This ratio can either be given explicitly by the user, or chosen
from the  widget's initial size request (might be different from the
one if was  actually given).

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Frame    (*note Package_Gtk.Frame::)
                    \___ Gtk_Aspect_Frame (*note Package_Gtk.Aspect_Frame::)

Subprograms
===========

procedure Gtk_New
     (Aspect_Frame       : out    Gtk_Aspect_Frame;
        Label              : in     String;
        Xalign             : in     Gfloat;
        Yalign             : in     Gfloat;
        Ratio              : in     Gfloat;
        Obey_Child         : in     Boolean);

Create a new Aspect_Frame.
If Label is the empty string, then the frame won't have any title.
Xalign and Yalign are constrained to the range 0.0 .. 1.0 and specify
the alignment of the child inside the frame (0.0 means either left or
top aligned, 1.0 means right or bottom aligned).   Ratio is the ratio
width/height for the child of the frame.   If Obey_Child is True, then
Ratio is ignored and the effective ratio  is taken from the child's
requisition (ie the ideal size it asked  for at creation time).
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Aspect_Frame.
procedure Set
     (Aspect_Frame       : access Gtk_Aspect_Frame_Record;
        Xalign             : in     Gfloat;
        Yalign             : in     Gfloat;
        Ratio              : in     Gfloat;
        Obey_Child         : in     Boolean);

Modify the frame's parameters (see the description of these parameters
for Gtk_New.
function Get_Ratio
     (Aspect_Frame       : access Gtk_Aspect_Frame_Record)
        return Gfloat;

Return the current ratio for the frame (width / height)
function Get_Xalign
     (Aspect_Frame       : access Gtk_Aspect_Frame_Record)
        return Gfloat;

Return the current X alignment for the frame.
0.0 means the child is left aligned, 1.0 that it is right aligned.
function Get_Yalign
     (Aspect_Frame       : access Gtk_Aspect_Frame_Record)
        return Gfloat;

Return the current Y alignment for the frame.
1.0 means the child is top aligned, 1.0 that it is bottom aligned.
Package Gtk.Bin
***************

Base class for containers that have only one child.   This widget can
not be instantiated directly.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)

Subprograms
===========

function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Bin.
function Get_Child
     (Bin                : access Gtk_Bin_Record)
        return Gtk_Widget;

Return the child associated with Bin.
Package Gtk.Box
***************

A box is a container that can have multiple children, organized either
horizontally or vertically. Two subtypes are provided, Gtk_Hbox and
Gtk_Vbox, to conform to the C API. In Ada, you do not need to
distinguish between the two, but note that the Gtk_Box type is
conceptually  an abstract type: there is no way to create a "Gtk_Box",
only ways to  create either an horizontal box, or a vertical box.

   Children can be added to one of two positions in the box, either at
the  beginning (ie left or top) or at the end (ie right or bottom).
Each of  these positions can contain multiple widgets.

   Every time a child is added to the start, it is placed to the right
(resp. the bottom) of the previous widget added to the start.

   Every time a child is added to the end, it is placed to the left
(resp.   the top) of the previous widget added to the end.

   There are a number of parameters to specify the behavior of the box
when  it is resized, and how the children should be reorganized and/or
resized.

   See the testgtk example in the GtkAda distribution to see concrete
examples  on how all the parameters for the boxes work.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)

Subprograms
===========

procedure Gtk_New_Vbox
     (Box                : out    Gtk_Box;
        Homogeneous        : in     Boolean := False;
        Spacing            : in     Gint := 0);

Create a new vertical box.
Its children will be placed one above the other.   If Homogeneous is
True, all the children will be allocated exactly the  same screen
real-estate, whereas if it is False, each child can have  its own size.
Spacing is the space left between two adjacent children.
procedure Gtk_New_Hbox
     (Box                : out    Gtk_Box;
        Homogeneous        : in     Boolean := False;
        Spacing            : in     Gint := 0);

Create a new horizontal box.
Its children will be placed one besides the other.   If Homogeneous is
True, all the children will be allocated exactly the  same screen
real-estate, whereas if it is False, each child can have  its own size.
Spacing is the space left between two adjacent children.
procedure Initialize_Vbox
     (Box                : access Gtk_Box_Record'Class;
        Homogeneous        : in     Boolean := False;
        Spacing            : in     Gint := 0);

Internal initialization function.
See the section "Creating your own widgets" in the documentation.
procedure Initialize_Hbox
     (Box                : access Gtk_Box_Record'Class;
        Homogeneous        : in     Boolean := False;
        Spacing            : in     Gint := 0);

Internal initialization function.
See the section "Creating your own widgets" in the documentation.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Box.
function Get_Hbox_Type         return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_HBox.
function Get_Vbox_Type         return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_VBox.
procedure Pack_Start
     (In_Box             : access Gtk_Box_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Expand             : in     Boolean := True;
        Fill               : in     Boolean := True;
        Padding            : in     Gint := 0);

Add a new child to the beginning of the box (ie left or top part).
It is added to the right (resp. the bottom) of the previous child added
to the beginning of the box. Note that a child added to the beginning
of  the box will always remain on the left (resp. top) of all the
children  added to the end of the box.

   If Expand is False, the size allocated for each size will be the one
requested by the widget (or the largest child if Homogeneous was set to
true when the box was created). Otherwise, the total size of the box is
divided between all the children. Note that this does not mean that the
children have to occupy all the space given to them...

   If Fill is True, then the widget will be resized so as to occupy all
the  space allocated to them. This is only relevant if Expand is True,
since  otherwise the space allocated is the same one as the child's
size.

   Padding is the amount of space left around the widget when it is
drawn.
procedure Pack_End
     (In_Box             : access Gtk_Box_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Expand             : in     Boolean := True;
        Fill               : in     Boolean := True;
        Padding            : in     Gint := 0);

Add a new child to the end of the box (ie right or bottom part).
It is added to the left (resp. top) of the previous child added to the
end of the box. Note that a child added to the end of the box will
always remain on the right (resp. bottom) of all the children added to
the beginning of the box.

   See Pack_Start for an explanation of all the parameters.
procedure Pack_Start_Defaults
     (In_Box             : access Gtk_Box_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class);

This is the same as Pack_Start if you use the default parameter values.
It is provided for backward compatibility only.
procedure Pack_End_Defaults
     (In_Box             : access Gtk_Box_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class);

This is the same as Pack_End if you use the default parameter values.
It is provided for backward compatibility only.
procedure Set_Homogeneous
     (In_Box             : access Gtk_Box_Record;
        Homogeneous        : in     Boolean);

Modify the homogeneous parameter for the box.
If the box is homogeneous, then all its children will be allocated the
same amount of space, even if they are not resized to occupy it
(depending on the parameters given to Pack_Start and Pack_End).
procedure Set_Spacing
     (In_Box             : access Gtk_Box_Record;
        Spacing            : in     Gint);

Modify the spacing for the box.
I.e. the amount of space left between two adjacent children.
procedure Reorder_Child
     (In_Box             : access Gtk_Box_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Pos                : in     Guint);

Move the Child to a new position.
Nothing is done if Child is not in the box.   Pos starts at 0, and
indicates the position of the child relative to all  other children, no
matter where they were packed  (the beginning or the  end of the box).
procedure Query_Child_Packing
     (In_Box             : access Gtk_Box_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Expand             : out    Boolean;
        Fill               : out    Boolean;
        Padding            : out    Gint;
        PackType           : out    Gtk.Enums.Gtk_Pack_Type);

Get information on how the child was packed in the box.
The results are undefined if Child is not in the box.
procedure Set_Child_Packing
     (In_Box             : access Gtk_Box_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Expand             : in     Boolean;
        Fill               : in     Boolean;
        Padding            : in     Gint;
        PackType           : in     Gtk.Enums.Gtk_Pack_Type);

Modify the packing for a child.
function Get_Child
     (Box                : access Gtk_Box_Record;
        Num                : in     Gint)
        return Gtk.Widget.Gtk_Widget;

Return the Num-th child of the box, or null if there is no such child.
Package Gtk.Button
******************

This package implements a general button widget. This button can  be
clicked on by the user to start any action.   This button does not have
multiple states, it can just be temporarily  pressed while the mouse is
on it, but does not keep its pressed state.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Button   (*note Package_Gtk.Button::)

Signals
=======

   * "clicked"

     procedure Handler (Button : access Gtk_Button_Record'Class);
     Emitted when the button has been clicked on by the user. This is
     the signal you should use to start your own actions.

   * "enter"

     procedure Handler (Button : access Gtk_Button_Record'Class);
     Emitted when the mouse enters the button. The clicked signal can
     only be emitted when the mouse is inside the button.

   * "leave"

     procedure Handler (Button : access Gtk_Button_Record'Class);
     Emitted when the mouse leaves the button.

   * "pressed"

     procedure Handler (Button : access Gtk_Button_Record'Class);
     Emitted when the user presses the mouse button on the widget. The
     default implementation modifies the widget state and its visual
     aspect.

   * "released"

     procedure Handler (Button : access Gtk_Button_Record'Class);
     Emitted when the user releases the mouse button and is inside of
     the widget. The default implementation modifies the widget state
     and its visual aspect. If the mouse is still inside the widget,
     then the "clicked" signal is emitted.


Subprograms
===========

procedure Gtk_New
     (Button             : out    Gtk_Button;
        Label              : in     String := "");

Create a new button.
if Label is not the empty string, then the text appears in the  button
(and the child of the button is a Gtk_Label). On the other  hand, if
Label is the empty string, then no child is created for  the button and
it is your responsibility to add one. This is the  recommended way to
put a pixmap inside the button.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Button.
procedure Set_Relief
     (Button             : access Gtk_Button_Record;
        NewStyle           : in     Gtk.Enums.Gtk_Relief_Style);

Modify the relief style for the button.
This modifies only its visual aspect, not its behavior.
function Get_Relief
     (Button             : access Gtk_Button_Record)
        return Gtk.Enums.Gtk_Relief_Style;

Get the current relief style for the button
Signals emission
----------------

procedure Pressed
     (Button             : access Gtk_Button_Record);

Send the "pressed" signal to the button
procedure Released
     (Button             : access Gtk_Button_Record);

Send the "release" signal to the button
procedure Clicked
     (Button             : access Gtk_Button_Record);

Send the "clicked" signal to the button
procedure Enter
     (Button             : access Gtk_Button_Record);

Send the "enter" signal to the button
procedure Leave
     (Button             : access Gtk_Button_Record);

Send the "leave" signal to the button
Package Gtk.Button`_'Box
************************

A Gtk_Button_Box is a special type of Gtk_Box specially tailored to
contain  buttons.

   This is only a base class for Gtk_Hbutton_Box and Gtk_Vbutton_Box
which  provide a way to arrange their children horizontally (resp.
vertically).   You can not instantiate a Gtk_Button_Box directly, and
have to use one the  above two instead.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Button_Box (*note Package_Gtk.Button_Box::)

Subprograms
===========

function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Button_Box.
procedure Set_Child_Size_Default
     (Min_Width          : in     Gint;
        Min_Height         : in     Gint);

Set the default size for the children of the button boxes.
This is the minimal size that the children will have (in pixels).
These default values apply to all the Button_Boxes created in your
application, except for boxes where Set_Child_Size has been called.
procedure Get_Child_Size_Default
     (Min_Width          : out    Gint;
        Min_Height         : out    Gint);

Return the default size for the children of the button_boxes.
procedure Set_Child_Ipadding_Default
     (Ipad_X             : in     Gint;
        Ipad_Y             : in     Gint);

Set the default padding (the empty space left around all children).
This will be used for all the button boxes in your application,  except
those for which Set_Child_Ipadding has been used.
procedure Get_Child_Ipadding_Default
     (Ipad_X             : out    Gint;
        Ipad_Y             : out    Gint);

Return the default padding of the button boxes.
procedure Set_Spacing
     (Button_Box         : access Gtk_Button_Box_Record;
        Spacing            : in     Gint);

Set the spacing (the space left between two adjacent children).
This is done for all the button boxes. Note that there is a default
spacing set for Gtk_Hbutton_boxes and Gtk_Vbutton_boxes.
function Get_Spacing
     (Button_Box         : access Gtk_Button_Box_Record)
        return Gint;

Return the spacing used for the button box.
procedure Set_Layout
     (Button_Box         : access Gtk_Button_Box_Record;
        Layout_Style       : in     Enums.Gtk_Button_Box_Style);

Set the layout to use for the box.
There are four such styles:

   * Buttonbox_Spread: The children are spread regularly across the box

   * Buttonbox_Edge  : Same as Spread, except that the first and last
                       children are aligned on the border of the box.

   * Buttonbox_Start : The children are put as much to the left (resp.
     top)                      as possible in the box.

   * Buttonbox_End   : The children are put as much to the right
                  (resp. bottom) as possible in the box.

function Get_Layout
     (Button_Box         : access Gtk_Button_Box_Record)
        return Enums.Gtk_Button_Box_Style;

Return the layout used in the box.
procedure Set_Child_Size
     (Button_Box         : access Gtk_Button_Box_Record;
        Min_Width          : in     Gint;
        Min_Height         : in     Gint);

Set the size to use for children of this specific box.
You can modify the size for all the boxes at once by using
Set_Child_Size_Default.
procedure Get_Child_Size
     (Button_Box         : access Gtk_Button_Box_Record;
        Min_Width          : out    Gint;
        Min_Height         : out    Gint);

Return the size to use for children of this specific box.
Min_Width and Min_Height are set to -1 if this widget uses the default
sizes that are set by Set_Child_Size_Default.
procedure Set_Child_Ipadding
     (Button_Box         : access Gtk_Button_Box_Record;
        Ipad_X             : in     Gint;
        Ipad_Y             : in     Gint);

Set the padding to use for the children of this specific box.
You can modify the default padding by using Set_Child_Ipadding_Default.
procedure Get_Child_Ipadding
     (Button_Box         : access Gtk_Button_Box_Record;
        Ipad_X             : out    Gint;
        Ipad_Y             : out    Gint);

Return the padding to use for children of this specific box.
Ipad_X and Ipad_Y are set to -1 if this widget uses the default  values
that are set by Set_Child_Ipadding_Default.
Package Gtk.Calendar
********************

Gtk_Calendar is a widget that displays a calendar, one month at a time.
It can be created with Gtk_New.

   The month and year currently displayed can be altered with
Select_Month.   The exact day can be selected from the displayed month
using Select_Day.

   The way in which the calendar itself is displayed can be altered
using  Display_Options.

   The selected date can be retrieved from a Gtk_Calendar using
Get_Date.

   If performing many 'mark' operations, the calendar can be frozen to
prevent  flicker, using Freeze, and 'thawed' again using Thaw.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Calendar       (*note Package_Gtk.Calendar::)

Signals
=======

   * "month_changed"

     procedure Handler (Calendar : access Gtk_Calendar_Record'Class);
     Emitted when the user clicks a button to change the selected month
     on a calendar.


Types
=====

type Gtk_Calendar_Display_Options is private;

Subprograms
===========

function "and"
     (Left, Right        :        Gtk_Calendar_Display_Options)
        return Gtk_Calendar_Display_Options;

procedure Gtk_New
     (Widget             : out    Gtk_Calendar);

Create a new Calendar that points to the current date.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Calendar.
function Select_Month
     (Calendar           : access Gtk_Calendar_Record;
        Month              : in     Guint;
        Year               : in     Guint)
        return Boolean;

Shift the calendar to a different month/year.
Return True if sucessful.
procedure Select_Day
     (Calendar           : access Gtk_Calendar_Record;
        Day                : in     Guint);

Select a day from the current month.
Only one day can be selected at a time.
function Mark_Day
     (Calendar           : access Gtk_Calendar_Record;
        Day                : in     Guint)
        return Boolean;

Set a specified Day as marked in the Calendar.
This is shown visually as a painted box around the Day.   Note that
several days can be marked.   Return True if successful.
function Unmark_Day
     (Calendar           : access Gtk_Calendar_Record;
        Day                : in     Guint)
        return Boolean;

Undo the marking of Day.
Return True if sucessful.
procedure Clear_Marks
     (Calendar           : access Gtk_Calendar_Record);

Clear all the marks set by Mark_Day.
procedure Display_Options
     (Calendar           : access Gtk_Calendar_Record;
        Flags              : in     Gtk_Calendar_Display_Options);

Change the display options.
See individual Display_Option flags for more details.
procedure Get_Date
     (Calendar           : access Gtk_Calendar_Record;
        Year               : out    Guint;
        Month              : out    Guint;
        Day                : out    Guint);

Return the date currently selected.
procedure Freeze
     (Calendar           : access Gtk_Calendar_Record);

Lock the display of the calendar until it is thawed.
procedure Thaw
     (Calendar           : access Gtk_Calendar_Record);

Defrost a calendar.
All the changes made since the last Freeze are displayed.
Package Gtk.Check`_'Button
**************************

A Gtk_Check_Button places a discrete Gtk_Toggle_Button next to a widget,
(usually a Gtk_Label).

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Button   (*note Package_Gtk.Button::)
                    \___ Gtk_Toggle_Button (*note Package_Gtk.Toggle_Button::)
                       \___ Gtk_Check_Button (*note Package_Gtk.Check_Button::)

Subprograms
===========

procedure Gtk_New
     (Check_Button       : out    Gtk_Check_Button;
        With_Label         : in     String := "");

Initialize a button.
if With_Label is "", then no widget is associated with the button, and
any widget can be added to the button (with Gtk.Container.Add).
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Check_Button.
Package Gtk.Check`_'Menu`_'Item
*******************************

A Gtk_Check_Menu_Item is a menu item that maintains the state of a
boolean  value in addition to a Gtk_Menu_Item's usual role in
activating application  code.

   A check box indicating the state of the boolean value is displayed
at the  left side of the Gtk_Menu_Item. Activating the Gtk_Menu_Item
toggles the  value.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Item     (*note Package_Gtk.Item::)
                    \___ Gtk_Menu_Item (*note Package_Gtk.Menu_Item::)
                       \___ Gtk_Check_Menu_Item (*note Package_Gtk.Check_Menu_Item::)

Signals
=======

   * "toggled"

     procedure Handler
     (Check_Menu_Item : access Gtk_Check_Menu_Item_Record'Class);
     Emitted when the state of the check box is changed.  A signal
     handler can call Get_Active to discover the new state.


Subprograms
===========

procedure Gtk_New
     (Check_Menu_Item    : out    Gtk_Check_Menu_Item;
        Label              : in     String := "");

Create a new Gtk_Check_Menu_Item with a label, if label isn't null.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Calendar.
procedure Set_Show_Toggle
     (Check_Menu_Item    : access Gtk_Check_Menu_Item_Record;
        Always             : in     Boolean);

Control whether the check box is shown at all times.
Normally the check box is shown only when it is active or while the
menu item is selected.
procedure Set_Always_Show_Toggle
     (Check_Menu_Item    : access Gtk_Check_Menu_Item_Record;
        Always             : in     Boolean);

Same as Set_Show_Toggle.
Provided to simplify automated tools, such as Gate.
procedure Set_Active
     (Check_Menu_Item    : access Gtk_Check_Menu_Item_Record;
        Is_Active          : in     Boolean);

Set the active state of the menu item's check box.
procedure Toggled
     (Check_Menu_Item    : access Gtk_Check_Menu_Item_Record);

Emit the "toggled" signal.
function Get_Active
     (Check_Menu_Item    : access Gtk_Check_Menu_Item_Record)
        return Boolean;

Return True if the Item is active
Package Gtk.Clist
*****************

This widget displays a multi-column list. Each line is made of  a
number of column, each being able to display any kind of widget.

   The intersection of a line and a column is called a Cell. Each cell
can  have a different type (Cell_Text, Cell_Pixmap, Cell_Pixtext), and
display  its contents depending on this type. For instance, the text is
not  displayed in the type is Cell_Pixmap.   Note that this type is
changed dynamically by some of the subprograms  below, like Set_Pixmap,
Set_Text, ... and Set_Cell_Contents

   This is one of the most powerful widgets in GtkAda, that can be used
to  display an kind of information. Look also into using Gtk_Ctree,
which is  a similar widget.

   You can add scrolling in a Gtk_Clist by adding it in a
Gtk_Scrolled_Window.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Clist       (*note Package_Gtk.Clist::)

Signals
=======

   * "abort_column_resize"

     procedure Handler (Clist       : access Gtk_Clist_Record'Class);
     Aborts the current interactive resizing of the column by the user.
     This releases the grab done on the pointer. It is never emitted
     internally by GtkAda.

   * "click_column"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class;
     Column : Gint);
     Emitted when the user has clicked on one of the buttons at the top
     of a column. The first column has number 0.

   * "end_selection"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class);
     Ends the current selection process. This is never emitted
     internally by GtkAda, but acts as if the user had just released
     the mouse button.

   * "extend_selection"

     procedure Handler (Clist       : access Gtk_Clist_Record'Class;
     Scroll_Type : Gtk.Enums.Gtk_Scroll_Type;
     Position    : Gfloat;
     Auto_Start_Selection : Boolean);
     Extends the current selection. Position is used only for certain
     values of Scroll_Type. It is never emitted internally by GtkAda. It
     has no effect if the selection mode is not Extended.

   * "resize_column"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class;
     Column : Gint;
     Width  : Gint);
     Emitted to request a new size for a given column. You should use
     Set_Column_Width instead.

   * "row_move"

     procedure Handler (Clist      : access Gtk_Clist_Record'Class;
     Source_Row : Gint;
     Dest_Row   : Gint);
     Emitted to request the change of a Source_Row to Dest_Row. You
     should use Row_Move instead.

   * "scroll_horizontal"

     procedure Handler (Clist       : access Gtk_Clist_Record'Class;
     Scroll_Type : Gtk.Enums.Gtk_Scroll_Type;
     Position    : Gfloat);
     Scrolls the clist horizontally. This also modifies the selection.
     It is never emitted internally by GtkAda. You should consider using
     Moveto instead.

   * "scroll_vertical"

     procedure Handler (Clist       : access Gtk_Clist_Record'Class;
     Scroll_Type : Gtk.Enums.Gtk_Scroll_Type;
     Position    : Gfloat);
     Scrolls the clist vertically. This also modifies the selection.
     It is never emitted internally by GtkAda. You should consider using
     Moveto instead.

   * "select_all"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class);
     Emitted to request the selection of all the rows in the Clist, if
     the selection mode allows. You should use Select_All instead.

   * "select_row"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class;
     Row    : Gint;
     Column : Gint;
     Event  : Gdk.Event.Gdk_Event);
     Emitted when a row is selected. Column contains the column number
     in which the user has clicked, or -1 if the selection was done
     internally by GtkAda.  Event will be null if the selection was not
     triggered by an event, eg if the row was selected through a call
     to Select_Row.

   * "start_selection"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class);
     Request the start of the selection. This signal is not emitted
     internally by GtkAda, but acts as if the user had clicked on the
     focus row (the exact visual modification depends on the selection
     mode).

   * "toggle_add_mode"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class);
     Changes the add_mode for the clist (indicates whether the next line
     clicked on will be added to the selection or will replace it).
     This is never emitted internally by GtkAda.

   * "toggle_focus_row"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class);
     Emitted to request the change of the selection status (selected/
     unselected) of the focus row. This signal is not emitted internally
     by GtkAda.

   * "undo_selection"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class);
     Emitted to request the cancellation of the last select/unselect
     operation. You should use Undo_Selection instead.

   * "unselect_all"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class);
     Emitted to request the unselection of all the rows in the Clist, if
     the selection mode is different from Browse. You should use
     Unselect_All instead.

   * "unselect_row"

     procedure Handler (Clist  : access Gtk_Clist_Record'Class;
     Row    : Gint;
     Column : Gint;
     Event  : Gdk.Event.Gdk_Event);
     Emitted to request the unselection of a row. Event will be null
     most of the time when the event is emitted directly by GtkAda. You
     should use Unselect_Row instead.


Types
=====

type Gtk_Clist_Compare_Func is access function
     (Clist : access Gtk_Clist_Record'Class;

type Gtk_Clist_Row is new Gdk.C_Proxy;

A row of the clist.   Application-specific data can be associated with
each row.   In the following subprograms, rows can also be accessed via
their  number, starting from 0.
type Gtk_Sort_Type is
     (Ascending, Descending);

The order in which the rows should be sorted.
Subprograms
===========

Creating a list and setting the attributes
------------------------------------------

procedure Gtk_New
     (Widget             : out    Gtk_Clist;
        Columns            : in     Gint);

Create a list with Columns columns.
Each line will have this exact number of column  The number of columns
can not be changed once the widget has been  created.
procedure Gtk_New
     (Widget             : out    Gtk_Clist;
        Columns            : in     Gint;
        Titles             : in     Gtkada.Types.Chars_Ptr_Array);

Create a new list with Columns columns.
The title of the columns is specified in Titles.   The results are
undefined (and can raise an exception) if Titles does  not have at
least Columns items.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Clist.
procedure Set_Hadjustment
     (Clist              : access Gtk_Clist_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Set the horizontal adjustment used for the clist.
Note that such an adjustment is automatically created when the clist
is added to a Gtk_Scrolled_Window. You should rather use
Gtk.Scrolled_Window.Set_Hadjustment if you want to modify the
adjustment.   If there was already such an adjustment, it is unref-ed,
and might  be deleted.
procedure Set_Vadjustment
     (Clist              : access Gtk_Clist_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Set the vertical adjustment used for the clist.
Note that such an adjustment is automatically created when the clist
is added to a Gtk_Scrolled_Window. You should rather use
Gtk.Scrolled_Window.Set_Hadjustment if you want to modify the
adjustment.   If there was already such an adjustment, it is unref-ed,
and might  be deleted.
function Get_Hadjustment
     (Clist              : access Gtk_Clist_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the horizontal adjustment used for the clist.
This indicates what position the clist is presently displaying, and  by
changing its value, the clist is automatically scrolled horizontally.
This is done automatically when the clist's parent is a
Gtk_Scrolled_Window.
function Get_Vadjustment
     (Clist              : access Gtk_Clist_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the vertical adjustment used for the clist.
This indicates what position the clist is presently displaying, and  by
changing its value, the clist is automatically scrolled vertically.
This is done automatically when the clist's parent is a
Gtk_Scrolled_Window.
procedure Set_Selection_Mode
     (Clist              : access Gtk_Clist_Record;
        Mode               : in     Gtk.Enums.Gtk_Selection_Mode);

Modify the selection mode for the clist.
This indicates whether one or more lines can be selected at the  same
time in the clist, and how this selection can done by the  user (does
he have to click explicitly on an item, or can he  browse through the
clist and select the last item he was on, etc.)

   Note that changing the selection mode to Selection_Single or
Selection_Browse will deselect all the items in the clist.
function Get_Selection_Mode
     (Clist              : access Gtk_Clist_Record)
        return Gtk.Enums.Gtk_Selection_Mode;

Return the selection mode for the clist.
Visual aspects
--------------

procedure Freeze
     (Clist              : access Gtk_Clist_Record);

Freeze all visual updates on the list, while you make big changes.
This is more efficient than working on an unfrozen list.
procedure Thaw
     (Clist              : access Gtk_Clist_Record);

Thaw the list, ie reactivate all the visual updates.
This also forces an immediate refresh of the list.   Note that each
Freeze must be followed by a Thaw. The visual updates  are not
reactivated until the last Thaw has been emitted, but there is  an
immediate refresh every time anyway.
procedure Set_Shadow_Type
     (Clist              : access Gtk_Clist_Record;
        The_Type           : in     Gtk.Enums.Gtk_Shadow_Type);

Set the border style of the clist.
Modifying the contents
----------------------

function Append
     (Clist              : access Gtk_Clist_Record;
        Text               : in     Gtkada.Types.Chars_Ptr_Array)
        return Gint;

Append a new row to the clist, and return the index of the row created.
The row is added at the end of the Clist.   The behavior is undefined
if Text does not have at least as many items  as there are columns in
the Clist.
function Prepend
     (Clist              : access Gtk_Clist_Record;
        Text               : in     Gtkada.Types.Chars_Ptr_Array)
        return Gint;

Add a new row at the beginning of the clist, and return its index.
The behavior is undefined if Text does not have at least as many items
as there are columns in the Clist.
procedure Insert
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Text               : in     Gtkada.Types.Chars_Ptr_Array);

Add a new row in the clist.
The row 0 is the first in the clist. If Row is not in the range for
clist, the new row is added at the end. The behavior is undefined if
Text does not have enough items.
procedure Remove
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint);

Remove a row from the clist (0 is the first one).
procedure Clear
     (Clist              : access Gtk_Clist_Record);

Clears the entire list. This is much faster than doing a Remove on each
line.
procedure Swap_Rows
     (Clist              : access Gtk_Clist_Record;
        Row1               : in     Gint;
        Row2               : in     Gint);

Exchange the position of two rows in the clist.
procedure Row_Move
     (Clist              : access Gtk_Clist_Record;
        Source_Row         : in     Gint;
        Dest_Row           : in     Gint);

Move the row at Source_Row to Dest_Row (0 indicates the first row in
the clist)
procedure Set_Sort_Column
     (Clist              : access Gtk_Clist_Record;
        Column             :        Gint);

Indicate the column on which to sort the clist.
This column is relevant when you use Sort or Set_Auto_Sort below.   The
first column is number 0.
function Get_Sort_Column
     (Clist              : access Gtk_Clist_Record)
        return Gint;

Return the column on which the clist is sorted.
procedure Set_Sort_Type
     (Clist              : access Gtk_Clist_Record;
        Sort_Type          :        Gtk_Sort_Type);

Indicate in which order the sort should be done on the clist
(ascending or descending).
function Get_Sort_Type
     (Clist              : access Gtk_Clist_Record)
        return Gtk_Sort_Type;

Return the sort type currently used for the list
procedure Sort
     (Clist              : access Gtk_Clist_Record);

Sort the lines of the clist, based on the column set by Set_Sort_Column,
and in the order set by Set_Sort_Type.
procedure Set_Auto_Sort
     (Clist              : access Gtk_Clist_Record;
        Auto_Sort          :        Boolean);

If Auto_Sort is true, then the clist will be automatically sorted every
time a new line is inserted into the clist.
procedure Set_Compare_Func
     (Clist              : access Gtk_Clist_Record;
        Func               :        Gtk_Clist_Compare_Func);

Set the function used when sorting the list. This function takes two
rows as its arguments, and should return a Gint indicating in which
order the rows are found (-1 if Row1 comes first, 0 if they are equal,
1 if Row2 comes last).   Func should be null to restore the default
sorting functions.
Columns
-------

function Get_Columns
     (Clist              : access Gtk_Clist_Record)
        return Gint;

Return the number of columns in the clist.
procedure Column_Titles_Hide
     (Clist              : access Gtk_Clist_Record);

Hide the column titles for the list.
This is the default behavior if no column titles were given when the
list was created.
procedure Column_Titles_Show
     (Clist              : access Gtk_Clist_Record);

Show the column titles for the list.
This is the default behavior if some column titles were given when the
list was created.
procedure Column_Title_Active
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint);

Set the column title to be an activate title.
In other words, answer all button presses, highlights when the mouse is
over it, ...
procedure Column_Title_Passive
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint);

Set the column title to be passive.
Act just as a title, and do not react to mouse events.
procedure Column_Titles_Active
     (Clist              : access Gtk_Clist_Record);

Set all column titles to be active.
procedure Column_Titles_Passive
     (Clist              : access Gtk_Clist_Record);

Set all column titles to be passive.
procedure Set_Column_Title
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint;
        Title              : in     String);

Set the text for the button of the column's title.
See Set_Column_Widget if you want to put a pixmap inside the button.
function Get_Column_Title
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint)
        return String;

Return the text used for the title's column.
This is a copy of the title, so you can't modify it to automatically
change the column's title.
procedure Set_Column_Widget
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Modify the widget used in the Gtk_Button that is the column's title.
By default, this button contains a simple Gtk_Label, which is replaced
by Widget. This is the function to use if you want to put a pixmap  (or
a Gtk_Box that contains both a pixmap and some text) in a column's
title.
function Get_Column_Widget
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint)
        return Gtk.Widget.Gtk_Widget;

Return the child of the button that makes the column's title.
Unless you changed it with Set_Column_Widget, this will return a
Gtk_Label. Note also that if this widget was not created in Ada, but
transparently by gtk+, you have to 'with' Gtk.Type_Conversion so that
the correct type of the widget is created (See the user's guide for
more information on type conversion).
procedure Set_Column_Justification
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Change the way the text in the whole column is justified.
This function has no effect on the title if you used Set_Column_Widget
before.
procedure Set_Column_Visibility
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint;
        Visible            : in     Boolean);

Modify the visibility of a column.
Note that GtkAda prevents the last visible column to be hidden. Nothing
will be done if you try to hide that last column.   See the example
below for an example how to hide all the columns but  one.
procedure Set_Column_Resizeable
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint;
        Resizeable         : in     Boolean);

Set whether the column can be dynamically resized with the mouse.
If Resizeable is true, then the column can be resized by clicking  and
dragging the lines that separates the column from the next one.
procedure Set_Column_Auto_Resize
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint;
        Auto_Resize        : in     Boolean);

Set whether the column should automatically be resized to the optimal
size (based on its contents). Note that this operation could slow things
down a lot if you have a lot of items in your list.
function Columns_Autosize
     (Clist              : access Gtk_Clist_Record)
        return Gint;

Set all the columns' width to their optimal size.
Return the total width of the clist after this operation.
function Optimal_Column_Width
     (Clist              : access Gtk_Clist_Record;
        Column             :        Gint)
        return Gint;

Return the optimal width for Column, based on its contents.
This is the maximal cell width in the column.
procedure Set_Column_Width
     (Clist              : access Gtk_Clist_Record;
        Column             : in     Gint;
        Width              : in     Gint);

Set the column width in pixels.
By default, the column's width is chosen from the column's title.
procedure Set_Column_Min_Width
     (Clist              : access Gtk_Clist_Record;
        Column             :        Gint;
        Min_Width          :        Gint);

Set the minimal width for the column, in pixels.
if Min_Width is negative, there is no limit on the minimal width for
the column.
procedure Set_Column_Max_Width
     (Clist              : access Gtk_Clist_Record;
        Column             :        Gint;
        Max_Width          :        Gint);

Set the maximal width for the column, in pixels.
If Max_Width is negative, there is no limit on the maximal width for
the column.
Rows
----

function Get_Rows
     (Clist              : access Gtk_Clist_Record)
        return Gint;

Return the number of rows in the clist.
procedure Set_Row_Height
     (Clist              : access Gtk_Clist_Record;
        Height             :        Gint);

Set the height of the rows, in pixels.
if Height is 0, the chosen height will be the current's font height.
function Row_Is_Visible
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint)
        return Gtk.Enums.Gtk_Visibility;

Return the visibility status of the row.
procedure Set_Foreground
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Color              : in     Gdk.Color.Gdk_Color);

Set the foreground color for the row.
The color must already be allocated.   If no such row exists in the
list, nothing is done.
procedure Set_Background
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Color              : in     Gdk.Color.Gdk_Color);

Set the background color for the row.
The color must already be allocated.   If no such row exists in the
list, nothing is done.
procedure Set_Row_Style
     (Clist              : access Gtk_Clist_Record;
        Row                :        Gint;
        Style              : in     Gtk.Style.Gtk_Style);

Set the default style for the cells in the row. This can be
overridden for each cell with Set_Cell_Style.
function Get_Row_Style
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint)
        return Gtk.Style.Gtk_Style;

Return the default style used for the row.
procedure Set_Selectable
     (Clist              : access Gtk_Clist_Record;
        Row                :        Gint;
        Selectable         :        Boolean);

Indicate whether the row can be selected or not.
The default value is True.
function Get_Selectable
     (Clist              : access Gtk_Clist_Record;
        Row                :        Gint)
        return Boolean;

Return the selectable status of the row.
procedure Select_Row
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint);

Emit the signal "select_row". This simulates the user pressing
the mouse on Row, Column on the clist.
procedure Unselect_Row
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint);

Emit the signal "unselect_row", as if the user had clicked on
Row, Column on the clist.
procedure Undo_Selection
     (Clist              : access Gtk_Clist_Record);

Undo the last select/unselect operation.
procedure Get_Selection_Info
     (Clist              : access Gtk_Clist_Record;
        X                  : in     Gint;
        Y                  : in     Gint;
        Row                : out    Gint;
        Column             : out    Gint;
        Is_Valid           : out    Boolean);

Return the Row/Column corresponding to the coordinates X,Y in the
Row column. The coordinates X,Y are relative to the clist window  (ie
0,0 is the top left corner of the clist).   The result is valid only if
Is_Valid is true
procedure Select_All
     (Clist              : access Gtk_Clist_Record);

Select all the rows in the clist. This only works if the selection
mode allows for multiple rows selected at the same time (extended or
multiple).
procedure Unselect_All
     (Clist              : access Gtk_Clist_Record);

Deselect all the rows in the clist. If the selection mode is
Browse, then only the current line is deselected.
function Get_Focus_Row
     (Clist              : access Gtk_Clist_Record)
        return Gint;

Return the number of the line that currently has the focus.
function Get_Row_List
     (Clist              : access Gtk_Clist_Record)
        return Row_List.Glist;

Return the list of all the rows in the clist. This might speed up
the access to the rows a little.   You can then use the function
Set_Cell_Contents to modify the cells  in the row, and Get_Text or
Get_Pixmap to get its contents.
function Get_Selection
     (Widget             : access Gtk_Clist_Record)
        return Gtk.Enums.Gint_List.Glist;

Return the list of selected rows, by number.
Cells
-----

function Get_Cell_Type
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint)
        return Gtk.Enums.Gtk_Cell_Type;

Return the type of the cell at Row/Column.
This indicates which of the functions Get_Text. Get_Pixmap, etc.
below you can use.
procedure Set_Text
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Text               : in     String);

Set the cell's text, replacing its current contents.
This changes the type of the cell to Cell_Text. The pixmap (if any)
will no longer be displayed.
function Get_Text
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint)
        return String;

Return the text contained in cell. The type of the cell should be
either Cell_Text or Cell_Pixtext.   If there was a problem, a
null-length string is returned.   The problem might appear in case the
row or the column are  invalid, or if the cell does not contain any
text.
function Get_Text
     (Clist              : access Gtk_Clist_Record;
        Row                :        Gtk_Clist_Row;
        Column             : in     Gint)
        return String;

Return the text contained in cell. The Row can be obtained from
Get_Row_List, this function speeds up the access a little compared  to
the other Get_Text above.
procedure Set_Pixmap
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

Set the cell's pixmap, replacing its current contents.
The type of the cell becomes Cell_Pixmap, and the text is no longer
displayed.
procedure Get_Pixmap
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Pixmap             : out    Gdk.Pixmap.Gdk_Pixmap;
        Mask               : out    Gdk.Bitmap.Gdk_Bitmap;
        Is_Valid           : out    Boolean);

Return the pixmap contained in a cell. The type of the cell should
be Cell_Pixmap.   The result is meaningful only if Is_Valid is True. If
the Cell did not  contain a pixmap, Is_Valid is set to False
procedure Get_Pixmap
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gtk_Clist_Row;
        Column             : in     Gint;
        Pixmap             : out    Gdk.Pixmap.Gdk_Pixmap;
        Mask               : out    Gdk.Bitmap.Gdk_Bitmap;
        Is_Valid           : out    Boolean);

Return the pixmap contained in a cell. Row can be obtained directly with
Get_Row_List, and speeds up the access a little compared to the previous
Get_Pixmap function.
procedure Set_Pixtext
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Text               : in     String;
        Spacing            : in     Guint8;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

Set both the text and the pixmap for the cell.
Replace its current contents. The type of the cell becomes Cell_Pixtext,
and both the text and the pixmap are displayed.
procedure Get_Pixtext
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Spacing            : out    Guint8;
        Pixmap             : out    Gdk.Pixmap.Gdk_Pixmap;
        Mask               : out    Gdk.Bitmap.Gdk_Bitmap;
        Is_Valid           : out    Boolean);

The result is not meaningful if Is_Valid is False.
The only way to get the string is to use Get_Text, since a String is
an unconstrained type in Ada and is not really convenient to use as an
out parameter.
procedure Set_Cell_Style
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Style              : in     Gtk.Style.Gtk_Style);

Set the style (font, color, ...) used for the cell.
This overrides the row's style.
function Get_Cell_Style
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint)
        return Gtk.Style.Gtk_Style;

Return the style of the cell.
procedure Set_Shift
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Vertical           : in     Gint;
        Horizontal         : in     Gint);

Set a horizontal and vertical shift for drawing the content of the cell.
Both shifts can be either positive or negative.   This is particularly
useful for indenting items in a columns.
procedure Set_Cell_Contents
     (Clist              : access Gtk_Clist_Record;
        Row                :        Gtk_Clist_Row;
        Column             :        Gint;
        Cell_Type          :        Gtk.Enums.Gtk_Cell_Type;
        Text               :        String;
        Spacing            :        Guint8;
        Pixmap             :        Gdk.Pixmap.Gdk_Pixmap;
        Mask               :        Gdk.Bitmap.Gdk_Bitmap);

Modify the contents and type of a cell.
Cell_Type indicates what should be displayed in the cell. Note that  if
you do not want any string, you should pass an empty string "".   You
get Row from Get_Row_List.
Reordering the list
-------------------

procedure Set_Reorderable
     (Clist              : access Gtk_Clist_Record;
        Reorderable        :        Boolean);

Set whether the list can be dynamically reordered by the user.
(using a simple drag-n-drop protocol).
procedure Set_Use_Drag_Icons
     (Clist              : access Gtk_Clist_Record;
        Use_Icons          :        Boolean);

Set whether drag icons are shown while the user is reordering the list.
The default value is True.
procedure Set_Button_Actions
     (Clist              : access Gtk_Clist_Record;
        Button             :        Guint;
        Button_Action      :        Gtk.Enums.Gtk_Button_Action);

Set the action for a specific button on the list.
The default if for the left mouse button to select or drag and item,
the other buttons are ignored.   The Button_Expands action has no
effect on a clist.
procedure Moveto
     (Clist              : access Gtk_Clist_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Row_Align          : in     Gfloat;
        Col_Align          : in     Gfloat);

Scroll the list so that Row/Column is visible.
If Row is -1, the clist is not scrolled vertically.   If Column is -1,
the clist is not scrolled horizontally.   The new location of
Row/Column depends on the value of Row_Align and  Col_Align (from
0.0x0.0 (top-left) to 1.0x1.0 (bottom-right), all  intermediate values
are possible).
Row_Data
--------

You can associate one private data with each row in the clist. If you
want to store multiple values, you should create a record type that
contains all the values, and associate with value with the relevant
line in the clist.   This package is the equivalent of
Gtk.Widget.User_Data for the Clists.

   This is your responsibility to use the Get and Set functions from the
same generic package. However, you can use different packages for
different lines (although this will definitely make things harder to
use!)

   Note also that an internal copy of the Data is done, therefore the
"find" functions found in gtk+ have no equivalent in GtkAda, although it
would be enough to write one by iterating over the Row numbers.

function Get
     (Object             : access Gtk_Clist_Record'Class;
        Row                : in     Gint)
        return Data_Type;

Get the data associated to a specific row.
function Get
     (Object             : access Gtk_Clist_Record'Class;
        Row                : in     Gtk_Clist_Row)
        return Data_Type;

Same as above, but acts directly on a row obtained through
Get_Row_List. This is faster for big lists.
procedure Set
     (Object             : access Gtk_Clist_Record'Class;
        Row                : in     Gint;
        Data               : in     Data_Type);

Modify the data associated with a row
procedure Set
     (Object             : access Gtk_Clist_Record'Class;
        Row                : in     Gtk_Clist_Row;
        Data               : in     Data_Type);

Same as above but acts directly on a row obtained through
Get_Row_List. This is faster for big lists.
Example
=======



      --  The procedure below shows how you can hide all the columns but one
      --  in the clist.
      --  Since Gtk_Clist prevents you to hide the last visible column, the following
      --  code does not work:
      --
      --     -  Hide all the columns
      --     for J in 0 .. Get_Columns (Clist) loop
      --        Set_Column_Visibility (Clist, J, False);
      --     end loop;
      --
      --     -  Show the one you want
      --     Set_Column_Visibility (Clist, New_Column, True);
      --
      --  The following code should be used instead:
     
      package body Clist is
     
         procedure Hide_All_But_One (Clist : access Gtk_Clist_Record'Class;
                                     New_Column : Gint)
         is
         begin
            --  Make sure that at least one column is visible
            Set_Column_Visibility (Clist, New_Column, True);
     
            --  Hide all the other columns.
            for J in 0 .. Get_Columns (Clist) loop
               if J /= New_Column then
                  Set_Column_Visibility (Clist, J, False);
               end if;
            end loop;
         end Hide_All_But_One;
     
      end Clist;

Package Gtk.Color`_'Selection
*****************************

A Gtk_Color_Selection widget is a complex dialog that allows the user
to select a color based either on its (Red, Green, Blue) or its  (Hue,
Saturation, Value).   An additional field is provided to select the
opacity of the color (this  is usually called the alpha channel).

   *note Package_Gtk.Color_Selection_Dialog:: for a version of this
widget  that comes with its own dialog.

   *note Package_Gtk.Extra.Color_Combo:: for a different way to select
colors.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Color_Selection (*note Package_Gtk.Color_Selection::)

Signals
=======

   * "color_changed"

     procedure Handler
     (Selection : access Gtk_Color_Selection_Record'Class);
     Called every time a new color is selected in the dialog


Types
=====

type Color_Array is array (Color_Index'Range) of Gdouble;

Array that indicates the currently selected color.   All the values are
between 0.0 and 1.0 (a percentage value).   They should be converted to
absolute values before using them to create  a new color, with the
following piece of code:  Absolute := To_Absolute (Color_Array (Index))
type Color_Index is
     (Red, Green, Blue, Opacity);

Used as an index to the table used to set and get the currently
selected color.
Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Color_Selection);

Create a new color selection widget.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Color_Selection.
procedure Set_Update_Policy
     (Colorsel           : access Gtk_Color_Selection_Record;
        Policy             : in     Enums.Gtk_Update_Type);

Set the behavior of the scales used to select a value (red, green,...)
Set Policy to Update_Continuous if you want to update the color
continuously as the slider is mode, Update_Discontinuous to update the
color only when the mouse is released and Update_Delayed to update when
the mouse is released or has been motionless for a while.
procedure Set_Opacity
     (Colorsel           : access Gtk_Color_Selection_Record;
        Use_Opacity        : in     Boolean);

Indicate whether the dialog should provide a way to change the
opacity of the color.   Since not every application can handle
transparent colors, it is better  to deactivate this feature if you
don't intend to use it.   Note also that if you deactivated that
feature, Get_Color will not  set a valid value for the Opacity index of
its return type.
procedure Set_Color
     (Colorsel           : access Gtk_Color_Selection_Record;
        Color              : in     Color_Array);

Modify the current color.
Note that Color is an array of percentages, between 0.0 and 1.0, not
absolute values.
procedure Get_Color
     (Colorsel           : access Gtk_Color_Selection_Record;
        Color              : out    Color_Array);

Get the current color.
Note that Color is an array of percentages, between 0.0 and 1.0, not
absolute values.
function To_Absolute
     (Color              :        Gdouble)
        return Gushort;

Convert from a percentage value as returned by Get_Color to an
absolute value as can be used with Gdk_Color.
function To_Percent
     (Color              :        Gushort)
        return Gdouble;

Convert from an absolute value as used in Gdk_Color to a percentage
value as used in Set_Color.
Package Gtk.Color`_'Selection`_'Dialog
**************************************

The Gtk_Color_Selection_Dialog provides a standard dialog which allows
the  user to select a color much like the Gtk_File_Selection provides a
standard  dialog for file selection.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Window   (*note Package_Gtk.Window::)
                    \___ Gtk_Color_Selection_Dialog (*note Package_Gtk.Color_Selection_Dialog::)

Subprograms
===========

procedure Gtk_New
     (Color_Selection_Dialog  : out    Gtk_Color_Selection_Dialog;
        Title              : in     String);

Create a new Color_Selection_Dialog with a specified title.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Menu.
Functions to get the fields of the dialog
-----------------------------------------

function Get_Colorsel
     (Color_Selection_Dialog  : access Gtk_Color_Selection_Dialog_Record)
        return Gtk.Color_Selection.Gtk_Color_Selection;

Get the Gtk_Color_Selection widget contained within the dialog.
Use this widget and its Gtk.Color_Selection.Get_Color function to gain
access to the selected color. Connect a handler for this widget's
color_changed signal to be notified when the color changes.
function Get_OK_Button
     (Color_Selection_Dialog  : access Gtk_Color_Selection_Dialog_Record)
        return Gtk.Button.Gtk_Button;

Get the OK button widget contained within the dialog.
function Get_Reset_Button
     (Color_Selection_Dialog  : access Gtk_Color_Selection_Dialog_Record)
        return Gtk.Button.Gtk_Button;

Get the reset button widget contained within the dialog.
function Get_Cancel_Button
     (Color_Selection_Dialog  : access Gtk_Color_Selection_Dialog_Record)
        return Gtk.Button.Gtk_Button;

Get the cancel button widget contained within the dialog.
function Get_Help_Button
     (Color_Selection_Dialog  : access Gtk_Color_Selection_Dialog_Record)
        return Gtk.Button.Gtk_Button;

Get the help button widget contained within the dialog.
Package Gtk.Combo
*****************

The Gtk_Combo widget consists of a single-line text entry field and a
drop-down list. The drop-down list is displayed when the user clicks on
a  small arrow button to the right of the entry field.

   The drop-down list is a Gtk_List widget and can be accessed using
the list  member of the Gtk_Combo. List elements can contain arbitrary
widgets, but  if an element is not a plain label, then you must use the
Gtk_List.Set_Item_String function. This sets the string which will be
placed in the text entry field when the item is selected.

   By default, the user can step through the items in the list using
the arrow  (cursor) keys, though this behaviour can be turned off with
Set_Use_Arrows.

   Normally the arrow keys are only active when the contents of the
text entry  field matches one of the items in the list. If the contents
of the entry  field do not match any of the list items, then pressing
the arrow keys does  nothing. However, by calling Set_Use_Arrows_Always
you can specify that the  arrow keys are always active. If the contents
of the entry field does not  match any of the items in the list, then
pressing the up or down arrow key  will set the entry field to the last
or first item in the list,  respectively.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Combo    (*note Package_Gtk.Combo::)

Subprograms
===========

procedure Gtk_New
     (Combo_Box          : out    Gtk_Combo);

Create a new Gtk_Combo.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Combo.
procedure Disable_Activate
     (Combo_Box          : access Gtk_Combo_Record);

Disable the standard handler for the <return> key in the entry field.
The default behavior is to popdown the combo box list, so that the user
can choose from it. However, if you want to add your own callback  for
the return key, you need to call this subprogram, and connect  a
handler to the "activate" signal for the entry.
function Get_Entry
     (Combo_Box          : access Gtk_Combo_Record)
        return Gtk.GEntry.Gtk_Entry;

Return the Gtk_Entry associated with a Combo_Box.
procedure Set_Entry
     (Combo_Box          : access Gtk_Combo_Record;
        GEntry             :        Gtk.GEntry.Gtk_Entry);

Set the entry field for the combo box.
function Get_List
     (Combo_Box          : access Gtk_Combo_Record)
        return Gtk.List.Gtk_List;

Return the list of items associated with a Combo_Box.
Add (Gtk.Container.Add) Gtk_List_Items to this list to insert new
entries in the popdown menu.
procedure Set_Case_Sensitive
     (Combo_Box          : access Gtk_Combo_Record;
        Val                : in     Boolean := True);

Specify whether the text entered into the Gtk_Entry field and the text
in the list items are case sensitive.   This may be useful, for
example, when you have called Set_Value_In_List  to limit the values
entered, but you are not worried about differences  in case.
procedure Set_Item_String
     (Combo_Box          : access Gtk_Combo_Record;
        Item               : in     Gtk.Item.Gtk_Item;
        Item_Value         : in     String);

Set the string to place in the Gtk_Entry field when a particular list
item is selected. This is needed if the list item is not a simple label.
procedure Set_Popdown_Strings
     (Combo_Box          : access Gtk_Combo_Record;
        Strings            : in     String_List.Glist);

Set all the items in the popup list.
procedure Set_Use_Arrows
     (Combo_Box          : access Gtk_Combo_Record;
        Val                : in     Boolean := True);

Specify if the arrow (cursor) keys can be used to step through the
items in the list. This is on by default.
procedure Set_Use_Arrows_Always
     (Combo_Box          : access Gtk_Combo_Record;
        Val                : in     Boolean := True);

Specify if the arrow keys will still work even if the current contents
of the Gtk_Entry field do not match any of the list items.
procedure Set_Value_In_List
     (Combo_Box          : access Gtk_Combo_Record;
        Val                : in     Gint;
        Ok_If_Empty        : in     Boolean);

Specify whether the value entered in the text entry field must match one
of the values in the list. If this is set then the user will not be able
to perform any other action until a valid value has been entered.   If
an empty field is acceptable, the Ok_If_Empty parameter should be  True.
If the value entered must match one of the values in the list, val
should be True.
Example
=======

      Creating a Gtk_Combo widget with simple text items.
     
        Combo : Gtk_Combo;
        Items : String_List.Glist;
     
        String_List.Append (Items, "First Item");
        String_List.Append (Items, "Second Item");
        String_List.Append (Items, "Third Item");
        String_List.Append (Items, "Fourth Item");
        String_List.Append (Items, "Fifth Item");
     
        Gtk_New (Combo);
        Set_Popdown_Strings (Combo, Items);

Package Gtk.Container
*********************

Base class for widgets that have children.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)

Signals
=======

   * "add"

     procedure Handler (Container : access Gtk_Container_Record'Class;
     Widget    : access Gtk_Widget_Record'Class);
     A new widget is added to the container

   * "check_resize"

     procedure Handler (Container : access Gtk_Container_Record'Class);
     Called every time the Container needs resizing.  Upon receiving
     this signal, Container should check whether it needs to be
     resized, and if it does should queue a resize request.

   * "focus"

     procedure Handler (Container : access Gtk_Container_Record'Class;
     Direction : Gtk_Direction_Type);
     Moves the current selection to a new widget.

   * "remove"

     procedure Handler (Container : access Gtk_Container_Record'Class;
     Widget    : access Gtk_Widget_Record'Class);
     A widget is removed from the container

   * "set-focus-child"

     procedure Handler (Container : access Gtk_Container_Record'Class;
     Widget    : access Gtk_Widget_Record'Class);
     Emitted when a new widget gains the focus.


Types
=====

type Forall_Function is access procedure
     (Item : access Gtk.Widget.Gtk_Widget_Record'Class);

Function that can be call for each child of a container.   This is
called automatically by the Forall subprogram below.
Subprograms
===========

procedure Set_Border_Width
     (Container          : access Gtk_Container_Record;
        Border_Width       : in     Gint);

Modify the size of the frame that surrounds the widget.
The exact visual impact depends on the specific widget class.
procedure Add
     (Container          : access Gtk_Container_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Add a new child to the container.
Note that some containers can have only one child. Nothing is done  if
there is already a child.   This basically sends the "add" signal (see
below)
procedure Remove
     (Container          : access Gtk_Container_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Remove a child from the container.
Nothing is done if Widget is not a child of Container. Widget is not
destroyed, but is deleted from the screen.   This basically sends the
"remove" signal (see below)
procedure Set_Resize_Mode
     (Container          : access Gtk_Container_Record;
        Resize_Mode        : in     Gtk.Enums.Gtk_Resize_Mode);

Change the resizing behavior for the Container.
The default value is Resize_Parent.
function Children
     (Container          : access Gtk_Container_Record)
        return Gtk.Widget.Widget_List.Glist;

Return a list of all the children of the container.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Container.
Foreach functions
-----------------

procedure Forall
     (Container          : access Gtk_Container_Record;
        Func               :        Forall_Function);

Execute Func for each of the children of Container.
See also the generic package Forall_Pkg if you want to pass some  extra
data to Func.
Widget-level methods
--------------------

procedure Set_Reallocate_Redraws
     (Container          : access Gtk_Container_Record;
        Needs_Redraws      :        Boolean := False);

Set the "needs_redraws" field.
If Needs_Redraws is True, then a "draw" signal is emitted for the
Container whenever one is emitted for a child.
procedure Set_Focus_Vadjustment
     (Container          : access Gtk_Container_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Set the focus to the vertical adjustment.
Adjustment should have been created and displayed at some other  place
in your application.   Container will make sure that Adjustment always
matches the range  for the focus widget's position (y .. y + height).
procedure Set_Focus_Hadjustment
     (Container          : access Gtk_Container_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Set the focus to the horizontal adjustment.
Adjustment should have been created and displayed at some other  place
in your application.   Container will make sure that Adjustment always
matches the range  for the focus widget's position (x .. x + width).
function Get_Toplevels         return Gtk.Widget.Widget_List.Glist;

Return the list of all the toplevel widgets.
I.e. the ones that don't have any parent (windows, dialogs, ...)
procedure Register_Toplevel
     (Container          : access Gtk_Container_Record);

Register Container as a toplevel widget, returned by the subprogram
Get_Toplevels.
procedure Unregister_Toplevel
     (Container          : access Gtk_Container_Record);

Unregister Container as a toplevel widget.
function Child_Type
     (Container          : access Gtk_Container_Record)
        return Gtk.Gtk_Type;

Return the type of the children in Container.
If Container can contain any type of widget, Gtk_Type_None is  returned.
Signals emission
----------------

procedure Check_Resize
     (Container          : access Gtk_Container_Record);

Emit the "check_resize" signal
function Focus
     (Container          : access Gtk_Container_Record;
        Direction          :        Gtk.Enums.Gtk_Direction_Type)
        return Boolean;

Emit the "focus" signal
procedure Set_Focus_Child
     (Container          : access Gtk_Container_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class);

Emit a "set_focus_child" signal.
Package Gtk.Ctree
*****************

This widget is similar to GtkClist but it displays a tree with
expandable  nodes instead of a simple list. Gtk_Tree is a more flexible
tree widget  (it can have arbitrary widgets in the tree cells), but it
is less efficient  and is limited to 32768 pixels.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Clist       (*note Package_Gtk.Clist::)
                 \___ Gtk_Ctree    (*note Package_Gtk.Ctree::)

Signals
=======

   * "tree_collapse"

     procedure Handler (Ctree  : access Gtk_Clist_Record'Class;
     Node   : Gtk_Ctree_Node);
     Emitted when the subtree associated with a Node is collapsed.

   * "tree_expand"

     procedure Handler (Ctree  : access Gtk_Clist_Record'Class;
     Node   : Gtk_Ctree_Node);
     Emitted when the subtree associated with a Node is expanded.

   * "tree_move"

     procedure Handler (Ctree       : access Gtk_Clist_Record'Class;
     Node        : Gtk_Ctree_Node);
     New_Parent  : Gtk_Ctree_Node);
     New_Sibling : Gtk_Ctree_Node);
     Emitted when a Node is moved (e.g its parent and/or its sibling
     changed).

   * "tree_select_row"

     procedure Handler (Ctree  : access Gtk_Ctree_Record'Class;
     Node   : Gtk_Ctree_Node;
     Column : Gint);
     Emitted to request the selection of a node.  Column is the column
     number where the user clicked.

   * "tree_unselect_row"

     procedure Handler (Ctree  : access Gtk_Ctree_Record'Class;
     Node   : Gtk_Ctree_Node;
     Column : Gint);
     Emitted to request the unselection of a node.


Types
=====

type Gcompare_Func is access function
     (A, B : in Data_Type) return Boolean;

Function used to compare data types in the functions  Find_[All]
By_Row_Data_Custom.
type Gtk_Ctree_Compare_Drag_Func is access function
     (Ctree        : in Gtk_Ctree;
          Source_Node  : in Gtk_Ctree_Node;
          New_Parent   : in Gtk_Ctree_Node;
          New_Sibling  : in Gtk_Ctree_Node) return Boolean;

Function type used in Set_Drag_Compare_Func.
type Gtk_Ctree_Func is access procedure
     (Ctree : access Gtk_Ctree_Record'Class;
          Node  : in     Gtk_Ctree_Node;
          Data  : in     Data_Type_Access);

Function used by Post/Pre_Recursive functions below.
type Gtk_Ctree_Node is new Gdk.C_Proxy;

This type represents a node inside a Ctree.
type Gtk_Ctree_Row is new Gtk.Clist.Gtk_Clist_Row;

Similar to Clist_Row, but for a Ctree.
Subprograms
===========

Creation, insertion, deletion
-----------------------------

Elements inside a Gtk_Ctree are not ordered from the top to the bottom
as is the case for Gtk_Clist. Instead, they are put in the ctree by
indicating where in the tree they should be placed. The position of an
element (called a node) is defined by a parent node and a sibling node.
The node will be attached in the parent subtree, on top of the sibling
node.

procedure Gtk_New
     (Widget             : out    Gtk_Ctree;
        Columns            : in     Gint;
        Tree_Column        : in     Gint := 0);

Create a ctree with Columns columns.
Tree_Column indicates in which column the tree will be displayed.
procedure Gtk_New
     (Widget             : out    Gtk_Ctree;
        Titles             : in     Chars_Ptr_Array;
        Tree_Column        : in     Gint := 0);

Create a ctree with Titles'Length columns.
Titles gives the title of each column.   Tree_Column indicates in which
column the tree will be displayed.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Ctree.
function Insert_Node
     (Ctree              : access Gtk_Ctree_Record;
        Parent             : in     Gtk_Ctree_Node;
        Sibling            : in     Gtk_Ctree_Node;
        Text               : in     Chars_Ptr_Array;
        Spacing            : in     Guint8;
        Pixmap_Closed      : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask_Closed        : in     Gdk.Bitmap.Gdk_Bitmap;
        Pixmap_Opened      : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask_Opened        : in     Gdk.Bitmap.Gdk_Bitmap;
        Is_Leaf            : in     Boolean;
        Expanded           : in     Boolean)
        return Gtk_Ctree_Node;

Insert a new node in the Ctree.
Parent is the parent node. If null, the new node is part of the root.
The new node will be inserted right on top of Sibling. If Sibling is
null, then it will be the first node in the subtree.   Text contains
the text for each cell of the node. Note that Insert_Node  expects the
length of the Text parameter to be equal to the number of  columns of
the Ctree.   Spacing is the number of pixels between the lines of the
tree and the  text in the same column.   If Is_Leaf is True, then the
node won't contain any subtree. If False,  the newly created node can
be used as the Parent for further node  creation. In this case,
Expanded indicates whether the subtree  associated with this node
should be initially visible.   In addition to the "+" or "-" sign
indicating whether the subtree is  expanded or not, it is possible to
put a pixmap giving this information.   Pixmap_Closed and Mask_Closed
represent the image and the mask used when  the subtree is closed;
similarly, Pixmap_Opened and Mask_Opened  represent the image and the
mask used when the subtree is opened.
procedure Remove_Node
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Remove Node from Ctree.
Tree, Node and Row basic manipulation
-------------------------------------

function Get_Tree_Column
     (Widget             : access Gtk.Ctree.Gtk_Ctree_Record'Class)
        return Gint;

Return the Tree_Column attribute of a given Node.
Tree_Column indicates in which column the tree will be displayed.
function Get_Node_List
     (Ctree              : access Gtk_Ctree_Record)
        return Node_List.Glist;

Return the list of nodes associated with a given Ctree.
Note: you need to extract the nodes with Node_List.Get_Gpointer.
function Get_Row_List
     (Ctree              : access Gtk_Ctree_Record)
        return Row_List.Glist;

Return the list of rows associated with a given Ctree.
function Get_Selection
     (Ctree              : access Gtk_Ctree_Record)
        return Node_List.Glist;

Return the list of nodes currently selected.
Extract the nodes with Node_List.Get_Data
function Node_Get_Row
     (Node               : in     Gtk_Ctree_Node)
        return Gtk_Ctree_Row;

Return the row of a given Node.
function Row_Get_Children
     (Row                : in     Gtk_Ctree_Row)
        return Gtk_Ctree_Node;

Return the children node of a given Row.
function Row_Get_Expanded
     (Row                : in     Gtk_Ctree_Row)
        return Boolean;

Return the expanded attribute of a given Row.
Note that Expanded can also be retrieved via Get_Node_Info,  this
function is just a quick accessor.
function Row_Get_Is_Leaf
     (Row                : in     Gtk_Ctree_Row)
        return Boolean;

Return the leaf attribute of a given Row.
Note that Is_Leaf can also be retrieved via Get_Node_Info,  this
function is just a quick accessor.
function Row_Get_Parent
     (Row                : in     Gtk_Ctree_Row)
        return Gtk_Ctree_Node;

Return the parent node of a given Row.
function Row_Get_Sibling
     (Row                : in     Gtk_Ctree_Row)
        return Gtk_Ctree_Node;

Return the sibling node of a given Row.
function Is_Created
     (Node               : in     Gtk_Ctree_Node)
        return Boolean;

Return True if Node is different from Null_Ctree_Node
Querying / finding tree information
-----------------------------------

function Is_Viewable
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node)
        return Boolean;

Return True if Node is viewable.
A Node is viewable if all the trees and subtrees containing it are
expanded.
function Last
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node)
        return Gtk_Ctree_Node;

Return the last node of a given subtree.
Starting at Node, this function will recursively look for the last
sibling of the last child.   Return an empty node is Node is empty.
function Find_Node_Ptr
     (Ctree              : access Gtk_Ctree_Record;
        Ctree_Row          : in     Gtk_Ctree_Row)
        return Gtk_Ctree_Node;

Return the node corresponding to a given row.
function Node_Nth
     (Ctree              : access Gtk_Ctree_Record;
        Row                : in     Guint)
        return Gtk_Ctree_Node;

Return the Node corresponding to the nth row of a given Ctree.
function Find
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Child              : in     Gtk_Ctree_Node)
        return Boolean;

Recursively search for a given Child in a given subtree.
the subtree is determined by Node. If Node is empty, the search will
occur on the whole tree.   Return True if Child is found, False
otherwise.
function Is_Ancestor
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Child              : in     Gtk_Ctree_Node)
        return Boolean;

Indicate whether Node is an ancestor of Child.
It is assumed that Node is not empty.
function Is_Hot_Spot
     (Ctree              : access Gtk_Ctree_Record;
        X                  : in     Gint;
        Y                  : in     Gint)
        return Boolean;

Return True if the Ctree is centered on (x,y)
Tree signals: move, expand, collapse, (un)select
------------------------------------------------

procedure Move
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        New_Parent         : in     Gtk_Ctree_Node;
        New_Sibling        : in     Gtk_Ctree_Node);

Move a node in a Ctree.
After its creation, a node can be moved.   New_Parent points to the new
parent node that will contain Node.   If null, Node will be attached to
the root.   New_Sibling indicates under which node Node will be
inserted.   If New_Sibling is null, the new node will be the lowest in
its branch.
procedure Expand
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Expand the first level of the subtree associated with Node.
procedure Expand_Recursive
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null);

Expand the whole subtree associated with Node.
procedure Expand_To_Depth
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null;
        Depth              : in     Gint);

Expand the subtree associated with Node and its descendants until Depth
levels of subtrees have been reached.
procedure Collapse
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Collapse the first level of the subtree associated with Node.
procedure Collapse_Recursive
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null);

Collapse the whole subtree associated with Node.
procedure Collapse_To_Depth
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null;
        Depth              : in     Gint);

Collapse the subtree associated with Node and its descendants until
Depth levels of subtrees have been reached.
procedure Toggle_Expansion
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Change the state of the Ctree from expanded to collapsed and the other
way around on one level.
procedure Toggle_Expansion_Recursive
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Change the state of the Ctree from expanded to collapsed and the other
way around for the whole subtree.
procedure Gtk_Select
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Select a specified Node, and only this one.
procedure Select_Recursive
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null);

Select a specified Node, and its whole subtree.
procedure Unselect
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Unselect a specified Node, and only this one.
procedure Unselect_Recursive
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null);

Unselect a specified Node, and its whole subtree.
procedure Real_Select_Recursive
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null;
        Do_Select          : in     Boolean);

Similar to Select_Recursive or Unselect_Recursive.
If Do_Select is True, equivalent to Select_Recursive.   If Do_Select is
False, equivalent to Unselect_Recursive.
Analogs of Gtk_Clist functions
------------------------------

procedure Node_Set_Text
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Text               : in     String);

Set the cell's text, replacing its current contents.
This changes the type of the cell to Cell_Text. The pixmap (if any)
will no longer be displayed.
function Node_Get_Text
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint)
        return String;

Return the text contained in cell.
An empty string is returned if Column is invalid or if the Cell did not
contain any text (only a pixmap)
procedure Node_Set_Pixmap
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

Set the cell's pixmap, replacing its current contents.
The type of the cell becomes Cell_Pixmap, and the text is no longer
displayed.
procedure Node_Get_Pixmap
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Pixmap             : out    Gdk.Pixmap.Gdk_Pixmap;
        Mask               : out    Gdk.Bitmap.Gdk_Bitmap;
        Success            : out    Boolean);

Return the Pixmap contained in a cell.
The type of the cell should be Cell_Pixmap.   The result is meaningful
only if Success is True. If the Cell did not  contain a pixmap, Success
is set to False.
procedure Node_Set_Pixtext
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Text               : in     String;
        Spacing            : in     Guint8;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

Set both the Text and the Pixmap for the cell.
Replace its current contents. The type of the cell becomes Cell_Pixtext,
and both the text and the pixmap are displayed.
procedure Node_Get_Pixtext
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Text               : out    Interfaces.C.Strings.chars_ptr;
        Spacing            : out    Guint8;
        Pixmap             : out    Gdk.Pixmap.Gdk_Pixmap;
        Mask               : out    Gdk.Bitmap.Gdk_Bitmap;
        Success            : out    Boolean);

Return the Text and the Pixmap for the cell.
The result is not meaningful if Success is False.
procedure Node_Set_Shift
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Vertical           : in     Gint;
        Horizontal         : in     Gint);

Set a horizontal and vertical shift for drawing the content of the cell.
Both shifts can be either positive or negative.   This is particularly
useful for indenting items in a columns.
procedure Set_Node_Info
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Text               : in     String;
        Spacing            : in     Guint8;
        Pixmap_Closed      : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask_Closed        : in     Gdk.Bitmap.Gdk_Bitmap;
        Pixmap_Opened      : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask_Opened        : in     Gdk.Bitmap.Gdk_Bitmap;
        Is_Leaf            : in     Boolean;
        Expanded           : in     Boolean);

Set all the info related to a specific Node.
procedure Get_Node_Info
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Text               : out    Interfaces.C.Strings.chars_ptr;
        Spacing            : out    Guint8;
        Pixmap_Closed      : out    Gdk.Pixmap.Gdk_Pixmap;
        Mask_Closed        : out    Gdk.Bitmap.Gdk_Bitmap;
        Pixmap_Opened      : out    Gdk.Pixmap.Gdk_Pixmap;
        Mask_Opened        : out    Gdk.Bitmap.Gdk_Bitmap;
        Is_Leaf            : out    Boolean;
        Expanded           : out    Boolean;
        Success            : out    Boolean);

Return all the info related to a specific Node.
procedure Node_Set_Selectable
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Selectable         : in     Boolean := True);

Indicate whether the Node can be selected or not.
The default value is True.
function Node_Get_Selectable
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node)
        return Boolean;

Return the selectable status of the Node.
procedure Node_Set_Row_Style
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Style              : in     Gtk.Style.Gtk_Style);

Set the default style for the cells in the Node.
This can be overridden for each cell with Node_Set_Cell_Style.
function Node_Get_Row_Style
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node)
        return Gtk.Style.Gtk_Style;

Return the default style used for the Node.
procedure Node_Set_Cell_Style
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Style              : in     Gtk.Style.Gtk_Style);

Set the style (font, color, ...) used for the cell.
This overrides the Node's style.
function Node_Get_Cell_Style
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint)
        return Gtk.Style.Gtk_Style;

Return the style of the cell.
procedure Node_Set_Foreground
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Color              : in     Gdk.Color.Gdk_Color);

Set the foreground color for the Node.
The color must already be allocated.   If no such Node exists in the
tree, nothing is done.
procedure Node_Set_Background
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Color              : in     Gdk.Color.Gdk_Color);

Set the background color for the Node.
The color must already be allocated.   If no such Node exists in the
tree, nothing is done.
function Node_Get_Cell_Type
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint)
        return Gtk_Cell_Type;

Return the type of the cell at Node/Column.
This indicates which of the functions Node_Get_Text. Node_Get_Pixmap,
etc. should be used with this cell.
procedure Node_Moveto
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node;
        Column             : in     Gint;
        Row_Align          : in     Gfloat := 0.5;
        Col_Align          : in     Gfloat := 0.5);

Make a Node visible.
Column indicates which column of the Node should be visible, if not
all columns can be displayed.   Row_Align and Col_Align are parameters
between 0.0 and 1.0, and  specify how the Node and the Column will be
centered in the Ctree  window. 0.0 means a Node on the top, and a
Column on the left.
function Node_Is_Visible
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node)
        return Gtk_Visibility;

Indicate the visibility of a Node.
Return Visibility_None if the Node is not visible in the Ctree window;
Visibility_Partial if the Node is partially visible; Visibility_Full
if the Node is entirely visible.   This function ignores the fact that
Node is in an expanded or collapsed  subtree.
Ctree specific functions
------------------------

procedure Set_Indent
     (Ctree              : access Gtk_Ctree_Record;
        Indent             : in     Gint := 20);

Change the indentation of the Ctree.
Each different level of a subtree is indented by a number of pixels.
By default, the indentation is 20 pixels, and can be changed using this
procedure.
function Get_Indent
     (Widget             : access Gtk.Ctree.Gtk_Ctree_Record'Class)
        return Gint;

Return the indentation of a Ctree.
procedure Set_Spacing
     (Ctree              : access Gtk_Ctree_Record;
        Spacing            : in     Gint := 5);

Set the spacing between the tree's icon and the additional pixmap.
The additional pixmap indicates whether the subtree is opened or closed.
The default value is 5 pixels.
function Get_Spacing
     (Widget             : access Gtk.Ctree.Gtk_Ctree_Record'Class)
        return Gint;

Return the spacing between the tree's icon and the additional pixmap.
procedure Set_Show_Stub
     (Ctree              : access Gtk_Ctree_Record;
        Show_Stub          : in     Boolean);

Set the Show_Stub attribute of Ctree.
function Get_Show_Stub
     (Ctree              : access Gtk_Ctree_Record)
        return Boolean;

Return the Show_Stub attribute of Ctree.
procedure Set_Line_Style
     (Ctree              : access Gtk_Ctree_Record;
        Line_Style         : in     Gtk_Ctree_Line_Style
                            := Ctree_Lines_Solid);

Change the style of the lines representing the tree of a given Ctree.
By default, solid lines are used.   See the description of
Gtk_Ctree_Line_Style for more details of the  possible values.
function Get_Line_Style
     (Ctree              : access Gtk_Ctree_Record)
        return Gtk_Ctree_Line_Style;

return the style of the lines representing the tree of a given Ctree.
procedure Set_Expander_Style
     (Ctree              : access Gtk_Ctree_Record;
        Expander_Style     : in     Gtk_Ctree_Expander_Style
                            := Ctree_Expander_Square);

Set the way a given Ctree can be expanded.
To expand a subtree, you can either double-click on a node, or click on
the "+/-" icon. This icon is by default included in a square pixmap.
This procedure can change the form of this pixmap.   See the
description of Gtk_Ctree_Expander_Style for more details.
function Get_Expander_Style
     (Ctree              : access Gtk_Ctree_Record)
        return Gtk_Ctree_Expander_Style;

Return the way a given Ctree can be expanded.
procedure Set_Drag_Compare_Func
     (Ctree              : access Gtk_Ctree_Record;
        Cmp_Func           : in     Gtk_Ctree_Compare_Drag_Func);

Set the drag compare function of a given Ctree.
This function is used when the Ctree receives a dragged data.
Tree sorting functions
----------------------

procedure Sort_Node
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node);

Sort the nodes of a given Ctree.
This procedure only sorts the first level of the tree.
procedure Sort_Recursive
     (Ctree              : access Gtk_Ctree_Record;
        Node               : in     Gtk_Ctree_Node := null);

Sort the nodes of a given Ctree recursively.
This procedure sorts the whole tree and subtrees associated with Ctree.
Set Node to null if you want to sort the whole tree starting from its
root.
Row_Data handling
-----------------

procedure Node_Set_Row_Data
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Data               : in     Data_Type);

Associate a Data with a Node.
function Node_Get_Row_Data
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node)
        return Data_Type;

Retrieve a data associated with a Node.
Error Handling:  Gtkada.Types.Data_Error is raised when trying to
retrieve  the data from a Node for which no data has been set  (using
Node_Set_Row_Data).
function Find_By_Row_Data
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Data               : in     Data_Type)
        return Gtk_Ctree_Node;

Find the first node containing a specified Data.
Node is the starting point of the search. If null, the search will
start from the root.   Return the first Node whose associated data is
Data, null if none  can be found.
function Find_All_By_Row_Data
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Data               : in     Data_Type)
        return Node_List.Glist;

Find all nodes containing a specified Data.
Node is the starting point of the search. If null, the search will
start from the root.
function Find_By_Row_Data_Custom
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Data               : in     Data_Type;
        Func               : in     Gcompare_Func)
        return Gtk_Ctree_Node;

Find the first node containing a specified Data.
Similar to Find_By_Row_Data but Func is used to allow a more flexible
(user defined) method to compare two nodes.
function Find_All_By_Row_Data_Custom
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Data               : in     Data_Type;
        Func               : in     Gcompare_Func)
        return Node_List.Glist;

Find all the nodes containing a specified Data.
Similar to Find_All_By_Row_Data but Func is used to allow a more
flexible (user defined) method to compare two nodes.
procedure Post_Recursive
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Func               : in     Gtk_Ctree_Func;
        Data               : in     Data_Type_Access);

Apply Func to each node of a subtree.
Node designates the root of the subtree.   Data will be passed as a
parameter to Func.   This procedure will first apply Func to the
children nodes.
procedure Post_Recursive_To_Depth
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Depth              : in     Gint;
        Func               : in     Gtk_Ctree_Func;
        Data               : in     Data_Type_Access);

Apply Func to each node of a subtree until a specified Depth.
Node designates the root of the subtree.   Data will be passed as a
parameter to Func.   This function is similar to Post_Recursive except
that it  stop at a specified subtree depth.
procedure Pre_Recursive
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Func               : in     Gtk_Ctree_Func;
        Data               : in     Data_Type_Access);

Apply Func to each node of a subtree.
Similar to Post_Recursive but will apply Func to the parent before
applying it to its children.
procedure Pre_Recursive_To_Depth
     (Ctree              : access Gtk_Ctree_Record'Class;
        Node               : in     Gtk_Ctree_Node;
        Depth              : in     Gint;
        Func               : in     Gtk_Ctree_Func;
        Data               : in     Data_Type_Access);

Apply Func to each node of a subtree until a specific Depth.
Similar to Post_Recursive_To_Depth but will apply Func to the parent
before applying it to its children.
Package Gtk.Curve
*****************

The Gtk_Curve widget allows the user to edit a curve covering a range of
values. It is typically used to fine-tune color balances in graphics
applications like the Gimp.

   The Gtk_Curve widget has 3 modes of operation: spline, linear and
free.   In spline mode the user places points on the curve which are
automatically  connected together into a smooth curve. In linear mode
the user places  points on the curve which are connected by straight
lines. In free mode the  user can draw the points of the curve freely,
and they are not connected at  all.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Drawing_Area   (*note Package_Gtk.Drawing_Area::)
              \___ Gtk_Curve       (*note Package_Gtk.Curve::)

Signals
=======

   * "curve-type-changed"

     procedure Handler (Curve : access Gtk_Curve_Record'Class);
     Emitted when the curve type has been changed. The curve type can be
     changed explicitly with a call to Set_Curve_Type. It is also
     changed as a side-effect of calling Reset or Set_Gamma.


Types
=====

type Gtk_Curve_Type is
     (Curve_Type_Linear,
          Curve_Type_Spline,
          Curve_Type_Free);

Subprograms
===========

procedure Gtk_New
     (Curve              : out    Gtk_Curve);

Create a new Curve.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Curve.
procedure Reset
     (Curve              : access Gtk_Curve_Record);

Reset the curve.
Reset to a straight line from the minimum x & y values to the maximum
x & y values (i.e. from the bottom-left to the top-right corners).
The curve type is not changed.
procedure Set_Gamma
     (Curve              : access Gtk_Curve_Record;
        Gamma              : in     Gfloat);

Recompute the entire curve using the given gamma value.
A gamma value of 1.0 results in a straight line. Values greater than 1.0
result in a curve above the straight line. Values less than 1.0 result
in a curve below the straight line. The curve type is changed to
Curve_Type_Free.
procedure Set_Range
     (Curve              : access Gtk_Curve_Record;
        Min_X              : in     Gfloat;
        Max_X              : in     Gfloat;
        Min_Y              : in     Gfloat;
        Max_Y              : in     Gfloat);

Set the minimum and maximum x & y values of the curve.
The curve is also reset with a call to Reset.
procedure Set_Vector
     (Curve              : access Gtk_Curve_Record;
        Vector             : in     Gfloat_Array);

Set the vector of points on the curve.
The curve type is set to Curve_Type_Free.
procedure Get_Vector
     (Curve              : access Gtk_Curve_Record;
        Vector             : in out Gfloat_Array);

Return a vector of points representing the curve.
procedure Set_Curve_Type
     (Curve              : access Gtk_Curve_Record;
        Curve_Type         : in     Gtk_Curve_Type);

Set the type of the curve.
The curve will remain unchanged except when changing from a free curve
to a linear or spline curve, in which case the curve will be changed as
little as possible.
Package Gtk.Data
****************

Abstract class for objects containing data  This object is currently
not very useful since it only provides  a single "disconnect" signal.

   This is the "Model" in the Model/View/Controller framework.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Data              (*note Package_Gtk.Data::)

Signals
=======

   * "disconnect"

     procedure Handler (Data : access Gtk_Data_Record'Class);
     Emitted just before Data is destroyed.


Subprograms
===========

function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Data.
Package Gtk.Dialog
******************

Dialog boxes are a convenient way to prompt the user for a small amount
of  input, eg. to display a message, ask a question, or anything else
that does  not require extensive effort on the user's part.

   Gtkada treats a dialog as a window split horizontally. The top
section is a  Gtk_Vbox, and is where widgets such as a Gtk_Label or a
Gtk_Entry should be  packed. The second area is known as the
action_area. This is generally used  for packing buttons into the
dialog which may perform functions such as  cancel, ok, or apply. The
two areas are separated by a Gtk_Hseparator.

   If 'dialog' is a newly created dialog, the two primary areas of the
window  can be accessed using Get_Vbox and Get_Action_Area as can be
seen from the  example, below.

   A 'modal' dialog (that is, one which freezes the rest of the
application  from user input), can be created by calling Set_Modal on
the dialog.

   *note Package_Gtkada.Dialogs:: for a higher level dialog interface.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Window   (*note Package_Gtk.Window::)
                    \___ Gtk_Dialog (*note Package_Gtk.Dialog::)

Subprograms
===========

procedure Gtk_New
     (Dialog             : out    Gtk_Dialog);

Create a new dialog.
Widgets should not be packed into this widget directly, but into the
vbox and action_area, as described above.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Dialog.
function Get_Action_Area
     (Dialog             : access Gtk_Dialog_Record)
        return Gtk.Box.Gtk_Box;

Return the action area box associated with a Dialog.
function Get_Vbox
     (Dialog             : access Gtk_Dialog_Record)
        return Gtk.Box.Gtk_Box;

Return the vertical box associated with a Dialog.
Package Gtk.Dnd
***************

Like all modern GUI toolkits, GtkAda has a full support for
drag-and-drop  operations. This is a mechanism for interactively
transferring data between  two widgets, either in the same application
or in two different  applications. The user clicks on a widget (called
a "drag source"), and,  while keeping the mouse button pressed, moves
it to another widget, where  the mouse button is released (this other
widget is called a "drop site").   As a result, and if both widgets can
handle the same type of data, some  data is either copied or moved to
this new widget.

   This is a very intuitive way, in some cases, to enhance the
usability of  your application, although you should carefully consider
whether this  should be used or not.

   GtkAda supports several drag-and-drop protocols, so as to be able to
communicate with the maximum number of applications. These protocols
are  Xdnd and Motif.

   Note that drag-and-drop is currently not supported under Windows
systems.

   Below is a summary of what is needed to add drag-and-drop
capabilities to  your application. We highly recommend that you look
at, and understand,  the example in testgtk (create_dnd.adb), before
using these features in  your own application.

   See also the package Gtk.Selection, that contains some lower
subprograms  and data types that are used when implementing
drag-and-drop.

   * Defining a widget as a possible drag source

    You need to call Source_Set, specifying which mouse buttons can
activate  the drag, which types of data will be given, and which kind
of action  will be performed.   You then need to connect to the signal
"drag_data_get", that will be  emitted when the user has dropped the
item and GtkAda needs to find the  data. You must call
Selection_Data_Set in the handler to set the actual  data.   You can
also connect the widget to "drag_data_delete", which will be  called
whenever the data set for the selection is no longer required and
should be deleted. The signal will be emitted only if the drop site
requests it, or if the selected action for the drag-and-drop operation
was Action_Move. It will not be called automatically for an Action_Copy.
Note that the callback might be called several times, if for instance
this  was an Action_Move, and the drop site requires explicitly to
delete the  data in its call to Finish.

   * Defining a widget as a possible drop site

    You need to call Dest_Set, specifying which types of Data are
accepted  by the widget, which actions are recognized, and whether you
accept drops  from external applications.   You also need to connect to
"drag_data_received", that will be emitted  when the user has dropped
some data on the widget. The handler should  call Finish, to warn the
source widget that the drag and drop operation  is finished, and
whether it was successful or not.

Signals
=======

   * "drag_begin"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context);
     A new drag-and-drop operation has just been started from Widget.
     This callback can be used for instance to modify the visual aspect
     of the widget, so as to give a visual clue as to what widget is
     the source.

   * "drag_data_delete"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context);
     This handler is called whenever the drop site of a drag-and-drop
     operation has decided that the data should be deleted, or
     automaticallyif the selected action was Action_Move.  Widget is
     the drag source.

   * "drag_data_get"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     Data    : Selection_Data;
     Info    : Guint;
     Time    : Guint);
     This should be connected to every drag source.  This is used to
     request the actual data to be transfered to the drop site once the
     drop has been done.  Info is the type of the expected Data, and is
     in fact the third field of the Target_Entry record, whose value
     you have define yourself.  Data should be modified to include a
     pointer or a copy of the data, through Selection_Data_Set.

   * "drag_data_received"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     X       : Gint;
     Y       : Gint;
     Data    : Selection_Data;
     Info    : Guint;
     Time    : Guint);
     This signal should be connected to every drop site.  The handler
     is called every time some new data has been dropped onto Widget.
     (X, Y) are the mouse coordinates, relative to the widget's window,
     where the data was dropped. Info is the type of the data, has set
     in the third field of the Target_Entry record, and Data contains a
     pointer to the actual data.

   * "drag_drop"

     function Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     X       : Gint;
     Y       : Gint;
     Time    : Guint)
     return Boolean;
     This is called whenever a drop is about to be performed on the
     widget.  Note that this is called even if no common target type
     has been found between the drag source and the drop site. Thus,
     you will need to analyze the result of Get_Targets (Context) to
     find the possible targets.  The data is sent separately through
     the "drag_data_received" signal, and might not even be available
     when "drag_drop" is emitted.  This signal is mostly used if you
     have chosen not to use any of the default behavior when calling
     Dest_Set. Otherwise, everything is already handled directly by
     GtkAda.

     This handler should return True if Widget acknowledges that it is a
     possible drop site for the particular targets provided by the drag
     source.

   * "drag_end"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context);
     The drag-and-drop operation that was started from the widget has
     been completed, and the standard set of the widget can be restored.

   * "drag_leave"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     Time    : Guint);
     Signal emitted whenever a drag-and-drop operation is being
     performed, and the mouse has just left the area covered by a
     widget on the screen. This can be used to restore the default
     visual aspect of the widget. This is also emitted when the drop
     has been performed on the widget.

   * "drag_motion"

     function Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     X       : Gint;
     Y       : Gint;
     Time    : Guint)
     return Boolean;
     This is called every time the user is doing a dnd operation, and
     the mouse is currently over Widget (but not released yet).  This
     can be used to change the visual aspect of Widget to provide
     visual clues to the user. The "opposite" signal is drag_leave.

     The return value is ignored if Dest_Default_Motion was set when
     Source_Set was called. This handler should return True if Widget
     acknowledges that it is a possible drop site for the particular
     targets provided by the drag source.


Types
=====

type Dest_Defaults is new Integer;

Specify the various types of action that will be taken on behalf of the
user for a drag destination site.
type Drag_Action is new Integer;

Possible actions for a drop onto a widget, during a drag-and-drop.
The drag widgets (ie the ones from which the user can start a
drag-and-drop operation) should set a mask, indicating which actions
it wants to do. The first action in the list below has the highest
priority, the last one the lowest. The actual action chosen for the
drag-and-drop will be the highest-priority one that is also accepted
by the drop site.    Note that in the case where the drag source
supports multiple actions,  the user can select the one he wants. As
explained above, the default  one is the highest priority one. But if
the user pressed Shift at the  same time, Action_Move will be used if
present. Ctrl-Shift selects  an Action_Link, and Ctrl selects an
Action_Copy.
type Drag_Context is new Gdk.C_Proxy;

Structure that holds information about a drag in progress.   This is
used on both source and destination sides.
type Drag_Protocol is
     (Drag_Proto_Motif,
          Drag_Proto_Xdnd,
          Drag_Proto_Rootwin,
             -- A root window with nobody claiming the drag
          Drag_Proto_None
             -- Not a valid drag window
          );

The various dnd protocols recognized by a window.   Note that not every
window recognizes every protocol, and you should  be careful as to
which one you use. The function Gdk.Drag.Get_Protocol  returns which
one is recognized by a window.
Subprograms
===========

Drag_Context
------------

function Get_Actions
     (Context            : in     Drag_Context)
        return Drag_Action;

Return the possible actions associated with the context.
This is the list of actions defined by the source of the drag-and-drop
operation, in Source_Set.   (for instance, if Source_Set was used with
Action_Copy + Action_Move,  the result will be exactly this sum,
whatever was used for Dest_Set).
function Get_Suggested_Action
     (Context            : in     Drag_Context)
        return Drag_Action;

Return the suggested action for that context.
This is the highest priority action that was set by the source of the
drag-and-drop, ie the one it would rather use. The action that is
actually used is the one returned by Get_Action, and depends on the
mask set by the target.
function Get_Action
     (Context            : in     Drag_Context)
        return Drag_Action;

Return the action selected for the drag-and-drop operation.
This is the highest priority action common between the drag site and the
drop widget (for instance, if Source_Set was used with Action_Copy +
Action_Move and Dest_Set was used with only Action_Move, this will  be
Action_Move).
function Get_Targets
     (Context            : in     Drag_Context)
        return Gtk.Enums.Guint_List.Glist;

List of all the targets common to the drag source and the drop site.
The Guint in the list are the ones given in the Info field in the
Target_Entry structure below.
To be moved to Gdk.Dnd
----------------------

procedure Drag_Status
     (Context            : in     Drag_Context;
        Action             : in     Drag_Action;
        Time               : in     Guint32 := 0);

Set the action for the context and warns the drag source about the
change.
function Drag_Get_Selection
     (Context            : in     Drag_Context)
        return Gdk.Types.Gdk_Atom;

Setting up a widget as a destination
------------------------------------

procedure Dest_Set
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Flags              : in     Dest_Defaults
                            := Dest_No_Default;
        Targets            : in     Target_Entry_Array
                            := Any_Target_Entry;
        Actions            : in     Drag_Action := Action_Any);

Set a widget as a potential drop destination.
Flags specifies what action GtkAda should take on behalf of a widget for
drops onto that widget. The Targets and Actions fields are used only
if Dest_Default_Motion or Dest_Default_Drop are given.

   Targets indicates the drop types that Widget accepts. If no item from
Targets matches the list of targets emitted by the source (as set in
Source_Set), then the drop will be considered illegal and refused.

   Actions is a bitmask of possible actions for a drop onto Widget. At
least of the actions must be in common with what was set for the source
in Source_Set, or the drop is considered illegal.
procedure Dest_Set_Proxy
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Proxy_Window       : in     Gdk.Window.Gdk_Window;
        Protocol           : in     Drag_Protocol;
        Use_Coordinates    : in     Boolean);

Set this widget as a proxy for drops to another window.
All drag events on Widget will be forwarded to Proxy_Window.   Protocol
is the drag protocol that Proxy_Window accepts. You can use
Gdk.Drag.Get_Protocol to determine this.   If Use_Coordinates is True,
send the same coordinates to the destination  because it is an embedded
subwindow.
procedure Dest_Unset
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Clear information about a drop destination set with Dest_Set. The
widget will no longer receive notification of drags.
Setting up a widget as a source
-------------------------------

procedure Source_Set
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Start_Button_Mask  : in     Gdk.Types.Gdk_Modifier_Type;
        Targets            : in     Target_Entry_Array;
        Actions            : in     Drag_Action);

Set up a widget so that GtkAda will start a drag operation when the
user clicks and drags on the widget. The widget must have a window.

   Targets is the list of targets that the drag can provide. The first
possible target accepted by the drop site will be used. For instance,
it Targets contains "text/plain" and "text/url", and the drop site only
accepts "text/url", this will be the one used. However, if the drop
site  also accepts "text/plain", the latter will be prefered.

   Widget needs to be able to convert the data to any of the types in
Target, as any of them might be requested by the drop site.

   Actions is a list of possible actions for drags from Widget. At least
one of the actions must be in common with the drop site for the
drag-and-drop operation to succeed.
procedure Source_Unset
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Undo the effects of Source_Set.
The drag-and-drop operation
---------------------------

procedure Finish
     (Context            : in     Drag_Context;
        Success            : in     Boolean;
        Del                : in     Boolean;
        Time               : in     Guint32 := 0);

Inform the drag source that the drop is finished, and that the data of
the drag will no longer be required.   Success should indicate whether
the drop was successful.   Del should be set to True if the source
should delete the original  data (this should be True for a move).
procedure Get_Data
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Context            : in     Drag_Context;
        Target             : in     Gdk.Types.Gdk_Atom;
        Time               : in     Guint32 := 0);

Get the data associated with a drag. When the data is received or the
retrieval fails, GtkAda will emit a "drag_data_received"  signal.
Failure of the retrieval is indicated by the length field of  the
selection_data signal parameter being negative. However, when  Get_Data
is called implicitely because the Drag_Default_Drop was set,  then the
widget will not receive notification of failed drops.

   Target is the target (form of the data) to retrieve.   Time is a
timestamp to retrive the data, and will be given to  "drag_data_motion"
or "drag_data_drop" signals.
function Get_Source_Widget
     (Context            : in     Drag_Context)
        return Gtk.Widget.Gtk_Widget;

Determine the source widget for a drag.
If the drag is occuring within a single application, this function
returns the source widget. Otherwise, it returns null.
procedure Highlight
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Draw a highlight around a widget.
procedure Unhighlight
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Remove a highlight set by Highlight.
function Drag_Begin
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Targets            : in     Target_List;
        Actions            : in     Drag_Action;
        Button             : in     Gint;
        Event              : in     Gdk.Event.Gdk_Event)
        return Drag_Context;

Initiate a drag on the source side. The function only needs to be used
when the application is starting drags itself, and is not needed when
Source_Set is used.   Targets is the list of targets (data formats) in
which the source can  provide the data.   Actions is a bitmask of the
allowed drag actions for this drag.   Button is the button the user
clicked to start the drag.   Event is the event that triggered the
start of the drag.
Icons
-----

procedure Set_Icon_Widget
     (Context            : in     Drag_Context;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Hot_X              : in     Gint;
        Hot_Y              : in     Gint);

Change the icon for a drag.
GtkAda will not destroy the icon, so if you don't want it to persist,
you should connect to the "drag_end" signal and destroy it yourself.
Context is the reference to the current drag operation.   Widget is the
toplevel window to use as an icon. (Hot_X, Hot_Y) is the  coordinates
of the hot point (that will be just under the mouse) within  Widget.
procedure Set_Icon_Pixmap
     (Context            : in     Drag_Context;
        Colormap           : in     Gdk.Color.Gdk_Colormap;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap;
        Hot_X              : in     Gint;
        Hot_Y              : in     Gint);

Sets a given pixmap as the icon for a given drag. GtkAda retains a
reference count for the arguments, and will release them when they are
no longer needed.   (Hot_X, Hot_Y) is the coordinates of the hotspot
within Pixmap.
procedure Set_Icon_Default
     (Context            : in     Drag_Context);

Set the icon for a particular drag to the default icon.
This must be called with a context for the source side of a drag.
procedure Set_Default_Icon
     (Colormap           : in     Gdk.Color.Gdk_Colormap;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap;
        Hot_X              : in     Gint;
        Hot_Y              : in     Gint);

Change the default drag icon. GtkAda retains a reference count for the
arguments, and will release them when they are no longer needed.
procedure Source_Set_Icon
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Colormap           : in     Gdk.Color.Gdk_Colormap;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

Set the icon that will be used for drags from a particular widget.
GtkAda retains a reference count for the arguments, and will release
them when they are no longer needed.
Package Gtk.Drawing`_'Area
**************************

This widget provides an empty canvas on which the application can draw
anything.   Note that this widget is simply an empty space, and that
you need to  connect it to events to make it useful. For instance, you
might want to do  one of the following :

   * Connect it to "expose_event": The handlers are called every time
the    widget needs to be redrawn. You can then draw anything you want
on the    canvas, after getting its associated window with a call to
Gtk.Widget.Get_Window. Note that the event mask is automatically set up
  to accept expose_events.

   * Connect it to "button_press" and "button_release" events, when you
want    it to react to user input. Note that you need to set up the
event mask    with a call to Gtk.Widget.Set_Events.

   See also the Double_Buffer widget provided in the GtkAda examples
for an  advanced example that demonstrates how to use double buffering,
to avoid  flickering in your drawings.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Drawing_Area   (*note Package_Gtk.Drawing_Area::)

Subprograms
===========

procedure Gtk_New
     (Drawing_Area       : out    Gtk_Drawing_Area);

Create a new blank Drawing_Area.
Note that the background of the widget is uninitialized, and that you
have to draw on it yourself.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Drawing_Area.
procedure Size
     (Darea              : access Gtk_Drawing_Area_Record;
        Width              : in     Gint;
        Height             : in     Gint);

Request a new size for the area.
This queues a resize request for the area.
Package Gtk.Editable
********************

This widget is an abstract widget designed to support the common
functionalities of all widgets for editing text. It provides general
services to manipulate an editable widget, a large number of action
signals used for key bindings, and several signals that an  application
can connect to to modify the behavior of a widget.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Editable       (*note Package_Gtk.Editable::)

Signals
=======

   * "activate"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitted when the user has activated the widget in some fashion.

   * "changed"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     emitted when the user has changed the text of the widget.

   * "copy_clipboard"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitting this signal will copy the current selection to the
     clipboard.

   * "cut_clipboard"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitting this signal will cut the current selection to the
     clipboard.

   * "delete_text"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Start_Pos : in Gint;
     End_Pos   : in Gint);
     Emitted when some text is deleted by the user. As for the
     "insert-text" handler, it is possible to override the default
     behavior by connecting a handler to this signal, and then stopping
     the signal.

   * "insert_text"

     procedure Handler (Widget   : access Gtk_Editable_Record'Class;
     Text     : in String;
     Length   : in Gint;
     Position : in Gint_Access);
     Emitted when some text is inserted inside the widget by the user.
     The default handler inserts the text into the widget.  By
     connecting a handler to this signal, and then by stopping the
     signal with Gtk.Handlers.Emit_Stop_By_Name, it is possible to
     modify the inserted text, or even prevent it from being inserted.
     Position.all should be modified by the callback, and indicates the
     new position of the cursor after the text has been inserted.

   * "kill_char"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Direction : in Gint);
     Emitting this signal deletes a single character. If Direction is
     positive, delete forward, else delete backward.

   * "kill_line"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Direction : in Gint);
     Emitting this signal deletes a single line. If Direction is
     positive, delete forward, otherwise delete backward.

   * "kill_word"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Direction : in Gint);
     Emitting this signal deletes a single word. If Direction is
     positive, delete forward, otherwise delete backward.

   * "move_cursor"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     X, Y   : in Gint);
     Emitting this signal will move the cursor position for X
     characters horizontally, and Y characters vertically.

   * "move_page"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     X, Y   : in Gint);
     Emitting this signal will move the cursor for X pages
     horizontally, and Y pages vertically.

   * "move_to_column"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     Column : in Gint);
     Emitting this signal will move the cursor to the given column.

   * "move_to_row"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     Row    : in Gint);
     Emitting this signal will move the cursor to the given row.

   * "move_word"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     N      : in Gint);
     Emitting this signal will move the cursor by N words (N can be
     negative).

   * "paste_clipboard"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitting this signal will paste the clipboard into the text of the
     widget at the current cursor position.

   * "set-editable"

     procedure Handler (Widget     : access Gtk_Editable_Record'Class;
     Is_Editable: in Boolean);
     Emitting this signal is equivalent to calling Set_Editable.


Subprograms
===========

function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Editable.
procedure Changed
     (Editable           : access Gtk_Editable_Record);

Cause the "changed" signal to be emitted.
procedure Claim_Selection
     (Editable           : access Gtk_Editable_Record;
        Claim              : in     Boolean := True;
        Time               : in     Guint32);

If Claim is set to True, claim the ownership of the primary X selection.
Otherwise, release it. "Time" should be set to the  time of the
last-change time for the specified selection. It is  discarded if it is
earlier than the current last-change time, or  later than the current X
server time.
procedure Copy_Clipboard
     (Editable           : access Gtk_Editable_Record;
        Time               : in     Guint32);

Copy the characters in the current selection to the clipboard.
procedure Cut_Clipboard
     (Editable           : access Gtk_Editable_Record;
        Time               : in     Guint32);

Copy the characters in the current selection to the clipboard.
The selection is then deleted.
procedure Delete_Selection
     (Editable           : access Gtk_Editable_Record);

Disclaim and delete the current selection.
procedure Delete_Text
     (Editable           : access Gtk_Editable_Record;
        Start_Pos          : in     Gint := 0;
        End_Pos            : in     Gint := -1);

Delete the characters from Start_Pos to End_Pos.
If End_Pos is negative, the characters are deleted from Start_Pos to the
end of the text.
function Get_Chars
     (Editable           : access Gtk_Editable_Record;
        Start_Pos          : in     Gint := 0;
        End_Pos            : in     Gint := -1)
        return String;

Get the text from Start_Pos to End_Pos.
If End_Pos is negative, the text from Start_Pos to the end is returned.
function Get_Clipboard_Text
     (Widget             : access Gtk_Editable_Record)
        return String;

Return the last text copied from the clipboard.
function Get_Editable
     (Widget             : access Gtk_Editable_Record)
        return Boolean;

Return True if the widget is editable by the user.
procedure Set_Editable
     (Widget             : access Gtk_Editable_Record;
        Editable           : in     Boolean := True);

Set the editable status of the entry.
If Editable is False, the user can not modify the contents of the entry.
This does not affect the user of the insertion functions above.
function Get_Has_Selection
     (Widget             : access Gtk_Editable_Record)
        return Boolean;

Return True if the selection is owned by the widget.
function Get_Selection_End_Pos
     (Widget             : access Gtk_Editable_Record)
        return Guint;

Return the position of the end of the current selection.
function Get_Selection_Start_Pos
     (Widget             : access Gtk_Editable_Record)
        return Guint;

Return the position of the beginning of the current selection.
procedure Insert_Text
     (Editable           : access Gtk_Editable_Record;
        New_Text           : in     String;
        Position           : in out Gint);

Insert the given string at the given position.
Position is set to the new cursor position.
procedure Paste_Clipboard
     (Editable           : access Gtk_Editable_Record;
        Time               : in     Guint32);

The contents of the clipboard is pasted into the given widget at
the current cursor position.
procedure Select_Region
     (Editable           : access Gtk_Editable_Record;
        Start              : in     Gint;
        The_End            : in     Gint := -1);

Select the region of text from Start to The_End.
The characters that are selected are those characters at positions
from Start up to, but not including The_End. If The_End_Pos is
negative, then the characters selected will be those characters  from
Start to the end of the text.
procedure Set_Position
     (Editable           : access Gtk_Editable_Record;
        Position           :        Gint);

Change the position of the cursor in the entry.
The cursor is displayed before the character with the given  index in
the widget (the first character has index 0). The  value must be less
than or equal to the number of characters in the  widget. A value of -1
indicates that the position  should be set after the last character in
the entry.   Note that this position is in characters, not in bytes.
function Get_Position
     (Editable           : access Gtk_Editable_Record)
        return Gint;

Return the position of the cursor.
Package Gtk.Event`_'Box
***********************

This widget is a container that catches events for its child when its
child does not have its own window (like a Gtk_Scrolled_Window or a
Gtk_Label for instance).   Some widgets in GtkAda do not have their own
window, and thus can not  directly get events from the server. The
Gtk_Event_Box widget can be  used to force its child to receive events
anyway.

   For instance, this widget is used internally in a Gtk_Combo_Box so
that  the application can change the cursor when the mouse is in the
popup  window. In that case, it contains a frame, that itself contains
the  scrolled window of the popup.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Event_Box (*note Package_Gtk.Event_Box::)

Subprograms
===========

procedure Gtk_New
     (Event_Box          : out    Gtk_Event_Box);

Create a new box.
The box's child can then be set using the Gtk.Container.Add function.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Event_Box.
Package Gtk.Extra
*****************

This is the top level package of the Gtk.Extra widget hierarchy.

Package Gtk.Extra.Border`_'Combo
********************************

A Gtk_Border_Combo is a special kind of combo box that allows the  user
to select the border to apply to cells in a spreadsheet.   Its main
usage seems to be with a Gtk_Sheet.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Combo_Box (*note Package_Gtk.Extra.Combo_Box::)
                    \___ Gtk_Border_Combo (*note Package_Gtk.Extra.Border_Combo::)

Signals
=======

   * "changed"

     procedure Handler (Combo : access Gtk_Border_Combo_Record'Class;
     Selection : Gint);
     Emitted when a new font has been selected.  Selection is the
     number of the selection font.


Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Border_Combo);

Create a new border combo.
The button contains the currently selected border.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Border_Combo.
Package Gtk.Extra.Check`_'Item
******************************

This package implements a toggle button that has a different visual
aspect than the standard button. When a Gtk_Check_Item is active, a
tick is drawn into the button, instead of the standard "in/out/ aspect.

   Note that the style given could be achieved easily with the standard
Gtk_Toggle_Button widget by defining a "theme", ie a special
configuration  file that specifies a pixmap to use for toggle buttons.
However, this  Gtk_Check_Item does not need any pixmap, and thus might
be a little bit  lighter if you need to use a lot of them in your
application.

   Note also that the visual aspect of the buttons should probably be
left up  to the user of your application through configuration files.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Button   (*note Package_Gtk.Button::)
                    \___ Gtk_Toggle_Button (*note Package_Gtk.Toggle_Button::)
                       \___ Gtk_Check_Item (*note Package_Gtk.Extra.Check_Item::)

Subprograms
===========

procedure Gtk_New
     (Item               : out    Gtk_Check_Item;
        Label              : in     String := "");

Initialize a button.
If Label is "", then no label is created inside the button and  you
will have to provide your own child through a call to
Gtk.Container.Add.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Check_Item.
Package Gtk.Extra.Color`_'Combo
*******************************

A Gtk_Color_Combo is a widget that ease the selection of colors  by the
user. It is a special form of a Gtk_Combo_Box, that displays  a special
popup window, with a list of colors.

   Note that nothing appears in the button, this your responsibility to
update it when the user selects a new color (see the "changed" signal).

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Combo_Box (*note Package_Gtk.Extra.Combo_Box::)
                    \___ Gtk_Color_Combo (*note Package_Gtk.Extra.Color_Combo::)

Signals
=======

   * "changed"

     procedure Handler (Color_Combo : access
     Gtk_Color_Combo_Record'Class;
     Selection   : Gint;
     Color_Name  : String);
     Emitted when the color has selected a new color.  Selection is the
     number of the selection (this is the total row * Ncols + col).
     Color_Name is the name of the selected color.


Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Color_Combo);

Create a new default combo box.
It shows a list of 40 default colors.
procedure Gtk_New
     (Widget             : out    Gtk_Color_Combo;
        Nrows              : in     Gint;
        Ncols              : in     Gint;
        Color_Names        : in     Gtkada.Types.Chars_Ptr_Array);

Create a new combo box with a specific list of colors.
Note that Color_Names must contain at least Nrows * Ncols elements.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Color_Combo.
function Get_Color_At
     (Widget             : access Gtk_Color_Combo_Record;
        Row                :        Gint;
        Col                :        Gint)
        return String;

Return the name of the color at specific coordinates.
procedure Find_Color
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Color              : in     Gdk.Color.Gdk_Color;
        Row                : out    Gint;
        Col                : out    Gint);

Return the coordinates in which a color appear in the popup window.
(-1, -1) is returned if the color was not found in the combo box.
function Set_Color
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Name               :        String)
        return Boolean;

Set the new current color. If the color is not found in the list of
colors provided in the popup window, False is returned.
function Set_Color
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Color              :        Gdk.Color.Gdk_Color)
        return Boolean;

Set the new current color. Color must have been allocated first.  If the
color is not found in the list of colors provided in the popup window,
False is returned.
function Get_Column
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return the currently selected column in the popup window. You can get
the currently selected color by using Get_Color_At and passing it the
current Row and Column.
function Get_Row
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return The currently selected row.
function Get_Ncols
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return the number of columns in the popup window
function Get_Nrows
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return the number of rows in the popup window
procedure Changed
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Row                :        Gint;
        Col                :        Gint);

Emit the changed signal for the widget, as if the color at coordinates
(Row, Col) had been selected.   Note that this doesn't change the
internal state of the widget (use  Set_Color for that).
Package Gtk.Extra.Combo`_'Box
*****************************

A Gtk_Combo_Box is a general form for a combo box (ie a button
associated with a popup window to select its value).   This widget
should be used only if you intend to write your own kind  of combo box.
You should look at the following widgets for specific  implementation:
Gtk_Combo, Gtk_Color_Combo, Gtk_Border_Combo.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Combo_Box (*note Package_Gtk.Extra.Combo_Box::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Combo_Box);

Create a new combo box.
This creates all the internal subwidgets (the popup window,...) but
this is your responsibility to put something inside the button or  the
popup window.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Combo_Box.
procedure Hide_Popdown_Window
     (Combobox           : access Gtk_Combo_Box_Record);

Hide the popup window, release the mouse grabs, and restore the
default aspect for the arrow.
function Get_Button
     (Combobox           : access Gtk_Combo_Box_Record)
        return Gtk.Button.Gtk_Button;

Return the button that shows the value of the combo.
function Get_Arrow
     (Combobox           : access Gtk_Combo_Box_Record)
        return Gtk.Arrow.Gtk_Arrow;

Return the arrow button.
The user has to click on it to open the popup window.
function Get_Frame
     (Combobox           : access Gtk_Combo_Box_Record)
        return Gtk.Frame.Gtk_Frame;

The frame displayed in the popup window.
You should add whatever value the popup window should display in it.
Package Gtk.Extra.Font`_'Combo
******************************

A Gtk_Font_Combo is a small toolbar used to select fonts.   This widget
takes less real-estate on the screen than a  Gtk_Font_Selection widget,
and thus can be kept permanently on the  screen.   This widget only
works with postscript fonts (see Gtk.Extra.PsFont).

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Toolbar     (*note Package_Gtk.Toolbar::)
                 \___ Gtk_Font_Combo (*note Package_Gtk.Extra.Font_Combo::)

Signals
=======

   * "changed"

     procedure Handler (Combo : access Gtk_Font_Combo_Record'Class);
     Emitted when a new font was selected by the user.


Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Font_Combo);

Create a new combo box
function Get_Type              return Guint;

Return the internal value associated with a Gtk_Font_Combo.
procedure Font_Combo_Select
     (Font_Combo         : access Gtk_Font_Combo_Record;
        Family             : in     String;
        Bold               : in     Boolean;
        Italic             : in     Boolean;
        Height             : in     Gint);

Selects a new font
Family is the name of the postscript font.
procedure Font_Combo_Select_Nth
     (Font_Combo         : access Gtk_Font_Combo_Record;
        N                  : in     Gint;
        Bold               : in     Boolean;
        Italic             : in     Boolean;
        Height             : in     Gint);

Selects the nth font in the combo box.
function Get_Name_Combo
     (Font_Combo         : access Gtk_Font_Combo_Record)
        return Gtk.Combo.Gtk_Combo;

Return the combo box used to select the name of the font.
function Get_Size_Combo
     (Font_Combo         : access Gtk_Font_Combo_Record)
        return Gtk.Combo.Gtk_Combo;

Return the combo box used to select the size of the font.
function Get_Bold_Button
     (Font_Combo         : access Gtk_Font_Combo_Record)
        return Gtk.Toggle_Button.Gtk_Toggle_Button;

Return the toggle button that indicates whether the font is
bold.
function Get_Italic_Button
     (Font_Combo         : access Gtk_Font_Combo_Record)
        return Gtk.Toggle_Button.Gtk_Toggle_Button;

Return the toggle button that indicates whether the font is
italic.
function Get_Font
     (Font_Combo         : access Gtk_Font_Combo_Record)
        return Gdk.Font.Gdk_Font;

Return the selected font.
Package Gtk.Extra.Item`_'Entry
******************************

A Gtk_Item_Entry is a special kind of entry item used in a  Gtk_Sheet
to edit the current cell.   It can be used independently, but you
should rather use a more general  Gtk_Entry widget.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Editable       (*note Package_Gtk.Editable::)
              \___ Gtk_Entry       (*note Package_Gtk.GEntry::)
                 \___ Gtk_IEntry   (*note Package_Gtk.Extra.Item_Entry::)

Types
=====

subtype Gtk_Item_Entry is Gtk_IEntry;

This type is provided so as to be compatible with the new name used  in
gtk+extra. Both names are kept for backward compatibility.
Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_IEntry;
        Max                : in     Guint16 := 0);

Create a new entry item.
By default, the maximal length depends only on the size of the widget.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Item_Entry.
procedure Set_Justification
     (Item_Entry         : access Gtk_IEntry_Record;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Change the justification of the text in the entry.
procedure Set_Text
     (Item_Entry         : access Gtk_IEntry_Record;
        Text               : in     String;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Change the text in the entry.
function Get_Justification
     (Item_Entry         : access Gtk_IEntry_Record)
        return Gtk.Enums.Gtk_Justification;

Return the current justification for the entry.
Package Gtk.Extra.Plot
**********************

This package implements a high-level, general purpose plotting widget.
You can display any set of data (set of points, curve defined by a
parametric function, ...). This widget can automatically display them
as a curve, along with labelled axis, axis tic marks, legends,...

   This is the base class, that provides 2D graphics. Some children
provide  polar-coordinates and 3D graphics in addition.

   It fully supports the drag-and-drop protocol for all of its children,
which means that the user can interactively move them in the Gtk_Plot
area.

   A Gtk_Plot is closely associated with a Gdk_Drawable, on which all
the  drawings are done. It can be done anywhere within that drawable,
its  "position" is indicated by a tuple (X, Y), which are two values
between  0.0 and 1.0 (from left to right, or from top to bottom).   Its
size is also given as a ratio other the drawable's size.

   Most points in the plot have also this relative coordinates systems,
which  makes it really easy to handle resizing of a plot window.

   See the package Gtk.Extra.Plot_Ps for a way to easily print a
Gtk_Plot to  a postscript file.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot           (*note Package_Gtk.Extra.Plot::)

Signals
=======

   * "changed"

     procedure Handler (Plot : access Gtk_Plot_Record'Class);
     Called every time some property of the widget is changed, or the
     widget is moved or resized.

   * "moved"

     function Handler (Plot : access Gtk_Plot_Record'Class;
     X    : Gdouble;
     Y    : Gdouble)
     return Boolean;
     Called when the widget has been moved relative to its drawable.
     Its new position is given in parameters.

   * "resized"

     function Handler (Plot   : access Gtk_Plot_Record'Class;
     Width  : Gdouble;
     Height : Gdouble)
     return Boolean;
     Called when the widget has been resized relative to its drawable.
     Its new size is given in parameters.

   * "tick_label"

     function Handler (Axis  : access Gtk_Plot_Axis_Record'Class;
     Tick  : Gdouble_Access;
     Label : Interfaces.C.Strings.chars_ptr)
     return Boolean;
     Called when a label should be drawn. You can modify the contents
     of Label (up to 100 characters) a


Types
=====

type Gtk_Plot_Line is new Gdk.C_Proxy;

A simple line drawn on the plot.
type Gtk_Plot_Text is new Gdk.C_Proxy;

A text that can be displayed anywhere on the plot.
type Plot3D_Function is access function
     (Plot  : System.Address;

type Plot_Angle is
     (Angle_0,
          Angle_90,
          Angle_180,
          Angle_270);

Valid values for the angles of texts and titles.
type Plot_Axis_Pos is
     (Axis_Left,
          Axis_Right,
          Axis_Top,
          Axis_Bottom);

Where the axis should be put
type Plot_Border_Style is
     (Border_None,
             -- No border is drawn
     
          Border_Line,
             -- A simple line on each side
     
          Border_Shadow
             -- The right and bottom lines are
             -- thicker
          );

Border types used for legends.
type Plot_Error is
     (Error_Div_Zero,
          Error_Log_Neg);

Errors that can be encountered while calculating a graph.
type Plot_Label_Pos is new Integer;

Position of labels along an axis.
type Plot_Label_Style is
     (Label_Float,
          Label_Exp,
          Label_Pow);

The style of labels (floating point, or scientific notation)
type Plot_Orientation is
     (Axis_X,
          Axis_Y,
          Axis_Z);

How to reference axis in 3D plots
type Plot_Scale is
     (Scale_Linear, Scale_Log10);

Type of scale used for each axis of a graph.
type Plot_Ticks_Pos is new Integer;

The position and orientation of the ticks along an axis.   See the
constants below for the possible values.   Note also that not all the
values are valid with all types of axis.
Subprograms
===========

Creating a plot
---------------

procedure Gtk_New
     (Plot               : out    Gtk_Plot;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable
                            := Gdk.Drawable.Null_Drawable);

Create a new plot, that will be displayed in Drawable.
All the dataset, labels, axis,... associated with the plot will be drawn
in that drawable, which must have been created beforehand.   Note that
the drawable can also be set later with Set_Drawable.
procedure Gtk_New
     (Plot               : out    Gtk_Plot;
        Width              : in     Gdouble;
        Height             : in     Gdouble;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable
                            := Gdk.Drawable.Null_Drawable);

Create a new plot with a specific size.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Plot.
procedure Set_Drawable
     (Plot               : access Gtk_Plot_Record;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable);

Modify the drawable on which the graphs are displayed.
From now on, all the drawings will be done on that drawable. Note that
they are not automatically copied to the new Drawable until the Plot
needs to be redrawn.
function Get_Drawable
     (Plot               : access Gtk_Plot_Record)
        return Gdk.Drawable.Gdk_Drawable;

Return the drawable on which the graphs are plotted.
procedure Set_Background
     (Plot               : access Gtk_Plot_Record;
        Background         : in     Gdk.Color.Gdk_Color);

Change the background for the plot.
Note that this has no effect if the plot has been set to transparent
(see the flags below).   The Plot is also redrawn as soon as you modify
this color.
procedure Paint
     (Plot               : access Gtk_Plot_Record);

Force an immediate repaint of the widget in its pixmap.
The modification won't appear on the screen until you call Refresh.
It is probably not a good idea to call this function directly, and it
is more efficient to queue a draw request (see the Gtk.Widget package
for related functions).
procedure Refresh
     (Plot               : access Gtk_Plot_Record;
        Area               : in     Gdk.Rectangle.Gdk_Rectangle);

Copy the plot's pixmap to the screen.
The same comment as for Paint applies here, and you probably don't
have to call this function yourself, since queuing a draw request is
more efficient.
procedure Set_Magnification
     (Plot               : access Gtk_Plot_Record;
        Magnification      :        Gdouble);

Change the magnification level of the plot.
1.0 is the default magnification, higher values will zoom in while lower
values will zoom out.
procedure Draw_Line
     (Plot               : access Gtk_Plot_Record;
        Line               :        Gtk_Plot_Line;
        X1, Y1, X2, Y2     :        Gdouble);

Draw a line on the plot
Coordinates and sizes
---------------------

procedure Get_Position
     (Plot               : access Gtk_Plot_Record;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Return the position of the Plot within its drawable.
X and Y are in the range 0.0 .. 1.0, where (0.0, 0.0) is the top-left
corner and (1.0, 1.0) the bottom-right corner. The position can be
modified by Move below.
procedure Get_Size
     (Plot               : access Gtk_Plot_Record;
        Width              : out    Gdouble;
        Height             : out    Gdouble);

Return the size of the Plot.
Width and Height are both in the range 0.0 .. 1.0, where 1.0 means they
occupy all the space available in the Drawable, 0.5 means they only
occupy half of it.
function Get_Internal_Allocation
     (Plot               : access Gtk_Plot_Record)
        return Gtk.Widget.Gtk_Allocation;

Return the real position/size of the plot inside its parent container.
You should use this function instead of converting yourself the result
of Get_Position and Get_Size.
procedure Move
     (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Move the plot widget inside its drawable.
X and Y should both be in the range 0.0 .. 1.0 (from top-left corner
to bottom-right corner).
procedure Resize
     (Plot               : access Gtk_Plot_Record;
        Width              : in     Gdouble;
        Height             : in     Gdouble);

Resize the widget.
Width and Height should both be in the range 0.0 .. 1.0, this indicates
which ratio of the drawable's screen real-estate they should use.
procedure Move_Resize
     (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble;
        Width              : in     Gdouble;
        Height             : in     Gdouble);

Move and resize the widget in a single operation.
This is faster than doing each operation separately.
procedure Get_Pixel
     (Plot               : access Gtk_Plot_Record;
        Xx                 : in     Gdouble;
        Yy                 : in     Gdouble;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Get the screen coordinate (relative to Plot's parent) of a point.
The initial coordinates (Xx, Yy) should be in the range 0.0 .. 1.0.
procedure Clip_Data
     (Plot               : access Gtk_Plot_Record;
        Clip               :        Boolean);

If Clip is True, any drawing of a Gtk_Plot_Data will be limited to the
area occupied by Plot. Otherwise, it might draw outside of Plot.
procedure Get_Point
     (Plot               : access Gtk_Plot_Record;
        X                  : in     Gint;
        Y                  : in     Gint;
        Xx                 : out    Gdouble;
        Yy                 : out    Gdouble);

Convert from an absolute screen coordinate to a relative one.
(X, Y) should be relative to Plot's parent.   This function is the
opposite of Get_Pixel.
procedure Set_Xrange
     (Plot               : access Gtk_Plot_Record;
        Xmin               : in     Gdouble := 0.0;
        Xmax               : in     Gdouble := 1.0);

Set the range of visible points for this plot.
Only the points of the graph those coordinates are in the range  Xmin
.. Xmax will be visible.
procedure Set_Yrange
     (Plot               : access Gtk_Plot_Record;
        Ymin               : in     Gdouble := 0.0;
        Ymax               : in     Gdouble := 1.0);

Set the range of visible points for this plot.
Only the points of the graph those coordinates are in the range  Xmin
.. Xmax will be visible.
procedure Set_Range
     (Plot               : access Gtk_Plot_Record;
        Xmin               : in     Gdouble := 0.0;
        Xmax               : in     Gdouble := 1.0;
        Ymin               : in     Gdouble := 0.0;
        Ymax               : in     Gdouble := 1.0);

Set both ranges at the same time
procedure Autoscale
     (Plot               : access Gtk_Plot_Record);

Calculate automically the appropriate ranges for the plot.
procedure Get_Xrange
     (Plot               : access Gtk_Plot_Record;
        Xmin               : out    Gdouble;
        Xmax               : out    Gdouble);

Get the current range for the X axis.
procedure Get_Yrange
     (Plot               : access Gtk_Plot_Record;
        Ymin               : out    Gdouble;
        Ymax               : out    Gdouble);

Get the current range for the X axis.
procedure Set_Xscale
     (Plot               : access Gtk_Plot_Record;
        Scale_Type         : in     Plot_Scale);

Set the type of the X axis (logarithmic, linear, ...).
procedure Set_Yscale
     (Plot               : access Gtk_Plot_Record;
        Scale_Type         : in     Plot_Scale);

Set the type of the Y axis (logarithmic, linear, ...).
function Get_Xscale
     (Plot               : access Gtk_Plot_Record)
        return Plot_Scale;

Get the type of the X axis.
function Get_Yscale
     (Plot               : access Gtk_Plot_Record)
        return Plot_Scale;

Get the type of the Y axis.
Axis
----

A Gtk_Plot has four axis, one one each of its sides. These axis can
have ticks, labels for ticks, titles, ... associated with them.

procedure Gtk_New
     (Axis               : out    Gtk_Plot_Axis;
        Orientation        :        Plot_Orientation);

Create a new axis
function Axis_Get_Type         return Gtk_Type;

Return the internal value associated with a Gtk_Plot_Axis.
function Get_Axis
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos)
        return Gtk_Plot_Axis;

Get a pointer to an axis.
procedure Axis_Set_Visible
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Visible            : in     Boolean);

Indicate whether the axis should be visible or not.
function Axis_Visible
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos)
        return Boolean;

Return the visibility state of the axis
procedure Axis_Set_Title
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Title              : in     String);

Modify the title of the axis.
Each axis has a title that is displayed along its line (vertically  for
the left and right sides).
procedure Axis_Show_Title
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos);

Show the title associated with the axis.
procedure Axis_Hide_Title
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos);

Hide the title associated with the axis.
procedure Axis_Move_Title
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Angle              : in     Plot_Angle;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Modify the position and orientation of the axis' title.
X and Y indicate a position relative to the location of the axis (0.0
to display it to the left (resp. top) of the axis, 1.0 to display it
to the right (resp. bottom) of the axis.
procedure Axis_Justify_Title
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Modify the justification for the axis.
procedure Axis_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Line_Width         : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Modify the attributes of the lines of the axis.
procedure Axis_Get_Attributes
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Line_Width         : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the axis.
procedure Axis_Set_Ticks
     (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation;
        Major_Step         : in     Gdouble;
        Num_Minor          : in     Gint);

Set up ticks for a specific orientation.
A horizontal orientation will match the left and right sides, whereas
a vertical orientation will match the top and bottom sides.
Major_Step is a percentage value of the widget size, and indicate the
step between each big ticks. For instance, if Major_Step has a value
of 0.2, there will be 5 big ticks drawn along the axis.   Num_Minor is
the number of minor ticks between each major one.
procedure Axis_Set_Major_Ticks
     (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation;
        Major_Step         : in     Gdouble);

Modify the step for major ticks.
This is a percentage value that indicates how many major ticks are
drawn along the axis. See also Axis_Set_Ticks.
procedure Axis_Set_Minor_Ticks
     (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation;
        Num_Minor          : in     Gint);

Modify the number of minor ticks between each major one.
See also Axis_Set_Ticks.
procedure Axis_Set_Ticks_Length
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Length             : in     Gint);

Set the length (in pixels) of the big ticks.
The small ticks will have half this length.
procedure Axis_Set_Ticks_Width
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Width              : in     Gfloat);

Set the width (in pixels) of the ticks.
This width is common to both the long and short ticks.
procedure Axis_Show_Ticks
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Major_Mask         : in     Plot_Ticks_Pos;
        Minor_Mask         : in     Plot_Ticks_Pos);

Set the style of the ticks.
procedure Axis_Set_Ticks_Limits
     (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Gtk.Enums.Gtk_Orientation;
        Ticks_Beg          : in     Gdouble;
        Ticks_End          : in     Gdouble);

Indicate the area of the axis that should have ticks.
Ticks will be displayed only from Ticks_Beg to Ticks_End.
procedure Axis_Unset_Ticks_Limits
     (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation);

Cancel the ticks limits set by a previous call to
Axis_Set_Ticks_Limits.
procedure Axis_Show_Labels
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Labels_Mask        : in     Plot_Label_Pos);

Indicate whether a label should be drawn at each ticks to indicate
its value.   Not all values of Labels_Mask are relevant for all axis.
For instance,  for a vertical axis, the relevant values are Label_Right
and Label_Left.
procedure Axis_Title_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Ps_Font            : in     String;
        Height             : in     Gint;
        Angle              : in     Plot_Angle;
        Foreground         : in     Gdk.Color.Gdk_Color;
        Background         : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Set the attributes to be used for the title of the axis.
Ps_Font should be a postscript font (see Gtk.Plot.PsFont).
procedure Axis_Set_Labels_Attributes
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Ps_Font            : in     String;
        Height             : in     Gint;
        Angle              : in     Plot_Angle;
        Foreground         : in     Gdk.Color.Gdk_Color;
        Background         : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Set the attributes to be used for the ticks labels.
Ps_Font should be a postscript font (see Gtk.Plot.PsFont).
procedure Axis_Set_Labels_Numbers
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Style              : in     Plot_Label_Style;
        Precision          : in     Gint);

Set the style of labels.
This indicates whether the labels should be displayed as floating
point values or in the scientific notation.   Precision is the number
of digits to be printed.
procedure Axis_Use_Custom_Tick_Labels
     (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Custom             : in     Boolean := True);

Indicate which kind of labels should be used for major ticks.
If Custom is True, then the labels set by Axis_Set_Tick_Labels will  be
used.
procedure Axis_Set_Labels_Suffix
     (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos;
        Text               :        String);

Defines a suffix to add after each label on the axis
procedure Axis_Set_Labels_Prefix
     (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos;
        Text               :        String);

Defines a suffix to add before each label on the axis
function Axis_Get_Labels_Suffix
     (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos)
        return String;

Return the suffix added to each label.
function Axis_Get_Labels_Prefix
     (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos)
        return String;

Return the prefix added to each label.
Grids
-----

A grid can be displayed in the graph.
This makes it easier to understand a graphics in some situations.   The
grid has two simultaneous line styles, each with its own specific  step
(minor and major steps).

   There are two special lines in the grid, that you can display even if
you don't display the rest of the line. These are the origin of the
coordinates system, ie the lines at X=0 and Y=0.

procedure X0_Set_Visible
     (Plot               : access Gtk_Plot_Record;
        Visible            : in     Boolean);

Indicate whether the line at X=0 should be displayed.
function X0_Visible
     (Plot               : access Gtk_Plot_Record)
        return Boolean;

Return the visibility state of the line at X=0
procedure Y0_Set_Visible
     (Plot               : access Gtk_Plot_Record;
        Visible            : in     Boolean);

Indicate whether the line at Y=0 should be displayed.
function Y0_Visible
     (Plot               : access Gtk_Plot_Record)
        return Boolean;

Return the visibility state of the line at Y=0
procedure X0line_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes of the line at X=0
procedure Y0line_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes of the line at Y=0
procedure Grids_Set_Visible
     (Plot               : access Gtk_Plot_Record;
        Vmajor             : in     Boolean;
        Vminor             : in     Boolean;
        Hmajor             : in     Boolean;
        Hminor             : in     Boolean);

Indicate whether the lines of the grids should be displayed.
You can decide separately whether the major and minor lines should  be
displayed.
procedure Grids_Visible
     (Plot               : access Gtk_Plot_Record;
        Vmajor             : out    Boolean;
        Vminor             : out    Boolean;
        Hmajor             : out    Boolean;
        Hminor             : out    Boolean);

Return the visibility state of the grid.
procedure Major_Hgrid_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the major horizontal lines in the grid.
procedure Major_Vgrid_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the major vertical lines in the grid.
procedure Minor_Hgrid_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the minor horizontal lines in the grid.
procedure Minor_Vgrid_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the minor vertical lines in the grid.
Legends
-------

Each graph is associated with one legend, that is supposed to
indicate what the plot represents.

procedure Show_Legends
     (Plot               : access Gtk_Plot_Record);

Indicate that the legend should be displayed.
procedure Hide_Legends
     (Plot               : access Gtk_Plot_Record);

Indicate that the legend should not be displayed.
procedure Set_Legends_Border
     (Plot               : access Gtk_Plot_Record;
        Border             :        Plot_Border_Style;
        Shadow_Width       :        Gint);

Modify the way the borders of the legend look like.
procedure Legends_Move
     (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Move the legend relative to the widget's area.
X and Y are percentage values. (0.0, 0.0) indicates the top-left
corner of the plot, (1.0, 1.0) indicates the bottom-right corner.
procedure Legends_Get_Position
     (Plot               : access Gtk_Plot_Record;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Return the current position of the legend.
function Legends_Get_Allocation
     (Plot               : access Gtk_Plot_Record)
        return Gtk.Widget.Gtk_Allocation;

Return the exact coordinates and size in pixels of the legend.
The coordinates are relative to the widget's parent container.
procedure Legends_Set_Attributes
     (Plot               : access Gtk_Plot_Record;
        Ps_Font            : in     String;
        Height             : in     Gint;
        Foreground         : in     Gdk.Color.Gdk_Color;
        Background         : in     Gdk.Color.Gdk_Color);

Set the attributes to use when displaying the legend.
Ps_Font is the name of a postscript font (see Gtk.Plot.PsFont)
Line
----

procedure Set_Line_Style
     (Line               :        Gtk_Plot_Line;
        Style              :        Plot_Line_Style);

Change the style of the line.
procedure Set_Line_Width
     (Line               :        Gtk_Plot_Line;
        Width              :        Gfloat);

Change the width of the line.
procedure Set_Color
     (Line               :        Gtk_Plot_Line;
        Color              :        Gdk.Color.Gdk_Color);

Change the color used to draw the line
Text
----

procedure Put_Text
     (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble;
        Ps_Font            : in     String := "";
        Font_Height        : in     Gint := 10;
        Angle              : in     Plot_Angle;
        Foreground         : in     Gdk.Color.Gdk_Color
                            := Gdk.Color.Null_Color;
        Background         : in     Gdk.Color.Gdk_Color
                            := Gdk.Color.Null_Color;
        Transparent        : in     Boolean := False;
        Justification      : in     Gtk.Enums.Gtk_Justification
                            := Gtk.Enums.Justify_Center;
        Text               : in     String := "");

Print some text in Plot.
The text will be drawn at the relative coordinates (X, Y), with a
specified Angle.   If Font is the empty string, a default font and
default Font_Height  will be used. Likewise, default colors will be
used if you don't  specify any. Font should be the name of a postscript
font, the list of  which can be found in Gtk.Plot.Psfont.   If
Transparent is True, then no background will be drawn for the text.
procedure Remove_Text
     (Plot               : access Gtk_Plot_Record;
        Text               : in     Gtk_Plot_Text);

Remove some text that is currently visible on the plot.
Nothing is done if Text is currently not visible.
procedure Text_Get_Area
     (Text               : in     Gtk_Plot_Text;
        Angle              : in     Gint;
        Just               : in     Gtk.Enums.Gtk_Justification;
        Font_Name          : in     String;
        Font_Size          : in     Gint;
        X                  : out    Gint;
        Y                  : out    Gint;
        Width              : out    Gint;
        Height             : out    Gint);

Return the area currently occupied by a text.
The coordinates are relative to the top-left corner of the plot in
which the text was put.
procedure Text_Get_Size
     (Text               : in     Gtk_Plot_Text;
        Angle              : in     Gint;
        Font_Name          : in     String;
        Font_Size          : in     Gint;
        Width              : out    Gint;
        Height             : out    Gint;
        Ascent             : out    Gint;
        Descent            : out    Gint);

Return the size in pixels occupied by a text in the plot.
*note Package_Gtk.Extra.Plot_Canvas:: for a function that returns  a
Gtk_Plot_Text.
function Get_Texts
     (Plot               : access Gtk_Plot_Record)
        return Texts_List.Glist;

Return the list of all the texts associated with the plot
procedure Get_Text_Position
     (Text               : in     Gtk_Plot_Text;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Return the location of the Text.
function Get_Text_String
     (Text               : in     Gtk_Plot_Text)
        return String;

Return the string of the text.
procedure Text_Set_Attributes
     (Text               : in     Gtk_Plot_Text;
        Font               : in     String;
        Height             : in     Gint;
        Angle              : in     Plot_Angle;
        Fg                 : in     Gdk.Color.Gdk_Color;
        Bg                 : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean := False;
        Justification      : in     Gtk.Enums.Gtk_Justification
                            := Gtk.Enums.Justify_Center;
        Str                : in     String := "");

Change the attributes of Text.
procedure Draw_Text
     (Plot               : access Gtk_Plot_Record;
        Text               :        Gtk_Plot_Text);

Draw the text
Datasets
--------

A dataset is a set of points, either given explicitly by your
application or calculated with a specific function, and that can be
plotted on the screen.   In Gtk_Plot, such a set is represented with
symbols (special points in  the graph, that can be manipulated
interactively if you so wish), linked  by connectors, which are either
straight lines, splines, sets, ...   Multiple data sets can of course
be printed on a single graph.

procedure Add_Data
     (Plot               : access Gtk_Plot_Record;
        Data               : access Gtk_Plot_Data_Record'Class);

Add an existing set of data to the plot.
This set will automatically be drawn the next time the Plot itself is
drawn.
function Remove_Data
     (Plot               : access Gtk_Plot_Record;
        Data               : access Gtk_Plot_Data_Record'Class)
        return Boolean;

Remove the dataset from Plot.
This function returns True if the dataset was indeed found and could be
removed, False otherwise.
function Add_Function
     (Plot               : access Gtk_Plot_Record;
        Func               : in     Plot_Function)
        return Gtk_Plot_Data;

Allocate a new dataset, whose point are automatically calculated.
Func is a function that takes the X coordinate value, and should return
the Y coordinate value.   The newly allocated set should be freed by
calling Free above.   The set is automatically added to the plot, so
you don't need to  explicitly call Add_Dataset.
Flags
-----

Some flags are defined for this widget. You can not access them through
the usual interface in Gtk.Object.Flag_Is_Set since this widget is not
part of the standard gtk+ packages. Instead, use the functions below.

   * "transparent"    If this flag is set, the widget's background is
     not filled, and thus    the widget's parent's background is seen
     through it.

function Plot_Flag_Is_Set
     (Plot               : access Gtk_Plot_Record;
        Flag               :        Guint8)
        return Boolean;

Test whether one of the flags for a Gtk_Plot widget or its children
is set. This can only be used for the flags defined in the
Gtk.Extra.Gtk_Plot package.
procedure Plot_Set_Flags
     (Plot               : access Gtk_Plot_Record;
        Flags              :        Guint8);

Set the flags for a Gtk_Plot widget or its children. Note that the
flags currently set are not touched by this function. This can only be
used for the flags defined in the Gtk.Extra.Gtk_Plot package.
procedure Plot_Unset_Flags
     (Plot               : access Gtk_Plot_Record;
        Flags              :        Guint8);

Unset the flags in the widget.
Package Gtk.Extra.Plot`_'3D
***************************

A special plot that draws its data in three dimension. The data
associated  with such plots should either be a function or a
Gtk.Extra.Plot_Surface.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot           (*note Package_Gtk.Extra.Plot::)
              \___ Gtk_Plot_3D     (*note Package_Gtk.Extra.Plot_3D::)

Types
=====

type Plot_Plane is new Integer;

type Plot_Side is mod 2 ** 32;

type Plot_Vector is record
     X, Y, Z : Gdouble;
         end record;

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Plot_3D;
        Drawable           :        Gdk.Drawable.Gdk_Drawable;
        Width, Height      :        Gdouble := 0.0);

Create a new 3D plot.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with this widget.
procedure Autoscale
     (Plot               : access Gtk_Plot_3D_Record);

Chooses the best ranges for all coordinates depending on the data sets
put in Plot. Note that only data sets whose points you have set
explicitely are taken into account, not the ones based on functions.
function Get_Xfactor
     (Plot               : access Gtk_Plot_3D_Record)
        return Gdouble;

function Get_Zfactor
     (Plot               : access Gtk_Plot_3D_Record)
        return Gdouble;

Get the scaling factor along each of the coordinates.
procedure Set_Xfactor
     (Plot               : access Gtk_Plot_3D_Record;
        Xfactor            :        Gdouble);

procedure Set_Zfactor
     (Plot               : access Gtk_Plot_3D_Record;
        Zfactor            :        Gdouble);

Set the scaling factor along each of the coordinates
procedure Set_Xrange
     (Plot               : access Gtk_Plot_3D_Record;
        Min, Max           :        Gdouble);

procedure Set_Zrange
     (Plot               : access Gtk_Plot_3D_Record;
        Min, Max           :        Gdouble);

Set the minimal and maximal values for each axis.
Axis
----

procedure Axis_Hide_Title
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side);

Hide the title associated with the axis.
procedure Axis_Set_Major_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Major_Step         :        Gdouble);

Modify the step for major ticks.
This is a percentage value that indicates how many major ticks are
drawn along the axis. See also Axis_Set_Ticks.
procedure Axis_Set_Minor_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Nminor             :        Gint);

Modify the number of minor ticks between each major one.
See also Axis_Set_Ticks.
procedure Axis_Set_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Major_Step         :        Gdouble;
        Nminor             :        Gint);

Set up ticks for a specific orientation.
A horizontal orientation will match the left and right sides, whereas
a vertical orientation will match the top and bottom sides.
Major_Step is a percentage value of the widget size, and indicate the
step between each big ticks. For instance, if Major_Step has a value
of 0.2, there will be 5 big ticks drawn along the axis.   Num_Minor is
the number of minor ticks between each major one.
procedure Axis_Set_Ticks_Length
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Length             :        Gint);

Set the length (in pixels) of the big ticks.
The small ticks will have half this length.
procedure Axis_Set_Ticks_Width
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Width              :        Gfloat);

Set the width (in pixels) of the ticks.
This width is common to both the long and short ticks.
procedure Axis_Show_Labels
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Label_Mask         :        Gint);

Indicate whether a label should be drawn at each ticks to indicate
its value.   Not all values of Labels_Mask are relevant for all axis.
For instance,  for a vertical axis, the relevant values are Label_Right
and Label_Left.
procedure Axis_Show_Major_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Ticks_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the major ticks along one of the axis
procedure Axis_Show_Minor_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Ticks_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the minor ticks along one of the axis
procedure Axis_Show_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Major_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos;
        Minor_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the ticks.
procedure Axis_Show_Title
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side);

Show the title associated with the axis.
function Get_Axis
     (Plot               : access Gtk_Plot_3D_Record;
        Orientation        :        Gtk.Extra.Plot.Plot_Orientation)
        return Gtk.Extra.Plot.Gtk_Plot_Axis;

Return a handle to a specific axis.
function Get_Side
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side)
        return Gtk.Extra.Plot.Gtk_Plot_Axis;

Get the axis for a specific side.
Grid
----

procedure Major_Grids_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Boolean);

Indicate whether the grid should be displayed for each coordinate
procedure Major_Grids_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            : out    Boolean);

Indicate whether the grid is currently displayed.
procedure Minor_Grids_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Boolean);

Indicate whether the grid should be displayed for each coordinate
procedure Minor_Grids_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            : out    Boolean);

Indicate whether the grid is currently displayed.
procedure Major_Zgrid_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the major grid
procedure Major_Zgrid_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the attributes of the major grid
procedure Minor_Zgrid_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the minor grid
procedure Minor_Zgrid_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the attributes of the minor grid
Rotating
--------

procedure Reset_Angles
     (Plot               : access Gtk_Plot_3D_Record);

reset all the angles to their default values
procedure Rotate
     (Plot               : access Gtk_Plot_3D_Record;
        Angle_X, Angle_Y, Angle_Z  :        Gdouble);

Rotate the plot along the three axis at the same time.
The angles are specified in degrees.
procedure Rotate_Vector
     (Plot               : access Gtk_Plot_3D_Record;
        Vector             :        Plot_Vector;
        A1, A2, A3         :        Gdouble);

Rotate Vector along the three axis.
The three angles A1, A2 and A3 are specified in degrees.
procedure Rotate_X
     (Plot               : access Gtk_Plot_3D_Record;
        Angle              :        Gdouble);

procedure Rotate_Z
     (Plot               : access Gtk_Plot_3D_Record;
        Angle              :        Gdouble);

Rotate the plot along a specific axis.
Angle is specific in degrees.
Planes
------

A 3D plot is associated, as usual, with three axis (one per coordinate
X, Y and Z). These three axis, together, define 3 planes that can be
shown or hidden, and on which a grid can be displayed to make it easy
to visualize the value of the data.

procedure Plane_Set_Color
     (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane;
        Color              :        Gdk.Color.Gdk_Color);

Define the background color to use for one of the planes. Each plane
can have its own color.
procedure Plane_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane;
        Visible            :        Boolean);

Indicate whether each plane should be displayed or not.
function Plane_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane)
        return Boolean;

Indicate whether a plane is currently visible or not.
Corners
-------

In addition to drawing the three planes defined by the axis, a 3D plot
can also draw some lines to draw a cube around the plot (although the
three new planes defined by these lines are left transparent so that
the plot is visible.

procedure Corner_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the style of the corner lines.
procedure Corner_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Define the style of the corner lines.
procedure Corner_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        Visible            :        Boolean);

Whether corners should be visible
function Corner_Visible
     (Plot               : access Gtk_Plot_3D_Record)
        return Boolean;

Indicate whether corners are visible
Misc
----

procedure Frame_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

procedure Frame_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

procedure Get_Pixel
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Gdouble;
        Px, Py, Pz         : out    Gdouble);

function Get_Titles_Offset
     (Plot               : access Gtk_Plot_3D_Record)
        return Gint;

procedure Set_Titles_Offset
     (Plot               : access Gtk_Plot_3D_Record;
        Offset             :        Gint);

Package Gtk.Extra.Plot`_'Bar
****************************

This special type of data set displays itself with bar (also known  as
histograms).

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)
              \___ Gtk_Plot_Bar    (*note Package_Gtk.Extra.Plot_Bar::)

Subprograms
===========

procedure Gtk_New
     (Bar                : out    Gtk_Plot_Bar;
        Orientation        :        Gtk.Enums.Gtk_Orientation);

Create a new Plot bar.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Bar.
procedure Set_Width
     (Bar                : access Gtk_Plot_Bar_Record'Class;
        Width              :        Gdouble);

Set the width of the bars
function Get_Width
     (Bar                : access Gtk_Plot_Bar_Record'Class)
        return Gdouble;

Return the width used to draw the bars
Package Gtk.Extra.Plot`_'Box
****************************

This special type of data set displays itself with boxes

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)
              \___ Gtk_Plot_Box    (*note Package_Gtk.Extra.Plot_Box::)

Subprograms
===========

procedure Gtk_New
     (Box                : out    Gtk_Plot_Box;
        Orientation        :        Gtk.Enums.Gtk_Orientation);

Create a new Plot bar.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Box
Package Gtk.Extra.Plot`_'Canvas
*******************************

A Gtk_Plot_Canvas is a special kind of drawing area used with Gtk_Plot
widgets.   It provides drag-and-drop capabilities for the texts,
legends, points...   available in a Gtk_Plot.   Note that this widget
is specifically designed for Gtk_Plot widgets, and  won't provide any
other capability for other kinds of widgets.

   Like any child of Gtk_Layout, this widget can have an almost
unlimited  size for its children, and provides scrolling.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Fixed       (*note Package_Gtk.Fixed::)
                 \___ Gtk_Plot_Canvas (*note Package_Gtk.Extra.Plot_Canvas::)

Signals
=======

   * "changed"

     procedure Handler (Canvas : access Gtk_Plot_Canvas_Record'Class);
     Called when the contents of the canvas has changed (an item was
     moved interactively by the user).

     A region of the canvas was selected by the user.

   * "delete_item"

     procedure Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     Item   : Gtk_Plot_Canvas_Child);
     Called when an item is being removed from the canvas

   * "move_item"

     function Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     Item   : Gtk_Plot_Canvas_Child;
     New_X  : Gdouble;
     New_Y  : Gdouble)
     return Boolean;
     An item was moved on the canvas.  Its coordinates have not changed
     yet, but if the handler returns True they will become (New_X,
     New_Y). If the handler returns False, nothing happens.

   * "resize_item"

     function Handler (Canvas     : access Gtk_Plot_Canvas_Record'Class;
     Item       : Gtk_Plot_Canvas_Child;
     New_Width  : Gdouble;
     New_Height : Gdouble)
     return Boolean;
     An item is being resized.  Its size has not changed yet, but if
     the handler returns True it will become (New_Width, New_Height).
     If the handler returns False, nothing happens.

   * "select_item"

     function Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     Event  : Gdk_Button_Event;
     Item   : Gtk_Plot_Canvas_Child)
     return Boolean;
     Called when an item was selected.  An item can be anything, from a
     text to a plot When this signal is called, the item was simply
     selected, but not dragged.  The handler should return False if the
     item can not be selected.

   * "select_region"

     procedure Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     X_Min  : Gdouble;
     Y_Min  : Gdouble;
     X_Max  : Gdouble;
     Y_Max  : Gdouble);

Types
=====

type Child_Draw_Func is access procedure
     (Canvas : System.Address;
          Child  : Gtk_Plot_Canvas_Child);

Generic format of functions used to draw a child of the canvas.
Canvas is a System.Address since these functions are called directly
from C and GtkAda can't insert its hooks. However, you can use the
Convert function below to convert to a Gtk_Plot_Canvas.
type Gtk_Plot_Canvas_Child is new Gdk.C_Proxy;

type Plot_Canvas_Action is
     (Action_Inactive,
          Action_Selection,
          Action_Drag,
          Action_Resize);

The action being performed on the canvas.
type Plot_Canvas_Arrow is new Gint;

type Plot_Canvas_Flag is new Gint;

type Plot_Canvas_Pos is
     (Canvas_Out,
          Canvas_In,
          Canvas_Left,
          Canvas_Right,
          Canvas_Top,
          Canvas_Bottom,
          Canvas_Top_Left,
          Canvas_Top_Right,
          Canvas_Bottom_Left,
          Canvas_Bottom_Right);

The position of the items in the canvas.
type Plot_Canvas_Type is
     (None,
          Plot,
          Axis,
          Legends,
          Title,
          Text,
          Data,
          Line,
          Rectangle,
          Ellipse,
          Custom);

The type of data that can be put in a canvas.   Plot is only for a
Gtk.Extra.Plot.Gtk_Plot widget.
Subprograms
===========

Creating and manipulating the canvas
------------------------------------

procedure Gtk_New
     (Widget             : out    Gtk_Plot_Canvas;
        Width              : in     Gint;
        Height             : in     Gint;
        Magnification      : in     Gdouble := 1.0);

Create a new Gtk_Plot_Canvas, with a specific screen size.
Since the widget can have an unlimited internal size, it does not try
to set its size to accommodate all of its children.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Plot_Canvas.
function Child_Get_Type        return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Plot_Canvas_Child.
procedure Refresh
     (Canvas             : access Gtk_Plot_Canvas_Record);

Force a refresh of the canvas on the screen. The screen is updated from
the contents of the double-buffer.
procedure Paint
     (Canvas             : access Gtk_Plot_Canvas_Record);

Redraw each of the items included in the canvas. The painting is done
in the double-buffer, and must be drawn on the screen with Refresh.
function Get_Pixmap
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gdk.Pixmap.Gdk_Pixmap;

Return the pixmap associated with the Canvas.
If you add your own items on the canvas (see Child_New below), you  can
draw them on this pixmap to make them visible on the canvas. You  need
to call Refresh to send this pixmap to the screen.
procedure Grid_Set_Visible
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Visible            : in     Boolean);

Indicate whether the grid should be visible or not.
procedure Grid_Set_Step
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Step               : in     Gint);

Set the space between two lines of the grid.
procedure Grid_Set_Attributes
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Style              : in     Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : in     Gint;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes of the grid.
procedure Add_Plot
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Plot               : access Gtk.Extra.Plot.Gtk_Plot_Record'Class;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Add a new plot to the list handled by the canvas.
The canvas will then provide drag-and-drop functionalities for that
plot.   The plot is displayed at the relative screen coordinates (X, Y).
Plot becomes the new active plot, and its associated pixmap becomes the
Plot_Canvas itself.
procedure Set_Active_Plot
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Plot               : access Gtk.Extra.Plot.Gtk_Plot_Record'Class);

Modify the active plot in the canvas.
The active plot is generally the one that received the last click
event (drag-and-drop, etc.). This should be set before emitting any  of
the signals in this class.
procedure Cancel_Action
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record);

Cancel the current action.
This can be called in the user callbacks to ignore temporarily some of
the signals below.
function Get_Active_Plot
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gtk.Extra.Plot.Gtk_Plot;

Return the active plot.
In the callbacks for the signals below, this is the widget that got
the signal.
function Get_Active_Data
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gtk.Extra.Plot_Data.Gtk_Plot_Data;

Return the active dataset (which of course belongs to the active plot).
This is the dataset that was last clicked on.
procedure Get_Active_Point
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X                  : out    Gdouble;
        Y                  : out    Gdouble;
        Index              : out    Gint);

Return the relative coordinates of the active point in the
active dataset. Index will contain the index of the active point in the
list of the canvas'children, or -1 if there is no active point.   This
is the index in the coordinates arrays of Get_Active_Data.   This is
the one that was last clicked on.
procedure Set_Size
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Width              : in     Gint;
        Height             : in     Gint);

Modify the size allocated for the canvas, and the size of the pixmap
the plots are displayed on.
procedure Unselect
     (Canvas             : access Gtk_Plot_Canvas_Record);

Unselect the currently selected item.
procedure Set_Magnification
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Magnification      :        Gdouble := 1.0);

Changes the magnification for the canvas.
1.0 is the default value. Higher values will zoom in, while lower values
will zoom out.
procedure Set_Background
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Background         :        Gdk.Color.Gdk_Color);

Set the background color for the canvas.
procedure Get_Pixel
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Px                 : in     Gdouble;
        Py                 : in     Gdouble;
        X                  : out    Gint;
        Y                  : out    Gint);

Convert from relative coordinates to absolute ones.
procedure Get_Position
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X                  : in     Gint;
        Y                  : in     Gint;
        Px                 : out    Gdouble;
        Py                 : out    Gdouble);

Convert from absolute coordinates to relative ones.
Canvas items
------------

There are several different types of items that can be put on the
canvas, and then manipulated interactively by the user.

function Convert
     (Canvas             :        System.Address)
        return Gtk_Plot_Canvas;

Convert from a System.Address returned by C to a real Gtk_Plot_Canvas
structure.
procedure Set_Draw_Func
     (Child              :        Gtk_Plot_Canvas_Child;
        Draw               :        Child_Draw_Func);

Set the function used to draw the item.
This should be used only for items whose type is Custom, since other
items have their own drawing functions.
function Get_Active_Item
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gtk_Plot_Canvas_Child;

Return the currently selected item.
function Put_Text
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble;
        Ps_Font            : in     String;
        Height             : in     Gint;
        Angle              : in     Gint;
        Fg                 : in     Gdk.Color.Gdk_Color;
        Bg                 : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean;
        Justification      : in     Gtk.Enums.Gtk_Justification;
        Text               : in     String)
        return Gtk_Plot_Canvas_Child;

Put an arbitrary text in the layout.
Ps_Font should be the name of a postscript font.   (X, Y) are the
relative coordinates to which the text should be drawn.   The only
legal values for Angle are 0, 90, 180 and 270 degrees.

   Text can contain some special characters, that change is renderering.
They all begin with a '\' (backslash) character, followed by one of:
   * '0' .. '9' : Change the font (take the nth font in the family

   * 'g' : Select the "Symbol" font

   * 'B' : Activate bold characters.

   * 'i' : Activate italic characters.

   * 'S' or '^' : Activate superscripts.

   * 's' or '_' : Activate subscripts.

   * '+' : Increment the fontsize by 3 pixels.

   * '-' : Decrement the fontsize by 3 pixels.

   * 'N' : Restore the default characteristics of the font.

   * 'b' : Move back one character.

function Put_Line
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color;
        Arrow_Mask         :        Plot_Canvas_Arrow)
        return Gtk_Plot_Canvas_Child;

Draw a line in the background of the canvas.
function Put_Rectangle
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Border             :        Gtk.Extra.Plot.Plot_Border_Style;
        Fill               :        Boolean := False)
        return Gtk_Plot_Canvas_Child;

Draw a rectangle in the canvas.
function Put_Ellipse
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Fill               :        Boolean := False)
        return Gtk_Plot_Canvas_Child;

Draw an ellipse in the canvas.
procedure Line_Set_Attributes
     (Child              :        Gtk_Plot_Canvas_Child;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color;
        Mask               :        Plot_Canvas_Arrow);

Change the attributes of a line.
procedure Rectangle_Set_Attributes
     (Child              :        Gtk_Plot_Canvas_Child;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Border             :        Gtk.Extra.Plot.Plot_Border_Style;
        Fill               :        Boolean := False);

Change the attributes of a rectangle.
procedure Ellipse_Set_Attributes
     (Child              :        Gtk_Plot_Canvas_Child;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Fill               :        Boolean := False);

Change the attributes for an ellipse.
Custom children
---------------

You can insert your own items in a canvas.
While the canvas will take care of moving the item, it is your
responsability to provide a visual rendering for it.

function Child_New
     (Child_Type         :        Plot_Canvas_Type := Custom)
        return Gtk_Plot_Canvas_Child;

Create a new child.
procedure Put_Child
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Child              :        Gtk_Plot_Canvas_Child;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble);

Insert a new item in the canvas. It will occupy the area defined by
the four coordinates.
procedure Child_Move
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Child              :        Gtk_Plot_Canvas_Child;
        X1                 :        Gdouble;
        Y1                 :        Gdouble);

Move an item, but does not change its size.
procedure Child_Move_Resize
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Child              :        Gtk_Plot_Canvas_Child;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble);

Move an resize an item in the canvas.
function Get_Item_Type
     (Item               :        Gtk_Plot_Canvas_Child)
        return Plot_Canvas_Type;

Return the type of the item.
function Get_Allocation_Width
     (Child              :        Gtk_Plot_Canvas_Child)
        return Guint;

Return the current width of the child.
function Get_Allocation_Height
     (Child              :        Gtk_Plot_Canvas_Child)
        return Guint;

Return the current height of the child.
function Get_Allocation_X
     (Child              :        Gtk_Plot_Canvas_Child)
        return Gint;

Return the current position of the child, relative to its canvas.
function Get_Allocation_Y
     (Child              :        Gtk_Plot_Canvas_Child)
        return Gint;

Return the current position of the child, relative to its canvas.
function Get_Flags
     (Child              :        Gtk_Plot_Canvas_Child)
        return Plot_Canvas_Flag;

Return the list of actions currently possible on the child.
procedure Set_Flags
     (Child              :        Gtk_Plot_Canvas_Child;
        Flags              :        Plot_Canvas_Flag);

Modify the list of actions possible for a child.
Flags
-----

Some flags are defined for this widget. You can not access them through
the usual interface in Gtk.Object.Flag_Is_Set since this widget is not
part of the standard gtk+ packages. Instead, use the functions below.

   * "can_select"    True if it is possible to select a region of the
     canvas

   * "can_select_item"    True if it is possible to select any of the
     item on the canvas.

   * "can_select_point"    True if the individual points in the plots
     can be selected and    interactively moved by the user.

   * "can_dnd"    True if it is possible to drag an item on the canvas.

   * "can_dnd_point"    True if the points of the plots can be moved
     interactively.

function Plot_Canvas_Flag_Is_Set
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Flag               : in     Guint16)
        return Boolean;

Test whether one of the flags for a Gtk_Plot_Canvas widget or its
children is set.
procedure Plot_Canvas_Set_Flags
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Flags              : in     Guint16);

Set the flags for a Gtk_Plot_Canvas widget or its children.
Note that the flags currently set are not touched by this function.
This can only be used for the flags defined in the
Gtk.Extra.Gtk_Plot_Canvas package.
procedure Plot_Canvas_Unset_Flags
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Flags              : in     Guint16);

Unset the flags for a Gtk_Plot_Canvas.
Package Gtk.Extra.Plot`_'Data
*****************************

This package defines the root of the plot hierarchy. It defines several
display strategies that can be used to show scientific data on the
screen (see the children for 3D, polar, bars,...)

   All coordinates are in percent of the total size allocates for the
data  set (ie the actual position is (x * width, y * height), where (x,
y) is  the value stored in the data set and (width, height) its
allocated screen  size.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)

Types
=====

type Gdouble_Array_Access is access all Glib.Gdouble_Array;

The reason we use this type in the functions below is because
gtk+-extra does not keep a copy of the arrays, but points to the one
given in argument. Thus, the Ada arrays should not be allocated on the
stack, or at least they should be at library level. Using this 'Access
will force the compiler to do the check for us.
type No_Range_Gdouble_Array is array (Natural) of Gdouble;

An array of values.   This is used to represent the data values
displayed in the plot.   This array does not have any range information
(so that it can be  easily returned from a C function, without
requiring an extra  copy of the table). You can not use 'Range on this
array.
type No_Range_Gdouble_Array_Access is access all No_Range_Gdouble_Array;

An access to a flat array.
type Plot_Connector is
     (Connect_None,
             -- No connection
     
          Connect_Straight,
             -- straight line
     
          Connect_Spline,
             -- spline or Bezier curve
     
          Connect_Hv_Step,
             -- Horizontal then vertical
     
          Connect_Vh_Step,
             -- Vertical then horizontal
     
          Connect_Middle_Step
             -- Split in the middle
          );

The type of connection between two adjacent points in a graph.
type Plot_Function is access function
     (Plot  : System.Address;

type Plot_Gradient is new Integer;

Indicate which color components vary along the gradient
type Plot_Line_Style is
     (Line_None,
          Line_Solid,
          Line_Dotted,
          Line_Dashed,
          Line_Dot_Dash,
          Line_Dot_Dot_Dash,
          Line_Dot_Dash_Dash);

Lines used to connect two adjacent points in a graph.
type Plot_Symbol_Style is
     (Symbol_Empty,
          Symbol_Filled,
          Symbol_Opaque);

Style used to draw the points in a graph.
type Plot_Symbol_Type is
     (Symbol_None,
          Symbol_Square,
          Symbol_Circle,
          Symbol_Up_Triangle,
          Symbol_Down_Triangle,
          Symbol_Right_Triangle,
          Symbol_Left_Triangle,
          Symbol_Diamond,
          Symbol_Plus,
          Symbol_Cross,
          Symbol_Star,
          Symbol_Dot,
          Symbol_Impulse);

Type of symbol used to represent the points in a graph.
type Points_Array is record
     Points     : No_Range_Gdouble_Array_Access;
         Num_Points : Gint := 0;
         end record;

The points are indexed from 0 to Num_Points-1.   Note that you can't
use 'Range, 'First or 'Last on Points.
Subprograms
===========

Creating a Data set
-------------------

procedure Gtk_New
     (Data               : out    Gtk_Plot_Data;
        Func               :        Plot_Function := null);

Creates a new data set. Its values can either be generated automatically
from Func, or will have to be set explicitely using the other
subprograms in this package.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Plot_Data.
procedure Set_Name
     (Data               : access Gtk_Plot_Data_Record;
        Name               :        String);

Set the name used internally for that dataset.
This name does not appear anywhere on the screen, but it is easier to
find the dataset afterward by using this name.
Drawing a set
-------------

Although a set is basically a list of values, it is closely associated
with its representation on the screen (see the children of Gtk_Plot_Data
for various possible representations).   The Gtk.Extra packages are
designed so that the drawing can be done  either to the screen (through
a Gdk adapter), to a postscript file for  easy printing, or to any
other media.

procedure Paint
     (Data               : access Gtk_Plot_Data_Record);

Emits the "draw_data" signal to request a redrawing of the data set.
procedure Draw_Points
     (Data               : access Gtk_Plot_Data_Record;
        N                  :        Gint);

Draw at most N values of the Data set on the screen. If N is greater
than the actual number of values in Data, then they are all displayed.
procedure Draw_Symbol
     (Data               : access Gtk_Plot_Data_Record;
        X, Y               :        Gdouble);

Draw the current symbol (see Set_Symbol) at specific coordinates on
the screen.
Manipulating values
-------------------

procedure Set_Points
     (Data               : access Gtk_Plot_Data_Record;
        X                  :        Gdouble_Array_Access;
        Y                  :        Gdouble_Array_Access;
        Dx                 :        Gdouble_Array_Access;
        Dy                 :        Gdouble_Array_Access);

Set some explicit points in the set.
Note that the set must not be associated with a function, or the points
will simply be ignored.   All of the arrays must have the same length,
the behavior is undefined  otherwise.   X and Y are the list of
coordinates of the points.   Dx and Dy are the list of size (precision)
of these points. A bigger  symbol will be displayed for the point whose
(Dx, Dy) value is bigger.
procedure Get_Points
     (Data               : access Gtk_Plot_Data_Record;
        X                  : out    Points_Array;
        Y                  : out    Points_Array;
        Dx                 : out    Points_Array;
        Dy                 : out    Points_Array);

Return the value of the points in the set.
Null-length arrays are returned if the set is associated with a
function, since no explicit point has been set.   See Set_Points for a
definition of X, Y, Dx and Dy.
procedure Set_X
     (Data               : access Gtk_Plot_Data_Record;
        X                  :        Gdouble_Array_Access);

procedure Set_Z
     (Data               : access Gtk_Plot_Data_Record;
        Z                  :        Gdouble_Array_Access);

procedure Set_Dx
     (Data               : access Gtk_Plot_Data_Record;
        Dx                 :        Gdouble_Array_Access);

procedure Set_Dz
     (Data               : access Gtk_Plot_Data_Record;
        Dz                 :        Gdouble_Array_Access);

Set the precision of the points in the set. A bigger symbol is displayed
for the points whose (Dx, Dy, Dz) is bigger.   The array must have a
length of Get_Numpoints (if GtkAda was  compiled with assertions
enabled, an exception will be raised if the  length are different).
No copy of the array is made for efficiency reasons, thus modifying
the array content later on will also modify the plot.
procedure Set_Da
     (Data               : access Gtk_Plot_Data_Record;
        Da                 :        Gdouble_Array_Access);

Specifies the colors to use for the points.
The color of the symbols is detemined using the gradient. the gradient
has (min, max) values, and corresponding colors. The symbol's color is
interpolated between these values using hue/saturation/value depending
on the gradient_mask.
function Get_X
     (Data               : access Gtk_Plot_Data_Record)
        return Points_Array;

function Get_Z
     (Data               : access Gtk_Plot_Data_Record)
        return Points_Array;

function Get_Dx
     (Data               : access Gtk_Plot_Data_Record)
        return Points_Array;

function Get_Dz
     (Data               : access Gtk_Plot_Data_Record)
        return Points_Array;

procedure Set_Numpoints
     (Data               : access Gtk_Plot_Data_Record;
        Num                :        Gint);

Set the number of points that should be expected in the graph.
Note that this does not automatically resize all the internal structure,
it just indicates what size the parameters to Set_X, Set_Y,... should
have.
function Get_Numpoints
     (Data               : access Gtk_Plot_Data_Record)
        return Gint;

Return the number of points expected in the graph.
Labels
------

Each point in the data set can be associated with a label that describes
it. This is only relevant for data sets where you explicitely give
values, not when the values are generated by a function.

procedure Set_Labels
     (Data               : access Gtk_Plot_Data_Record;
        Labels             :        Gtkada.Types.Chars_Ptr_Array);

Set the labels associated which each point in the canvas.
There must be at least Get_Numpoints elements in Labels, or the
behavior is undefined
function Get_Labels
     (Data               : access Gtk_Plot_Data_Record)
        return Gtkada.Types.Chars_Ptr_Array;

Return the labels associated with the points in the data set.
Note that this returns a *copy* of the actual array, and thus might  be
expensive to call.
procedure Show_Labels
     (Data               : access Gtk_Plot_Data_Record;
        Show               :        Boolean);

Indicate whether the labels should be displayed next to each point in
the data set. This has no effect if no labels were specified.
procedure Labels_Set_Attributes
     (Data               : access Gtk_Plot_Data_Record;
        Font               :        String;
        Height             :        Gint;
        Angle              :        Gint;
        Foreground         :        Gdk.Color.Gdk_Color;
        Background         :        Gdk.Color.Gdk_Color);

Set the properties of the labels
Symbols and Connectors
----------------------

Each point that is explicitely set in the data set through the
Set_X, Set_Y,... subprograms is visually associated with a symbol. There
are several representations for the symbols.

   All these symbols are then connected by a line, a curve or any other
link. These are called connectors.

   Each symbol, in addition to being connected to the next one with a
connector, can also be linked to the axis X=0, Y=0 or Z=0 so that it is
easier to read its coordinates. These are called errbars, and they must
be explicitely shown.

procedure Set_Symbol
     (Data               : access Gtk_Plot_Data_Record;
        The_Type           :        Plot_Symbol_Type;
        Style              :        Plot_Symbol_Style;
        Size               :        Gint;
        Line_Width         :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color;
        Border_Color       :        Gdk.Color.Gdk_Color);

Set the visual aspect of the symbols.
procedure Get_Symbol
     (Data               : access Gtk_Plot_Data_Record;
        The_Type           : out    Plot_Symbol_Type;
        Style              : out    Plot_Symbol_Style;
        Size               : out    Gint;
        Line_Width         : out    Gint;
        Color              : out    Gdk.Color.Gdk_Color;
        Border_Color       : out    Gdk.Color.Gdk_Color);

Return the visual characteristics of the symbols.
procedure Set_Connector
     (Data               : access Gtk_Plot_Data_Record;
        Connector          :        Plot_Connector);

Set the style of the connectors.
function Get_Connector
     (Data               : access Gtk_Plot_Data_Record)
        return Plot_Connector;

Return the connector style used for the data set.
procedure Set_Line_Attributes
     (Data               : access Gtk_Plot_Data_Record;
        Style              :        Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the line style used for the connectors.
procedure Get_Line_Attributes
     (Data               : access Gtk_Plot_Data_Record;
        Style              : out    Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Return the line attributes used for the connectors.
procedure Set_X_Attributes
     (Data               : access Gtk_Plot_Data_Record;
        Style              :        Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the style of the lines used to connect the symbols to the X axis.
procedure Set_Y_Attributes
     (Data               : access Gtk_Plot_Data_Record;
        Style              :        Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the style of the lines used to connect the symbols to the Y axis.
procedure Set_Z_Attributes
     (Data               : access Gtk_Plot_Data_Record;
        Style              :        Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the style of the lines used to connect the symbols to the Z axis.
procedure Show_Xerrbars
     (Data               : access Gtk_Plot_Data_Record);

procedure Show_Zerrbars
     (Data               : access Gtk_Plot_Data_Record);

Indicate that each symbol should be connected to the various axis
procedure Hide_Xerrbars
     (Data               : access Gtk_Plot_Data_Record);

procedure Hide_Zerrbars
     (Data               : access Gtk_Plot_Data_Record);

Indicate the the symbol should not be connected to the axis.
procedure Fill_Area
     (Data               : access Gtk_Plot_Data_Record;
        Fill               :        Boolean);

Indicate whether the area between two points should be filled or not.
function Area_Is_Filled
     (Data               : access Gtk_Plot_Data_Record)
        return Boolean;

Indicate whether the area between two points is filled.
Legends
-------

In addition to the drawing corresponding to the data set, it is possible
to display a box that contains a legend. This is particulary useful when
multiple data sets are displayed on the same plot.

procedure Set_Legend
     (Data               : access Gtk_Plot_Data_Record;
        Legend             :        String);

Set the string printed in the legend for that data set.
Note that an entry can exist in the legend even if there is no name
associated with the graph.
procedure Show_Legend
     (Data               : access Gtk_Plot_Data_Record);

An entry will be made in the plot's legend for that dataset.
procedure Hide_Legend
     (Data               : access Gtk_Plot_Data_Record);

No entry will appear in the plot's legend for that dataset.
procedure Set_Legend_Precision
     (Data               : access Gtk_Plot_Data_Record;
        Precision          :        Gint);

Number of digits to display when the legends is associated with values,
as is the case for gradients.
function Get_Legend_Precision
     (Data               : access Gtk_Plot_Data_Record)
        return Gint;

Return the number of digits used for values in the legend
Gradients
---------

The symbols displayed in the plot can be assigned specific colors. But
they can also compute their own color by picking it in a gradient,
depending on the value.

procedure Set_Gradient_Mask
     (Data               : access Gtk_Plot_Data_Record;
        Mask               :        Plot_Gradient);

Indicates which component of the colors vary along the gradient.
function Get_Gradient_Mask
     (Data               : access Gtk_Plot_Data_Record)
        return Plot_Gradient;

Return the mask used for the gradient.
procedure Gradient_Set_Visible
     (Data               : access Gtk_Plot_Data_Record;
        Visible            :        Boolean);

Indicates whether the gradient should be visible
function Gradient_Visible
     (Data               : access Gtk_Plot_Data_Record)
        return Boolean;

Return True if the gradient is currently visible
procedure Set_Gradient_Colors
     (Data               : access Gtk_Plot_Data_Record;
        Min, Max           :        Gdk.Color.Gdk_Color);

Set the colors that define the gradient. The colors will vary from
Min to Max along the components specified in Set_Gradient_Mask.
procedure Get_Gradient_Colors
     (Data               : access Gtk_Plot_Data_Record;
        Min, Max           : out    Gdk.Color.Gdk_Color);

Return the colors that define the range
procedure Set_Gradient
     (Data               : access Gtk_Plot_Data_Record;
        Min, Max           :        Gdouble;
        Nlevels            :        Gint);

Define the values associated with the minimal color and the maximal
color. Any value in between will have a color computed in between.
Nlevels is the number of ticks to display in the gradient.
procedure Get_Gradient
     (Data               : access Gtk_Plot_Data_Record;
        Min, Max           : out    Gdouble;
        Nlevels            : out    Gint);

Return the values associated with the minimal and maximal colors.
procedure Get_Gradient_Level
     (Data               : access Gtk_Plot_Data_Record;
        Level              :        Gdouble;
        Color              : out    Gdk.Color.Gdk_Color);

Return the color associated with a specific level.
The color depends on the parameters to Set_Gradient and
Set_Gradient_Colors.
User Data
---------

It is possible to associated your own user data with a plot. This is
the mechanism provided by the C version of gtkextra. However, the best
way to do this in Ada is to inherit from Gtk_Plot_Data_Record (or one
of its children), and add your own fields.

procedure Set_Link
     (Data               : access Gtk_Plot_Data_Record;
        Link               :        System.Address);

Associate some user data with Data.
It is the responsability of the user to do some convert conversion to
System.Address.
function Get_Link
     (Data               : access Gtk_Plot_Data_Record)
        return System.Address;

Return the user data associated with Data, or Null_Address if there is
none.
procedure Remove_Link
     (Data               : access Gtk_Plot_Data_Record);

Remove the user data associated with Data.
Package Gtk.Extra.Plot`_'Polar
******************************

This special type of data set displays itself in polar coordinates.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot           (*note Package_Gtk.Extra.Plot::)
              \___ Gtk_Plot_Polar  (*note Package_Gtk.Extra.Plot_Polar::)

Subprograms
===========

procedure Gtk_New
     (Polar              : out    Gtk_Plot_Polar;
        Drawable           :        Gdk.Drawable.Gdk_Drawable
                            := null;
        Width, Height      :        Gdouble := 0.0);

Create a new polar plot.
If Width and Height are 0, they are left unspecified when calling the
C function.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Box
procedure Rotate
     (Polar              : access Gtk_Plot_Polar_Record;
        Angle              :        Gdouble);

Rotate the graph by a given amount of radians.
Package Gtk.Extra.Plot`_'Ps
***************************

This package does not implement any new widget.   Instead, if provides
postscript support for Gtk_Plot widgets, and can  create a postscript
file from any Gtk_Plot widget.

Types
=====

type Ps_Orientation is
     (Plot_Portrait,
          Plot_Landscape);

Portrait format means that the vertical size is longer than  the
horizontal size. Landscape is the reverse.
type Ps_Page_Size is
     (Plot_Letter,
          Plot_Legal,
          Plot_A4,
          Plot_Executive,
          Plot_Custom);

The formats that can be used for paper sizes.
type Ps_Units is
     (Plot_Inches,
          Plot_Mm,
          Plot_Cm,
          Plot_Pspoints);

Units of measure for paper sizes.
Subprograms
===========

procedure Plot_Export_Ps
     (Plot               : access Gtk.Extra.Plot.Gtk_Plot_Record'Class;
        Psfile             : in     String;
        Orientation        : in     Ps_Orientation;
        Epsflag            : in     Boolean;
        Page_Size          : in     Ps_Page_Size);

Create a new postscript file PsFile with the content of Plot.
Epsflag should be true if the generated file should be in  Encapsulated
Postscript format instead of simple Postscript.
procedure Plot_Export_Ps_With_Size
     (Plot               : access Gtk.Extra.Plot.Gtk_Plot_Record'Class;
        Psfile             : in     String;
        Orientation        : in     Ps_Orientation;
        Epsflag            : in     Boolean;
        Units              : in     Ps_Units;
        Width              : in     Gint;
        Height             : in     Gint);

Create a new postscript file PsFile with the content of Plot.
Epsflag should be true if the generated file should be in  Encapsulated
Postscript format instead of simple Postscript.   The page has a custom
size.
procedure Plot_Canvas_Export_Ps
     (Canvas             : access Gtk_Plot_Canvas_Record'Class;
        File_Name          : in     String;
        Orientation        : in     Ps_Orientation;
        Epsflag            : in     Boolean;
        Page_Size          : in     Ps_Page_Size);

Create a new postscript file PsFile with the content of Layout.
Every plot on it is exported to the postscript file.   Epsflag should
be true if the generated file should be in  Encapsulated Postscript
format instead of simple Postscript.
procedure Plot_Canvas_Export_Ps_With_Size
     (Canvas             : access Gtk_Plot_Canvas_Record'Class;
        File_Name          : in     String;
        Orientation        : in     Ps_Orientation;
        Epsflag            : in     Boolean;
        Units              : in     Ps_Units;
        Width              : in     Gint;
        Height             : in     Gint);

Create a new postscript file PsFile with the content of Layout.
Every plot on it is exported to the postscript file.   Epsflag should
be true if the generated file should be in  Encapsulated Postscript
format instead of simple Postscript.   The page has a custom size.
Package Gtk.Extra.Plot`_'Surface
********************************

A special kind of data set that stores three-dimensional data.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)
              \___ Gtk_Plot_Surface (*note Package_Gtk.Extra.Plot_Surface::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Plot_Surface;
        Func               :        Gtk.Extra.Plot.Plot3D_Function
                            := null);

Create a new surface.
If Func is null, you have to explicitely specify the set of points
found in the data set. Otherwise, the points will be generated
automatically from Func.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with this widget.
function Get_Grid_Visible
     (Data               : access Gtk_Plot_Surface_Record)
        return Boolean;

Return True if the grid is currently visible for this data set.
procedure Set_Grid_Visible
     (Data               : access Gtk_Plot_Surface_Record;
        Visible            :        Boolean);

Choose whether the grid should be visible
function Get_Mesh_Visible
     (Data               : access Gtk_Plot_Surface_Record)
        return Boolean;

Return True if the wireframe mesh should be drawn.
procedure Set_Mesh_Visible
     (Data               : access Gtk_Plot_Surface_Record;
        Visible            :        Boolean);

Indicate whether the wireframe mesh should be visible.
function Get_Nx
     (Data               : access Gtk_Plot_Surface_Record)
        return Gint;

procedure Set_Nx
     (Data               : access Gtk_Plot_Surface_Record;
        Nx                 :        Gint);

procedure Set_Points
     (Data               : access Gtk_Plot_Surface_Record;
        X                  :        Gdouble_Array_Access;
        Y                  :        Gdouble_Array_Access;
        Z                  :        Gdouble_Array_Access;
        Dx                 :        Gdouble_Array_Access;
        Dy                 :        Gdouble_Array_Access;
        Dz                 :        Gdouble_Array_Access);

Set all the values of the data set at once.
procedure Get_Points
     (Data               : access Gtk_Plot_Surface_Record;
        X                  : out    Points_Array;
        Y                  : out    Points_Array;
        Z                  : out    Points_Array;
        Dx                 : out    Points_Array;
        Dy                 : out    Points_Array;
        Dz                 : out    Points_Array);

Return the values contained in the data set.
function Get_X
     (Data               : access Gtk_Plot_Surface_Record)
        return Points_Array;

function Get_Z
     (Data               : access Gtk_Plot_Surface_Record)
        return Points_Array;

Return the values contained in the data set.
function Get_Xstep
     (Data               : access Gtk_Plot_Surface_Record)
        return Gdouble;

procedure Set_Xstep
     (Data               : access Gtk_Plot_Surface_Record;
        Step               :        Gdouble);

procedure Set_Color
     (Data               : access Gtk_Plot_Surface_Record;
        Color              :        Gdk.Color.Gdk_Color);

Set the color to use for the surface
procedure Set_Grid_Background
     (Data               : access Gtk_Plot_Surface_Record;
        Background         :        Gdk.Color.Gdk_Color);

Set the background color to use for the grid
procedure Set_Shadow
     (Data               : access Gtk_Plot_Surface_Record;
        Color              :        Gdk.Color.Gdk_Color);

Set the color to use for the shadows.
procedure Set_Grid_Foreground
     (Data               : access Gtk_Plot_Surface_Record;
        Foreground         :        Gdk.Color.Gdk_Color);

Set the foreground color to use for the grid
Lightning model
---------------

procedure Set_Ambient
     (Data               : access Gtk_Plot_Surface_Record;
        Ambient            :        Gdouble);

Set the ambient
procedure Set_Light
     (Data               : access Gtk_Plot_Surface_Record;
        X, Y, Z            :        Gdouble);

Set the orientation of the light vector
Package Gtk.Extra.PsFont
************************

This package does not provide any new widget.   Rather, it gives a set
of subprogram for postscript font handling,  and is used by most of the
Gtk.Extra.* packages.

   The following is the name of the 35 default Adobe fonts:
   * "Times-Roman",

   * "Times-Italic",

   * "Times-Bold",

   * "Times-BoldItalic",

   * "AvantGarde-Book",

   * "AvantGarde-BookOblique",

   * "AvantGarde-Demi",

   * "AvantGarde-DemiOblique",

   * "Bookman-Light",

   * "Bookman-LightItalic",

   * "Bookman-Demi",

   * "Bookman-DemiItalic",

   * "Courier",

   * "Courier-Oblique",

   * "Courier-Bold",

   * "Courier-BoldOblique",

   * "Helvetica",

   * "Helvetica-Oblique",

   * "Helvetica-Bold",

   * "Helvetica-BoldOblique",

   * "Helvetica-Narrow",

   * "Helvetica-Narrow-Oblique",

   * "Helvetica-Narrow-Bold",

   * "Helvetica-Narrow-BoldOblique",

   * "NewCenturySchoolbook-Roman",

   * "NewCenturySchoolbook-Italic",

   * "NewCenturySchoolbook-Bold",

   * "NewCenturySchoolbook-BoldItalic",

   * "Palatino-Roman",

   * "Palatino-Italic",

   * "Palatino-Bold",

   * "Palatino-BoldItalic",

   * "Symbol",

   * "ZapfChancery-MediumItalic",

   * "ZapfDingbats",


Types
=====

type Gtk_PsFont is new Gdk.C_Proxy;

A postscript font.
Subprograms
===========

function Getfont
     (Name               : in     String)
        return Gtk_PsFont;

Return the font structure associated with the font Name.
function Get_Gdkfont
     (Name               : in     String;
        Height             : in     Gint)
        return Gdk.Font.Gdk_Font;

Return the Gdk_Font that matches the postscript font Name.
Null_Font is returned if the corresponding font is not found  on your
system.
function Get_Psfontname
     (Name               : in     String)
        return String;

Return the real postscript name of the font.
In most cases this is the same as Name, except for a few cases.
procedure Add
     (Fontname           : in     String;
        Psname             : in     String;
        Family             : in     String;
        Xstring            : in     Gtkada.Types.Chars_Ptr_Array;
        Italic             : in     Boolean;
        Bold               : in     Boolean);

Add a new font to the list of recognized fonts.
The items in Xstring should be the standard X11 names for the fonts
that match that postscript font (and are used to convert from a
Gtk_PsFont to a Gdk_Font. This should be a Null terminated array.
function Find_By_Family
     (Name               : in     String;
        Italic             : in     Boolean;
        Bold               : in     Boolean)
        return Gtk_PsFont;

Return the first postscript font whose family is Name and whose
attributes match Italic and Bold.
function Get_Psname
     (Font               :        Gtk_PsFont)
        return String;

Return the name of the font.
This name can be give to Get_GdkFont above to get a font that can be
used anywhere in GtkAda.
function Init                  return Gint;

Initialize the internal list for Get_Families.
This function needs to be called before any call to Get_Families can
succeed. This list is reference counted, thus you need to call Unref
as many times as you called Init to free the memory correctly.   This
function returns 0 if it did not do anything (because the list was
already initialized), or 1 if it had to allocate some memory.
procedure Unref;

Free the memory used by the internal lists for Get_Families.
This procedure does not need to be call if you don't call Get_Families.
Package Gtk.Extra.Sheet
***********************

A Gtk_Sheet is a table like the one you can find in most spreadsheets.
Each cell can contain some text or any kind of widgets.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Sheet       (*note Package_Gtk.Extra.Sheet::)

Signals
=======

   * "activate"

     function Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Row    : Gint;
     Column : Gint)
     return Boolean;
     Emitted when the user wants to activate a specific cell. The
     callback should return True if the cell can be activated, False
     otherwise. See the subprogram Activate_Cell.

   * "changed"

     procedure Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Row    : Gint;
     Column : Gint);
     Emitted when the content of the cell is modified (either the text
     itself, or its properties, alignment,...)  A value of -1 for Row
     or Column means the row title, the column title, or their
     intersection.

   * "clear_cell"

     procedure Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Row    : Gint;
     Column : Gint);
     Emitted when the content of the cell has been deleted (the text is
     now the empty string).

   * "clip_range"

     procedure Handler (Sheet      : access Gtk_Sheet_Record'Class;
     Clip_Range : Gtk_Sheet_Range);
     Emitted when the clip area is set to a new value.

   * "deactivate"

     function Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Row    : Gint;
     Column : Gint)
     return Boolean;
     Emitted when the user wants to deactivate a specific cell. The
     callback should return True if the cell can be deactivated, False
     otherwise. See the subprogram Deactivate_Cell.

   * "move_range"

     procedure Handler (Sheet     : access Gtk_Sheet_Record'Class;
     Old_Range : Gtk_Sheet_Range;
     New_Range : Gtk_Sheet_Range);
     Emitted when the current range of selected cell is moved (ie the
     top-left cell is changed, but the size is not modified).

   * "new_column_width"

     procedure Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Column : Gint;
     Width  : Guint);
     Emitted whenever the width of the column is changed, either by the
     user or automatically if the cells should automatically resize
     themselves depending on their contents).

   * "new_row_height"

     procedure Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Row    : Gint;
     Height : Guint);
     Emitted whenever the height of the row is changed.

   * "resize_range"

     procedure Handler (Sheet     : access Gtk_Sheet_Record'Class;
     Old_Range : Gtk_Sheet_Range;
     New_Range : Gtk_Sheet_Range);
     Emitted when the current range of selected cell is resized (ie new
     cells are added to it or removed from it).

   * "select_column"

     procedure Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Column : Gint);
     Emitted when a new column is selected.

   * "select_range"

     procedure Handler (Sheet     : access Gtk_Sheet_Record'Class;
     The_Range : Gtk_Sheet_Range);
     Emitted when a new range of cells is selected.

   * "select_row"

     procedure Handler (Sheet : access Gtk_Sheet_Record'Class;
     Row   : Gint);
     Emitted when a new row is selected.

   * "set_cell"

     procedure Handler (Sheet  : access Gtk_Sheet_Record'Class;
     Row    : Gint;
     Column : Gint);
     Emitted from Hide_Active_Cell, when the cell is non-empty. ???

   * "set_scroll_adjustments"

     procedure Handler (Sheet : access Gtk_Sheet_Record'Class;
     Hadj  : Gtk_Adjustement;
     Vadj  : Gtk_Adjustment);
     Emitted when the adjustments used to indicate which area of the
     sheet is visible are set or changed. This is not called when their
     value is changed, only when a new one is set.

   * "traverse"

     function Handler (Sheet      : access Gtk_Sheet_Record'Class;
     Row        : Gint;
     Column     : Gint;
     New_Row    : Gint_Access;
     New_Column : Gint_Access)
     return Boolean;
     Emitted when the user wants to make a new cell active. The
     coordinates of the currently active cell are passed in (Row,
     Column), the coordinates of the cell that the user would like to
     select are passed in (New_Row, New_Column). The callback can
     modify the new values, and should return True if the new
     coordinates are accepted, False if the selection should be refused.


Types
=====

type Gtk_Sheet_Border is new Integer;

Mask that indicates which borders should be visible in a cell.
type Gtk_Sheet_Child is new Gdk.C_Proxy;

A widget insert in the sheet.   This structure includes both a widget
pointer and the position in the  table in which it is put.
type Sheet_State is
     (Sheet_Normal,
          Sheet_Row_Selected,
          Sheet_Column_Selected,
          Sheet_Range_Selected);

The state of the selection.
Subprograms
===========

Creation and modification
-------------------------

procedure Gtk_New
     (Sheet              : out    Gtk_Sheet;
        Rows               : in     Guint;
        Columns            : in     Guint;
        Title              : in     String := "";
        Entry_Type         : in     Gtk_Type := Gtk_Type_Invalid);

Create a new sheet with a specific number of rows and columns.
You can fully specify which type the entry used to modify the value of
cells should have. The value of Entry_Type can be found by using one
of the Get_Type subprograms in the GtkAda packages.   The Title is
internal, and does not appear on the screen.
procedure Gtk_New_Browser
     (Sheet              : out    Gtk_Sheet;
        Rows               : in     Guint;
        Columns            : in     Guint;
        Title              : in     String := "");

Create a new sheet browser with a specific number of rows and columns.
This is a standard Gtk_Sheet, except that it is read-only and that its
cells will automatically resize themselves depending on their contents.
procedure Initialize_Browser
     (Sheet              : access Gtk_Sheet_Record'Class;
        Rows               : in     Guint;
        Columns            : in     Guint;
        Title              : in     String := "");

Internal initialization function.
See the section "Creating your own widgets" in the documentation.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Sheet.
procedure Set_Hadjustment
     (Sheet              : access Gtk_Sheet_Record;
        Adjustment         : access Gtk_Adjustment_Record'Class);

Change the horizontal adjustment.
It indicates what range of columns is visible.
procedure Set_Vadjustment
     (Sheet              : access Gtk_Sheet_Record;
        Adjustment         : access Gtk_Adjustment_Record'Class);

Change the vertical adjustment.
It indicates what range of rows is visible.
function Get_Vadjustment
     (Sheet              : access Gtk_Sheet_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the adjustment used to indicate the range of visible rows.
function Get_Hadjustment
     (Sheet              : access Gtk_Sheet_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the adjustment used to indicate the range of visible columns.
procedure Change_Entry
     (Sheet              : access Gtk_Sheet_Record;
        Entry_Type         : in     Gtk_Type);

Change the type of widget used to interactively modify the value of
the cells.
function Get_Entry
     (Sheet              : access Gtk_Sheet_Record)
        return Gtk.Widget.Gtk_Widget;

Return the entry used to modify the content of the cells.
procedure Set_Title
     (Sheet              : access Gtk_Sheet_Record;
        Title              : in     String);

Change the title of the sheet.
procedure Freeze
     (Sheet              : access Gtk_Sheet_Record);

Freeze all visual updates of the sheet, until you thaw it.
The update will occur in a more efficient way.
procedure Thaw
     (Sheet              : access Gtk_Sheet_Record);

Thaw the sheet, so that visual updates occur again.
Note that you have to call Thaw as many times as you have called
Freeze to actually thaw the widget.
procedure Moveto
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Row_Align          : in     Gfloat;
        Col_Align          : in     Gfloat);

Scroll the viewing area to (Row, Column).
(Row_Align, Col_Align) represent the location on the screen that the
cell should appear at. (0.0, 0.0) is at the top-left of the screen,
whereas (1.0, 1.0) is at the bottom-right corner.   If Row or Column is
negative, there is no change.
Selection and Clipping
----------------------

function Get_State
     (Sheet              : access Gtk_Sheet_Record)
        return Sheet_State;

Return the status of the selection in the sheet.
function Get_Range
     (Sheet              : access Gtk_Sheet_Record)
        return Gtk_Sheet_Range;

Return the selected range.
procedure Get_Visible_Range
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : out    Gtk_Sheet_Range);

Return the range visible on the screen.
procedure Set_Selection_Mode
     (Sheet              : access Gtk_Sheet_Record;
        Mode               : in     Gtk.Enums.Gtk_Selection_Mode);

Change the selection mode.
procedure Select_Column
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint);

Replace the current selection with a specific column.
The range is highlighted.
procedure Select_Row
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint);

Replace the current selection with a specific row.
The range is highlighted.
procedure Select_Range
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range);

Select a new range of cells.
procedure Unselect_Range
     (Sheet              : access Gtk_Sheet_Record);

Unselect a specific range of cells.
If null is passed, the current selected range is used.
procedure Clip_Range
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range);

Create a new clip range.
That range is flashed on the screen.
procedure Unclip_Range
     (Sheet              : access Gtk_Sheet_Record);

Destroy the clip area.
function Set_Active_Cell
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Column             : in     Gint)
        return Boolean;

Set active cell where the entry will be displayed.
Returns FALSE if the current cell can not be deactivated or if the
requested cell can't be activated.
procedure Get_Active_Cell
     (Sheet              : access Gtk_Sheet_Record;
        Row                : out    Gint;
        Column             : out    Gint);

Return the coordinates of the active cell.
This is the cell that the user is currently editing.
Columns
-------

procedure Set_Column_Title
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Title              : in     String);

Modify the title of a column.
The first column on the left has the number 0.   Note that this title
does not appear on the screen, and can only be  used internally to find
a specific column.
function Get_Column_Title
     (Sheet              : access Gtk_Sheet_Record;
        Column             :        Gint)
        return String;

Return the title of a specific column.
procedure Set_Column_Titles_Height
     (Sheet              : access Gtk_Sheet_Record;
        Height             : in     Guint);

Modify the height of the row in which the column titles appear.
procedure Column_Button_Add_Label
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Label              : in     String);

Modify the label of the button that appears at the top of each column.
procedure Column_Button_Justify
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Modify the justification for the label in the column button.
procedure Show_Column_Titles
     (Sheet              : access Gtk_Sheet_Record);

Show the row in which the column titles appear.
procedure Hide_Column_Titles
     (Sheet              : access Gtk_Sheet_Record);

Hide the row in which the column titles appear.
procedure Columns_Set_Sensitivity
     (Sheet              : access Gtk_Sheet_Record;
        Sensitive          : in     Boolean);

Modify the sensitivity of all the columns.
If Sensitive is False, the columns can not be resized dynamically.
This also modifies the sensitivity of the button at the top of the
columns.
procedure Column_Set_Sensitivity
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Sensitive          : in     Boolean);

Modify the sensitivity of a specific column and its title button.
If Sensitive if False, the column can not be dynamically resized.
procedure Column_Set_Visibility
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Visible            : in     Boolean);

Change the visibility of a column.
procedure Column_Label_Set_Visibility
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Visible            : in     Boolean := True);

Change the visibility of the label in a given column.
procedure Columns_Labels_Set_Visibility
     (Sheet              : access Gtk_Sheet_Record;
        Visible            :        Boolean := True);

Change the visibility for all the column labels.
procedure Set_Column_Width
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Width              : in     Guint);

Modify the width in pixels of a specific column.
function Get_Column_Width
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint)
        return Gint;

Return the width in pixels of the Column-nth in Sheet.
procedure Add_Column
     (Sheet              : access Gtk_Sheet_Record;
        Ncols              : in     Guint);

Add some empty columns at the end of the sheet.
procedure Insert_Columns
     (Sheet              : access Gtk_Sheet_Record;
        Col                : in     Guint;
        Ncols              : in     Guint);

Add Ncols empty columns just before the columns number Col.
procedure Delete_Columns
     (Sheet              : access Gtk_Sheet_Record;
        Col                : in     Guint;
        Ncols              : in     Guint);

Delete Ncols columns starting from Col.
procedure Column_Set_Justification
     (Sheet              : access Gtk_Sheet_Record;
        Column             : in     Gint;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Set the default justification for the cells in the specific column.
function Get_Columns_Count
     (Sheet              : access Gtk_Sheet_Record)
        return Guint;

Return the maximum column number of the displayed cells.
Rows
----

procedure Set_Row_Title
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Title              : in     String);

Modify the title of a row.
The first row at the top has the number 0.   Note that this title does
not appear on the screen, and can only be  used internally to find a
specific row.
function Get_Row_Title
     (Sheet              : access Gtk_Sheet_Record;
        Row                :        Gint)
        return String;

Return the title of a specific row.
procedure Set_Row_Titles_Width
     (Sheet              : access Gtk_Sheet_Record;
        Width              : in     Guint);

Modify the width of the column that has the row titles.
procedure Row_Button_Add_Label
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Label              : in     String);

Modify the label of the button that appears at the left of each row.
procedure Row_Button_Justify
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Modify the justification for the label of the row button.
procedure Show_Row_Titles
     (Sheet              : access Gtk_Sheet_Record);

Show the column in which the row titles appear.
procedure Hide_Row_Titles
     (Sheet              : access Gtk_Sheet_Record);

Hide the column in which the row titles appear.
procedure Rows_Set_Sensitivity
     (Sheet              : access Gtk_Sheet_Record;
        Sensitive          : in     Boolean);

Modify the sensitivity of all the rows.
If Sensitive is False, the rows can not be resized dynamically.   This
also modifies the sensitivity of the button at the left of the  row.
procedure Row_Set_Sensitivity
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Sensitive          : in     Boolean);

Modify the sensitivity of a specific row and its title button.
If Sensitive if False, the row can not be dynamically resized.
procedure Row_Set_Visibility
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Visible            : in     Boolean);

Modify the visibility of a specific row
procedure Row_Label_Set_Visibility
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Visible            : in     Boolean := True);

Change the visibility of the label in a given Row.
procedure Rows_Labels_Set_Visibility
     (Sheet              : access Gtk_Sheet_Record;
        Visible            :        Boolean := True);

Change the visibility for all the row labels.
procedure Set_Row_Height
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Height             : in     Guint);

Set the height in pixels of a specific row.
function Get_Row_Height
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint)
        return Gint;

Return the height in pixels of the Row-th row in Sheet.
procedure Add_Row
     (Sheet              : access Gtk_Sheet_Record;
        Nrows              : in     Guint);

Append Nrows row at the end of the sheet.
procedure Insert_Rows
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Guint;
        Nrows              : in     Guint);

Add Nrows empty rows just before the row number Row.
procedure Delete_Rows
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Guint;
        Nrows              : in     Guint);

Delete Nrows rows starting from Row.
function Get_Rows_Count
     (Sheet              : access Gtk_Sheet_Record)
        return Guint;

Return the maximum row number of displayed cells.
Range
-----

function Range_Get_Type        return Gtk.Gtk_Type;

Return the internal value associate with a Gtk_Sheet_Range
procedure Range_Clear
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range);

Clear the content of the range.
procedure Range_Delete
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range);

Clear the content of the range and delete all the links (user_data)
procedure Range_Set_Background
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Color              : in     Gdk.Color.Gdk_Color);

Set the background color for the cells in a specific range.
procedure Range_Set_Foreground
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Color              : in     Gdk.Color.Gdk_Color);

Set the foreground color for the cells in a specific range.
procedure Range_Set_Justification
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Set the text justification for the cells in the range.
procedure Range_Set_Editable
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Editable           : in     Boolean);

Set whether the cells in the range are editable.
procedure Range_Set_Visible
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Visible            : in     Boolean);

Set whether the cells in the range are visible.
procedure Range_Set_Border
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Mask               : in     Gtk_Sheet_Border;
        Width              : in     Guint;
        Line_Style         : in     Gdk.Types.Gdk_Line_Style);

Set the style of the border for the cells in the range.
procedure Range_Set_Border_Color
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Color              : in     Gdk.Color.Gdk_Color);

Change the color for the borders of the cells in the range.
procedure Range_Set_Font
     (Sheet              : access Gtk_Sheet_Record;
        The_Range          : in     Gtk_Sheet_Range;
        Font               : in     Gdk.Font.Gdk_Font);

Change the font of the cells in the range.
Cells
-----

procedure Set_Cell
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint;
        Justification      : in     Gtk.Enums.Gtk_Justification;
        Text               : in     String);

Set the cell contents.
Set Text to the empty string to delete the content of the cell.
procedure Set_Cell_Text
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint;
        Text               : in     String);

Set the cell contents.
The justification used is the previous one used in that cell.
function Cell_Get_Text
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint)
        return String;

Return the text put in a specific cell.
The empty string is returned if there is no text in that cell.
procedure Cell_Clear
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint);

Clear the contents of the cell.
procedure Cell_Delete
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint);

Clear the contents of the cell and remove the user data associated
with it.
function Cell_Get_State
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint)
        return Gtk.Enums.Gtk_State_Type;

Return the state of the cell (normal or selected).
procedure Get_Pixel_Info
     (Sheet              : access Gtk_Sheet_Record;
        X                  : in     Gint;
        Y                  : in     Gint;
        Row                : out    Gint;
        Column             : out    Gint);

Return the row and column matching a given pixel on the screen.
Constraint_Error is raised if no such cell exists.
procedure Get_Cell_Area
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Column             : in     Gint;
        Area               : out    Gdk.Rectangle.Gdk_Rectangle);

Get the area of the screen that a cell is mapped to.
Constraint_Error is raised if no such cell exists;
Children
--------

A Gtk_Sheet can contain some children, attached to some specific
cells.

procedure Put
     (Sheet              : access Gtk_Sheet_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        X                  : in     Gint;
        Y                  : in     Gint);

Put a new child at a specific location (in pixels) in the sheet.
procedure Attach
     (Sheet              : access Gtk_Sheet_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Row                : in     Gint;
        Col                : in     Gint;
        X_Align            : in     Gfloat;
        Y_Align            : in     Gfloat);

Attach a child to a specific Cell in the sheet.
X_Align and Y_Align should be between 0.0 and 1.0, indicating that  the
child should be aligned from the Left (resp. Top) to the Right  (resp.
Bottom) of the cell.
procedure Move_Child
     (Sheet              : access Gtk_Sheet_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        X                  : in     Gint;
        Y                  : in     Gint);

Move a child of the table to a specific location in pixels.
A warning is printed if Widget is not already a child of Sheet.
function Get_Child_At
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint)
        return Gtk_Sheet_Child;

Return the widget associated with the cell.
function Get_Widget
     (Child              :        Gtk_Sheet_Child)
        return Gtk.Widget.Gtk_Widget;

Return the widget in the child.
procedure Button_Attach
     (Sheet              : access Gtk_Sheet_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Row                : in     Gint;
        Col                : in     Gint;
        X_Align            : in     Gfloat;
        Y_Align            : in     Gfloat);

Attach a new button in the row or column title.
One of Row or Col must be negative (but only one).   This can be used
to modify the standard buttons that appear at the top  of each column,
or on the left of each row.
Links / User_Data
-----------------

You can associate any kind of data with a cell, just like you
can associate user_data with all the widgets.   Note that this uses a
generic package, which must be instantiated at  library level since it
has internal clean up functions.

procedure Link_Cell
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint;
        Link               : in     Data_Type);

Associate some user specific data with a given cell.
function Get_Link
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint)
        return Data_Type_Access;

Return the user data associated with the cell.
null is returned if the cell has no user data.
procedure Remove_Link
     (Sheet              : access Gtk_Sheet_Record;
        Row                : in     Gint;
        Col                : in     Gint);

Delete the user data associated with the cell.
Flags
-----

Some flags are defined for this widget. You can not access them through
the usual interface in Gtk.Object.Flag_Is_Set since this widget is not
part of the standard gtk+ packages. Instead, use the functions below.

   * "Is_Locked"    Set if the cells are editable

   * "Is_Frozen"    Set if the sheet is temporary frozen, ie does not
     redisplay itself    after each modification. See the subprograms
     Freeze and Thaw.

   * "In_Xdrag"    Set while a column is being dynamically resized by
     the user.

   * "In_Ydrag"    Set while a row is being dynamically resized by the
     user.

   * "In_Drag"    Set while the active cell's is being dragged.

   * "In_Selection"    Set while the user is selecting a block of cells.

   * "In_Resize"    Set while the sheet itself is being dynamically
     resized by the user.

   * "In_Clip"    See the subprograms Clip_Range and Unclip_Range.

   * "Row_Frozen"    Set when the user can not dynamically resize the
     rows.

   * "Column_Frozen"    Set when the user can not dynamically resize
     the columns.

   * "Auto_Resize"    Set when the columns automatically resize
     themselves when their    content is longer than their width.

   * "Clip_Text"    Set when the text contained in the cells is
     automatically clipped to    their width.

   * "Row_Titles_Visible"    Set when a special column is added to the
     left to show the title of    the rows.

   * "Column_Titles_Visible"    Set when a special row is added at the
     top to show the title of the    columns.

   * "Auto_Scroll"    Set when the sheet should automatically scroll to
     show the active    cell at all times.

   * "Justify_Entry"    Set when the justification attribute for
     entries should be taken into    account

function Sheet_Flag_Is_Set
     (Sheet              : access Gtk_Sheet_Record;
        Flag               :        Guint16)
        return Boolean;

Test whether one of the flags for a Gtk_Sheet widget or its children
is set. This can only be used for the flags defined in the
Gtk.Extra.Gtk_Sheet package.
procedure Sheet_Set_Flags
     (Sheet              : access Gtk_Sheet_Record;
        Flags              :        Guint16);

Set the flags for a Gtk_Sheet widget or its children. Note that the
flags currently set are not touched by this function. This can only be
used for the flags defined in the Gtk.Extra.Gtk_Sheet package.
procedure Sheet_Unset_Flags
     (Sheet              : access Gtk_Sheet_Record;
        Flags              :        Guint16);

Unset the flags in the widget.
Package Gtk.File`_'Selection
****************************

A Gtk_File_Selection is a general widget to interactively select file.
It displays a dialog in which the user can navigate through
directories,  select a file, and even manipulate files with operations
like removing,  renaming,...   Currently, only one file can be selected
in the dialog.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Window   (*note Package_Gtk.Window::)
                    \___ Gtk_File_Selection (*note Package_Gtk.File_Selection::)

Subprograms
===========

Operations on the dialog
------------------------

procedure Gtk_New
     (File_Selection     : out    Gtk_File_Selection;
        Title              : in     String);

Create a new file selection dialog.
Title is the name of the dialog, as displayed in its title bar.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_File_Selection.
procedure Set_Filename
     (File_Selection     : access Gtk_File_Selection_Record;
        Filename           : in     String);

Highlight the given file in the dialog.
Note that this does not close the dialog.   You can also use this
procedure to select the directory to be displayed  in the dialog. Along
with Complete, this allows you to set some filters  in the dialog.
function Get_Filename
     (File_Selection     : access Gtk_File_Selection_Record)
        return String;

Get the selected file name.
procedure Complete
     (File_Selection     : access Gtk_File_Selection_Record;
        Pattern            : in     String);

Set the filter used to display the files.
The pattern is displayed in the entry at the bottom of the dialog, and
the list of files displayed in the list.
procedure Show_Fileop_Buttons
     (File_Selection     : access Gtk_File_Selection_Record);

When this function is called, the dialog includes a series of buttons
for file operations (create directory, rename a file, delete a file).
procedure Hide_Fileop_Buttons
     (File_Selection     : access Gtk_File_Selection_Record);

Hide the buttons for file operations.
procedure Set_Show_File_Op_Buttons
     (File_Selection     : access Gtk_File_Selection_Record;
        Flag               :        Boolean);

Choose whether to display or not the file operation buttons.
This button is kept for backward compatibility only.

   If Flag is true, calls Show_Fileop_Buttons, otherwise calls
Hide_Fileop_Buttons.
Getting the fields
------------------

The following functions are provided to access the fields of the
file selection dialog.   This dialog is divided into two main areas,
the Action_Area which is  the top part that contains the list of files,
and the button area which  is the bottom part that contains the OK and
Cancel buttons.

function Get_Action_Area
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Box.Gtk_Box;

Return the action area.
This is the area that contains the list of files, the filter entry,etc.
function Get_Button_Area
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Box.Gtk_Box;

Return the button area.
This is the area that contains the OK and Cancel buttons.
function Get_Dir_List
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Widget.Gtk_Widget;

Return the list that display the list of directories.
function Get_File_List
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Widget.Gtk_Widget;

Return the list that display the list of files in the selected directory
function Get_Cancel_Button
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Button.Gtk_Button;

Return the Cancel button.
To remove this button from the dialog, call Hide on the return value.
The callbacks on this button should simply close the dialog, but should
ignore the file selected by the user.
function Get_Help_Button
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Button.Gtk_Button;

Return the Help button.
To remove this button from the dialog, call Hide on the return value.
The callbacks on this button should display a new dialog that explain
what file the user should select.
function Get_Ok_Button
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Button.Gtk_Button;

Return the OK button.
The callbacks on this button should close the dialog and do something
with the file selected by the user.
function Get_History_Pulldown
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Widget.Gtk_Widget;

Return the menu that display the history of directories
for easy access by the user.
function Get_Selection_Entry
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Widget.Gtk_Widget;

Return the entry used to set the filter on the list of directories.
The simplest way to insert text in this entry is to use the  Complete
procedure above.
function Get_Selection_Text
     (File_Selection     : access Gtk_File_Selection_Record)
        return Gtk.Widget.Gtk_Widget;

Return the text displayed just above the Selection_Entry.
Package Gtk.Fixed
*****************

The Gtk_Fixed widget is a container which can place child widgets at
fixed  positions and with fixed sizes, given in pixels.

   Note that it is usually bad practice to use the Gtk_Fixed container
in  GtkAda. Instead, you should consider using one of the other many
containers  available, that will allow you to handle resizing of your
windows, as well  as font size changes easily.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Fixed       (*note Package_Gtk.Fixed::)

Subprograms
===========

procedure Gtk_New
     (Fixed              : out    Gtk_Fixed);

Create a new fixed container.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Fixed.
function Get_Children
     (Fixed              : access Gtk_Fixed_Record)
        return Widget.Widget_List.Glist;

Return the list of Widgets contained in a Gtk_Fixed.
procedure Move
     (Fixed              : access Gtk_Fixed_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        X                  : in     Gint16;
        Y                  : in     Gint16);

Move a child of a GtkFixed container to the given position.
X indicates the horizontal position to place the widget at.   Y is the
vertical position to place the widget at.
procedure Put
     (Fixed              : access Gtk_Fixed_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        X                  : in     Gint16;
        Y                  : in     Gint16);

Add Widget to a Fixed container at the given position.
X indicates the horizontal position to place the widget at.   Y is the
vertical position to place the widget at.
Package Gtk.Font`_'Selection
****************************

This widget provides a nice way for the user of your application to
select fonts.   It first searches on your system for the list of fonts
available, and  displays a set of boxes to select them based on their
name, their  weight, their size, etc.   This widget is provided in two
forms, one widget that can be embedded  in any container, a
Gtk_Font_Selection, whereas the other one comes  directly in its own
separate window (to be popped up as a dialog).

   Some filters can be applied to the widget, when you want the user to
select only a font only among a specific subset (like bitmap or
true-type fonts for instance).   There are two kinds of filters: a base
filter, set in your application  and that the user can not change; a
user filter that can be modified  interactively by the user.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Window   (*note Package_Gtk.Window::)
                    \___ Gtk_Font_Selection_Dialog (*note Package_Gtk.Font_Selection_Dialog::)

Types
=====

type Gtk_Font_Filter_Type is
     (Font_Filter_Base,
          Font_Filter_User);

These are the two types of filter available - base and user. The  base
filter is set by the application and can't be changed by the  user.
type Gtk_Font_Metric_Type is
     (Font_Metric_Pixels,
          Font_Metric_Points);

Used to determine whether point or pixel sizes are used.
subtype Gtk_Font_Type is Gint;

Used for determining the type of a font style (bitmap, scalable,...),
and also for setting filters.  These can be combined if a style has
bitmaps and scalable fonts available.
Subprograms
===========

Font_Selection functions
------------------------

procedure Gtk_New
     (Widget             : out    Gtk_Font_Selection);

Create a new font selection widget.
It can be added to any existing container.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Font_Selection.
function Get_Font_Name
     (Fontsel            : access Gtk_Font_Selection_Record)
        return String;

Return the name of the font selected by the user.
It returns an empty string if not font is selected.   The string has
the same format as excepted in the Gdk.Font package.   This is also the
standard format on X11 systems.
function Get_Font
     (Fontsel            : access Gtk_Font_Selection_Record)
        return Gdk.Font.Gdk_Font;

Allocate and return the font selected by the user.
This newly created font can be used as is by all the drawing functions
in the Gdk.Drawable package.   If not font has been selected,
Gdk.Font.Null_Font is returned.
function Set_Font_Name
     (Fontsel            : access Gtk_Font_Selection_Record;
        Fontname           : in     String)
        return Boolean;

Set the name and attributes of the selected font in Fontsel.
Fontname should have the standard format on X11 systems, that fully
describe the family, weight, size, slant, etc. of the font.
procedure Set_Filter
     (Fsd                : access Gtk_Font_Selection_Record;
        Filter_Type        : in     Gtk_Font_Filter_Type;
        Font_Type          : in     Gtk_Font_Type := Font_All;
        Foundries          : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Weights            : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Slants             : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Setwidths          : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Spacings           : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Charsets           : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array);

Set up one of the filters used to display the fonts.
As described above, there are two types of filters, one of which,
Font_Filter_Base, can not be modified by the user.   All the properties
are given in an array (no need to have a NULL  terminated array as in
C).   See the example in the testgtk/ directory in the GtkAda
distribution for  the possible values you can give to the parameters.
The strings are  case sensitive.   You can also free the strings when
you are done with them, since gtk+  keeps a copy of the information it
needs.   The default values for parameters are set so that there is in
fact no  filter.   Note that this call will succeed only if Fsd has
been added to a window  first.
function Get_Preview_Text
     (Fontsel            : access Gtk_Font_Selection_Record)
        return String;

Return the string used to preview the selected font in the dialog.
procedure Set_Preview_Text
     (Fontsel            : access Gtk_Font_Selection_Record;
        Text               : in     String);

Set the string to use to preview the selected font.
Font_Selection_Dialog functions
-------------------------------

procedure Gtk_New
     (Widget             : out    Gtk_Font_Selection_Dialog;
        Title              : in     String);

Create a new dialog to select a font.
The font selection widget has its own window, whose title is chosen  by
Title.
function Dialog_Get_Type       return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Font_Selection_Dialog.
function Get_Font_Name
     (Fsd                : access Gtk_Font_Selection_Dialog_Record)
        return String;

Return the name of the font selected by the user.
It returns an empty string if not font is selected.   The string has
the same format as excepted in the Gdk.Font package.   This is also the
standard format on X11 systems.
function Get_Font
     (Fsd                : access Gtk_Font_Selection_Dialog_Record)
        return Gdk.Font.Gdk_Font;

Allocate and return the font selected by the user.
This newly created font can be used as is by all the drawing functions
in the Gdk.Drawable package.   If not font has been selected,
Gdk.Font.Null_Font is returned.
function Set_Font_Name
     (Fsd                : access Gtk_Font_Selection_Dialog_Record;
        Fontname           : in     String)
        return Boolean;

Set the name and attributes of the selected font in Fontsel.
Fontname should have the standard format on X11 systems, that fully
describe the family, weight, size, slant, etc. of the font.
procedure Set_Filter
     (Fsd                : access Gtk_Font_Selection_Dialog_Record;
        Filter_Type        : in     Gtk_Font_Filter_Type;
        Font_Type          : in     Gtk_Font_Type := Font_All;
        Foundries          : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Weights            : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Slants             : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Setwidths          : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Spacings           : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array;
        Charsets           : in     Gtkada.Types.Chars_Ptr_Array
                            := Gtkada.Types.Null_Array);

Set up one of the filters used to display the fonts.
As described above, there are two types of filters, one of which,
Font_Filter_Base, can not be modified by the user.   All the properties
are given in an array (no need to have a NULL  terminated array as in
C).   See the example in the testgtk/ directory in the GtkAda
distribution for  the possible values you can give to the parameters.
The strings are  case sensitive.   You can also free the strings when
you are done with them, since gtk+  keeps a copy of the information it
needs.   The default values for parameters are set so that there is in
fact no  filter.
function Get_Preview_Text
     (Fsd                : access Gtk_Font_Selection_Dialog_Record)
        return String;

Return the string used to preview the selected font in the dialog.
procedure Set_Preview_Text
     (Fsd                : access Gtk_Font_Selection_Dialog_Record;
        Text               : in     String);

Set the string to use to preview the selected font.
function Get_Cancel_Button
     (Fsd                : access Gtk_Font_Selection_Dialog_Record)
        return Gtk.Button.Gtk_Button;

Return the Id of the cancel button of the dialog.
You can use this to set up a callback on that button.   The callback
should close the dialog, and ignore any value that has been  set in it.
function Get_OK_Button
     (Fsd                : access Gtk_Font_Selection_Dialog_Record)
        return Gtk.Button.Gtk_Button;

Return the Id of the Ok button.
The callback set on this button should close the dialog if the selected
font is valid, and do whatever if should with it.
function Get_Apply_Button
     (Fsd                : access Gtk_Font_Selection_Dialog_Record)
        return Gtk.Button.Gtk_Button;

Return the Id of the Apply button.
The callback on this button should temporarily apply the font, but
should be able to cancel its effect if the Cancel button is selected.
Package Gtk.Font_Selection_Dialog
*********************************

Package Gtk.Frame
*****************

A Gtk_Frame is a simple border than can be added to any widget or
group of widget to enhance its visual aspect.   Optionally, a frame can
have a title.

   This is a very convenient widget to visually group related widgets
(like  groups of buttons for instance), possibly with a title to
explain the  purpose of this group.

   A Gtk_Frame has only one child, so you have to put a container like
for  instance a Gtk_Box inside if you want the frame to surround
multiple  widgets.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Frame    (*note Package_Gtk.Frame::)

Subprograms
===========

procedure Gtk_New
     (Frame              : out    Gtk_Frame;
        Label              : in     String := "");

Create a new frame.
If Label is not the empty string, the frame will have a title.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Frame.
procedure Set_Label
     (Frame              : access Gtk_Frame_Record;
        Label              : in     String := "");

Change the label of the frame dynamically.
If Label is the empty string, the frame's label is deleted.
procedure Set_Label_Align
     (Frame              : access Gtk_Frame_Record;
        Xalign             : in     Gfloat := 0.0;
        Yalign             : in     Gfloat := 0.0);

Change the alignment of the title in the frame.
Xalign and Yalign are both percents that indicate the exact position
of the label relative to the top-left corner of the frame.   Note that
Yalign is currently ignored, and the label can only be  displayed on
the top of the frame (0.0 for Xalign means align the label  on the
left, 1.0 means align the label on the right).
procedure Set_Shadow_Type
     (Frame              : access Gtk_Frame_Record;
        The_Type           : in     Gtk_Shadow_Type);

Change the visual aspect of the frame.
Package Gtk.GEntry
******************

A Gtk_Entry is a single line text editing widget.   The text is
automatically scrolled if it is longer than can be displayed  on the
screen, so that the cursor position is visible at all times.

   See also Gtk_Text for a multiple-line text editing widget.

   Note that this widget does not currently support wide-character, or
character sets that require multiple-byte encoding.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Editable       (*note Package_Gtk.Editable::)
              \___ Gtk_Entry       (*note Package_Gtk.GEntry::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Entry;
        Max                : in     Guint16);

Create a new entry with a maximum length for the text.
The text can never be longer than Max characters.
procedure Gtk_New
     (Widget             : out    Gtk_Entry);

Create a new entry with no maximum length for the text
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Entry.
procedure Set_Text
     (The_Entry          : access Gtk_Entry_Record;
        Text               : in     String);

Modify the text in the entry.
The text is cut at the maximum length that was set when the entry was
created.   The text replaces the current contents.
procedure Append_Text
     (The_Entry          : access Gtk_Entry_Record;
        Text               : in     String);

Append a new string at the end of the existing one.
procedure Prepend_Text
     (The_Entry          : access Gtk_Entry_Record;
        Text               : in     String);

Insert some text at the beginning of the entry.
procedure Set_Visibility
     (The_Entry          : access Gtk_Entry_Record;
        Visible            : in     Boolean);

Set the visibility of the characters in the entry.
If Visible is set to False, the characters will be replaced with
starts ('*') in the display, and when the text is copied elsewhere.
procedure Set_Max_Length
     (The_Entry          : access Gtk_Entry_Record;
        Max                : in     Guint16);

Set the maximum length for the text.
The current text is truncated if needed.
Package Gtk.GLArea
******************

This widget is derived from Gtk_Drawing_Area and provides an area where
it is possible to use the openGL API.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Drawing_Area   (*note Package_Gtk.Drawing_Area::)
              \___ Gtk_GLArea      (*note Package_Gtk.GLArea::)

Types
=====

type Attributes_Array is array (Natural range <>) of GL_Configs;

Note: as opposed to what exists in C, you don't need to have  the last
element in the array be GDK_GL_NONE. This is done  transparently by
GtkAda itself.
Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_GLArea;
        Attr_List          : in     Attributes_Array);

Make an OpenGL widget, Attr_List is passed to glXChooseVisual GLX call.
Attr_List specifies a list of Boolean attributes and enum/integer
attribute/value pairs.   See glXChooseVisual man page for more
explanation on Attr_List.   Widget is created with visual and colormap
of the  requested type and GLX context is created for this widget. You
can't do opengl calls on widget until it has X window. X window  is not
created until widget is realized.
procedure Gtk_New
     (Widget             : out    Gtk_GLArea;
        Attr_List          : in     Attributes_Array;
        Share              : access Gtk_GLArea_Record'Class);

Same as above.
Share specifies the widget with which to share display lists and
texture objects. A non initialized value indicates that no sharing is
to take place.
function Make_Current
     (Glarea             : access Gtk_GLArea_Record'Class)
        return Boolean;

Must be called before rendering into OpenGL widgets.
Return True if rendering to widget is possible. Rendering is not
possible if widget is not Gtk_GLArea widget or widget is not realized.
procedure Swap_Buffers
     (Glarea             : access Gtk_GLArea_Record'Class);

Promote contents of back buffer of Glarea to front buffer.
The contents of front buffer become undefined.
Package Gtk.Gamma`_'Curve
*************************

The Gtk_Gamma_Curve widget is a child of Gtk_Curve specifically for
editing  gamma curves, which are used in graphics applications such as
the Gimp.

   The Gamma_Curve widget shows a curve which the user can edit with
the mouse  just like a Gtk_Curve widget. On the right of the curve it
also displays 5  buttons, 3 of which change between the 3 curve modes
(spline, linear and  free), and the other 2 set the curve to a
particular gamma value, or reset  it to a straight line.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Gamma_Curve (*note Package_Gtk.Gamma_Curve::)

Subprograms
===========

procedure Gtk_New
     (Gamma_Curve        : out    Gtk_Gamma_Curve);

Create a new Gtk_Gamma_Curve.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Gamma_Curve.
function Get_Curve
     (Gamma_Curve        : access Gtk_Gamma_Curve_Record)
        return Gtk.Curve.Gtk_Curve;

Return the Curve widget associated with a Gamma_Curve.
function Get_Gamma
     (Gamma_Curve        : access Gtk_Gamma_Curve_Record)
        return Gfloat;

Return the Gamma value associated with a Gamma_Curve.
Package Gtk.Handle`_'Box
************************

The Gtk_Handle_Box widget allows a portion of a window to be "torn off".
It is a bin widget which displays its child and a handle that the user
can  drag to tear off a separate window (the float window) containing
the child  widget. A thin ghost is drawn in the original location of
the handlebox. By  dragging the separate window back to its original
location, it can be  reattached.

   When reattaching, the ghost and float window, must be aligned along
one of  the edges, the snap edge. This either can be specified by the
application  programmer explicitely, or GtkAda will pick a reasonable
default based on  the handle position.

   To make detaching and reattaching the handlebox as minimally
confusing as  possible to the user, it is important to set the snap
edge so that the snap  edge does not move when the handlebox is
detached. For instance, if the  handlebox is packed at the bottom of a
Vbox, then when the handlebox is  detached, the bottom edge of the
handlebox's allocation will remain fixed  as the height of the
handlebox shrinks, so the snap edge should be set to  Pos_Bottom.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Handle_Box (*note Package_Gtk.Handle_Box::)

Signals
=======

   * "child-attached"

     procedure Handler
     (Handle_Box : access Gtk_Handle_Box_Record'Class;
     Widget     : access Gtk_Widget_Record'Class);
     Emitted when the contents of the Handle_Box are reattached to the
     main window.  Widget is the child widget of the Handle_Box. (this
     argument provides no extra information and is here only for
     backwards-compatibility)

   * "child-detached"

     procedure Handler
     (Handle_Box : access Gtk_Handle_Box_Record'Class;
     Widget     : access Gtk_Widget_Record'Class);
     Emitted when the contents of the Handle_Box are detached from the
     main window. See "child-attached" for drtails on the parameters.


Subprograms
===========

procedure Gtk_New
     (Handle_Box         : out    Gtk_Handle_Box);

Create a new Handle_Box.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Dialog.
procedure Set_Shadow_Type
     (Handle_Box         : access Gtk_Handle_Box_Record;
        Typ                : in     Enums.Gtk_Shadow_Type);

Set the type of shadow to be drawn around the border of the Handle_Box.
procedure Set_Handle_Position
     (Handle_Box         : access Gtk_Handle_Box_Record;
        Position           : in     Enums.Gtk_Position_Type);

Set the side of the Handle_Box where the handle is drawn.
procedure Set_Snap_Edge
     (Handle_Box         : access Gtk_Handle_Box_Record;
        Edge               : in     Enums.Gtk_Position_Type);

Set the snap edge of a Handle_Box.
The snap edge is the edge of the detached child that must be aligned
with the corresponding edge of the "ghost" left behind when the child
was detached to reattach the torn-off window. Usually, the snap edge
should be chosen so that it stays in the same place on the screen when
the Handle_Box is torn off.

   If the snap edge is not set, then an appropriate value will be
guessed  from the handle position. If the handle position is Pos_Right
or  Pos_Left, then the snap edge will be Pos_Top, otherwise it will be
Pos_Left.
Package Gtk.Handlers
********************

The aim of this package is to provide some services to connect a
handler to a signal emitted by a Gtk Object. To understand the
services provided by this package, some definitions are necessary:

   Signal: A signal is a kind of message that an object wants to
broadcast. All Gtk_Objects can emit signals. These messages are
associated to certain events happening during the life of an    object.
For instance, when a user clicks on a button, the    "clicked" signal
is emitted by the button.

   Handler (or callback): A handler is a function or procedure that
the user "connects" to a signal for a particular object.     Connecting
a handler to a signal means associating this handler to    the signal.
When the signal is emitted, all connected handlers    are called back.
Usually, the role of those callbacks is to do    some processing
triggered by a user action. For instance, when    "clicked" signal is
emitted by the "OK" button of a dialog, the    connected handler can be
used to close the dialog or recompute    some value.

   In GtkAda, the handlers are defined in a form as general as
possible. The first argument is always an access to the object it
has been connected to. The second object is a table of arguments
(See Gtk.Arguments for more details about this table). It is the
responsibility of this handler to extract the values from it, and    to
convert them to the correct Ada type.

   Because such handlers are not very convenient to use, this package
also provides some services to connect a marshaller instead. It
will then do the extraction work before calling the more
programmer-friendly handler, as defined in Gtk.Marshallers (see
Gtk.Marshallers for more details).

   The subdivision of this package is identical to Gtk.Marshallers; it
is made of four generic sub-packages, each representing one of the
four possible kinds of handlers: they can return a value or not, and
they can have some user specific data associated to them or not.
Selecting the right package depends on the profile of the handler.
For example, the handler for the "delete_event" signal of a  Gtk_Window
has a return value, and has an extra parameter (a Gint).   All handlers
also have a user_data field by default, but its usage  is optional. To
connect a handler to this signal, if the user_data  field is not used,
the Return_Callback generic should be  instantiated. On the other hand,
if the user_data field is  necessary, then the User_Return_Callback
generic should be used.

   Note also that the real handler in Gtk+ should expect at least as
many arguments as in the marshaller you are using. If your  marshaller
has one argument, the C handler must have at least one  argument too.

   The common generic parameter to all sub-packages is the widget type,
which is the basic widget manipulated. This can be
Gtk.Object.Gtk_Object_Record type if you want to reduce the number of
instantiations, but the conversion to the original type will have to be
done inside the handler.

   All sub-packages are organized in the same way.

   First, the type "Handler" is defined. It represents the general
form of the callbacks supported by the sub-package.

   The corresponding sub-package of Gtk.Marshallers is instantiated.

   A series of "Connect" procedures and functions is given. All cases
are covered: the functions return the Handler_Id of the newly
created association, while the procedures just connect the    handler,
dropping the Handler_Id; some services allow the user to    connect a
Handler while some others allow the usage of    Marshallers, which are
more convenient. Note that more than one    handler may be connected to
a signal; the handlers will then be    invoked in the order of
connection.

   Some "Connect_Object" services are also provided. Those services
never have a user_data. They accept an additional parameter called
Slot_Object. When the callback in invoked, the Gtk Object emitting
the signal is substituted by this Slot_Object.     These callbacks are
always automatically disconnected as soon as one    of the two widgets
involved is destroyed.

   There are several methods to connect a handler. For each method,
although the option of connecting a Handler is provided, the
recommended way is to use Marshallers. Each connect service is
documented below, in the first sub-package.

   A series of "To_Marshaller" functions are provided. They return
some marshallers for the most commonly used types in order to ease
the usage of this package. Most of the time, it will not be
necessary to use some other marshallers.

   As for the "To_Marshaller" functions, a series of "Emit_By_Name"
procedures are also provided for the same most common types, to
allow the user to easily emit signals. These procedures are mainly
intended for people building new Gtk_Objects.

   At the end of this package, some general services related to the
management of signals and handlers are also provided. Each one of  them
is documented individually below.

   IMPORTANT NOTE: These packages must be instantiated at library-level

Example
=======

      --  This example connects the "delete_event" signal to a widget.
      --  The handlers for this signal get an extra argument which is
      --  the Gdk_Event that generated the signal.
     
      with Gtk.Handlers;    use Gtk.Handlers;
      with Gtk.Marshallers; use Gtk.Marshallers;
     
      function My_Cb (Widget : access Gtk_Widget_Record'Class;
                      Event  : Gdk.Event.Gdk_Event)
                      return Gint;
      --  your own function
     
      package Return_Widget_Cb is new Gtk.Handlers.Return_Callback
         (Gtk.Widget.Gtk_Widget_Record, Gint);
     
      Return_Widget_Cb.Connect (W, "delete_event",
         Return_Widget_Cb.To_Marshaller (My_Cb'Access));

Package Gtk.Hbutton`_'Box
*************************

A Gtk_Hbutton_Box is a specific Gtk_Button_Box that organizes its
children horizontally.   The beginning of the box (when you add
children with Gtk.Box.Pack_Start)  is on the left of the box. Its end
(for Gtk.Box.Pack_End) is on the right.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Button_Box (*note Package_Gtk.Button_Box::)
                    \___ Gtk_Hbutton_Box (*note Package_Gtk.Hbutton_Box::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Hbutton_Box);

Create a new horizontal button box.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_HButton_Box.
procedure Set_Spacing_Default
     (Spacing            : in     Gint);

Set the default spacing (space between two adjacent children).
This is done for all the Hbutton_Boxes in your application. This can be
overridden for a specific box by calling Gtk.Button_Box.Set_Spacing.
function Get_Spacing_Default   return Gint;

Return the default spacing to use for all Hbutton_Boxes in your
application that don't have a specific value.
procedure Set_Layout_Default
     (Layout             : in     Gtk.Enums.Gtk_Button_Box_Style);

Set the the default layout to use for all the hbutton_boxes in your
application that don't have a specific value set by
Gtk.Button_Box.Set_Layout. The default value is Buttonbox_Edge.
function Get_Layout_Default    return Gtk.Enums.Gtk_Button_Box_Style;

Return the default layout to use for all the hbutton_boxes.
Package Gtk.Image
*****************

The Gtk_Image widget displays a graphical image. The image is typically
created using Gdk.Image.Gdk_New.

   The pixels in a Gtk_Image may be manipulated by the application after
creation, as Gtk_Image store the pixel data on the client side. If you
wish  to store the pixel data on the server side (thus not allowing
manipulation  of the data after creation) you should use Gtk_Pixmap.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Misc           (*note Package_Gtk.Misc::)
              \___ Gtk_Image       (*note Package_Gtk.Image::)

Subprograms
===========

procedure Gtk_New
     (Image              : out    Gtk_Image;
        Val                : in     Gdk.Image.Gdk_Image;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Image.
procedure Get
     (Image              : access Gtk_Image_Record;
        Val                : out    Gdk.Image.Gdk_Image;
        Mask               : out    Gdk.Bitmap.Gdk_Bitmap);

Get the values of a Gtk_Image.
Mask indicates which parts of the image should be transparent.
procedure Set
     (Image              : access Gtk_Image_Record;
        Val                : in     Gdk.Image.Gdk_Image;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

Set the values of a Gtk_Image.
Mask indicates which parts of the image should be transparent.
Package Gtk.Item
****************

Package Gtk.Label
*****************

A Gtk_Label is a light widget associated with some text you want  to
display on the screen. You can change the text dynamically if  needed.

   The text can be on multiple lines if you separate each line with
the ASCII.LF character. However, this is not the recommended way  to
display long texts (see the Gtk_Text widget instead)

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Misc           (*note Package_Gtk.Misc::)
              \___ Gtk_Label       (*note Package_Gtk.Label::)

Subprograms
===========

procedure Gtk_New
     (Label              : out    Gtk_Label;
        Str                : in     String := "");

Create a new label.
Str is the string to be displayed.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Label.
procedure Set_Text
     (Label              : access Gtk_Label_Record;
        Str                : in     String);

Change the text of the label.
The new text is visible on the screen at once. Note that the underline
pattern is not modified.
procedure Set_Justify
     (Label              : access Gtk_Label_Record;
        Jtype              : in     Enums.Gtk_Justification);

Set the justification for the label.
The default value is Justify_Center, which means that the text will be
centered in the label. Note that this setting has an impact only when
the Gtk_Label is larger than the text (its default width is the same
as the text) and contains multiple lines.   To justify a single line
label, you should instead change the properties  of the container
handling the label (box, table, ...).
procedure Set_Pattern
     (Label              : access Gtk_Label_Record;
        Pattern            : in     String);

Change the underlines pattern.
Pattern is a simple string made of underscore and space characters,
matching the ones in the string. GtkAda will underline every letter
that matches an underscore.   An empty string disables the underlines.
example: If the text is FooBarBaz and the Pattern is "___   ___"  then
both "Foo" and "Baz" will be underlined, but not "Bar".
procedure Set_Line_Wrap
     (Label              : access Gtk_Label_Record;
        Wrap               : in     Boolean);

Toggle line wrapping within Label.
if Wrap is True, then Label will break lines if the text is larger
then the widget's size. If Wrap is False, then the text is simply  cut
off.
function Get
     (Label              : access Gtk_Label_Record)
        return String;

Get the current value of the text displayed in the label.
function Parse_Uline
     (Label              : access Gtk_Label_Record;
        Text               :        String)
        return Gdk.Types.Gdk_Key_Type;

Create both the text and the underscore pattern from a single string.
Text is parsed for underscores. The next character is converted to  an
underlined character.
Package Gtk.Layout
******************

A Gtk_Layout is a widget that can have an almost infinite size, without
occupying a lot of memory. Its children can be located anywhere within
it, but will only appear on the screen if the visible area of the
layout  contains them.   Just like a Gtk_Viewport, its visible area is
indicated by two  Gtk_Adjustment widgets, and thus a Gtk_Layout can be
put as is in a  Gtk_Scrolled_Window.   In fact, due to a bug in
gtk+1.2.6, you will have to do put in a scrolled  window. This of
course will be fixed in later versions.   As for Gtk_Fixed containers,
the children can be located anywhere in the  layout (no automatic
organization is done). But, as opposed to Gtk_Fixed  widgets, a
Gtk_Layout does not try to resize itself to show all its  children.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Layout      (*note Package_Gtk.Layout::)

Signals
=======

   * "set_scroll_adjustments"

     procedure Handler (Layout : access Gtk_Layout_Record'Class;
     Hadj   : in Gtk.Adjustment.Gtk_Adjustment;
     Vadj   : in Gtk.Adjustment.Gtk_Adjustment);
     Emitted whenever at least one of the adjustment of the layout is
     changed.


Subprograms
===========

procedure Gtk_New
     (Layout             : out    Gtk_Layout;
        Hadjustment        :        Adjustment.Gtk_Adjustment
                            := Adjustment.Null_Adjustment;
        Vadjustment        :        Adjustment.Gtk_Adjustment
                            := Adjustment.Null_Adjustment);

Create new layout.
You can either give an explicit couple of adjustments, that will
indicate the current visible area. If you don't specify any, they will
be created automatically by GtkAda, which is the usual way to do.   The
Layout does not occupy any area on the screen, and you have to
explicitly specify one with Set_Size below.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Layout.
procedure Put
     (Layout             : access Gtk_Layout_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        X                  : in     Gint;
        Y                  : in     Gint);

Insert a new child in the layout.
The child will be displayed on the screen only if at least part of  it
intersects the visible area of the layout.   The layout does not resize
itself to automatically show the widget.
procedure Move
     (Layout             : access Gtk_Layout_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        X                  : in     Gint;
        Y                  : in     Gint);

Move a child of the layout.
Nothing is done if Widget is not already a child of Layout.
function Get_Bin_Window
     (Widget             : access Gtk_Layout_Record)
        return Gdk.Window.Gdk_Window;

Return the window associated with the layout.
You should use this one rather than Gtk.Widget.Get_Window.
procedure Set_Size
     (Layout             : access Gtk_Layout_Record;
        Width              : in     Guint;
        Height             : in     Guint);

Specify an absolute size for the layout.
This is not the size on the screen, but the internal size of the widget.
The screen's size can be set with Gtk.Widget.Set_Usize.
function Get_Hadjustment
     (Layout             : access Gtk_Layout_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the adjustment that indicate the horizontal visual area
of the layout.   You generally do not have to modify the value of this
adjustment  yourself, since this is done automatically when the layout
has  been put in a Gtk_Scrolled_Window.
function Get_Vadjustment
     (Layout             : access Gtk_Layout_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the adjustment that indicate the vertical visual area
of the layout.   You generally do not have to modify the value of this
adjustment  yourself, since this is done automatically when the layout
has  been put in a Gtk_Scrolled_Window.
procedure Set_Hadjustment
     (Layout             : access Gtk_Layout_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Specify a new adjustment to use for the horizontal visual area.
procedure Set_Vadjustment
     (Layout             : access Gtk_Layout_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Specify a new adjustment to use for the vertical visual area.
procedure Freeze
     (Layout             : access Gtk_Layout_Record);

Temporarily freezes the refreshing of the layout on the screen.
This should be used before doing long modifications to the children  to
speed up the update.   Note that each call to Freeze increments an
internal counter, and the  widget will only be thawed when the counter
reaches 0;
procedure Thaw
     (Layout             : access Gtk_Layout_Record);

Force an immediate update of the layout.
Every time a child is modified, the screen is refreshed.   This is the
opposite of Freeze.   This subprogram decrements the internal counter.
function Get_Xoffset
     (Layout             : access Gtk_Layout_Record)
        return Guint;

Get the current offset of the top-left corner.
function Get_Yoffset
     (Layout             : access Gtk_Layout_Record)
        return Guint;

Get the current offset of the top-left corner.
function Get_Width
     (Layout             : access Gtk_Layout_Record)
        return Guint;

Get the width in pixels of the layout.
function Get_Height
     (Layout             : access Gtk_Layout_Record)
        return Guint;

Get the height in pixels of the layout.
Package Gtk.Main
****************

This package contains top-level subprograms that are used to initialize
GtkAda and interact with the main event loop.

   It also provides a set of packages to set up idle functions, timeout
functions, and functions to be called before and after entering the
main loop.

Types
=====

type Idle_Callback is access function return Boolean;

Function that can be called automatically whenever GtkAda is not
processing events.   It should return True if the function should be
called again as soon  as possible, False if it should be unregistered.
type Idle_Handler_Id is new Guint;

Id for Idle handlers.
type Idle_Priority is new Guint;

Priorities that can be set for idle handlers.   The higher the
priority, the less urgent the task. Handlers whose  priority is lower
will be called before others.
type Init_Function is access procedure
     (Data : System.Address);

Function called just before starting the main loop.   This can be
registered with Init_Add below.
type Quit_Function is access function return Boolean;

Type of function that can be called when the main loop exits.   It
should return False if it should not be called again when another  main
loop exits.
type Quit_Handler_Id is new Guint;

registration ID for functions that will be called before the  main loop
exits.
type Timeout_Callback is access function return Boolean;

Function that can be called automatically at precise time intervals.
It should return True if the function should be called again as soon
as possible, False if it should be unregistered.
type Timeout_Handler_Id is new Guint;

Id for Timeout handlers.
Subprograms
===========

Initialization and exit routines
--------------------------------

procedure Init;

Initialize GtkAda's internal structures.
This subprogram should be called before any other one in GtkAda.   If
GtkAda could not be initialized (no access to the display, etc.), the
application exits with an error
function Init_Check            return Boolean;

Initialize GtkAda's internal structures.
Return False if there was an error (no access to the display, etc.)
procedure Gtk_Exit
     (Error_Code         : in     Gint);

Terminate GtkAda cleanly, and quits the application.
function Set_Locale            return String;

Read and parse the local settings, such as time format, ...
Return the name of the local settings, which can also be set with  the
environment variable LOCALE
procedure Set_Locale;

Read and parse the local settings, such as time format, ...
Init and Quit functions
-----------------------

procedure Init_Add
     (Func               :        Init_Function;
        Data               :        System.Address);

Register a function to be called just before starting a main loop.
This function is called only once, even if a new main loop is started
recursively.
function Quit_Add
     (Main_Level         :        Guint;
        Func               :        Quit_Function)
        return Quit_Handler_Id;

Register a new function to be called when the current main loop exits.
The function will be called once when the current main loop exists.
If it returns False, it will then be deleted from the list of  quit
functions, and won't be called again next time a main loop is  exited.
The function will only be called when exiting a main loop at level
Main_Level. If Main_Level is 0, the function will be called for the
current main_loop.
function Quit_Add_Destroy
     (Main_Level         :        Guint;
        Object             : access Gtk.Object.Gtk_Object_Record'Class)
        return Quit_Handler_Id;

Ensure that Object is destroyed when exiting the main loop at Main_Level
(or the current main loop level is 0).
procedure Quit_Remove
     (Id                 :        Quit_Handler_Id);

Remove a Quit Handler, that has been previously set by Quit_Add.
The main loop
-------------

function Events_Pending        return Boolean;

Return True if there are some events waiting in the event queue.
procedure Main;

Start the main loop, and returns only when the main loop is exited.
This subprogram can be called recursively, to start new internal
loops. Each of these loops is exited through a call to Main_Quit.
This is the recommended method to use when you want to popup a dialog
and wait for the user answer before going any further.   Note that this
procedure can only be called within a single task.
function Main_Level            return Guint;

Return the level of the current main loop.
Since there can be nested loops, this returns the depth of the  current
one, starting from 1 (0 if there is none).
procedure Main_Quit;

Quit the current main loop.
If this was the last active main loop, no more events will be processed
by GtkAda.
function Main_Iteration
     (Blocking           : in     Boolean := True)
        return Boolean;

Do one iteration of the main loop.
Blocking indicates whether GtkAda should wait for an event to be
available, or simply exit if there is none.   Returns True if no main
loop is running  When doing some heavy calculations in an application,
it is recommended  that you check from time to time if there are any
events pending and  process them, so that your application still reacts
to events.   To do that, you would add a loop like:

   while Gtk.Main.Events_Pending loop

   Dead := Gtk.Main.Main_Iteration;

   end loop;
procedure Do_Event
     (Event              : in     Gdk.Event.Gdk_Event);

Process Event as if it was in the event queue.
This function should almost never be used in your own application, this
is the core function for event processing in GtkAda.   The user should
not free Event, this is already done by GtkAda.
function Get_Event_Widget
     (Event              : in     Gdk.Event.Gdk_Event)
        return Gtk.Widget.Gtk_Widget;

Return the widget to which Event applies.
Grab functions
--------------

procedure Grab_Add
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Add a new widget to the grab list.
The widget at the front of this list gets all the events even if it does
not have the focus. This feature should be used with care.   If you
want a whole window to get the events, it is better to use
Gtk.Window.Set_Modal instead which does the grabbing and ungrabbing for
you.   The grab is only done for the application. Events outside the
application are still sent to their respective windows.
procedure Grab_Remove
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Remove a widget from the grab list.
function Grab_Get_Current      return Gtk.Widget.Gtk_Widget;

Return the widget that currently has the focus.
Idle
----

GtkAda gives the possibility to register Idle functions.
These are called every time there is no more event to process in the
queue, and are used for instance internally to redraw widgets (so that
the application keeps reacting to user input even if there is a heavy
redrawing to do).   The Idle function returns a boolean, which should
be True if the idle  remains active and should be called again, or
False if the idle should  be unregistered.   The priority of these idle
callbacks can also be modified, so that  the scheduling calls one
callback before another.

   Two versions are given, either with a user data or with none.

function Idle_Add
     (Cb                 : in     Idle_Callback;
        Priority           : in     Idle_Priority
                            := Priority_Default_Idle)
        return Idle_Handler_Id;

Register an idle callback with no user data.
procedure Idle_Remove
     (Id                 : in     Idle_Handler_Id);

Remove an idle callback, when its Id is known.
Timeout
-------

A timeout is a function that is called after a specified amount
of time. You can of course use Ada tasks for the same role, however
this might provide an easier way of doing things.

   In case your timeout function takes longer to execute than the
specific  delay (for instance it takes 200ms for an internal of 100ms),
then  no invocation is queued, and they are simply discarded. There is
no  queue of expired timers. On the other hand, standard events are
still  processed, but slowly (since they have the same priority as
timeouts).

   The redrawing and resizing of widgets, which are being done as idles
with lower priority will not take place.

function Timeout_Add
     (Interval           : in     Guint32;
        Func               :        Timeout_Callback)
        return Timeout_Handler_Id;

Add a new timeout. Func will be called after Interval milliseconds.
The function will be as long as it returns True.
procedure Timeout_Remove
     (Id                 : in     Timeout_Handler_Id);

Unregister a timeout function.
Package Gtk.Marshallers
***********************

This package provides a set of generic packages to easily create  some
Marshallers. Although this package has been designed to be  easily
reusable, its primary aim is to simplify the use of callbacks.

   Note that most users don't need to understand or even look at this
package, since the main functions are also renamed in the Gtk.Handlers
package (They are called To_Marshaller). This package is rather
complex (generic packages inside generic packages), and thus you should
understand correctly how Gtk.Handlers work before looking at this one.

   To understand the paradigm used in this package, some definitions
are necessary:

   A Handler, or Callback, is a subprogram provided by the user.
This handler, when attached to a particular object, will be     called
when certain events happen during the life of this     object. All
handlers take as a first argument an access to     the object they were
attached to. Depending on the signal, this     handler can also have
some extra parameters; most of the time,     only one extra parameter
will be used. For more information about     Handlers, refer to the
package Gtk.Handlers, where this notion is     explained in more
details.

   A General_Handler is an access to any Handler. Note that this is
a type used internally, most users should *not* be using it. It is
publicly declared so that users can create new marshallers that
would not be already provided here.

   A Handler_Proxy is a subprogram that calls its associated
handler with the appropriate arguments (from an array of arguments
stored in Gtk.Arguments.Gtk_Args)

   A Marshaller is the association of a General_Handler and a
Handler_Proxy.

   This package is divided in four generic packages. Each package has
been designed to cover a certain kind of callback by providing the
associated marshallers. There are two primary factors that describe  a
callback, and that decide which marshaller to use: Does the  callback
have access to some user data?  Does the callback return  some value?

   Depending on that, the appropriate generic package should be chosen.
For example, if the callback returns a value, but does not expect
user data, then the "Return_Marshallers" package should be used.   More
details about the usage of each package is provided individually  below.

   Each of these packages is in turn divided into three generic
sub-packages.  The organization of these subpackages is always the
same :     o The type "Handler" is defined. It describes the profile of
the       Handler covered in this generic package.      o a
"To_Marshaller" function is provided to build a Marshaller       from
any Handler.      o A "Emit_By_Name" procedure is also provided to
allow the user       to "emit" a signal. This service is explained in
more details in       Gtk.Handlers.      o A private function "Call" is
also defined. This is the actual       Handler_Proxy that will be used
when creating Marshallers with       the "To_Marshaller" service.

   Once again, selecting the right generic sub-package depends on the
callback. For instance, the first sub-package, always called
"Generic_Marshaller", is to be used when the handler has one extra
argument which is a simple non-tagged type. More details about the
usage of each sub-package is also provided individually.

   Although most of the cases are covered by the packages below, some
unusual cases may appear. This is the case for example when the
callback accepts several extra parameters. In such cases, two options
are available: The first option is to use the "standard" callback
mechanism with one parameter, this parameter being an array of
arguments that you will parse yourself. The second option is to  create
a new Marshaller package. This is more interesting if more  than one
callback will follow the same pattern. The body of this  package can be
used as a good model to build such new marshallers.   See also the
example in the GtkAda distribution for how to create your  own
marshallers.

Package Gtk.Menu
****************

This widget implements a drop-down menu.   This is basically a simple
box that contains a series of Gtk_Menu_Item  widgets, on which the user
can click to perform actions.

   Such a menu is usually part of a Gtk_Menu_Bar (at the top of the
window),  or activated by clicking on an item in another Gtk_Menu.
*note Package_Gtk.Option_Menu:: for another way of displaying menus.

   All the menus in GtkAda can be "Tear off" menus, i.e you can detach
them from their parent (either a menu bar or another menu) to keep them
visible on the screen at all times).

   It is worth noting that by default, the user of your application
will be  able to dynamically modify the shortcuts associated with each
menu item.   For instance, selecting a menu item and pressing a key
will assign this  new shortcut to the item, possibly removing the
shortcut from any other  item it was associated with.

   Note that pressing <backspace> will simply remove the shortcut.

   This default behavior, somewhat unexpected, can be canceled.   There
are two ways to control this behavior: you can lock a specific menu
item by calling Gtk.Widget.Lock_Accelerators on it. But you can also
lock all the menu items at once by calling Gtk.Accel_Group.Lock for all
the accelerator groups that were used (the GUI builder gate generally
creates a single one), as well as on the group returned by
Gtk.Accel_Group.Get_Default, which is the one used for items that don't
initially have a shortcut.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Menu_Shell  (*note Package_Gtk.Menu_Shell::)
                 \___ Gtk_Menu     (*note Package_Gtk.Menu::)

Types
=====

type Gtk_Menu_Detach_Func is access procedure

type Gtk_Menu_Position_Func is access procedure

Subprograms
===========

Creating a menu
---------------

procedure Gtk_New
     (Widget             : out    Gtk_Menu);

Create a new empty menu.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Menu.
procedure Append
     (Menu               : access Gtk_Menu_Record;
        Child              : access Gtk_Menu_Item_Record'Class);

Append a new item to the menu.
The new item is added at the end of the menu.
procedure Insert
     (Menu               : access Gtk_Menu_Record;
        Child              : access Gtk_Menu_Item_Record'Class;
        Position           : in     Gint := 0);

Add a new item to the menu, at a given position.
The first position in the menu is number 0.   If Position is 0, this
procedure is the same as Prepend.
procedure Prepend
     (Menu               : access Gtk_Menu_Record;
        Child              : access Gtk_Menu_Item_Record'Class);

Add a new item at the end of a menu.
procedure Reorder_Child
     (Menu               : access Gtk_Menu_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Position           : in     Gint);

Move an existing menu_item within the menu.
Its new position is given by Position, 0 being the first item in the
menu.   If Child does not exist in the menu, nothing is done.
procedure Set_Tearoff_State
     (Menu               : access Gtk_Menu_Record;
        Torn_Off           : in     Boolean);

Modify the tearoff status of the menu.
If Torn_Off is False, the menu is displayed as a drop down menu which
disappears when the menu is not active. If Torn_Off is True, the menu
persists until it is closed or reattached.   Note that you can give the
user access to this functionality by  inserting a Gtk_Tearoff_Menu_Item
in the menu.
procedure Set_Title
     (Menu               : access Gtk_Menu_Record;
        Title              : in     String);

Set the title of the menu.
Title is displayed when the menu is displayed as a tearoff menu in an
independent window.
procedure Set_Active
     (Menu               : access Gtk_Menu_Record;
        Index              : in     Guint);

Select a specified item in the menu.
You will almost never need this function, it is used internally by
Gtk_Option_Menu.   Note that the item is not considered as being
pressed by the user, and  thus no callback is called as a result.
function Get_Active
     (Menu               : access Gtk_Menu_Record)
        return Gtk.Menu_Item.Gtk_Menu_Item;

Get the active menu item.
In a Gtk_Option_Menu, this is the item that is currently shown in the
button.
Displaying a menu
-----------------

procedure Popup
     (Menu               : access Gtk_Menu_Record;
        Parent_Menu_Shell  : in     Gtk.Menu_Shell.Gtk_Menu_Shell
                            := null;
        Parent_Menu_Item   : in     Gtk.Menu_Item.Gtk_Menu_Item
                            := null;
        Func               : in     Gtk_Menu_Position_Func := null;
        Button             : in     Guint := 1;
        Activate_Time      : in     Guint32 := 0);

Display a menu on the screen.
This is the function to use to create contextual menus.   Most of the
time, the parameters can have a null value.   Parent_Menu_Shell is the
Gtk_Menu_Shell that contains Parent_Menu_Item,  i.e. the widget that
triggered the display of the menu.   Func is a function that returns
the coordinates for the menu. If it is  null, then a default function
that positions the menu at the pointer  location is used.   Button is
the mouse button that was pressed to initiate the event.
Activate_Time is the time at which the event occurred (you can get it
directly from the Gdk_Event structure).

   Note that a variant of this function is given in the generic package
User_Menu_Popup.
procedure Popup
     (Menu               : access Gtk_Menu_Record;
        Data               : access Data_Type;
        Parent_Menu_Shell  : in     Gtk.Menu_Shell.Gtk_Menu_Shell
                            := null;
        Parent_Menu_Item   : in     Gtk.Menu_Item.Gtk_Menu_Item
                            := null;
        Func               : in     Gtk_Menu_Position_Func := null;
        Button             : in     Guint := 1;
        Activate_Time      : in     Guint32 := 0);

Same as the Popup function above.
Note that Data is not duplicated, thus you should take care of the
memory allocation/deallocation yourself.
procedure Popdown
     (Menu               : access Gtk_Menu_Record);

Remove the menu from the screen
procedure Reposition
     (Menu               : access Gtk_Menu_Record);

Reposition a menu according to its position function.
This function is set when Popup is called.
Modifying the accelerators
--------------------------

procedure Set_Accel_Group
     (Menu               : access Gtk_Menu_Record;
        Accel              : in     Accel_Group.Gtk_Accel_Group);

Set the Accel_Group that holds the global accelerators and key bindings
for the menu.
function Get_Accel_Group
     (Menu               : access Gtk_Menu_Record)
        return Accel_Group.Gtk_Accel_Group;

Get the accelerator group used to set the key bindings in the menu.
function Get_Uline_Accel_Group
     (Menu               : access Gtk_Menu_Record)
        return Accel_Group.Gtk_Accel_Group;

Get the accelerator group that is used internally by the menu for
underline accelerators while the menu is popped up.
function Ensure_Uline_Accel_Group
     (Menu               : access Gtk_Menu_Record)
        return Accel_Group.Gtk_Accel_Group;

Make sure there exists a group of accelerators for the underline
characters when the menu is popped up.
Attaching a menu to a widget
----------------------------

procedure Attach_To_Widget
     (Menu               : access Gtk_Menu_Record;
        Attach_Widget      : access Gtk.Widget.Gtk_Widget_Record'Class;
        Detacher           : in     Gtk_Menu_Detach_Func);

Attach a menu to the widget.
When the menu is detached from the widget (for instance when it is
destroyed), the procedure Detached will be called.   You will almost
never need to use this function, unless you specifically  want a call
back when a widget becomes unavailable.   If Attach_Widget is a
menu_item with a single label in it, the name of  the window created
when Menu is teared-off will be the label in the  menu_item.
procedure Detach
     (Menu               : access Gtk_Menu_Record);

Detach the menu from its widget, and call the Detacher set in
Attach_To_Widget.
function Get_Attach_Widget
     (Menu               : access Gtk_Menu_Record)
        return Gtk.Widget.Gtk_Widget;

Return the widget to which the menu was attached.
If the menu was not attached, this function returns null.
Example
=======


      --  This example shows how you create contextual menus with the third mouse
      --  button.
     
      with Gtk.Handlers, Gtk.Menu, Gtk.Widget, Gdk.Types, Gdk.Event, Glib;
      with Gtk.Window, Gtk.Menu_Item, Gtk.Enums, Gtk.Main;
      use  Gtk.Handlers, Gtk.Menu, Gtk.Widget, Gdk.Types, Gdk.Event, Glib;
      use  Gtk.Window, Gtk.Menu_Item, Gtk.Enums, Gtk.Main;
     
      procedure Contextual is
     
         package Menu_Cb is new Gtk.Handlers.Return_Callback
           (Widget_Type => Gtk_Menu_Record,  Return_Type => Boolean);
     
         function Popup_Menu_Handler (Menu  : access Gtk_Menu_Record'Class;
                                      Event : Gdk.Event.Gdk_Event)
                                     return Boolean
         is
         begin
            if Gdk.Event.Get_Event_Type (Event) = Button_Press
              and then Gdk.Event.Get_Button (Event) = 3
            then
               Popup (Menu,
                      Button            => Gdk.Event.Get_Button (Event),
                      Activate_Time     => Gdk.Event.Get_Time (Event));
            end if;
            return False;
         end Popup_Menu_Handler;
     
     
         Menu  : Gtk_Menu;
         Win   : Gtk_Window;
         Item  : Gtk_Menu_Item;
      begin
         Gtk.Main.Init;
     
         --  create the menu as usual
         Gtk_New (Menu);
         Gtk_New (Item, "Item1");
         Append (Menu, Item);
         Show (Item);
     
         --  create the widget on which you want a contextual menu
         --  Prepares it to receive button_press events
         Gtk_New (Win, Window_Toplevel);
         Set_Events (Win, Button_Press_Mask);
     
         --  Finally, connect both:
         Menu_Cb.Object_Connect
            (Win, "button_press_event",
             Menu_Cb.To_Marshaller (Popup_Menu_Handler'Access),
             Slot_Object => Menu);
     
         Show_All (Win);
         Gtk.Main.Main;
      end Contextual;

Package Gtk.Menu`_'Bar
**********************

Gtk_Menu_Bar is a subclass of Gtk_Menu_Shell which contains one to many
Gtk_Menu_Item. The result is a standard menu bar which can hold many
menu  items. Gtk_Menu_Bar allows for a shadow type to be set for
aesthetic  purposes. The shadow types are defined in the
Set_Shadow_Type function.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Menu_Shell  (*note Package_Gtk.Menu_Shell::)
                 \___ Gtk_Menu_Bar (*note Package_Gtk.Menu_Bar::)

Subprograms
===========

procedure Gtk_New
     (Menu_Bar           : out    Gtk_Menu_Bar);

Create a menu bar.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Menu_Bar.
procedure Append
     (Menu_Bar           : access Gtk_Menu_Bar_Record;
        Child              : access Gtk.Menu_Item.Gtk_Menu_Item_Record'Class);

Add a new Gtk_Menu_Item to the end of the Gtk_Menu_Bar.
procedure Insert
     (Menu_Bar           : access Gtk_Menu_Bar_Record;
        Child              : access Gtk.Menu_Item.Gtk_Menu_Item_Record'Class;
        Position           : in     Gint);

Add a new Gtk_Menu_Item to the Gtk_Menu_Bar at a specified position.
The first element of a menu bar is at position 0.
procedure Prepend
     (Menu_Bar           : access Gtk_Menu_Bar_Record;
        Child              : access Gtk.Menu_Item.Gtk_Menu_Item_Record'Class);

Add a new Gtk_Menu_Item to the beginning of the Gtk_Menu_Bar.
procedure Set_Shadow_Type
     (Menu_Bar           : access Gtk_Menu_Bar_Record;
        The_Type           : in     Gtk_Shadow_Type);

Set the shadow type to use on the Gtk_Menu_Bar.
Package Gtk.Menu_Item
*********************

Package Gtk.Menu`_'Shell
************************

This widget is a base class for all menu widgets. It contains a list of
items that can be navigated, selected and activated by the user.   It
can not be instantiated directly.

   A menu is considered "active" when it is displayed on the screen,
or, in  the case of a menu_bar when one of its menus is active.

   An item is "selected" if it is displayed in a prelight state and its
submenu (if any) displayed.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Menu_Shell  (*note Package_Gtk.Menu_Shell::)

Signals
=======

   * "activate_current"

     procedure Handler (Menu_Shell : access Gtk_Menu_Shell_Record'Class;
     Force_Hide : Gboolean);
     Activates the current menu item within the Menu_Shell.  if
     Force_Hide is True, hide the menu afterwards.

   * "cancel"

     procedure Handler (Menu_Shell : access
     Gtk_Menu_Shell_Record'Class);
     Cancels the selection within the menu_shell. Causes a
     "selection-done" signal to be emitted.

   * "deactivate"

     procedure Handler (Menu_Shell : access
     Gtk_Menu_Shell_Record'Class);
     Emitted when the menu is deactivated, ie is erased from the screen.

   * "move_current"

     procedure Handler (Menu_Shell : access Gtk_Menu_Shell_Record'Class;
     Direction  : Gtk_Menu_Direction_Type);
     An action signal which selects another menu item (given by
     direction).  In a menu, this is bound by default to the arrow keys
     to move the the selection.

   * "selection-done"

     procedure Handler (Menu_Shell : access
     Gtk_Menu_Shell_Record'Class);
     Emitted when an item has been selected. The menu shell might not be
     activated when the signal is emitted.


Types
=====

type Gtk_Menu_Direction_Type is
     (Menu_Dir_Parent,
          Menu_Dir_Child,
          Menu_Dir_Next,
          Menu_Dir_Prev);

Direction where to move the selection. See the signal "selection-done"
below.
Subprograms
===========

procedure Append
     (Menu_Shell         : access Gtk_Menu_Shell_Record;
        Child              : access Gtk_Menu_Item_Record'Class);

Add a new item at the end of the menu.
procedure Prepend
     (Menu_Shell         : access Gtk_Menu_Shell_Record;
        Child              : access Gtk_Menu_Item_Record'Class);

Add a new item at the beginning of the menu
procedure Insert
     (Menu_Shell         : access Gtk_Menu_Shell_Record;
        Child              : access Gtk_Menu_Item_Record'Class;
        Position           : in     Gint);

Add a new item at a specific position in the menu.
The first item is at position 0. To insert as the last item in the menu,
set Position to -1.
procedure Select_Item
     (Menu_Shell         : access Gtk_Menu_Shell_Record;
        Item               : access Gtk_Menu_Item_Record'Class);

Select a new item in the menu, after deselecting the current item.
procedure Deselect
     (Menu_Shell         : access Gtk_Menu_Shell_Record);

Deselect the currently selected item.
procedure Activate_Item
     (Menu_Shell         : access Gtk_Menu_Shell_Record;
        Item               : access Gtk_Menu_Item_Record'Class;
        Force_Deactivate   :        Boolean);

Activate the item.
If Force_Deactivate is True or the menu_shell sets this property,
Menu_Shell and all its parent menus are deactivated and erased from
the screen.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Menu_Shell.
Signals emission
----------------

procedure Deactivate
     (Menu_Shell         : access Gtk_Menu_Shell_Record);

Emit the "deactivate" signal.
This deselects the selected item, ungrabs the mouse and keyboard, and
erase the Menu_Shell from the screen.
Package Gtk.Misc
****************

This widget is a base class for all the widgets that require an
alignment and padding.   This widget can not be instantiated directly.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Misc           (*note Package_Gtk.Misc::)

Subprograms
===========

procedure Set_Alignment
     (Misc               : access Gtk_Misc_Record;
        Xalign             : in     Gfloat;
        Yalign             : in     Gfloat);

Modify the alignment for the widget.
Xalign and Yalign are both values between 0.0 and 1.0 that specify the
alignment: if Xalign is 0.0, the widget will be left aligned; if it is
0.5, the widget will be centered; if it is 1.0 the widget will be
right aligned. Yalign is from top (0.0) to bottom (1.0).   Both Xalign
and Yalign will be constrained to the range 0.0 .. 1.0  Note that if
the widget fills its allocated area, these two parameters  won't have
any effect.
procedure Set_Padding
     (Misc               : access Gtk_Misc_Record;
        Xpad               : in     Gint;
        Ypad               : in     Gint);

Set the padding (i.e. the extra spaces on the side of the widget).
If Xpad or Ypad is negative, they will be changed to 0.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Misc.
Package Gtk.Notebook
********************

A Gtk_Notebook is a container that displays all of its children at the
same location on the screen. They are organized into pages, that can be
selected through tabs (either by clicking on them or by a contextual
menu).   This is the best way to organize complicated interfaces that
have a lot  of widgets, by putting the children into groups of coherent
widgets.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Notebook    (*note Package_Gtk.Notebook::)

Signals
=======

   * "switch_page"

     procedure Handler (Notebook : access Gtk_Notebook_Record'Class;
     Page     : in Gtk_Notebook_Page;
     Page_Num : Guint);
     Notify when the current page is modified in the notebook.  This is
     called every time the user selected a new page, or the program
     selected a new page with Next_Page, Prev_Page, ...


Types
=====

subtype Gtk_Notebook_Page is Gtk.Gtk_Notebook_Page;

Subprograms
===========

Creating a notebook and inserting pages
---------------------------------------

procedure Gtk_New
     (Widget             : out    Gtk_Notebook);

Create a new empty notebook.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Notebook.
procedure Append_Page
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Label          : access Gtk.Widget.Gtk_Widget_Record'Class);

Insert a new page in Notebook.
The page is put at the end of the list of pages.   The user will select
it through a button that contains the  Tab_Label widget, which is
generally a Gtk_Label, but could be a box  with a pixmap in it for
instance.   No entry is associated with the page in the contextual menu.
procedure Append_Page_Menu
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Label          : access Gtk.Widget.Gtk_Widget_Record'Class;
        Menu_Label         : access Gtk.Widget.Gtk_Widget_Record'Class);

Insert a new page in Notebook.
The page is put at the end of the list of pages.   The user will select
it through a button that contains the  Tab_Label widget, which is
generally a Gtk_Label, but could be a box  with a pixmap in it for
instance.   A new entry is inserted into the contextual menu. This new
entry is  made with Menu_Label.
procedure Prepend_Page
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Label          : access Gtk.Widget.Gtk_Widget_Record'Class);

Insert a new page in Notebook.
The page is put at the beginning of the list of pages.   The user will
select it through a button that contains the  Tab_Label widget, which
is generally a Gtk_Label, but could be a box  with a pixmap in it for
instance.   No entry is associated with the page in the contextual menu.
procedure Prepend_Page_Menu
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Label          : access Gtk.Widget.Gtk_Widget_Record'Class;
        Menu_Label         : access Gtk.Widget.Gtk_Widget_Record'Class);

Insert a new page in Notebook.
The page is put at the beginning of the list of pages.   The user will
select it through a button that contains the  Tab_Label widget, which
is generally a Gtk_Label, but could be a box  with a pixmap in it for
instance.   A new entry is inserted into the contextual menu. This new
entry is  made with Menu_Label.
procedure Insert_Page
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Label          : access Gtk.Widget.Gtk_Widget_Record'Class;
        Position           : in     Gint);

Insert a new page at a specific position in Notebook.
The page is put at the beginning of the list of pages.   The user will
select it through a button that contains the  Tab_Label widget, which
is generally a Gtk_Label, but could be a box  with a pixmap in it for
instance.   No entry is associated with the page in the contextual menu.
The first position in the list of pages is 0.
procedure Insert_Page_Menu
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Label          : access Gtk.Widget.Gtk_Widget_Record'Class;
        Menu_Label         : access Gtk.Widget.Gtk_Widget_Record'Class;
        Position           : in     Gint);

Insert a new page at a specific position in Notebook.
The page is put at the beginning of the list of pages.   The user will
select it through a button that contains the  Tab_Label widget, which
is generally a Gtk_Label, but could be a box  with a pixmap in it for
instance.   A new entry is inserted into the contextual menu. This new
entry is  made with Menu_Label.   The first position in the list of
pages is 0.
procedure Remove_Page
     (Notebook           : access Gtk_Notebook_Record;
        Page_Num           : in     Gint);

Remove a page from the notebook.
The first position in the list of pages is 0.
function Get_Child
     (Page               : in     Gtk_Notebook_Page)
        return Gtk.Widget.Gtk_Widget;

Return the child from a page.
A page is automatically created by GtkAda when you inserted a  widget
in the notebook. The child is the widget you created itself.
Modifying and getting the current page
--------------------------------------

function Get_Current_Page
     (Notebook           : access Gtk_Notebook_Record)
        return Gint;

Get the number of the current page.
The first page has the number 0.
function Get_Cur_Page
     (Widget             : access Gtk_Notebook_Record'Class)
        return Gtk_Notebook_Page;

Return the current page.
function Get_Nth_Page
     (Widget             : access Gtk_Notebook_Record'Class;
        Page_Num           :        Gint)
        return Gtk.Widget.Gtk_Widget;

Convert from a page number to the real page.
function Page_Num
     (Widget             : access Gtk_Notebook_Record'Class;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class)
        return Gint;

Convert from a child to a page number.
Note that Child is not the notebook page, but the widget you inserted
with Insert_Page, Append_Page,...
procedure Set_Page
     (Notebook           : access Gtk_Notebook_Record;
        Page_Num           : in     Gint := -1);

Modify the current page.
The current page is the page that is currently visible on the screen.
Nothing happens if there is no such page.   Note also that the page has
to be visible on the screen (ie you must  have called Gtk.Widget.Show
on it first).   Use -1 to set the current page to the last one.
procedure Next_Page
     (Notebook           : access Gtk_Notebook_Record);

Display the next page on the screen.
procedure Prev_Page
     (Notebook           : access Gtk_Notebook_Record);

Display the previous page on the screen.
Style and visual aspect
-----------------------

procedure Set_Show_Border
     (Notebook           : access Gtk_Notebook_Record;
        Show_Border        : in     Boolean := True);

Indicate whether the notebook should display borders.
This border gives a 3D aspect to the notebook.
procedure Set_Show_Tabs
     (Notebook           : access Gtk_Notebook_Record;
        Show_Tabs          : in     Boolean := True);

Indicate whether the tabs should be displayed.
If the tabs are not displayed, the only way for the user to select a
new page is through the contextual menu, and thus you should make sure
that the pages were created with the Insert_Page_Menu, ... subprograms.
procedure Set_Tab_Pos
     (Notebook           : access Gtk_Notebook_Record;
        Pos                : in     Gtk.Enums.Gtk_Position_Type);

Change the position of the tabs.
The tabs can be display on any of the four sides of the notebook.
function Get_Tab_Pos
     (Widget             : access Gtk_Notebook_Record)
        return Gtk.Enums.Gtk_Position_Type;

Return the current position of the tabs.
procedure Set_Homogeneous_Tabs
     (Notebook           : access Gtk_Notebook_Record;
        Homogeneous        : in     Boolean := True);

Indicate whether all the tabs should have the same size (width or
height, depending on which side they are displayed on).
procedure Set_Tab_Border
     (Notebook           : access Gtk_Notebook_Record;
        Border_Width       : in     Gint);

Change the width of the tabs' borders.
This modifies both the horizontal border and the vertical border.
procedure Set_Tab_Hborder
     (Notebook           : access Gtk_Notebook_Record;
        Border_Width       : in     Gint);

Modify the width of the horizontal borders of the tabs.
procedure Set_Tab_Vborder
     (Notebook           : access Gtk_Notebook_Record;
        Border_Width       : in     Gint);

Modify the height of the vertical borders of the tabs.
procedure Set_Scrollable
     (Notebook           : access Gtk_Notebook_Record;
        Scrollable         : in     Boolean := True);

Indicate whether Notebook display scrolling arrows when there are
too many tabs.   The default is not to display such scrolling arrows.
Note also that  a notebook with too many pages, even if the scrolling
is activated,  is sometimes hard to use for the user.
Popup Menu
----------

The pages of a notebook can be selected both via tabs and a contextual
menu (right mouse button). Note however that the menu is available only
if the pages were inserted with Insert_Page_Menu, Append_Page_Menu or
Prepend_Page_Menu.

procedure Popup_Disable
     (Notebook           : access Gtk_Notebook_Record);

Disable the popup menu.
This menu won't be display any more when the user pressed the right
mouse button.
procedure Popup_Enable
     (Notebook           : access Gtk_Notebook_Record);

Enable the popup menu.
When the user pressed the right mouse button, a menu is selected that
allows him to select a new page.
Page properties
---------------

function Get_Allocation_Width
     (Page               :        Gtk_Notebook_Page)
        return Guint;

Return the current width of the page.
function Get_Allocation_Height
     (Page               :        Gtk_Notebook_Page)
        return Guint;

Return the current height of the page.
function Get_Allocation_X
     (Page               :        Gtk_Notebook_Page)
        return Gint;

Return the current position of the page, relative to its parent.
function Get_Allocation_Y
     (Page               :        Gtk_Notebook_Page)
        return Gint;

Return the current position of the page, relative to its parent.
function Get_Tab_Label
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class)
        return Gtk.Widget.Gtk_Widget;

Return the widget displayed in the tab used to select Page.
This widget is in fact the one given in argument to Insert_Page,etc.
when the page was created.
function Get_Tab_Label
     (Page               :        Gtk_Notebook_Page)
        return Gtk.Widget.Gtk_Widget;

Same as the previous function, but this applies on a specific page,
which you can get for instance as the result of Get_Cur_Page.
procedure Set_Tab_Label
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Label          : access Gtk.Widget.Gtk_Widget_Record'Class);

Modify the widget displayed in the tab for the page that contains Child.
Tab_Label is generally a Gtk_Label, although it can also be a Gtk_Box
that contains a Gtk_Pixmap and a Gtk_Label if you want to show pixmaps.
procedure Set_Tab_Label_Text
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tab_Text           : in     String);

Modify the text displayed in the tab for the page that contains Child.
This is a less general form of Set_Tab_Label above.
function Get_Menu_Label
     (Page               : in     Gtk_Notebook_Page)
        return Gtk.Widget.Gtk_Widget;

Return the widget displayed in the contextual menu for the page.
This is the widget given in argument to Insert_Page_Menu,
Append_Page_Menu and Prepend_Page_Menu
procedure Set_Menu_Label
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Menu_Label         : access Gtk.Widget.Gtk_Widget_Record'Class);

Modify the widget displayed in the contextual menu for the page
that contains Child.
procedure Set_Menu_Label_Text
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Menu_Text          : in     String);

Modify the text displayed in the contextual menu for the page that
contains Child.   This is a less general form of Set_Menu_Label above.
procedure Query_Tab_Label_Packing
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Expand             : out    Boolean;
        Fill               : out    Boolean;
        Pack_Type          : out    Gtk.Enums.Gtk_Pack_Type);

Return the packing used for the tab associated with the page
that contains Child.   See the Gtk.Box package for more information on
the parameters.
procedure Set_Tab_Label_Packing
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Expand             : in     Boolean;
        Fill               : in     Boolean;
        Pack_Type          : in     Gtk.Enums.Gtk_Pack_Type);

Modify the packing used for the tab associated with the page that
contains Child.
procedure Reorder_Child
     (Notebook           : access Gtk_Notebook_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Position           :        Gint);

Change the position of the page that contains Child.
List of pages
-------------

function Get_Children
     (Widget             : access Gtk_Notebook_Record)
        return Page_List.Glist;

Return the list of all pages in the notebook.
Package Gtk.Object
******************

This is the base class of the widget hierarchy.   Everything in GtkAda
inherits from this class Gtk_Object, except for a few  structures in
the Gdk.* packages (low-level drawing routines).

   This class provides a set of handful features that you can choose to
reuse  in your applications:

   * Reference counting: an object is not deleted while there exists at
     least    one reference to it. Although GtkAda mostly takes care of
     that aspect    transparently, you might need in some obscure cases
     to increment or    decrement the reference counting for a widget
     manually, so that it is not    removed from memory while you still
     need it.

   * User data: any number of data can be attached to a Gtk_Object or
     one of    its children. Theses data are references by a String, in
     a hash-table.     GtkAda itself uses this feature to provide an
     easy conversion between C    and Ada widgets.     Although you
     might prefer to have a completely object-oriented    application
     (and thus associate data through class inheritance), it    might
     be convenient to directly attach some data to your objects.

   * It also contains the basic structures and subprograms required for
     signal    emission. This is of course used to implement the signal
     mechanism in    GtkAda itself, but can also be used to implement a
     Model/View/Controller    framework.

    Note that a lot of functions provided in the C interface are not
provided  here. They are used to emulate an object-oriented language in
C, which can  of course be done much more conveniently in Ada.
Therefore most of these  functions are not needed.

   Here is a brief explanation on how the reference counting and
destruction  process work. You should not have to understand all this
to use GtkAda, but  it might help anyway.

   When an object (descendant of Gtk.Object) is created, it has
initially a  ref_count of 1. A flag is set to say the object is
"floating".  See the  Flags functions in this package for how to
retrieve the status of this  flag.

   When the object gets a parent (ie Gtk.Widget.Set_Parent is called,
possibly  from other subprograms like Gtk.Container.Add,
Gtk.Box.Pack_Start, ...),  the ref_count of the object is incremented
to 2.   If the object was still "floating", it is also "sinked", ie its
ref_count  is decremented to 1, and the "floating" flag is cleared.

   The same behavior as above happens when the object is registered as a
top-level widget (i.e. we know it won't have any parent).

   Thus the normal life cycle of an object is to have a ref_count to 1,
and  not be a "floating" object.

   When the object is destroyed, the following happens:     A temporary
reference to the object is created (call to Ref), and        ref_count
to 2.      The object is shutdown:        It is removed from its parent
(if any), and its ref_count is          decremented to 1.         The
"destroy" signal is emitted, the user's handlers are called,
and then all the handlers connected to the object are destroyed.
The object is unref-ed. If its ref_count goes down to 0 (normal case),
     the memory used by the object and its user_data is freed.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)

Signals
=======

   * "destroy"

     procedure Handler (Object : access Gtk_Object_Record'Class);
     Raised when the object is about to be destroyed. The "destroyed"
     flag has been set on the object first. Handlers should not keep a
     reference on the object.  Note that when your destroy handlers are
     called, the user_data is still available.  The default
     implementation destroys all the handlers.


Types
=====

type Signal_Parameter_Types is array (Natural range <>, Natural range <>) of Gtk_Type;

The description of the parameters for each event.   Each event defined
with Initialize_Class_Record below should have an  entry in this table.
If Gtk_Type_None is found in the table, it is  ignored. For instance, a
Signal_Parameter_Type like:  (1 => (1 => Gdk_Type_Gdk_Event, 2 =>
Gdk_Type_Nonde),  2 => (1 => Gdk_Type_Int,       2 => Gdk_Type_Int));
defines two signals, the first with a single Gdk_Event parameter, the
second with two ints parameters.
Subprograms
===========

procedure Ref
     (Object             : access Gtk_Object_Record);

Increment the reference count on the object.
Since an object is not deleted while its reference count is not null,
this is a way to keep an object in memory.   GtkAda mostly takes care
of everything, and you should not need this  function except in special
cases.
procedure Unref
     (Object             : access Gtk_Object_Record);

Decrement the reference count for an object.
If it passed from 1 to 0, then the memory allocated for the object is
freed, and the object no longer usable.   It is better to use Destroy
than Unref to destroy an object, although  both might be acceptable.
procedure Sink
     (Object             : access Gtk_Object_Record);

Sink the object.
If the object is floating (does not have a parent yet), it is unref-ed
once and the floating flag is cleared.
procedure Destroy
     (Object             : access Gtk_Object_Record);

Destroy the object.
This emits a "destroy" signal, calls all your handlers, and then
unconnects them all. The object is then unref-ed, and if its reference
count goes down to 0, the memory associated with the object and its
user data is freed.   Note that when you destroy handlers are called,
the user_data is still  available.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Object internally.
function Get_Type
     (Object             : access Gtk_Object_Record)
        return Gtk_Type;

Return the type of Object.
This function is mostly used internally, since in Ada you can simply
test whether an object belong to a class with a statement like:

   if Object in Gtk_Button_Record'Class then ...

   which is easier.
Flags
-----

Each object is associated with a set of flags, that reports the state
of the object.   The following flags are known by all objects:

   * "Destroyed":     Set if the object is marked as destroyed (if its
     reference count is     not yet 0, the memory has not been freed,
     but you should not use it     anyway).

   * "Floating":     The object has no parent yet, since it was just
     created. Its     reference count is still 1 (as it was initially).
     This flag is     cleared as soon as Set_Parent is called on the
     widget or the widget     is qualified as a toplevel widget (see
     Gtk.Container.Register_Toplevel).

   * "Connected":     Set if the object is connected to at least one
     handler

   * "Constructed":     Set if the object has been fully constructed,
     and is now usable.      Every time you create an object at the
     GtkAda level, the object will     be fully constructed, and you
     shouldn't have to worry about that     flag.

function Flags
     (Object             : access Gtk_Object_Record)
        return Guint32;

Return the flags that are set for the object, as a binary mask.
procedure Set_Flags
     (Object             : access Gtk_Object_Record;
        Flags              : in     Guint32);

Set some specific flags for the object.
Flags is a mask that will be added to the current flags of the object.
procedure Unset_Flags
     (Object             : access Gtk_Object_Record;
        Flags              : in     Guint32);

Unset some specific flags for the object.
Flags is a mask that will be deleted from the current flags of the
object.
function Flag_Is_Set
     (Object             : access Gtk_Object_Record;
        Flag               : in     Guint32)
        return Boolean;

Return True if the specific flag Flag is set for the object.
function Destroyed_Is_Set
     (Object             : access Gtk_Object_Record'Class)
        return Boolean;

Test if the Destroyed flag is set for the object.
function Floating_Is_Set
     (Object             : access Gtk_Object_Record'Class)
        return Boolean;

Test if the Floating flag is set for the object.
function Connected_Is_Set
     (Object             : access Gtk_Object_Record'Class)
        return Boolean;

Test if the Connected flag is set for the object.
function Constructed_Is_Set
     (Object             : access Gtk_Object_Record'Class)
        return Boolean;

Test if the Constructed flag is set for the object
Creating new widgets
--------------------

These types and functions are used only when creating new widget types
directly in Ada. These functions initialize the classes so that they are
correctly recognized by gtk+ itself  See the GtkAda user's guide for
more information on how to create your  own widget types in Ada.

procedure Initialize_Class_Record
     (Object             : access Gtk_Object_Record'Class;
        Signals            :        Gtkada.Types.Chars_Ptr_Array;
        Class_Record       : in out System.Address;
        Parameters         :        Signal_Parameter_Types
                            := Null_Parameter_Types;
        Scroll_Adjustments_Signal  :        Guint := 0);

Create the class record for a new widget type.
It is associated with Signals'Length new signals. A pointer to the
newly created structure is also returned in Class_Record.   If
Class_Record /= System.Null_Address, no memory allocation is
performed, we just reuse it.   Note: The underlying C widget must
already have been initialized  by a call to its parent's Initialize
function.   Parameters'Length should be the same as Signals'Length, or
the result  is undefined.   As a special case, if Parameters has its
default value, all signals are  created with no argument. This is done
for backward compatibility  mainly, and you should instead give it an
explicit value.

   Scroll_Adjustments_Signal is the index of the new signal that will be
emitted when Gtk.Widget.Set_Scroll_Adjustments is called. If it is 0,
no signal is emitted. The first signal in Signals has index 1. Note
that the handlers for this signal take two arguments in addition to the
widget (the horizontal and vertical adjustments to be used). See
Gtk.Scrolled_Window and Gtk.Widget.Set_Scroll_Adustment for more
information on this signal.

   Only the signals with no parameter can be connected from C. However,
any signal can be connected from Ada. This is due to the way we define
default marshallers for the signals.
Package Gtk.Option`_'Menu
*************************

A GtkOptionMenu is a widget that allows the user to choose from a list
of  valid choices. The GtkOptionMenu displays the selected choice. When
activated, the GtkOptionMenu displays a popup GtkMenu which allows the
user to make a new choice.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Button   (*note Package_Gtk.Button::)
                    \___ Gtk_Option_Menu (*note Package_Gtk.Option_Menu::)

Subprograms
===========

procedure Gtk_New
     (Option_Menu        : out    Gtk_Option_Menu);

Create a new Gtk_Option_Menu.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Option_Menu.
function Get_Menu
     (Option_Menu        : access Gtk_Option_Menu_Record)
        return Gtk.Menu.Gtk_Menu;

Return the Gtk_Menu associated with the Gtk_Option_Menu.
procedure Set_Menu
     (Option_Menu        : access Gtk_Option_Menu_Record;
        Menu               : access Widget.Gtk_Widget_Record'Class);

Provide the Gtk_Menu that is popped up to allow the user to choose a new
value. You should provide a simple menu avoiding the use of tearoff menu
items, submenus, and accelerators.
procedure Remove_Menu
     (Option_Menu        : access Gtk_Option_Menu_Record;
        Menu               : access Widget.Gtk_Widget_Record'Class);

Remove the menu from the option menu.
procedure Set_History
     (Option_Menu        : access Gtk_Option_Menu_Record;
        Index              : in     Gint);

Select the menu item specified by index making it the newly selected
value for the option menu.
Package Gtk.Packer
******************

A Gtk_Packer is a container that organizes its children according  to a
given location (North, East, South, West or any combination of  them).

   The children can be set to expand and/or fill their assigned
location.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Packer      (*note Package_Gtk.Packer::)

Types
=====

type Gtk_Anchor_Type is
     (Anchor_Center,
          Anchor_North,
          Anchor_North_West,
          Anchor_North_East,
          Anchor_South,
          Anchor_South_East,
          Anchor_South_West,
          Anchor_West,
          Anchor_East);

Gtk_Anchor_Type indicates the exact location of the widget on its
side. Note that not all anchors are relevant for each side.    For
instance, if you put a widget on Side_Right, with an anchor of
Anchor_North, Anchor_North_West or Anchor_North_East, the widget will
in fact appear on the upper right side of the remaining space in the
container.    Thus, if a previous child was added on Side_North, then
the new child  will only appear on the second line in the container.
The order the  children are inserted into the container is important.
type Gtk_Packer_Child is new Gdk.C_Proxy;

A child of the packer.   It includes both the widget and its position
in the packer.
type Gtk_Packer_Options is new Guint;

Indicate how the child should fill its allocated area.    If
Gtk_Pack_Expand is set, the child allocated area is expanded to  occupy
the whole width (or height) or the Package. The orientation  depends on
the side of the child (if Top or Bottom, the expansion  is done
vertically, otherwise it is done horizontally).    If Gtk_Fill_X or
Gtk_Fill_Y is set, the child is resized till it  occupies all the area
allocated to it.   If the side of the widget is top or bottom, the
widget can always  be filled horizontally with Gtk_Fill_X (and will
thus be as wide as  the Gtk_Packer itself. However, it can be filled
vertically with  Gtk_Fill_Y only if Gtk_Pack_Expand is set.
type Gtk_Side_Type is
     (Side_Top,
          Side_Bottom,
          Side_Left,
          Side_Right);

Gtk_Side_Type indicates on which the widget should be inserted.   The
children are displayed in the order they were inserted into the
container.   Each time a child is displayed, the available space for
the remaining  child is restrained. For instance, every time you put a
child on the  Side_Top or Side_Bottom, the available space is decreased
so that no  other widget is inserted in the same line.    For instance,
if you put two widgets on Side_Top, the second one will  appear below
the first one. If you add two widgets on Side_Right, the  second one
will be placed on the left of the first.
Subprograms
===========

Modifying the Packer
--------------------

procedure Gtk_New
     (Widget             : out    Gtk_Packer);

Create a new empty packer.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Packer.
procedure Add_Defaults
     (Packer             : access Gtk_Packer_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Side               : in     Gtk_Side_Type;
        Anchor             : in     Gtk_Anchor_Type;
        Options            : in     Gtk_Packer_Options);

Add a new child in the container, with default values for its border
width and its padding.   See Gtk_Size_Type, Gtk_Anchor_Type and
Gtk_Packer_Options above for  more information on these types.
procedure Add
     (Packer             : access Gtk_Packer_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Side               : in     Gtk_Side_Type;
        Anchor             : in     Gtk_Anchor_Type;
        Options            : in     Gtk_Packer_Options;
        Border_Width       : in     Guint;
        Pad_X              : in     Guint;
        Pad_Y              : in     Guint;
        I_Pad_X            : in     Guint;
        I_Pad_Y            : in     Guint);

Add a new child in the container.
See Gtk_Size_Type, Gtk_Anchor_Type and Gtk_Packer_Options above for
more information on these types.

   Border_Width is the space left on each side of the child.   Pad_X is
additional space left on each horizontal side of the child     when it
is not centered (the anchor is NE, E, NW, SW, W, SE)  Pad_Y is
additional space left on each vertical side of the child     when it is
not centered (the anchor is NW, N, NE, SE, S, SW)  I_Pad_X is
additional space left on each horizontal side of the     child when it
is on the borders (anchor is N, Center, S)  I_Pad_Y is additional space
left on each vertical side of the     child when it is on the borders
(anchor is E, Center, W)
procedure Set_Child_Packing
     (Packer             : access Gtk_Packer_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Side               : in     Gtk_Side_Type;
        Anchor             : in     Gtk_Anchor_Type;
        Options            : in     Gtk_Packer_Options;
        Border_Width       : in     Guint;
        Pad_X              : in     Guint;
        Pad_Y              : in     Guint;
        I_Pad_X            : in     Guint;
        I_Pad_Y            : in     Guint);

Change the packing options for Child.
See the documentation for Add above for more information on the
parameters.   Nothing is done if Child is not contained in Packer.
procedure Reorder_Child
     (Packer             : access Gtk_Packer_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Position           : in     Gint);

Change the position of the child in the list of children.
As seen in the explanation of the packing parameters, the order of  the
children is important, since each child inserted limits the space
available to the next children in the list.
procedure Set_Default_Border_Width
     (Packer             : access Gtk_Packer_Record;
        Border             : in     Guint);

Modify the default border width for all the children of Packer.
This is the border_width that is used by Add_Defaults above.   Its
default value is 0.
procedure Set_Default_Ipad
     (Packer             : access Gtk_Packer_Record;
        I_Pad_X            : in     Guint;
        I_Pad_Y            : in     Guint);

Set the default Ipadding for all the children of Packer.
This is the value used by Add_Defaults above.   The default values are
0.
procedure Set_Default_Pad
     (Packer             : access Gtk_Packer_Record;
        Pad_X              : in     Guint;
        Pad_Y              : in     Guint);

Set the default Padding for all the children of Packer.
This is the value used by Add_Defaults above.   The default values are
0.
Accessing children
------------------

Some functions give access to the children of a Gtk_Packer.
You can not use the standard Gtk.Container.Children function as is,
since the children are not exactly widgets but more complicated
structures. In C, one would use a direct access to the fields of  the
packer, and then do some type-casting, which is what we are  trying to
avoid in Ada.

function Find_Child
     (Packer             : access Gtk_Packer_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class)
        return Gtk_Packer_Child;

Return the child of Packer that is associated with the widget Child.
Null_Packer_Child will be returned if Child is not contained in Packer.
function Get_Nth_Child
     (Packer             : access Gtk_Packer_Record;
        N                  :        Guint)
        return Gtk_Packer_Child;

Returns the Nth child of the packer.
The first child is found at index 1.   Null_Packer_Child will be
returned if there is no such child in Packer.
function Get_Anchor
     (Child              :        Gtk_Packer_Child)
        return Gtk_Anchor_Type;

Return the Anchor type for the child.
function Get_Side
     (Child              :        Gtk_Packer_Child)
        return Gtk_Side_Type;

Return the side of the child.
function Get_Options
     (Chlid              :        Gtk_Packer_Child)
        return Gtk_Packer_Options;

Return the options set for the child.
function Get_Border_Width
     (Child              :        Gtk_Packer_Child)
        return Guint;

Return the border width for the child.
function Get_Pad_X
     (Child              :        Gtk_Packer_Child)
        return Guint;

Return the X padding for the child (when on the borders).
function Get_Pad_Y
     (Child              :        Gtk_Packer_Child)
        return Guint;

Return the Y padding for the child (when on the borders).
function Get_I_Pad_X
     (Child              :        Gtk_Packer_Child)
        return Guint;

Return the X i_padding for the child (when not on the borders).
function Get_I_Pad_Y
     (Child              :        Gtk_Packer_Child)
        return Guint;

Return the Y i_padding for the child (when not on the borders).
Package Gtk.Paned
*****************

A Gtk_Paned is a container that organizes its two children either
horizontally or vertically.   The initial size allocated to the
children depends on the size  they request. However, the user has the
possibility to interactively  move a separation bar between the two to
enlarge one of the children,  while at the same time shrinking the
second one.   The bar can be moved by clicking with the mouse on a
small cursor  displayed in the bar, and then dragging the mouse.

   No additional decoration is provided around the children.

   Each child has two parameters, Resize and Shrink.

   If Shrink is True, then the widget can be made smaller than its
requisition size by the user. Set this to False if you want to  set a
minimum size.

   if Resize is True, this means that the child accepts to be resized,
and  will not require any size. Thus, the size allocated to it will be
the total size allocated to the container minus the size requested by
the other child.   If Resize is False, the child should ask for a
specific size, which it  will get. The other child will be resized
accordingly.   If both Child have the same value for Resize (either
True or False), then  the size allocated to each is a ratio between the
size requested by both.

   When you use Set_Position with a parameter other than -1, or the user
moves the handle to resize the widgets, the behavior of Resize is
canceled.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Paned       (*note Package_Gtk.Paned::)

Subprograms
===========

procedure Gtk_New_Vpaned
     (Widget             : out    Gtk_Paned);

Create a new vertical container.
The children will be displayed one on top of the other.
procedure Gtk_New_Hpaned
     (Widget             : out    Gtk_Paned);

Create a new horizontal container.
The children will be displayed one besides the other.
procedure Initialize_Vpaned
     (Widget             : access Gtk_Paned_Record'Class);

Internal initialization function.
See the section "Creating your own widgets" in the documentation.
procedure Initialize_Hpaned
     (Widget             : access Gtk_Paned_Record'Class);

Internal initialization function.
See the section "Creating your own widgets" in the documentation.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Paned.
function Get_Type_Vpaned       return Gtk.Gtk_Type;

Return the internal value associated with a vertical Gtk_Paned.
function Get_Type_Hpaned       return Gtk.Gtk_Type;

Return the internal value associated with a horizontal Gtk_Paned.
procedure Add1
     (Paned              : access Gtk_Paned_Record;
        Child              : access Gtk_Widget_Record'Class);

Add the first child of the container.
The child will be displayed either in the top or in the left pane,
depending on the orientation of the container.   This is equivalent to
using the Pack1 procedure with its default  parameters.
procedure Pack1
     (Paned              : access Gtk_Paned_Record;
        Child              : access Gtk_Widget_Record'Class;
        Resize             : in     Boolean := False;
        Shrink             : in     Boolean := True);

Add a child to the top or left pane.
You can not change dynamically the attributes Resize and Shrink.
Instead, you have to remove the child from the container, and put it
back with the new value of the attributes. You should also first  call
Gtk.Object.Ref on the child so as to be sure it is not destroyed  when
you remove it, and Gtk.Object.Unref it at the end. See the  example in
testgtk/ in the GtkAda distribution.
procedure Add2
     (Paned              : access Gtk_Paned_Record;
        Child              : access Gtk_Widget_Record'Class);

Add the second child of the container.
It will be displayed in the bottom or right pane, depending on the
container's orientation.   This is equivalent to using Pack2 with its
default parameters.
procedure Pack2
     (Paned              : access Gtk_Paned_Record;
        Child              : access Gtk_Widget_Record'Class;
        Resize             : in     Boolean := False;
        Shrink             : in     Boolean := False);

Add a child to the bottom or right pane.
procedure Set_Position
     (Paned              : access Gtk_Paned_Record;
        Position           :        Gint);

Change the position of the separator.
If position is negative, the remembered position is forgotten,  and the
division is recomputed from the requisitions of the  children.
Position is in fact the size (either vertically or horizontally,
depending on the container) set for the first child.
procedure Set_Handle_Size
     (Paned              : access Gtk_Paned_Record;
        Size               :        Guint16);

Set the handle size to Size x Size pixels.
This is the small handle that the user has to drag to resize the  panes.
function Get_Handle_Size
     (Paned              : access Gtk_Paned_Record)
        return Guint16;

Return the current size in pixels of the handle.
procedure Set_Gutter_Size
     (Paned              : access Gtk_Paned_Record;
        Size               : in     Guint16);

Set the width in pixels of the gutter.
This is the area between the two panes.
function Get_Gutter_Size
     (Paned              : access Gtk_Paned_Record)
        return Guint16;

Return the width in pixels of the gutter.
function Get_Child1
     (Paned              : access Gtk_Paned_Record)
        return Gtk.Widget.Gtk_Widget;

Return the child displayed in the top or left pane.
function Get_Child2
     (Paned              : access Gtk_Paned_Record)
        return Gtk.Widget.Gtk_Widget;

Return the child displayed in the bottom or right pane.
function Get_Child1_Resize
     (Paned              : access Gtk_Paned_Record)
        return Boolean;

Get the value of the resize attribute for the first child.
function Get_Child2_Resize
     (Paned              : access Gtk_Paned_Record)
        return Boolean;

Get the value of the resize attribute for the second child.
function Get_Child1_Shrink
     (Paned              : access Gtk_Paned_Record)
        return Boolean;

Get the value of the shrink attribute for the first child.
function Get_Child2_Shrink
     (Paned              : access Gtk_Paned_Record)
        return Boolean;

Get the value of the shrink attribute for the second child.
Package Gtk.Plug
****************

Note that this package is currently not supported under Win32 systems.

   Together with Gtk_Socket, Gtk_Plug provides the ability to embed
widgets  from one process into another process in a fashion that is
transparent to  the user. One process creates a Gtk_Socket widget and,
passes the XID of  that widgets window to the other process, which then
creates a Gtk_Plug  window with that XID.   Any widgets contained in
the Gtk_Plug then will appear inside the first  applications window.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Window   (*note Package_Gtk.Window::)
                    \___ Gtk_Plug  (*note Package_Gtk.Plug::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Plug;
        Socket_Id          : in     Guint32);

Create a new plug widget inside the Gtk_Socket identified by socket_id.
Socket_Id is the XID of the socket's window.
Package Gtk.Radio`_'Button
**************************

A Gtk_Radio_Button is a simple button that has two states, like a
Gtk_Toggle_Button.   However, Gtk_Radio_Buttons can be grouped together
to get a special  behavior: only one button in the group can be active
at any given time.   Thus, when the user selects one of the buttons
from the group, the button  that was previously selected is disabled.

   The radio buttons always belongs to a group, even if there is only
one in  this group

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Button   (*note Package_Gtk.Button::)
                    \___ Gtk_Toggle_Button (*note Package_Gtk.Toggle_Button::)
                       \___ Gtk_Check_Button (*note Package_Gtk.Check_Button::)
                          \___ Gtk_Radio_Button (*note Package_Gtk.Radio_Button::)

Subprograms
===========

procedure Gtk_New
     (Radio_Button       : out    Gtk_Radio_Button;
        Group              : in     Widget_SList.GSlist
                            := Widget_SList.Null_List;
        Label              : in     String := "");

Create a new radio button, belonging to Group.
If Label is left as the empty string, then the button will not have any
child and you are free to put any thing you want in it, including a
pixmap.   To initialize the group (when creating the first button),
leave Group  to the Null_List. You can later get the new group that is
created with  a call to the Group subprogram below.
procedure Gtk_New
     (Radio_Button       : out    Gtk_Radio_Button;
        Group              : in     Gtk_Radio_Button;
        Label              : in     String := "");

Create a new radio button in the same group as Group.
If Label is left as the empty string, Radio_Button is created without
any child and you can put whatever you want in it, including a pixmap.

   To initialize a new group (when creating the first button), you
should  pass it null or a button that has not been created with
Gtk_New, as in  the example below.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Radio_Button.
function Group
     (Radio_Button       : access Gtk_Radio_Button_Record)
        return Widget_SList.GSlist;

Return the group to which Radio_Button belongs.
This can be used as an argument to the first version of Gtk_New above,
or the list can also be traversed to get all the buttons.
procedure Set_Group
     (Radio_Button       : access Gtk_Radio_Button_Record;
        Group              : in     Widget_SList.GSlist);

Modify the group to which the button belongs.
This will not change anything visually.
Example
=======

      --  This creates a group of two buttons. Note how the group is initialized.
     
      declare
         Radio_Button : Gtk_Radio_Button;
      begin
         Gtk_New (Radio_Button,
                  Group       => Radio_Button,
                  Label       => "First button");
         Gtk_New (Radio_Button,
                  Group       => Radio_Button,
                  Label       => "Second button");
      end;

Package Gtk.Scrolled`_'Window
*****************************

Gtk_Scrolled_Window is a Gtk_Bin child: it's a container the accepts a
single child widget. Gtk_Scrolled_Window adds scrollbars to the child
widget.

   The scrolled window can work in two ways. Some widgets have native
scrolling support; these widgets have "slots" for Gtk_Adjustment
objects.   The scrolled window installs Gtk_Adjustment objects in the
child window's  slots using the "set_scroll_adjustments" signal
(Conceptually, these  widgets implement a "Scrollable" interface).

   The second way to use the scrolled window is useful with widgets
that lack  the "set_scroll_adjustments" signal. The Gtk_Viewport widget
acts as a  proxy, implementing scrollability for child widgets that
lack their own  scrolling capabilities.

   If a widget has native scrolling abilities, it can be added to the
Gtk_Scrolled_Window with Gtk.Container.Add. If a widget does not, you
must  first add the widget to a Gtk_Viewport, then add the Gtk_Viewport
to the  scrolled window. The convenience function Add_With_Viewport
does exactly  this, so you can ignore the presence of the viewport.

   If you want to create your own new widget type that can be inserted
directly into a scrolled_window, you need to specify a signal for
Set_Scroll_Adjustments in the call to
Gtk.Object.Initialize_Class_Record.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Scrolled_Window (*note Package_Gtk.Scrolled_Window::)

Types
=====

type Gtk_Corner_Type is
     (Corner_Top_Left,
          Corner_Bottom_Left,
          Corner_Top_Right,
          Corner_Bottom_Right);

Type used by Set_Placement below to determine the location of the
child widget with respect to the scrollbars.   Corner_Top_Left means
the child is in the top left, with the scrollbars  underneath and to
the right.
Subprograms
===========

procedure Gtk_New
     (Scrolled_Window    : out    Gtk_Scrolled_Window;
        Hadjustment        :        Adjustment.Gtk_Adjustment
                            := Adjustment.Null_Adjustment;
        Vadjustment        :        Adjustment.Gtk_Adjustment
                            := Adjustment.Null_Adjustment);

Create a new scrolled window.
The two arguments are the scrolled window's horizontal and vertical
adjustments; these will be shared with the scrollbars and the child
widget to keep the bars in sync with the child. Usually you want to use
the default value Null_Adjustment for the adjustments, which will cause
the scrolled window to create them for you.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Scrolled_Window.
procedure Add_With_Viewport
     (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class);

Used to add children without native scrolling capabilities.
This is simply a convenience function; it is equivalent to adding the
unscrollable child to a viewport, then adding the viewport to the
scrolled window. If a child has native scrolling, use Gtk.Container.Add
instead of this function.

   The viewport scrolls the child by moving its Gdk_Window, and takes
the  size of the child to be the size of its toplevel Gdk_Window. This
will  be very wrong for most widgets that support native scrolling; for
example, if you add a Gtk_Clist with a viewport, the whole widget will
scroll, including the column headings. Thus Gtk_Clist supports
scrolling  already, and should not be used with the GtkViewport proxy.

   A widget supports scrolling natively if it contains a valid
"set_scroll_adjustments" signal.
function Get_Hadjustment
     (Scrolled_Window    : access Gtk_Scrolled_Window_Record)
        return Adjustment.Gtk_Adjustment;

Return the horizontal scrollbar's adjustment.
This adjustment is used to connect the horizontal scrollbar to the child
widget's horizontal scroll functionality.
function Get_Vadjustment
     (Scrolled_Window    : access Gtk_Scrolled_Window_Record)
        return Adjustment.Gtk_Adjustment;

Return the vertical scrollbar's adjustment.
This adjustment is used to connect the vertical scrollbar to the child
widget's vertical scroll functionality.
procedure Set_Hadjustment
     (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Hadjustment        :        Adjustment.Gtk_Adjustment);

Set the Gtk_Adjustment for the horizontal scrollbar.
procedure Set_Vadjustment
     (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Vadjustment        :        Adjustment.Gtk_Adjustment);

Set the Gtk_Adjustment for the vertical scrollbar.
procedure Set_Placement
     (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Window_Placement   :        Gtk_Corner_Type);

Determine the location of the widget with respect to the scrollbars.
The default is Corner_Top_Left.
procedure Set_Policy
     (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        H_Scrollbar_Policy  : in     Enums.Gtk_Policy_Type;
        V_Scrollbar_Policy  : in     Enums.Gtk_Policy_Type);

Set the scrollbar policy for the horizontal and vertical scrollbars.
It determines when the scrollbar should appear; it is a value  from the
Gtk_Policy_Type enumeration. If Policy_Always, the scrollbar is  always
present; if Policy_Never, the scrollbar is never present; if
Policy_Automatic, the scrollbar is present only if needed (that is, if
the slider part of the bar would be smaller than the trough - the
display is larger than the page size).
Package Gtk.Selection
*********************

This package implements support for the selection mechanism (ie a way to
get a currently active selection anywhere on your Xserver or on your
Windows machine).

   This also acts as the low-level support for drag-and-drop, as
described  in Gtk.Dnd.

   A lot of subprograms in this package work on Gdk_Atom types, instead
of  strings. Converting from one to the other can easily be done through
calls to the subprograms in Gdk.Property (Atom_Intern and Atom_Name).
The reason we use Gdk_Atom is for efficiency, since comparing two
integers  is of course faster than comparing two strings.

   The selection mechanism is the primary mechanism by which
applications  can transfer data to each other on a given system. Even
though both  applications must be visible on the same screen, this does
not mean that  they can access the same files or ressources, since they
might in fact  be running on different machines. You should always keep
this in mind  when setting the data to be transfered.

   A selection is a essentially a named clipboard, identified by a
string  interned as a Gdk_Atom. By claiming ownership of a selection, an
application indicates that it will be responsible for supplying its
contents.

   The contents of a selection can be represented in a number of
formats,  called targets. Each target is identified by an atom. A list
of all  possible targets supported by the selection owner can be
retrieved by  requesting the special target TARGETS. When a selection
is retrieved, the  data is accompanied by a type (an atom), and a
format (an integer,  representing the number of bits per item).

Signals
=======

   * "selection_get"

     procedure Handler (Widget : access Gtk_Widget_Record'Class;
     Data   : Selection_Data;
     Info   : Guint;
     Time   : Guint);
     This signal is sent to the owner of a selection whenever some other
     widget wants to get data from that selection. The type of the data
     is indicated in Info, and is the third field that was set in the
     Target_Entrys for that specific widget and selection.

     The handler should modify the Data in the selection.

   * "selection_received"

     procedure Handler (Widget : access Gtk_Widget_Record'Class;
     Data   : Selection_Data;
     Time   : Guint);
     This signal is sent to the receiver end of a selection, when the
     data has been sent by the owner. The receiver should call Convert,
     which will emit the signal selection_get to ask for the contents
     of the selection, and then selection_received will be emitted to
     warn the receiver.

     Note: you can not connect this signal to a widget that does not
     have an associated Gdk_Window (i.e the flag Gtk.Widget.No_Window
     must not be set for this widget), since it needs to be able to
     receive Property_Notify events from the server. It will not work
     with a Gtk_Label for instance.


Types
=====

subtype Gdk_Selection is Gdk.Types.Gdk_Atom;

These are predefined atom values for several common selections.   You
are of course free to create new ones, but most of the time you  should
simply use Selection_Primary unless you foresee the need for  multiple
simultaneous selections.   To access the clipboard on windows machines,
you might need to create  a new selection with Gdk.Property.Atom_Intern
("CLIPBOARD");
subtype Gdk_Selection_Type is Gdk.Types.Gdk_Atom;

Predefined atom values for selection types.   Although the preferred
way in GtkAda to indicate the type of a selection  is to use mime
types, these values are provided for compatibility with  older X11
applications.
subtype Gdk_Target is Gdk.Types.Gdk_Atom;

Predefined atom values which are used to describe possible targets for
a selection. Other atoms can be used, and the recommended practice for
GtkAda is to to use mime types for this purpose. However, supporting
these types may be useful for compatibility with older programs.
type Selection_Data is new Gdk.C_Proxy;

Contents of a selection or a drag-and-drop operation.   This structure
can only be created internally by GtkAda. However, you  need to be able
to access it to get the selection.   - Selection and Target identify
the request.   - Type specifies the type of the return.   - if Length
is negative, the Data should be ignored. Otherwise, it  contains the
data itself.   - Time gives the timestamp at which the data was sent.
type Target_Entry is record
     Target : Gtkada.Types.Chars_Ptr;
         Flags  : Target_Flags;
         Info   : Guint;
         end record;

A single type of data that can be supplied or received during a
drag-and-drop or a selection.    Target is a string that represents the
drag type. This can be any  string if you want to implement
drag-and-drop inside your application.   However, if you want to
communicate with other external application,  you should use MIME
types, ie "text/plain", "text/uri-list", ...   See the RFCs 2045, 2046,
2047, 2048, 2049 for more information on  MIME types.    For more
information, see
ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/   Another set
of supported names are the ones associated with the X  Inter-Client
Communications Conventions Manual (ICCCM).   Here some of the default
names and their meaning. See the ICCCM manual  online for a complete
list (for instance at  http://www.tronche.com/gui/x/icccm/).    -
"TIMESTAMP"   (type Integer)  Timestamp used to acquire the selection
- "TEXT"        (type Text)     Text in owner's encoding  - "STRING"
 (type String)   Iso Latin1 text  - "PIXMAP"      (type Drawable)
Pixmap Id  - "BITMAP"      (type Bitmap)   Bitmap Id  - "FOREGROUND"
(type Pixel)    Pixel Value  - "BACKGROUND"  (type Pixel)    Pixel Value
 Info is an application-assigned integer (i.e. that you choose), that
will be passed as a signal parameter for all the dnd-related signals,
like "selection_get". This saves a lot of expensive string compares,
and in fact replaced Target everywhere in your application expect in
Source_Set and Dest_Set.
type Target_Entry_Array is array (Natural range <>) of Target_Entry;

type Target_Flags is new Integer;

Used to specify constraints on an entry
type Target_List is new Gdk.C_Proxy;

A list of targets.   You can only manipulate this list through the
functions below.
Subprograms
===========

Target_List
-----------

function Target_List_New
     (Targets            : in     Target_Entry_Array)
        return Target_List;

Create a new list of target, starting from an array.
procedure Target_List_Ref
     (List               : in     Target_List);

Increment the reference count for the list.
You should almost never have to use this function, this is done
transparently by GtkAda.
procedure Target_List_Unref
     (List               : in     Target_List);

Decrement the reference count for the list.
You should almost never have to use this function, since everything is
done transparently by GtkAda.   As usual, the list is freed when the
reference count reaches 0.
procedure Target_List_Add
     (List               : in     Target_List;
        Target             : in     Gdk.Types.Gdk_Atom;
        Flags              : in     Guint;
        Info               : in     Guint);

Add a new target to the list.
You can for instance use the result of Get_Targets (Drag_Context) for
the value of Target.
procedure Target_List_Add_Table
     (List               : in     Target_List;
        Targets            : in     Target_Entry_Array);

Add a new set of targets to the list.
procedure Target_List_Remove
     (List               : in     Target_List;
        Target             : in     Gdk.Types.Gdk_Atom);

Remove a specific target from the list.
procedure Target_List_Find
     (List               : in     Target_List;
        Target             : in     Gdk.Types.Gdk_Atom;
        Info               : out    Guint;
        Found              : out    Boolean);

Search for a specific target in the list.
If the target was found, Found is set to True and Info contains the
integer that was associated with the target when it was created.
Selection_Data
--------------

function Get_Selection
     (Selection          : in     Selection_Data)
        return Gdk_Selection;

Return the selection used (primary, clipboard, ...)
function Get_Target
     (Selection          : in     Selection_Data)
        return Gdk.Types.Gdk_Atom;

Return the target of the selection (ie a MIME string that identifies
the selection).
function Get_Type
     (Selection          : in     Selection_Data)
        return Gdk.Types.Gdk_Atom;

Return the type of the selection, as defined in Gdk_Selection_Type,
ie for compatibility with older X11 applications.
function Get_Format
     (Selection          : in     Selection_Data)
        return Gint;

Return the format of the data.
The semantics depends on the type of data. For instance, for strings
this is the number of bits per character.
function Get_Data
     (Selection          : in     Selection_Data)
        return System.Address;

Return the data of the selection.
This should be ignored if Get_Length returns a value < 0.
function Get_Data_As_String
     (Selection          : in     Selection_Data)
        return String;

Return the data as a string.
This is only a convenience function, since it simply creates a string
from the return of Get_Data.
function Get_Length
     (Selection          : in     Selection_Data)
        return Gint;

Return the length of the data.
procedure Selection_Data_Set
     (Selection          : in     Selection_Data;
        The_Type           : in     Gdk.Types.Gdk_Atom;
        Format             : in     Gint;
        Data               : in     System.Address;
        Length             : in     Gint);

General form of Selection_Data_Set.
Any data can be transmitted. Length is the number of bytes in Data.
procedure Selection_Data_Set
     (Selection          : in     Selection_Data;
        The_Type           : in     Gdk.Types.Gdk_Atom;
        Format             : in     Gint;
        Data               : in     String);

Set the data for a selection (special case for strings)
This function is generally called when a drag-and-drop operation  ask
the source widget for the data to be transmitted. In that case,  a
Selection_Data was already transmitted and is given as a handler
parameter for the signal "drag_data_get". The_Type can simply be
extracted from the Selection_Data.
function Selection_Data_Copy
     (Selection          : in     Selection_Data)
        return Selection_Data;

Make a copy of a selection data.
procedure Selection_Data_Free
     (Selection          : in     Selection_Data);

Free a Selection_Data structure returned from Selection_Data_Copy.
Manipulating the selection
--------------------------

function Owner_Set
     (Widget             : in     Gtk.Widget.Gtk_Widget;
        Selection          : in     Gdk_Selection
                            := Selection_Primary;
        Time               : in     Guint32 := 0)
        return Boolean;

Claim ownership of a given selection for a particular widget,
or, if widget is null, release ownership of the selection.

   Once a Widget has claimed selection, it is responsible for delivering
the data whenever it is needed.

   Time is the timestamp for claiming the selection (default is the
current  time).   This function returns True if the operation succeeded.
procedure Add_Target
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Selection          : in     Gdk_Selection;
        Target             : in     Gdk.Types.Gdk_Atom;
        Info               : in     Guint);

Add specified target to the list of supported targets for a given
widget and selection.   Info is an integer which will be passed back to
the application instead  of a string when the target is used.
procedure Add_Targets
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Selection          : in     Gdk_Selection;
        Targets            : in     Target_Entry_Array);

Add a set of targets to the list of supported targets for a given widget
and selection.
function Convert
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Selection          : in     Gdk_Selection
                            := Selection_Primary;
        Target             : in     Gdk.Types.Gdk_Atom;
        Time               : in     Guint32 := 0)
        return Boolean;

Request the contents of a selection.
When received, a "selection_received" signal will be generated, and the
widget needs to have a handler for it.

   Target is the form of information desired, for instance an intern
Gdk_Atom whose name is "text/plain", or one of the Gdk_Target values.

   This function returns True if the request succeeded, False if the
request could not be processed, for instance if there was already a
request in process for this widget or this target is not known by the
owner of the selection.

   Widget is the widget which acts as a requestor.
procedure Remove_All
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Remove all handlers and unsets ownership of all selections for a widget.
Called when widget is being destroyed. This function will not generally
be called by applications.
Package Gtk.Signal
******************

!! Important Note !!   This package is obsolete. It is provided only
for backward compatibility  only, and is known to be missing the
capacity to interface to some specific  types of signals.   Consider
using *note Package_Gtk.Handlers:: and  *note Package_Gtk.Marshallers::
instead.

Package Gtk.Socket
******************

Note that this package is currently not supported under Win32 systems.

   Together with Gtk_Plug, Gtk_Socket provides the ability to embed
widgets  from one process into another process in a fashion that is
transparent to  the user. One process creates a Gtk_Socket widget and,
passes the XID of  that widget's window to the other process, which
then creates a Gtk_Plug  window with that XID.   Any widgets contained
in the Gtk_Plug then will appear inside the first  applications window.

   The XID of the socket's window is obtained by using the  XWindow
function provided in this package. Before using  this macro, the socket
must have been realized, and for hence, have been  added to its parent.

   Note that if you pass the XID of the socket to another process that
will  create a plug in the socket, you must make sure that the socket
widget is  not destroyed until that plug is created. Violating this
rule will cause  unpredictable consequences, the most likely
consequence being that the plug  will appear as a separate toplevel
window. You can check if the plug has  been created by examining the
plug_window field of the Gtk_Socket  structure. If this field is
non-NULL, then the plug has been succesfully  created inside of the
socket.

   When GtkAda is notified that the embedded window has been destroyed,
then  it will destroy the socket as well. You should always, therefore,
be  prepared for your sockets to be destroyed at any time when the main
event  loop is running.

   A socket can also be used to swallow arbitrary pre-existing top-level
windows using Steal, though the integration when this is done will not
be  as close as between a Gtk_Plug and a Gtk_Socket. All you need in
that case  is the X11 window identifier for the external process.

   Note that it is recommended that the external window be first hidden
before  being swallowed, so that Gtk.Socket works with most window
managers. If  you start with visible windows, some window managers will
not be able to  correctly merge the two windows (Enlightenment for
instance).

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Socket      (*note Package_Gtk.Socket::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Socket);

Create a new empty GtkSocket.
procedure Steal
     (Socket             : access Gtk_Socket_Record;
        Wid                : in     Guint32);

Reparent a pre-existing toplevel window into a Gtk_Socket.
Wid is the XID of an existing toplevel window.
function Get_Plug_Window
     (Socket             : access Gtk_Socket_Record)
        return Gdk.Window.Gdk_Window;

Return the id of the embedded window.
function Get_XWindow
     (Window             :        Gdk.Window.Gdk_Window)
        return Guint32;

Return the X window associated with a Gdk_Window, 0 under Win32.
Example
=======

      Obtaining the XID of a socket
     
      with Gtk.Socket;
      use Gtk.Socket;
     
      Socket : Gtk_Socket;
     
      Gtk_New (Socket);
      Show (Socket);
      Add (Parent, Socket);
     
      --  The following call is only necessary if one of
      --  the ancestors of the socket is not yet visible.
     
      Realize (Socket);
      Put_Line ("The XID of the sockets window is" &
                Guint32'Image (Get_XWindow (Get_Window (Socket))));

Package Gtk.Spin`_'Button
*************************

A Gtk_Spin_Button is a single line text editing widget for text that
represents a number. At the right hand side of the text line there are
small up- and down arrow buttons for incrementing or decrementing
(spinning) the number within a given range.   It allows the value to
have zero or a number of decimal places and  to be
incremented/decremented in configurable steps.   The action of holding
down one of the buttons optionally results in an  acceleration of
change in the value according to how long it is  depressed.

   *note Package_Gtk.GEntry:: for a text editing widget without spin
buttons.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Editable       (*note Package_Gtk.Editable::)
              \___ Gtk_Entry       (*note Package_Gtk.GEntry::)
                 \___ Gtk_Spin_Button (*note Package_Gtk.Spin_Button::)

Subprograms
===========

procedure Gtk_New
     (Spin_Button        : out    Gtk_Spin_Button;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment;
        Climb_Rate         : in     Gfloat;
        The_Digits         : in     Gint);

Create a spin button with the given parameters.
Adjustment contains the range, current value, step value and  "page"
value. The step value is the increment/decrement when pressing  mouse
button 1 on a button; the page value when mouse button 2 is  pressed.
Additionally, mouse button 3 can be used to jump directly to  the or
lower values when used to select one of the buttons.   Climb_Rate takes
a value between 0.0 and 1.0 and indicates the  amount of acceleration
that the Spin Button has.   The_Digits is the number of digits behind
the decimal point to be  displayed for the value.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Spin_Button.
function Get_Adjustment
     (Spin_Button        : access Gtk_Spin_Button_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the adjustment settings of the spin button.
function Get_Value_As_Float
     (Spin_Button        : access Gtk_Spin_Button_Record)
        return Gfloat;

Return the current value of the spin button in a float.
function Get_Value_As_Int
     (Spin_Button        : access Gtk_Spin_Button_Record)
        return Gint;

Return the current value of the spin button in an integer.
procedure Set_Adjustment
     (Spin_Button        : access Gtk_Spin_Button_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Set the adjustment settings of the spin button.
procedure Set_Digits
     (Spin_Button        : access Gtk_Spin_Button_Record;
        The_Digits         : in     Gint);

Set number of decimals of the spin button.
procedure Set_Numeric
     (Spin_Button        : access Gtk_Spin_Button_Record;
        Numeric            : in     Boolean);

If Numeric is True, then only a numeric value can be typed in the
text entry, otherwise also nonnumeric text.
procedure Set_Snap_To_Ticks
     (Spin_Button        : access Gtk_Spin_Button_Record;
        Snap_To_Ticks      : in     Boolean);

Set the spin button to round the value to the nearest step value
which is set within its adjustment settings.
procedure Set_Update_Policy
     (Spin_Button        : access Gtk_Spin_Button_Record;
        Policy             : in     Gtk_Spin_Button_Update_Policy);

Set the update policy of the spin button which affects the behaviour
when parsing inserted text and syncing its value with the values of
the adjustment.   The possible values can be Update_Always or
Update_If_Valid.   In case of Update_If_Valid the spin button's value
gets changed if  the text input is a numeric value that is within the
range specified  by the adjustment. Otherwise the text is reset to the
current value.   In case of Update_Always errors are ignored while
converting text  into a numeric value.
procedure Set_Value
     (Spin_Button        : access Gtk_Spin_Button_Record;
        Value              : in     Gfloat);

Set the current value of the spin button.
procedure Set_Wrap
     (Spin_Button        : access Gtk_Spin_Button_Record;
        Wrap               : in     Boolean);

Set whether the spin button should "wrap around" when exceeding the
upper and lower limits.
procedure Spin
     (Spin_Button        : access Gtk_Spin_Button_Record;
        Direction          : in     Gtk.Enums.Gtk_Arrow_Type;
        Step               : in     Gfloat);

Set the value of the spin button relative to its current value.
Depending on Direction, it will be incremented or decremented with  the
step value.
Package Gtk.Status`_'Bar
************************

A status bar is a special widget in which you can display messages.
This type of widget is generally found at the bottom of application
windows, and is used to display help or error messages.

   This widget works as a stack of messages, ie all older messages are
kept when a new one is inserted. It is of course possible to remove the
most recent message from the stack.   This stack behavior is
especially useful when messages can be displayed  from several places
in your application. Thus, each one subprogram that  needs to print a
message can simply push it on the stack, and does not  need to make
sure that the user has had enough time to read the previous  message (a
timeout can be set to automatically remove the message after  a
specific delay)

   Each message is associated with a specific Context_Id. Each of this
context  can have a special name, and these context can be used to
organize the  messages into categories (for instance one for help
messages and one for  error messages). You can then selectively remove
the most recent message  of each category.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Status_Bar (*note Package_Gtk.Status_Bar::)

Signals
=======

   * "text_popped"

     procedure Handler (Status_Bar : access Gtk_Status_Bar_Record'Class;
     Context    : Context_Id;
     Text       : Interfaces.C.Strings.chars_ptr);
     Emitted when a message has been removed from the queue.

   * "text_pushed"

     procedure Handler (Status_Bar : access Gtk_Status_Bar_Record'Class;
     Context    : Context_Id;
     Text       : Interfaces.C.Strings.chars_ptr);
     Emitted when a new message has been in the queue.


Types
=====

type Context_Id is new Guint;

subtype Gtk_Statusbar is Gtk_Status_Bar;

This is needed by Gate since the C name is GtkStatusbar
type Message_Id is new Guint;

type Status_Bar_Msg is record
     Text    : Interfaces.C.Strings.chars_ptr;
         Context : Context_Id;
         Message : Message_Id;
         end record;

A message from the queue. Each of this message is associated with a
specific context, and has a specific number.
Subprograms
===========

function Convert
     (Msg                :        Status_Bar_Msg)
        return System.Address;

procedure Gtk_New
     (Statusbar          : out    Gtk_Status_Bar);

Create a new status bar, in which messages will be displayed.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Status_Bar.
function Get_Context_Id
     (Statusbar          : access Gtk_Status_Bar_Record;
        Context_Description  : in     String)
        return Context_Id;

Create the context id associated with a special name.
If no context is currently associated with Context_Description, then  a
new context is created.
function Get_Messages
     (Statusbar          : access Gtk_Status_Bar_Record)
        return Messages_List.GSlist;

Return a list of all the messages currently stored in the queue.
The first item in the list is the most recent message.
function Push
     (Statusbar          : access Gtk_Status_Bar_Record;
        Context            : in     Context_Id;
        Text               : in     String)
        return Message_Id;

Push a new message on the queue, associated with a specific context.
This message is directly displayed in the status bar.   A new unique
message id is associated with this message.
procedure Pop
     (Statusbar          : access Gtk_Status_Bar_Record;
        Context            : in     Context_Id);

Remove the most recent message from a specific context. All other
contexts are ignored, and no error is raised if there is no message in
Context.
procedure Remove
     (Statusbar          : access Gtk_Status_Bar_Record;
        Context            : in     Context_Id;
        Message            : in     Message_Id);

Remove a message from the list.
The message is only removed if it is in a specific context.   Nothing
happens if no matching message is found.
Package Gtk.Table
*****************

A Gtk_Table is a container that can contain any number of children.
Each of them is attached to a specific row and a specific column in
widget.   Every row in the table must have the same height, and every
column must  have the same width if the table was said as Homogeneous.
But you can  also decide to have an heterogeneous table, where the
width and height  are set by the children contained in the table.
Check out the Gtk_Sheet widget for a different kind of table that can
also contain text and images in a more efficient way.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Table       (*note Package_Gtk.Table::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Table;
        Rows               : in     Guint;
        Columns            : in     Guint;
        Homogeneous        : in     Boolean);

Create a new table.
The width allocated to the table is divided into Columns columns, which
all have the same width if Homogeneous is True. If Homogeneous is
False,  the width will be calculated with the children contained in the
table.   Same behavior for the rows.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Table.
procedure Resize
     (Table              : access Gtk_Table_Record;
        Rows               : in     Guint;
        Columns            : in     Guint);

Modify the number of rows and columns in the table.
procedure Attach
     (Table              : access Gtk_Table_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class;
        Left_Attach        : in     Guint;
        Right_Attach       : in     Guint;
        Top_Attach         : in     Guint;
        Bottom_Attach      : in     Guint;
        Xoptions           : in     Gtk_Attach_Options
                            := Expand or Fill;
        Yoptions           : in     Gtk_Attach_Options
                            := Expand or Fill;
        Xpadding           : in     Guint := 0;
        Ypadding           : in     Guint := 0);

Insert a new widget in the table.
All the attachments are relative to the separations between columns and
rows (for instance, to insert a widget spanning the first two columns
in the table, you should put Left_Attach=0 and Right_Attach=2).   Same
behavior for the rows.   Xoptions and Yoptions indicate the behavior of
the child when the table  is resized (whether the child can shrink or
expand). See the description  in Gtk.Box for more information on the
possible values.   Xpadding and Ypadding are the amount of space left
around the child.
procedure Attach_Defaults
     (Table              : access Gtk_Table_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Left_Attach        : in     Guint;
        Right_Attach       : in     Guint;
        Top_Attach         : in     Guint;
        Bottom_Attach      : in     Guint);

Insert a new widget in the table, with default values.
No padding is put around the child, and the options are set to  Expand
and Fill.   This call is similar to Attach with default values and is
only provided  for compatibility.
procedure Set_Row_Spacing
     (Table              : access Gtk_Table_Record;
        Row                : in     Guint;
        Spacing            : in     Guint);

Set the spacing insert between Row and the next one.
Spacing is in pixels.
procedure Set_Row_Spacings
     (Table              : access Gtk_Table_Record;
        Spacing            : in     Guint);

Set the spacing for all the rows.
procedure Set_Col_Spacing
     (Table              : access Gtk_Table_Record;
        Column             : in     Guint;
        Spacing            : in     Guint);

Set the spacing in pixels between Column and the next one.
procedure Set_Col_Spacings
     (Table              : access Gtk_Table_Record;
        Spacing            : in     Guint);

Set the spacing for all the columns.
procedure Set_Homogeneous
     (Table              : access Gtk_Table_Record;
        Homogeneous        : in     Boolean);

Indicate the homogeneous status of the table.
If Homogeneous is True, the rows and columns of the table will all  be
allocated the same width or height.
Package Gtk.Text
****************

This widget displays any given text that can be manipulated by  both
the user and the programmer.   The text can optionally be interactively
modified by the user.   Different colors and fonts can be used for any
given part of the  text. The background can have any color, or even be
a pixmap.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Editable       (*note Package_Gtk.Editable::)
              \___ Gtk_Text        (*note Package_Gtk.Text::)

Subprograms
===========

procedure Gtk_New
     (Text               : out    Gtk_Text;
        Hadj               : in     Adjustment.Gtk_Adjustment
                            := Adjustment.Null_Adjustment;
        Vadj               : in     Adjustment.Gtk_Adjustment
                            := Adjustment.Null_Adjustment);

Create a new text widget with the given adjustments.
If either or both scrollbars is not provided, the text widget will
create its own.   You need to insert the Gtk_Text in a
Gtk_Scrolled_Window to make  the scrollbars visible. Not also that this
widget does not currently  support horizontal scrollbars.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Text.
function Get_Text_Area
     (Text               : access Gtk_Text_Record)
        return Gdk.Window.Gdk_Window;

Return the specific window into which the text is displayed.
Note that a Gtk_Text is in fact a complex widget, which includes borders
on the sides. Thus, whenever you want to convert the mouse coordinates
to a position in the text, you should use the Gdk.Window.Get_Pointer
function, passing it this text area as the origin window, rather than
directly Get_Window (Text).   Note that null will be returned while
Text hasn't been realized.
function Backward_Delete
     (Text               : access Gtk_Text_Record;
        Nchars             : in     Guint)
        return Boolean;

Backward delete Nchars characters from the current cursor position.
There must be at least Nchars characters to delete before the  pointer,
or the operation will not be performed.   Return True if the operation
was successful, False otherwise.
function Forward_Delete
     (Text               : access Gtk_Text_Record;
        Nchars             : in     Guint)
        return Boolean;

Forward delete Nchars characters from the current point position.
There must be at least Nchars characters to delete after the  pointer,
or the operation will not be performed.   Return True if the operation
was successful, False otherwise.
procedure Freeze
     (Text               : access Gtk_Text_Record);

Freeze the Gtk_Text widget.
In other words, stop any redrawing of the widget until the Thaw
operation is called. This operation is useful when  a large number of
changes need to be made within the widget.   Freezing it during the
updates will avoid some flicker seen by  the user.   Note also that an
internal counter is incremented. The updates will  be performed only
when the same numbers of calls to Thaw has been  performed.

   Note that you can not call Set_Position while the widget is frozen.
This will create a Storage_Error otherwise.
procedure Thaw
     (Text               : access Gtk_Text_Record);

Cancel the previous call to Freeze.
Allow the widget to be redrawn again, when Thaw has been called as
many times as Freeze.
function Get_Hadj
     (Text               : access Gtk_Text_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the horizontal scrollbar associated with Text.
function Get_Vadj
     (Text               : access Gtk_Text_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the vertical scrollbar associated to the given text widget.
function Get_Length
     (Text               : access Gtk_Text_Record)
        return Guint;

Return the total length of the text contained within the text widget.
function Get_Point
     (Text               : access Gtk_Text_Record)
        return Guint;

Get the current position of the insertion point (cursor).
Return the number of characters from the upper left corner of the
widget.
procedure Set_Point
     (Text               : access Gtk_Text_Record;
        Index              : in     Guint);

Set the insertion point position.
This does not modify the position of the visible cursor (see
Gtk.Editable.Set_Position instead).
procedure Insert
     (Text               : access Gtk_Text_Record;
        Font               : in     Gdk.Font.Gdk_Font
                            := Gdk.Font.Null_Font;
        Fore               : in     Gdk.Color.Gdk_Color
                            := Gdk.Color.Null_Color;
        Back               : in     Gdk.Color.Gdk_Color
                            := Gdk.Color.Null_Color;
        Chars              : in     String := "";
        Length             : in     Gint := -1);

Insert the given string (Chars) inside the text of the text widget.
Use the specified Font, foreground (Fore) and background  (Back)
colors. Only the first "Length" characters are inserted,  unless Length
is set to -1, in which case the complete string is  inserted.   Note
that the colors must be allocated first, and the font loaded.   If the
default parameters are passed for font and colors, the text  widget
will use the ones defined in the style for Text (see Gtk.Style  for
more information about styles).
procedure Set_Adjustments
     (Text               : access Gtk_Text_Record;
        Hadj               :        Gtk.Adjustment.Gtk_Adjustment;
        Vadj               :        Gtk.Adjustment.Gtk_Adjustment);

Set the horizontal and vertical adjustments associated with Text.
procedure Set_Editable
     (Text               : access Gtk_Text_Record;
        Editable           : in     Boolean := True);

Toggle the editable state of the given text widget.
This determines whether the user can edit the text or not. Note that
the programmer can still perform any update.
procedure Set_Line_Wrap
     (Text               : access Gtk_Text_Record;
        Line_Wrap          : in     Boolean := True);

Set the Line_Wrap state of the given text widget.
If set to True, the line is broken when it reaches the extent of the
widget viewing area and the rest is displayed on the next line. If set
to false, the line continues regardless of the size of current  viewing
area.
procedure Set_Word_Wrap
     (Text               : access Gtk_Text_Record;
        Word_Wrap          : in     Boolean := True);

Set the Word_Wrap state of the given text widget.
If set to True, words are wrapped down to the next line if they can't
be completed on the current line.
Package Gtk.Toggle`_'Button
***************************

A Gtk_Toggle_Button is like a regular button, but can be in one of  two
states, "active" or "inactive". Its visual aspect is modified  when the
state is changed.

   You should consider using a Gtk_Check_Button instead, since it looks
nicer and provides more visual clues that the button can be  toggled.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Button   (*note Package_Gtk.Button::)
                    \___ Gtk_Toggle_Button (*note Package_Gtk.Toggle_Button::)

Signals
=======

   * "toggled"

     procedure Handler (Toggle : access Gtk_Toggle_Button_Record'Class);
     This signal is emitted every time the state of the button is
     modified.


Subprograms
===========

procedure Gtk_New
     (Toggle_Button      : out    Gtk_Toggle_Button;
        Label              : in     String := "");

Initialize a button.
If Label is "", then no label is created inside the button and  you
will have to provide your own child through a call to
Gtk.Container.Add. This is the recommended way to put a pixmap  inside
a toggle button.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Toggle_Button.
procedure Set_Mode
     (Toggle_Button      : access Gtk_Toggle_Button_Record;
        Draw_Indicator     : in     Boolean);

Change the mode of the button.
If Draw_Indicator is False, then the button is hidden.
procedure Set_Active
     (Toggle_Button      : access Gtk_Toggle_Button_Record;
        Is_Active          : in     Boolean);

Change the state of the button.
When Is_Active is True, the button is drawn as a pressed button.
function Get_Active
     (Toggle_Button      : access Gtk_Toggle_Button_Record)
        return Boolean;

Return true if the button is in its active state, i.e is pressed.
function Is_Active
     (Toggle_Button      : access Gtk_Toggle_Button_Record)
        return Boolean;

Deprecated: this is the old name of Get_Active.
Signals emission
----------------

procedure Toggled
     (Toggle_Button      : access Gtk_Toggle_Button_Record);

Emit the toggled signal on this widget.
Note that the state of the button is not changed, only the callbacks
are called.
Example
=======


      --  This example creates a toggle button with a pixmap in it
     
      with Gtk.Toggle_Button, Gdk.Pixmap, Gdk.Bitmap, Gtk.Pixmap;
      with Gtk.Style, Gtk.Enums;
     
      procedure Toggle is
         Toggle    : Gtk.Toggle_Button.Gtk_Toggle_Button;
         Style     : Gtk.Style.Gtk_Style;
         Pixmap    : Gdk.Pixmap.Gdk_Pixmap;
         Mask      : Gdk.Bitmap.Gdk_Bitmap;
         PixmapWid : Gtk.Pixmap.Gtk_Pixmap;
      begin
         --  Do not specify a label
         Gtk.Toggle_Button.Gtk_New (Toggle);
     
         Style := Gtk.Toggle_Button.Get_Style (Toggle);
         Gdk.Pixmap.Create_From_Xpm
           (Pixmap,
            Gtk.Toggle_Button.Get_Window (Toggle),
            Mask,
            Gtk.Style.Get_Bg (Style, Gtk.Enums.State_Normal),
            "icon.xpm");
         Gtk.Pixmap.Gtk_New (PixmapWid, Pixmap, Mask);
     
         --  Add the pixmap to the button
         Gtk.Toggle_Button.Add (Toggle, PixmapWid);
      end;

Package Gtk.Toolbar
*******************

Package Gtk.Tooltips
********************

Tooltips are the small text windows that popup when the mouse rests over
a widget, and that provide a quick help for the user.

   In GtkAda, all tooltips belong to a group (a Gtk_Tooltips). All the
individual tooltips in a group can be disabled or enabled at the same
time. Likewise, the colors and style of a tooltip can be set on a group
basis.

   See the example at the end for how to change the default colors used
for tooltips.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Data              (*note Package_Gtk.Data::)
           \___ Gtk_Tooltips       (*note Package_Gtk.Tooltips::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Tooltips);

Create a new group of tooltips.
procedure Force_Window
     (Widget             : access Gtk_Tooltips_Record);

Make sure the window in which the tooltips will be displayed is
created.   This is useful if you want to modify some characteristics of
that  window.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Tooltips.
procedure Enable
     (Tooltips           : access Gtk_Tooltips_Record);

Enable all the tooltips in the group.
From now on, when the mouse rests over a widget for a short period of
time, the help text is automatically displayed.
procedure Disable
     (Tooltips           : access Gtk_Tooltips_Record);

Disable all the tooptips in the group.
From now on, no tooltips in this group will appear, unless they are
re-enabled.
procedure Set_Delay
     (Tooltips           : access Gtk_Tooltips_Record;
        Duration           : in     Guint := 500);

Set the delay between the user moving the mouse over a widget and the
text appearing.   Duration is in milli-seconds.
procedure Set_Tip
     (Tooltips           : access Gtk_Tooltips_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Tip_Text           : in     String;
        Tip_Private        : in     String := "");

Add a new tooltip to Widget.
The message that appears in the tooltip is Tip_Text, and the tooltip
belongs to the group Tooltips.   Tip_Private contains more information,
that can be displayed by a  Gtk_Tips_Query widget through the
"widget_selected" signal.   In most cases, Tip_Private should simply
keep its default empty value.
function Get_Data
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class)
        return Tooltips_Data;

Return the tooltip data associated with the Widget.
If there is none, the two text fields in the returned structure have  a
length 0.
Example
=======


      --  This example demonstrates how you can change the color scheme used
      --  for tooltips.
      --  This is of course done through styles. However, you can not directly
      --  associate a Gtk_Tooltips with a style, so you have to do the following.
     
      --  Note also that this choice should probably left to the user, who can
      --  modify it through a RC file that contains the following:
      --      style "postie"
      --      {
      --         bg[NORMAL]={1.0, 0.93, 0.22}
      --      }
      --      widget "gtk-tooltips*" style "postie"
     
      with Gtk.Tooltips, Gtk.Style, Gtk.Widget, Gtk.Enums, Gdk.Color;
      use Gtk.Tooltips, Gtk.Style, Gtk.Widget, Gtk.Enums, Gdk.Color;
     
      procedure Tooltips is
         Style : Gtk_Style;
         Tips  : Gtk_Tooltips;
         Color : Gdk_Color;
      begin
         Gtk_New (Style);
     
         --  blue foreground
         Set_Rgb (Color, 255, 255, 65535);
         Alloc (Gdk.Color.Get_System, Color);
         Set_Foreground (Style, State_Normal, Color);
     
         --  green background
         Set_Rgb (Color, 255, 65535, 255);
         Alloc (Gdk.Color.Get_System, Color);
         Set_Background (Style, State_Normal, Color);
     
         --  temporarily change the default style while creating the tooltips.
         Push_Style (Style);
         Gtk_New (tips);
         Force_Window (Tips);
         Pop_Style;
     
      end Tooltips;

Package Gtk.Tree
****************

Note that this widget is obsolete. Consider using Gtk.Ctree instead.

   This widget displays a tree with expandable nodes. A tree is used to
display hierarchically-organized data. It is a vertical container for
arbitrary widgets of type Gtk_Tree_Item. The difference with a Gtk_Clist
is that Gtk_Tree widgets can be nested within other Gtk_Tree widgets.

   See also Gtk_Ctree for a columned tree which is also more efficient.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Tree        (*note Package_Gtk.Tree::)

Subprograms
===========

Creation, insertion, deletion
-----------------------------

   Elements inside a Gtk_Tree are not ordered from the top to the bottom
as is the case for Gtk_List. Instead, they are put in the tree by
indicating where in the tree they should be placed. The position of an
element (called a node) is defined by a parent node and a sibling node.
The node will be attached in the parent subtree, on top of the sibling
node.   Like the Gtk_List widget, a Gtk_Tree will simply keep growing
as  more items are added to it, as well as when subtrees are expanded.
For this reason, they are almost always packed into a
Gtk_Scrolled_Window. You might want to use Gtk.Widget.Set_Usize on  the
scrolled window to ensure that it is big enough to see the tree's
items, as the default size for Gtk_Scrolled_Window is quite small.

procedure Gtk_New
     (Widget             : out    Gtk_Tree);

Create an empty tree.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Tree.
procedure Append
     (Tree               : access Gtk_Tree_Record;
        Tree_Item          : access Gtk.Widget.Gtk_Widget_Record'Class);

Append a tree item to a Tree.
See package Gtk.Tree_Item for creating tree items and setting them as
subtree.   Remember to do Gtk.Widget.Show on the tree item after you
append or  insert items (can be done any time), otherwise they will not
be shown  if the user expands them for example.
function Child_Position
     (Tree               : access Gtk_Tree_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class)
        return Gint;

Return the position in the tree of Child.
If Child is not in the tree, return -1.
procedure Clear_Items
     (Tree               : access Gtk_Tree_Record;
        Start              : in     Gint;
        The_End            : in     Gint);

Remove the items from position Start to position The_End from the tree.
The warning about dereferencing at Remove_Items applies here too, as
Clear_Items simply constructs a list and passes it to Remove_Items.
function Get_Children
     (Widget             : access Gtk.Tree.Gtk_Tree_Record)
        return Widget_List.Glist;

Get the child items of the tree node.
function Get_Selection
     (Widget             : access Gtk.Tree.Gtk_Tree_Record)
        return Widget_List.Glist;

Get the current selection of items in the tree.
procedure Insert
     (Tree               : access Gtk_Tree_Record;
        Tree_Item          : access Gtk.Widget.Gtk_Widget_Record'Class;
        Position           : in     Gint);

Insert a tree item into a tree at the given position.
procedure Prepend
     (Tree               : access Gtk_Tree_Record;
        Tree_Item          : access Gtk.Widget.Gtk_Widget_Record'Class);

Prepend a tree item to a tree.
procedure Remove_Items
     (Tree               : access Gtk_Tree_Record;
        Items              : in     Widget_List.Glist);

Remove a list of items (in the form of a Glist) from the tree.
Note that removing an item from a tree dereferences (and thus usually)
destroys it and its subtree, if it has one, and all subtrees in that
subtree. If you want to remove only one item, you can use
Gtk.Container.Remove.
procedure Select_Child
     (Tree               : access Gtk_Tree_Record;
        Tree_Item          : access Gtk.Widget.Gtk_Widget_Record'Class);

Emit the select_item signal for the child Tree_Item, thus selecting it.
procedure Select_Item
     (Tree               : access Gtk_Tree_Record;
        Item               : in     Gint);

Emit the select_item signal for the child at position Item.
As a result, the child be is selected (unless you unselect it in a
signal handler).
procedure Set_Selection_Mode
     (Tree               : access Gtk_Tree_Record;
        Mode               : in     Gtk_Selection_Mode);

Set the selection mode.
The mode can be one of Selection_Single (the default),
Selection_Browse, Selection_Multiple, or Selection_Extended.   This is
only defined for root trees, which makes sense, since the  root tree
"owns" the selection. Setting it for subtrees has no effect  at all;
the value is simply ignored.
procedure Set_View_Lines
     (Tree               : access Gtk_Tree_Record;
        Flag               : in     Boolean);

If Flag is True then connecting lines between tree items are drawn,
otherwise not.
procedure Set_View_Mode
     (Tree               : access Gtk_Tree_Record;
        Mode               : in     Gtk_Tree_View_Mode);

Set the "view mode".
The mode can be either Tree_View_Line (the default) or Tree_View_Item.
The view mode propagates from a tree to its subtrees, and can't be set
exclusively to a subtree.   The term "view mode" is rather ambiguous -
basically, it controls the  way the highlight is drawn when one of a
tree's children is selected.   If it's Tree_View_Line, the entire
Tree_Item widget is highlighted,  while for Tree_View_Item only the
child widget (i.e., usually the  label) is highlighted.
procedure Unselect_Child
     (Tree               : access Gtk_Tree_Record;
        Tree_Item          : access Gtk.Widget.Gtk_Widget_Record'Class);

Emit the unselect_item signal for the child Tree_Item.
As a result, Tree_Item is unselected.
procedure Unselect_Item
     (Tree               : access Gtk_Tree_Record;
        Item               : in     Gint);

Emit the "unselect_item" signal for the child at position Item.
As a result, the child is unselected.
Package Gtk.Type`_'Conversion
*****************************

Provides full dynamic typing within GtkAda.

Subprograms
===========

procedure Init;

This function has to be called to enable the full capacity for type
conversions in GtkAda. If this function is not called, then  converting
a C widget to an Ada type will not be as exact (for  instance, most C
widgets will get converted to a Gtk.Object, instead  of the matching
Ada widget. One major exception is Gtk_Label which  will always be
recognized by GtkAda).   On the other hand, if you call this function
(or with this package),  then your application will 'with' all the
GtkAda packages, involving  bigger statically linked executables and a
longer elaboration.
Package Gtk.Type`_'Conversion`_'Hooks
*************************************

This package provides an implementation for hooks used in
Gtk.Type_Conversion. These hooks should be used when you import a new
C widget, so that GtkAda can recreate the Ada structure from the
underlying C structure.   Note that when you create a widget directly
in Ada, you do not need to  provide any hook.

   Implementation note: This is a separate package from
Gtk.Type_Conversion  so that adding a hook does not necessarily mean
the user has to 'with'  Gtk.Type_Conversion, and thus all the packages
from GtkAda.

   Note that this package is not thread safe. You should call the
function Add_Hook from the elaboration part of your packages.

Types
=====

type File_Conversion_Hook_Type is access function
     (Type_Name : String) return Root_Type_Access;

This variable can be point to one of your functions.   It gets the name
of a C widget (ex/ "GtkButton") and should return  a newly allocated
Ada widget.
type Hook_List is record
     Func : File_Conversion_Hook_Type;
         Next : Hook_List_Access := null;
         end record;

Internal structure used for the list.
type Hook_List_Access is access Hook_List;

Subprograms
===========

procedure Add_Hook
     (Func               :        File_Conversion_Hook_Type);

Add a new function to the list of hooks for file conversions.
All the hooks are called when GtkAda finds a type which is not one of
the standard types.
function Conversion_Hooks      return Hook_List_Access;

Return the head of the hook list.
Package Gtk.Vbutton`_'Box
*************************

A Gtk_Vbutton_Box is a specific Gtk_Button_Box that organizes its
children vertically.   The beginning of the box (when you add children
with Gtk.Box.Pack_Start)  is on the top of the box. Its end (for
Gtk.Box.Pack_End) is on the bottom.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Button_Box (*note Package_Gtk.Button_Box::)
                    \___ Gtk_Vbutton_Box (*note Package_Gtk.Vbutton_Box::)

Subprograms
===========

procedure Gtk_New
     (Widget             : out    Gtk_Vbutton_Box);

Create a new vertical button box.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Vbutton_Box.
procedure Set_Spacing_Default
     (Spacing            : in     Gint);

Set the default spacing (space between two adjacent children).
This is done for all the Vbutton_Boxes in your application. This can be
overridden for a specific box by calling Gtk.Button_Box.Set_Spacing.
function Get_Spacing_Default   return Gint;

Return the default spacing to use for all Vbutton_Boxes in your
application that don't have a specific value.
procedure Set_Layout_Default
     (Layout             : in     Gtk.Enums.Gtk_Button_Box_Style);

Set the the default layout to use for all the Vbutton_Boxes in your
application that don't have a specific value set by
Gtk.Button_Box.Set_Layout. The default value is Buttonbox_Edge.
function Get_Layout_Default    return Gtk.Enums.Gtk_Button_Box_Style;

Return the default layout to use for all the vbutton_boxes in your
application.
Package Gtk.Widget
******************

This widget is the base of the tree for displayable objects.   (A
displayable object is one which takes up some amount  of screen real
estate). It provides a common base and interface  which actual widgets
must adhere to.

   This package provides some services which might have been more
appropriate  in some other packages, but could not because of
dependency circularities  (there are for instance some functions
relating to colors and colormaps).   We have tried to reference these
functions in the other packages as well.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)

Signals
=======

   * "add_accelerator"

     ???

   * "button_press_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Button)
     return Boolean;
     A button was pressed while the pointer was inside the widget.  To
     get this signal, some widgets by have to use the Set_Events
     subprogram first to get this event.  If the handler returns False,
     the event might be pass to the parent of widget (if no other
     handler of widget has returned True).

   * "button_release_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Button)
     return Boolean;
     A button was released while the pointer was inside the widget.
     Note that in some cases (Gtk_Buttons for instance), another
     "clicked" signal could be emitted). This "button_release_event"
     should mainly be used for widgets that don't already have specific
     signals to cover that case (Gtk_Drawing_Area for instance).

     To get this signal, some widgets may have to use the Set_Events
     subprogram first to get this event.

     If the handler returns False, the event might be pass to the parent
     of widget (if no other handler of widget has returned True).

   * "client_event"

     ???

   * "configure_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Configure)
     return Boolean;
     Some configuration of the window has changed (it has been moved or
     resized).  If the handler returns False, the event might be pass
     to the parent of widget (if no other handler of widget has
     returned True).

   * "delete_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event)
     return Boolean;
     The user has clicked on the "close" button in the window's frame
     (the button that is automatically set by the window manager). If
     the handler returns False, the widget will be destroyed (and the
     window closed), but if the handler returns True, nothing will be
     done.  This is a good way to prevent the user from closing your
     application's window if there should be some clean ups first (like
     saving the document).

   * "destroy_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event)
     return Boolean;
     This signal is apparently never emitted by Gtk+. You might want to
     use "destroy" instead, which is documented in Gtk.Object.

   * "drag_begin"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "drag_data_delete"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "drag_data_get"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "drag_data_received"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "drag_drop"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "drag_end"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "drag_leave"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "drag_motion"

     Event related to drag-and-drop support. See the Gtk.Dnd
     documentation.
   * "draw"

     procedure Handler (Widget : access Gtk_Widget_Record'Class;
     Area   : Gdk.Rectangle.Gdk_Rectangle);
     Emitted when a widget needs to be drawn. The default handler emits
     the "expose" event.

   * "draw_default"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget needs to be drawn and it does not have the
     focus. This is never called if the widget can not have the focus
     (ie the "Can_Focus" flag is unset).

   * "draw_focus"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget needs to be drawn and it has the focus. Some
     widgets might want to provide visual clues that they have the
     focus, like a black border. This is never called if the widget can
     not have the focus (ie the "Can_Focus" flag is unset).

   * "enter_notify_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Crossing)
     return Boolean;
     The pointer has just entered the widget. If the "Can_Focus" flag is
     set, Widget will gain the focus, and the widget might be drawn
     differently.  If the handler returns False, the event might be
     pass to the parent of widget (if no other handler of widget has
     returned True).

   * "event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event)
     return Boolean;
     Some event was sent to the widget. This covers all the cases
     below, and acts as a general handler. This is called in addition to
     the relevant specific handler below.  If the handler returns
     False, the event might be pass to the parent of widget (if no
     other handler of widget has returned True).

   * "expose_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Expose)
     return Boolean;
     The widget needs to be partly redrawn. The exact area to redraw is
     found in Event. For some widgets, you should rather connect to the
     "draw" signal. However, for instance for Gtk_Drawing_Area widgets,
     you have to use this, after setting the correct event mask with
     Set_Events.  If the handler returns False, the event might be pass
     to the parent of widget (if no other handler of widget has
     returned True).

   * "focus_in_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Focus)
     return Boolean;
     The widget has just gained the focus.  If the handler returns
     False, the event might be pass to the parent of widget (if no
     other handler of widget has returned True).

   * "focus_out_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Focus)
     return Boolean;
     The widget has just lost the focus.  If the handler returns False,
     the event might be pass to the parent of widget (if no other
     handler of widget has returned True).

   * "grab_focus"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     The widget has got the focus, ie will now get the keyboard events
     sent to a window. This is only called if the "Can_Focus" flag is
     set. The "Has_Focus" flag might not be set when this signal is
     emitted.

   * "hide"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget is to be hidden (see explanation for the Hide
     subprogram). Hides the widget from the screen, and if its parent is
     shown, the widget will not appear on the screen again.

   * "key_press_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Key)
     return Boolean;
     A key has been pressed while Widget had the focus. Note that some
     widgets like Gtk_Editable provide some higher-level signals to
     handle this.  If the handler returns False, the event might be
     pass to the parent of widget (if no other handler of widget has
     returned True).

   * "key_release_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Key)
     return Boolean;
     A key has been released while Widget had the focus.  If the
     handler returns False, the event might be pass to the parent of
     widget (if no other handler of widget has returned True).

   * "leave_notify_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Crossing)
     return Boolean;
     The pointer has just leaved the widget. If the "Can_Focus" flag is
     set, Widget will gain the focus, and the widget might be drawn
     differently.  If the handler returns False, the event might be
     pass to the parent of widget (if no other handler of widget has
     returned True).

   * "map"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget is mapped on the screen (the default handler
     simply emits the "show" signal).

   * "map_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event)
     return Boolean;
     The widget has just been mapped. This is different from the "map"
     signal, which is called *before* the widget is actually mapped.
     If the handler returns False, the event might be pass to the parent
     of widget (if no other handler of widget has returned True).

   * "motion_notify_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Motion)
     return Boolean;
     The pointer has moved while remaining inside the widget.  The
     Set_Events subprogram has to be called first to get this event.

     If the handler returns False, the event might be pass to the parent
     of widget (if no other handler of widget has returned True).

   * "no_expose_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event)
     return Boolean;
     ???

   * "parent_set"

     procedure Handler (Widget : access Gtk_Widget_Record'Class;
     Previous_Parent : access Gtk_Widget_Record'Class);
     A new parent has been set for the widget. The previous parent is
     given in arguments (if there was none, Gdk.Is_Created
     (Previous_Parent) returns False).

   * "property_notify_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Property)
     return Boolean;
     ???

   * "proximity_in_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Proximity)
     return Boolean;
     Used for special input devices. See the description of
     Gdk.Event.Gdk_Event_Proximity.  If the handler returns False, the
     event might be pass to the parent of widget (if no other handler
     of widget has returned True).

   * "proximity_out_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Proximity)
     return Boolean;
     Used for special input devices. See the description of
     Gdk.Event.Gdk_Event_Proximity.  If the handler returns False, the
     event might be pass to the parent of widget (if no other handler
     of widget has returned True).

   * "realize"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget is realized. The default handler creates the
     Gdk window associated with the widget, and its ancestors.

   * "remove_accelerator"

     ???

   * "selection_clear_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Selection)
     return Boolean;
     ???

   * "selection_get"

     Related to the selection mechanism, see Gtk.Selection
   * "selection_notify_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Selection)
     return Boolean;
     ???

   * "selection_received"

     Related to the selection mechanism, see Gtk.Selection
   * "selection_request_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Selection)
     return Boolean;
     ???

   * "show"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget is to be shown (see explanation for the Show
     subprogam). This schedules the widget to be displayed on the
     screen, and if this is a toplevel widget it actually appears on
     the screen and all its children that have been shown.

   * "size_allocate"

     procedure Handler (Widget     : access Gtk_Widget_Record'Class;
     Allocation : Gtk_Allocation);
     A size and position were assigned to the widget. This is called
     every time the size of the widget changes.  The default handler
     takes care of resizing and moving the widget.

   * "size_request"

     procedure Handler (Widget      : access Gtk_Widget_Record'Class;
     Requisition : access Gtk_Requisition);
     Should return (in Requisition) the ideal size the widget would
     like to have. It is not sure this is the size that will be
     assigned to it, since it depends on the size of its parent).

   * "state_changed"

     procedure Handler (Widget         : access Gtk_Widget_Record'Class;
     Previous_State : Gtk.Enums.Gtk_State_Type);
     The state of the widget has changed.

   * "style_set"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Previous_Style : Gtk.Style.Gtk_Style);
     The widget's style has been changed (this is not call when some
     settings in the style are changed, only when the style itself is
     completely changed with a call to Set_Style or Set_Rc_Style).

   * "unmap"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget needs to be unmapped on the screen (the
     default handler simply emits the "hide" signal).

   * "unmap_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event)
     return Boolean;
     The widget has just been unmapped. This is different from the
     "unmap" signal, which is called *before* the widget is actually
     unmapped.  If the handler returns False, the event might be pass
     to the parent of widget (if no other handler of widget has
     returned True).

   * "unrealize"

     procedure Handler (Widget : access Gtk_Widget_Record'Class);
     Emitted when a widget is unrealized. The default handler destroys
     the Gdk windows of the widget and all its children.

   * "visibility_notify_event"

     function Handler (Widget : access Gtk_Widget_Record'Class;
     Event  : Gdk.Event.Gdk_Event_Visibility)
     return Boolean;
     The visibility state of the widget has changed (partially visible,
     fully visible, ...). You might want to use the "expose" signal
     instead.  If the handler returns False, the event might be pass to
     the parent of widget (if no other handler of widget has returned
     True).


Types
=====

type Gtk_Allocation is record
     X      : Gint16;
         Y      : Gint16;
         Width  : Guint16;
         Height : Guint16;
         end record;

Gtk_Allocation indicates a size and position a widget was allocated.
See the section in the user guide on how to create new widgets for more
information.     pragma Pack (Gtk_Allocation);
type Gtk_Allocation_Access is access all Gtk_Allocation;

This type is used to create new widgets.
type Gtk_Requisition is record
     Width  : Gint16;
         Height : Gint16;
         end record;

Gtk_Requisition is the desired amount of screen real-estate a widget
requests to the server. Its real allocated size might be different.
See the section in the GtkAda user guide on how to create new widgets
in Ada, and the examples/base_widget directory for an example on how to
use this.     pragma Pack (Gtk_Requisition);
type Gtk_Requisition_Access is access all Gtk_Requisition;

This type is used to create new widgets.
type Widget_Type is new Gtk_Widget_Record with private;

Subprograms
===========

Widgets' life cycle
-------------------

procedure Initialize_Widget
     (Widget             : access Gtk_Widget_Record'Class);

Internal initialization function.
See the section "Creating your own widgets" in the documentation.
procedure Destroy_Cb
     (Widget             : access Gtk_Widget_Record'Class);

This function should be used as a callback to destroy a widget.
All it does is call Destroy on its argument, but its profile is
compatible with the handlers found in Gtk.Handlers.
procedure Unparent
     (Widget             : access Gtk_Widget_Record'Class);

Detach the widget from its parent.
As a side effect, the widget will be erased from the screen.   Note
that Widget will be destroyed if its reference count reaches 0.   Thus,
if you want to reuse it, you should first Gtk.Object.Ref it,  before
calling Unparent.
procedure Show
     (Widget             : access Gtk_Widget_Record);

Schedule the widget to be displayed on the screen when its parent is
also shown (emits the "show" signal).   If its ancestors are already
mapped to the screen, then the widget is  immediately displayed through
a call to Map below.
procedure Show_Now
     (Widget             : access Gtk_Widget_Record);

Show the widget.
If it is an unmapped toplevel widget, wait for it to be mapped. This
creates a recursive main_loop.
procedure Hide
     (Widget             : access Gtk_Widget_Record);

Hide the widget from the screen (emits the "hide" signal).
If Widget was visible, it is immediately hidden.   If one of its
ancestor is later shown on the screen, Widget won't  appear.
procedure Show_All
     (Widget             : access Gtk_Widget_Record);

Show Widget and all its children recursively.
procedure Hide_All
     (Widget             : access Gtk_Widget_Record);

Hide Widget and all its children.
Note that if you simply want to delete Widget from the screen, you can
simply call the Hide subprogram on it. This procedure Hide_All should
only be used if you want to unschedule a widget to be displayed later,
not to remove an actual widget from the screen.
procedure Map
     (Widget             : access Gtk_Widget_Record);

Map a widget to the screen.
A window is created for it on the screen (through a call to Realize) and
Widget is then drawn on the screen (if its ancestors are also mapped).
This function is recursive and will also map all the children of
Widget.

   It is recommended to use the higher-level Show instead.
procedure Unmap
     (Widget             : access Gtk_Widget_Record);

Unmap a widget from the screen.
This results in the widget being hidden, but not destroyed. It can be
shown again any time through a call to Map (provided its ancestors are
also mapped).

   It is recommended to use the higher-level Hide instead.
procedure Realize
     (Widget             : access Gtk_Widget_Record);

Create a window for Widget and its ancestors (emit the "realize" signal)
This does not mean that the widget will appear on the screen, but
resources such as colormaps, etc. become available.   Some routines
require that the widget is realized before any call.   You must set the
Event_Mask before calling this routine if you want to  change it from
its default value.
procedure Unrealize
     (Widget             : access Gtk_Widget_Record);

Hide the widget from the screen and deletes the associated window.
This does not destroy the widget itself, only its server-side
resources.
procedure Set_Realize
     (Widget             : access Gtk_Widget_Record'Class);

Set the realize handler at the low level.
This is needed to replace the default realize in new widgets.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Widget.
Drawing a widget
----------------

procedure Queue_Draw
     (Widget             : access Gtk_Widget_Record);

Add a drawing request to the event queue for the whole widget.
This is more efficient than calling Draw directly, since GtkAda groups
drawing requests as much as possible to speed up the drawing process.
The actual drawing will take place as soon as GtkAda is not busy
processing other events, but before idle events.
procedure Queue_Draw_Area
     (Widget             : access Gtk_Widget_Record;
        X                  :        Gint;
        Y                  :        Gint;
        Width              :        Gint;
        Height             :        Gint);

Add a drawing request to the event queue for part of the widget.
This is more efficient that calling Draw directly (see Queue_Draw).
procedure Queue_Clear
     (Widget             : access Gtk_Widget_Record);

Add a clear request to the event queue for the whole widget.
This is added to the same list as for Queue_Draw, and thus is coalesced
as much as possible with other drawing requests.
procedure Queue_Clear_Area
     (Widget             : access Gtk_Widget_Record;
        X                  :        Gint;
        Y                  :        Gint;
        Width              :        Gint;
        Height             :        Gint);

Add a clear request to the event queue for part of the widget.
This is added to the same list as for Queue_Draw, and thus is coalesced
as much as possible with other drawing requests.
procedure Queue_Resize
     (Widget             : access Gtk_Widget_Record);

Queue drawing requests after a resizing of the widget.
This clears the widget, and its parent if any, so that everything is
correctly redrawn.   You should not have to call this function directly.
procedure Draw
     (Widget             : access Gtk_Widget_Record;
        Area               : in     Gdk.Rectangle.Gdk_Rectangle
                            := Gdk.Rectangle.Full_Area);

Emit a "draw" signal for a specific area of the widget.
The visual aspect might be different whether the widget has the focus
or not.
procedure Draw_Focus
     (Widget             : access Gtk_Widget_Record);

Emit a "draw_focus" signal for the widget.
The widget will be painted as it appears when it has the focus.
procedure Draw_Default
     (Widget             : access Gtk_Widget_Record);

Emit a "draw_default" signal for the widget.
The widget will be painted as it appears when it doesn't have the focus.
Size and position
-----------------

procedure Size_Request
     (Widget             : access Gtk_Widget_Record;
        Requisition        : in out Gtk_Requisition);

Emit a "size_request" event for the widget
procedure Size_Allocate
     (Widget             : access Gtk_Widget_Record;
        Allocation         : in out Gtk_Allocation);

Emit a "size_allocate" event for the widget.
Allocation'size is first constrained to a range between 1x1 and
32767x32767.   A clear and draw request is also queued if required.
function Get_Child_Requisition
     (Widget             : access Gtk_Widget_Record)
        return Gtk_Requisition;

Return the size requests by the widget.
This is the ideal size for the widget, not necessarily its actual size.
See the user guide's section on how to create new widgets for more
information on the size requisition and allocation.
procedure Set_UPosition
     (Widget             : access Gtk_Widget_Record;
        X, Y               : in     Gint);

Modify the position of the widget.
This should be used only for toplevel widgets (windows and dialogs),
since other widgets' positions are handled by their parent.
procedure Set_USize
     (Widget             : access Gtk_Widget_Record;
        Width, Height      : in     Gint);

Modify the size of the widget.
This sets an absolute size for the widget, no matter what its requested
size would be. For Gtk_Windows, you should consider using
Set_Default_Size instead, which sets a minimal size, but use the
widget's requested size if it is bigger.   If Width or Height is
negative, they are ignored, and the widget's  default width is kept.
function Get_Allocation_Width
     (Widget             : access Gtk_Widget_Record)
        return Guint;

Return the current width of the widget.
function Get_Allocation_Height
     (Widget             : access Gtk_Widget_Record)
        return Guint;

Return the current height of the widget.
function Get_Allocation_X
     (Widget             : access Gtk_Widget_Record)
        return Gint;

Return the current position of the widget, relative to its parent.
function Get_Allocation_Y
     (Widget             : access Gtk_Widget_Record)
        return Gint;

Return the current position of the widget, relative to its parent.
Accelerators
------------

procedure Add_Accelerator
     (Widget             : access Gtk_Widget_Record;
        Accel_Signal       : in     String;
        Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group;
        Accel_Key          : in     Gdk.Types.Gdk_Key_Type;
        Accel_Mods         : in     Gdk.Types.Gdk_Modifier_Type;
        Accel_Flags        : in     Gtk.Accel_Group.Gtk_Accel_Flags);

Add a new accelerator for the widget.
The signal Accel_Signal will be sent to Widget when the matching  key
is pressed and the widget has the focus.
procedure Remove_Accelerator
     (Widget             : access Gtk_Widget_Record;
        Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group;
        Accel_Key          : in     Gdk.Types.Gdk_Key_Type;
        Accel_Mods         : in     Gdk.Types.Gdk_Modifier_Type);

Remove an accelerator for the widget.
procedure Remove_Accelerators
     (Widget             : access Gtk_Widget_Record;
        Accel_Signal       : in     String;
        Visible_Only       : in     Boolean := True);

Remove all the accelerators for the widget that emits the Accel_Signal
signal when the key is pressed.   Visible_Only is currently unused in
the code of gtk+.
function Accelerator_Signal
     (Widget             : access Gtk_Widget_Record;
        Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group;
        Accel_Key          : in     Gdk.Types.Gdk_Key_Type;
        Accel_Mods         : in     Gdk.Types.Gdk_Modifier_Type)
        return Guint;

Return the signal id of the signal emitted when Accel_Key is pressed
inside the widget.
procedure Lock_Accelerators
     (Widget             : access Gtk_Widget_Record);

Lock the accelerators for the widget.
No new accelerator can be added to Widget (the default behavior is
that the user can dynamically create new accelerators, for instance  by
pressing a not-yet assigned key on any menu item.   If you call this
function on the menu_item, this behavior will not  longer be activated.
procedure Unlock_Accelerators
     (Widget             : access Gtk_Widget_Record);

Unlock the accelerators for the widget.
It is now possible to add new accelerators to the widget.
Events and signals
------------------

function Event
     (Widget             : access Gtk_Widget_Record'Class;
        Event              :        Gdk.Event.Gdk_Event)
        return Gint;

Emit a signal on the widget.
The exact signal depends on the event type (i.e. if the type is
Gdk_Button_Press, then a "button_press" signal is emitted).
procedure Activate
     (Widget             : access Gtk_Widget_Record);

Emit an activate signal on the widget.
The exact signal emitted depends on the widget type (i.e. for a
Gtk_Button this emits a "clicked" signal, for a Gtk_Editable this emits
the "activate" signal, ...).
procedure Grab_Focus
     (Widget             : access Gtk_Widget_Record);

Emit the "grab_focus" signal for the widget.
This is sent when the widget gets the focus. Its visual aspect might
change.   The "Can_Focus" flag must have been set first.
procedure Set_Events
     (Widget             : access Gtk_Widget_Record;
        Events             : in     Gdk.Types.Gdk_Event_Mask);

Sets the event mask for the widget.
Widget should not have been realized before, or nothing is done.   This
is the only way you can explicitly get mouse or keyboards events on
widgets that do not automatically get them, as for instance in a
Gtk_Drawing_Area.
function Get_Events
     (Widget             : access Gtk_Widget_Record)
        return Gdk.Types.Gdk_Event_Mask;

Get the event mask for the widget.
This indicates the list of events that the widget receives.
procedure Add_Events
     (Widget             : access Gtk_Widget_Record;
        Events             : in     Gdk.Types.Gdk_Event_Mask);

Add some events to the current event mask of the widget.
procedure Set_Extension_Events
     (Widget             : access Gtk_Widget_Record;
        Mode               : in     Gdk.Types.Gdk_Extension_Mode);

Set the extension event mask for the widget.
This is used to activate some special input modes for other devices than
keyboard and mouse.
function Get_Extension_Events
     (Widget             : access Gtk_Widget_Record)
        return Gdk.Types.Gdk_Extension_Mode;

Return the current extension events mask.
function Default_Motion_Notify_Event
     (Widget             : access Gtk_Widget_Record'Class;
        Event              :        Gdk.Event.Gdk_Event)
        return Gint;

Access to the standard default callback for motion events:
This is mainly used for rulers in Gtk.Ruler (See the example in
testgtk, with create_rulers.adb)
function Has_Default_Motion_Notify_Handler
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Return True if Widget has a default handler for motion_notify events.
Note that the function Default_Motion_Notify_Event should not be called
if this one returns False, since it would create a segmentation fault.
Colors and colormaps
--------------------

function Get_Colormap
     (Widget             : access Gtk_Widget_Record)
        return Gdk.Color.Gdk_Colormap;

Return the colormap used for the widget. This will generally be the
same one for all widgets, but might be different if for instance a
Gtk_Drawing_Area needs to display some different colors on a screen
that only has a limited amount of colors.
function Get_Visual
     (Widget             : access Gtk_Widget_Record)
        return Gdk.Visual.Gdk_Visual;

Get the visual used for the widget.
I.e. the structure that indicates the depth of the widget (number of
bits per pixel), and some information used internally by GtkAda to
handle colors and colormaps.
procedure Set_Colormap
     (Widget             : access Gtk_Widget_Record;
        Cmap               :        Gdk.Color.Gdk_Colormap);

Modify the colormap of the widget.
The widget must not have been realized.
procedure Set_Visual
     (Widget             : access Gtk_Widget_Record;
        Visual             :        Gdk.Visual.Gdk_Visual);

Modify the visual of the widget.
The widget must not have been realized.
procedure Push_Colormap
     (Cmap               :        Gdk.Color.Gdk_Colormap);

Modify temporarily the default colormap set for newly created widgets.
You should use this in pair with Pop_Colormap below (Push the new value,
create the widget, and pop the value).
procedure Pop_Colormap;

See Push_Colormap for more information.
procedure Push_Visual
     (Visual             :        Gdk.Visual.Gdk_Visual);

Modify temporarily the default visual set for newly created widgets.
You should use this in pair with Pop_Colormap below (Push the new value,
create the widget, and pop the value).
procedure Pop_Visual;

See Push_Visual for more information.
function Get_Default_Colormap  return Gdk.Color.Gdk_Colormap;

Return the default colormap used when a widget is created.
procedure Set_Default_Colormap
     (Cmap               :        Gdk.Color.Gdk_Colormap);

Modify permanently the default colormap used when a widget is created.
If you only want to modify this colormap temporarily for a few widgets,
you should consider using Push_Colormap and Pop_Colormap instead.
function Get_Default_Visual    return Gdk.Visual.Gdk_Visual;

Return the default visual used when a new widget is created.
procedure Set_Default_Visual
     (Visual             :        Gdk.Visual.Gdk_Visual);

Modify permanently the default visual used when a widget is created.
If you only want to modify this visual temporarily for a few widgets,
you should consider using Push_Visual and Pop_Visual instead.
Styles
------

procedure Push_Style
     (Style              :        Gtk.Style.Gtk_Style);

Change the default values for styles.
This is generally used just before creating a widget. You should use
this procedure in pair with Pop_Style (Push the new value, create the
widget then pop the value)
procedure Pop_Style;

Restore the default values for styles.
This is generally used just after creating a widget. You should use
this procedure in pair with Push_Style (Push the new value, create the
widget then pop the value)
procedure Set_Style
     (Widget             : access Gtk_Widget_Record;
        Style              :        Gtk.Style.Gtk_Style);

Set the style for a given widget.
function Get_Style
     (Widget             : access Gtk_Widget_Record)
        return Gtk.Style.Gtk_Style;

Return the style of a given widget.
procedure Modify_Style
     (Widget             : access Gtk_Widget_Record;
        Style              :        Gtk_Rc_Style);

Modify the default style of a widget.
procedure Set_Default_Style
     (Style              :        Gtk.Style.Gtk_Style);

Set the default global style.
function Get_Default_Style     return Gtk.Style.Gtk_Style;

Get the default global style.
procedure Set_Rc_Style
     (Widget             : access Gtk_Widget_Record);

Restore the default style of a widget.
The default style is given by the configuration file initially parsed
by GtkAda.
procedure Ensure_Style
     (Widget             : access Gtk_Widget_Record);

Make sure that the widget has a style associated to it.
Either the default one as set by Set_Rc_Style above or one set by the
user with Set_Style.
procedure Restore_Default_Style
     (Widget             : access Gtk_Widget_Record);

Restore the default style that was set for the widget.
The default style is the first one that was set either by a call  to
Set_Style or Set_Rc_Style.
procedure Reset_Rc_Styles
     (Widget             : access Gtk_Widget_Record);

Restore the Rc style recursively for widget and its children.
Widgets' tree
-------------

procedure Set_Name
     (Widget             : access Gtk_Widget_Record;
        Name               : in     String);

Set the name for the widget.
This name is used purely internally to identify the widget, and does not
give any visual clue.
function Get_Name
     (Widget             : access Gtk_Widget_Record)
        return String;

Return the name of the widget if it was set by Set_Name.
Return the name of its class otherwise.
procedure Set_Parent
     (Widget             : access Gtk_Widget_Record;
        Parent             : access Gtk_Widget_Record'Class);

Modify the parent for the widget.
This is not the recommended way to do this, you should use
Gtk.Container.Add or Gtk.Box.Pack_Start instead.
procedure Set_Parent_Window
     (Widget             : access Gtk_Widget_Record;
        Window             :        Gdk.Window.Gdk_Window);

Set the parent window for the actual Gdk_Window of the widget. This sets
up required internal fields, and should be used only when you implement
your own container, as opposed to using one of the standard containers.
function Get_Parent
     (Widget             : access Gtk_Widget_Record)
        return Gtk_Widget;

Return the parent of the widget, or null if Widget is a toplevel
widget.
function Get_Toplevel
     (Widget             : access Gtk_Widget_Record)
        return Gtk_Widget;

Return the toplevel ancestor of the widget.
This is the window or dialog in which the widget is included.   The
widget returned does not have any parent.
function Get_Ancestor
     (Widget             : access Gtk_Widget_Record;
        Ancestor_Type      : in     Gtk_Type)
        return Gtk_Widget;

Return the closest ancestor of Widget which is of type Ancestor_Type.
Return null if there is none.
function Is_Ancestor
     (Widget             : access Gtk_Widget_Record;
        Ancestor           : access Gtk_Widget_Record'Class)
        return Boolean;

Return True if Ancestor is in the ancestor tree for Widget.
I.e. if Widget is contained within Ancestor.
procedure Reparent
     (Widget             : access Gtk_Widget_Record;
        New_Parent         : access Gtk_Widget_Record'Class);

Change the parent of the widget dynamically.
If both the new parent and the widget are shown, then the widget is
visually redrawn in its new parent.
Misc functions
--------------

procedure Set_Scroll_Adjustments
     (Widget             : access Gtk_Widget_Record;
        Hadj               :        Gtk.Adjustment.Gtk_Adjustment;
        Vadj               :        Gtk.Adjustment.Gtk_Adjustment);

Emit the "set_scroll_adjustments" signal.
The exact signal emitted depends on the widget type (see
Gtk.Object.Initialize_Class_Record).   The handler creates the
adjustments if null is passed as argument, and  makes sure both
adjustments are in the correct range.
procedure Popup
     (Widget             : access Gtk_Widget_Record;
        X, Y               : in     Gint);

Realize the widget (see Realize above), moves it to the screen position
(X, Y), and shows the widget.   This should only be used for toplevel
windows and dialogs, as you can  no modify the position of a widget
that has a parent (the parent is  then responsible for its position).
function Intersect
     (Widget             : access Gtk_Widget_Record;
        Area               :        Gdk.Rectangle.Gdk_Rectangle;
        Intersection       : access Gdk.Rectangle.Gdk_Rectangle)
        return Boolean;

Return True if the widget intersects the screen area Area.
The intersection area is returned in Intersection.
procedure Grab_Default
     (Widget             : access Gtk_Widget_Record);

The widget becomes the default widget for its parent window or dialog.
All keyboard events will be sent to it if no other widget has the focus.
Note that the "Can_Default" flag must have been set first on WIDGET.
procedure Set_State
     (Widget             : access Gtk_Widget_Record;
        State              : in     Enums.Gtk_State_Type);

Modify the state of the widget.
This modifies its visual aspect, and thus should be used only if you
change its behavior at the same time, so as not to confuse the user.
function Get_State
     (Widget             : access Gtk_Widget_Record)
        return Enums.Gtk_State_Type;

Return the state of the widget.
procedure Set_Sensitive
     (Widget             : access Gtk_Widget_Record;
        Sensitive          : in     Boolean := True);

Modify the sensitivity of the widget.
An insensitive widget is generally grayed out, and can not be activated.
For instance, an insensitive menu item is grayed, and can never be
selected.
procedure Set_App_Paintable
     (Widget             : access Gtk_Widget_Record;
        App_Paintable      :        Boolean);

Modify the "App_Paintable" flag for the widget.
procedure Get_Pointer
     (Widget             : access Gtk_Widget_Record;
        X                  : out    Gint;
        Y                  : out    Gint);

Return the coordinates of the pointer (i.e. mouse) relative to Widget.
procedure Set_Window
     (Widget             : access Gtk_Widget_Record;
        Window             : in     Gdk.Window.Gdk_Window);

Set the Gdk window associated with the widget.
function Get_Window
     (Widget             : access Gtk_Widget_Record)
        return Gdk.Window.Gdk_Window;

Get the Gdk window associated with the widget.
You can use this window if you need to draw directly on the widget using
the functions found in the Gdk hierarchy.
procedure Shape_Combine_Mask
     (Widget             : access Gtk_Widget_Record;
        Shape_Mask         :        Gdk.Bitmap.Gdk_Bitmap;
        Offset_X           :        Gint;
        Offset_Y           :        Gint);

Modify the shape of the window that contains the widget.
This allows for transparent windows, and requires the Xext library to be
available on your system. If this library is not available, your
program  will still work.   See the manual page for
XShapeCombineMask(3x) for more information.
Flags
-----

Some additional flags are defined for all the visual objects (widgets).
They are defined in addition to the ones defined in Gtk.Object.   These
flags are important in that they define exactly the different  states a
widget can be in.

   * "Toplevel":    Set if the widget is a toplevel widget, ie has no
     parent. This is    mostly true for windows and dialogs.

   * "No_Window":    Set if the widget does not have an associated X11
     window, ie can not    receive events directly. For instance, a
     Gtk_Toolbar does not have    an associated window. These objects
     are more lightweight, but require    more work from GtkAda. This
     flag is only set if the widget will never    have a window, even
     after it is realized.

   * "Realized":    Set if the widget has been realized, ie its
     associated X11 window has    been created (providing the widget
     excepts a window, see the No_Window    flag

   * "Mapped":    Set if the widget is visible on the screen. This is
     only possible if    the Visible flag is also set.

   * "Visible":    Set if the widget will be displayed on the screen
     when mapped (see the    functions Show and Hide in this package).

   * "Sensitive":    Set if the widget is listening to events. See the
     function    Set_Sensitive in this package. An insensitive widget
     will generally    have a different visual aspect to clue that it
     is unavailable (for    instance an insensitive item menu will be
     grayed)

   * "Parent_Sensitive":    Set if the parent is sensitive. A widget is
     sensitive only if both    the Sensitive and Parent_Sensitive are
     set.

   * "Can_Focus":    Set if the widget can have the focus, ie get
     keyboard events. Most    widgets can not have the focus.

   * "Has_Focus":    Set if the widget currently has the focus. See the
     function Grab_Focus    in this package.

   * "Can_Default":    Set if the widget can be the default widget in a
     window, ie the one    that will get the keyboard events by
     default. For instance, the    default button in a dialog is the
     one that gets clicked on when the    user pressed Enter anywhere
     in the dialog.

   * "Has_Default":    Set if the widget is currently the default
     widget. See the function    Grab_Default in this package.

   * "Has_Grab":    Set if the widget currently grabs all mouse and
     keyboard events in    the application, even if it does not have
     the focus. There can be only    such widget per application at any
     given time.

   * "Rc_Style":    Set if the widget's style is either the default
     style, or in a    customization file. This is unset if the style
     has been modified by    the user.

   * "Composite_Child":    ???

   * "No_Reparent":    This flags is never used in gtk+.

   * "App_Paintable":    For some containers (including Gtk_Window and
     Gtk_Layout), this is    unset when the container itself has some
     special drawing routines.

   * "Receives_Default":    Set when the widget receives the default at
     the time it receives the    focus. This is how the default button
     in a dialog is automatically    changed when you press another
     button.

function Toplevel_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Toplevel flag is set.
function No_Window_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the No_Window flag is set.
function Realized_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Realized flag is set.
function Mapped_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Mapped flag is set.
function Visible_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Visible flag is set.
function Drawable_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

True if the widget is both visible and mapped.
In other words, if it does appear on the screen.
function Is_Sensitive
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the widget is Sensitive.
function Can_Focus_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Can_Focus flag is set.
function Has_Focus_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Has_Focus flag is set.
function Has_Default_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Has_Default flag is set.
function Has_Grab_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Has_Grab flag is set.
function Rc_Style_Is_Set
     (Widget             : access Gtk_Widget_Record'Class)
        return Boolean;

Test whether the Rc_Style flag is set.
Package Gtk.Window
******************

This widget implements a top level window.   It is used as the base
class for dialogs, ...

   A window has both a default widget (to which events are sent if no
other  widget has been selected and has the focus), and a focus widget
(which  gets the events and overrides the default widget).

   You can set many hints on the window (its minimum and maximum size,
its  decoration, etc.) but these are only hints to the window manager,
which  might not respect them.

   A useful hint, respected by most window managers, can be used to
force  some secondary windows to stay on top of the main window on the
screen  (for instance, so that a smaller window can not be hidden by a
bigger  one). See the function Set_Transient_For below.

   A window can also be modal, i.e. grab all the mouse and keyboard
events  in the application while it is displayed.

Widget Hierarchy
================

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Window   (*note Package_Gtk.Window::)

Signals
=======

   * "set_focus"

     procedure Handler (Window : access Gtk_Window_Record'Class;
     Widget : access Gtk_Widget_Record'Class);
     Called when the widget that has the focus has changed.  This
     widget gets all keyboard events that happen in the window.  You
     should not block the emission of this signal, since most of the
     work is done in the default handler.


Subprograms
===========

procedure Gtk_New
     (Window             : out    Gtk_Window;
        The_Type           : in     Gtk.Enums.Gtk_Window_Type
                            := Gtk.Enums.Window_Toplevel);

Create a new window.
The_Type specifies the type of the window, and can be either a  top
level window, a dialog or a popup window. You will most often only
need to use Window_Toplevel, the other types are mostly used internally
by gtk+.   A Popup window is used to display a temporary information
window. It has  no borders nor resizing handles.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Window.
procedure Set_Title
     (Window             : access Gtk_Window_Record;
        Title              : in     String);

Change the title of the window, as it appears in the title bar.
Note that on some systems you might not be able to change it.
function Get_Title
     (Window             : access Gtk_Window_Record)
        return String;

Return the title of the window, or "" if there is none
procedure Set_Wmclass
     (Window             : access Gtk_Window_Record;
        Wmclass_Name       : in     String;
        Wmclass_Class      : in     String);

Specify the string to look for in the user's configuration files
(Xdefault...) for windows specific resources. See some X11
documentation for more information (man XSetClassHint)  The window
should not be realized when you call this function.
procedure Set_Policy
     (Window             : access Gtk_Window_Record;
        Allow_Shrink       : in     Boolean;
        Allow_Grow         : in     Boolean;
        Auto_Shrink        : in     Boolean);

Specify the behavior of the window with regards to size modifications.
Default values when the window is created are:

   Allow_Shrink => False,

   Allow_Grow   => True,

   Auto_Shrink  => False.

   If Allow_Shrink is False, then the minimum size of the window is
calculated once depending on its children, and the window can never be
smaller.   If Allow_Grow is False, then the maximum size of the window
is  calculated once depending on its children, and the window can never
be  bigger.   If Auto_Shrink if False, then the window is not shrinked
when its  content changes.
procedure Add_Accel_Group
     (Window             : access Gtk_Window_Record;
        Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group);

Specify an accelerator group for the window.
procedure Remove_Accel_Group
     (Window             : access Gtk_Window_Record;
        Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group);

Remove the specified accelerator group for the window.
procedure Set_Position
     (Window             : access Gtk_Window_Record;
        Position           : in     Gtk.Enums.Gtk_Window_Position);

Specify how the position of the window should be computed.
If Position is Win_Pos_Center_Always or Win_Pos_Center, then the window
is centered on the screen. In the first case, it is also recentered
when the window is resized with Gtk.Widget.Set_Usize (ie except on
user action).   If Position is Win_Pos_Mouse, then the window is
positioned so that it  centered around the mouse.   If Position is
Win_Pos_None, no calculation is done. If  Gtk.Widget.Set_Uposition as
been called, it is respected. This is the  default case.
function Activate_Focus
     (Window             : access Gtk_Window_Record)
        return Boolean;

Call Gtk.Widget.Activate on the widget that currently has the focus in
the window, ie sends an "activate" signal to that widget. Note that this
signal does not really exists and is mapped to some widget-specific
signal.   Return True if the widget could be activated, False otherwise.
The Focus widget is set through a signal "set_focus".
function Activate_Default
     (Window             : access Gtk_Window_Record)
        return Boolean;

Activate the default widget in the window.
In other words, send an "activate" signal to that widget. Note that
this signal is a virtual one and is mapped to some widget specific
signal.   Return False is the widget could not be activated or if there
was  no default widget.   You can set the default widget with the
following calls:

   Gtk.Widget.Set_Flags (Widget, Can_Default);

   Gtk.Widget.Grab_Default (Widget);
function Get_Transient_Parent
     (Window             : access Gtk_Window_Record)
        return Gtk_Window;

Return the window for which this one is a temporary window.
See Set_Transient_For below for more information on transient windows.
null is returned if there is no such window.
procedure Set_Transient_For
     (Window             : access Gtk_Window_Record;
        Parent             : access Gtk_Window_Record'Class);

Specify that Window is a transient window.
A transient window is a temporary window, like a popup menu or a
dialog box). Parent is the toplevel window of the application to which
Window belongs. A window that has set this can expect less decoration
from the window manager (for instance no title bar and no borders).
(see XSetTransientForHint(3) on Unix systems)

   The main usage of this function is to force Window to be on top of
Parent on the screen at all times. Most window managers respect this
hint, even if this is not mandatory.
procedure Set_Geometry_Hints
     (Window             : access Gtk_Window_Record;
        Geometry_Widget    :        Gtk.Widget.Gtk_Widget;
        Geometry           :        Gdk.Types.Gdk_Geometry;
        Geom_Mask          :        Gdk.Types.Gdk_Window_Hints);

Specify some geometry hints for the window.
This includes its minimal and maximal sizes, ...   These attributes are
specified in Geometry.   Geom_Mask indicates which of the fields in
Geometry are set.   Geometry_Widget can be null (and thus is not an
access parameter). It  adds some extra size to Geometry based on the
actual size of  Geometry_Widget (the extra amount is Window'Size -
Geometry_Widget'Size)

   Geometry.Base_* indicates the size that is used by the window manager
to report the size: for instance, if Base_Width = 600 and actual width
is 200, the window manager will indicate a width of -400.

   If your window manager respects the hints (and its doesn't have to),
then the user will never be able to resize the window to a size not
in Geometry.Min_* .. Geometry.Max_*.

   Geometry.*_Inc specifies by which amount the size will be multiplied.
For instance, if Width_Inc = 50 and the size reported by the Window
Manager is 2x3, then the actual width of the window is 100.   Your
window's size will always be a multiple of the *_Inc values.

   Geometry.*_Aspect specifies the aspect ratio for the window. The
window  will always be resized so that the ratio between its width and
its  height remains in the range Min_Aspect .. Max_Aspect.
procedure Set_Default_Size
     (Window             : access Gtk_Window_Record;
        Width              : in     Gint;
        Height             : in     Gint);

Specify a minimal size for the window.
If its content needs to be bigger, then the actual window will grow
accordingly.   This is different from Gtk.Widget.Set_Usize which sets
an absolute  size for the widget.   This has no effect on Popup windows
(set in call to Gtk_New).
procedure Set_Modal
     (Window             : access Gtk_Window_Record;
        Modal              : in     Boolean := True);

Define the window as being Modal.
It will grab the input from the keyboard and the mouse while it is
displayed and will release it when it is hidden. The grab is only in
effect for the windows that belong to the same application, and will not
affect other applications running on the same screen.   In cunjunction
with Gtk.Main.Main, this is the easiest way to show a  dialog to which
the user has to answer before the application can  continue.
Example
=======


      --  This example shows how you can display a banner while your application is
      --  loading
     
      with Gtk.Window, Gtk.Enums, Gtk.Main, Gtk.Label;
      use Gtk.Window,  Gtk.Enums, Gtk.Main, Gtk.Label;
     
      procedure Banner is
         Win   : Gtk_Window;
         Label : Gtk_Label;
      begin
         Gtk.Main.Init;
     
         Gtk_New (Win, Window_Popup);
         Set_Policy (Win,
                     Allow_Shrink => False,
                     Allow_Grow   => False,
                     Auto_Shrink  => False);
         Set_Position (Win, Win_Pos_Center);
         Set_Usize (Win, 300, 300);
     
         Gtk_New (Label, "You should show a pixmap instead...");
         Add (Win, Label);
     
         Show_All (Win);
         Gtk.Main.Main;
      end Banner;

Package Interactive_Canvas
**************************

Index
*****

Gdk:
          See ``Subprograms''.
Gdk.Art:
          See ``Types''.
Gdk.Art.Pixbuf:
          See ``Package Gdk.Art''.
Gdk.Bitmap:
          See ``Types''.
Gdk.Color:
          See ``Subprograms''.
Gdk.Color_Context:
          See ``Example''.
Gdk.Cursor:
          See ``Package Gdk.Color`_'Context''.
Gdk.Drawable:
          See ``Subprograms''.
Gdk.Event:
          See ``Example''.
Gdk.Font:
          See ``Subprograms''.
Gdk.GC:
          See ``Subprograms''.
Gdk.Main:
          See ``Subprograms''.
Gdk.Pixbuf:
          See ``Subprograms''.
Gdk.Pixmap:
          See ``Subprograms''.
Gdk.Rgb:
          See ``Subprograms''.
Gdk.Threads:
          See ``Subprograms''.
Glade:
          See ``Subprograms''.
Glade.XML:
          See ``Subprograms''.
Glade_XML:
          See ``Subprograms''.
Glib:
          See ``GtkAda Reference Manual''.
Glib.Glist:
          See ``Package Glib.GSlist''.
Glib.GSlist:
          See ``Subprograms''.
Glib.Module:
          See ``Example''.
Glib.XML:
          See ``Subprograms''.
Gtk:
          See ``Package Glade_XML''.
Gtk.Accel_Label:
          See ``Subprograms''.
Gtk.Adjustment:
          See ``Example''.
Gtk.Alignment:
          See ``Example''.
Gtk.Arguments:
          See ``Subprograms''.
Gtk.Arrow:
          See ``Package Gtk.Arguments''.
Gtk.Aspect_Frame:
          See ``Subprograms''.
Gtk.Bin:
          See ``Subprograms''.
Gtk.Box:
          See ``Subprograms''.
Gtk.Button:
          See ``Subprograms''.
Gtk.Button_Box:
          See ``Subprograms''.
Gtk.Calendar:
          See ``Subprograms''.
Gtk.Check_Button:
          See ``Subprograms''.
Gtk.Check_Menu_Item:
          See ``Subprograms''.
Gtk.Clist:
          See ``Subprograms''.
Gtk.Color_Selection:
          See ``Example''.
Gtk.Color_Selection_Dialog:
          See ``Subprograms''.
Gtk.Combo:
          See ``Subprograms''.
Gtk.Container:
          See ``Example''.
Gtk.Ctree:
          See ``Subprograms''.
Gtk.Curve:
          See ``Subprograms''.
Gtk.Data:
          See ``Subprograms''.
Gtk.Dialog:
          See ``Subprograms''.
Gtk.Dnd:
          See ``Subprograms''.
Gtk.Drawing_Area:
          See ``Subprograms''.
Gtk.Editable:
          See ``Subprograms''.
Gtk.Event_Box:
          See ``Subprograms''.
Gtk.Extra:
          See ``Subprograms''.
Gtk.Extra.Border_Combo:
          See ``Package Gtk.Extra''.
Gtk.Extra.Check_Item:
          See ``Subprograms''.
Gtk.Extra.Color_Combo:
          See ``Subprograms''.
Gtk.Extra.Combo_Box:
          See ``Subprograms''.
Gtk.Extra.Font_Combo:
          See ``Subprograms''.
Gtk.Extra.Item_Entry:
          See ``Subprograms''.
Gtk.Extra.Plot:
          See ``Subprograms''.
Gtk.Extra.Plot_3D:
          See ``Subprograms''.
Gtk.Extra.Plot_Bar:
          See ``Subprograms''.
Gtk.Extra.Plot_Box:
          See ``Subprograms''.
Gtk.Extra.Plot_Canvas:
          See ``Subprograms''.
Gtk.Extra.Plot_Data:
          See ``Subprograms''.
Gtk.Extra.Plot_Polar:
          See ``Subprograms''.
Gtk.Extra.Plot_Ps:
          See ``Subprograms''.
Gtk.Extra.Plot_Surface:
          See ``Subprograms''.
Gtk.Extra.PsFont:
          See ``Subprograms''.
Gtk.Extra.Sheet:
          See ``Subprograms''.
Gtk.File_Selection:
          See ``Subprograms''.
Gtk.Fixed:
          See ``Subprograms''.
Gtk.Font_Selection:
          See ``Subprograms''.
Gtk.Font_Selection_Dialog:
          See ``Subprograms''.
Gtk.Frame:
          See ``Package Gtk.Font_Selection_Dialog''.
Gtk.Gamma_Curve:
          See ``Subprograms''.
Gtk.GEntry:
          See ``Subprograms''.
Gtk.GLArea:
          See ``Subprograms''.
Gtk.Handle_Box:
          See ``Subprograms''.
Gtk.Handlers:
          See ``Subprograms''.
Gtk.Hbutton_Box:
          See ``Example''.
Gtk.Image:
          See ``Subprograms''.
Gtk.Item:
          See ``Subprograms''.
Gtk.Label:
          See ``Package Gtk.Item''.
Gtk.Layout:
          See ``Subprograms''.
Gtk.Main:
          See ``Subprograms''.
Gtk.Marshallers:
          See ``Subprograms''.
Gtk.Menu:
          See ``Package Gtk.Marshallers''.
Gtk.Menu_Bar:
          See ``Example''.
Gtk.Menu_Item:
          See ``Subprograms''.
Gtk.Menu_Shell:
          See ``Package Gtk.Menu_Item''.
Gtk.Misc:
          See ``Subprograms''.
Gtk.Notebook:
          See ``Subprograms''.
Gtk.Object:
          See ``Subprograms''.
Gtk.Option_Menu:
          See ``Subprograms''.
Gtk.Packer:
          See ``Subprograms''.
Gtk.Paned:
          See ``Subprograms''.
Gtk.Plug:
          See ``Subprograms''.
Gtk.Radio_Button:
          See ``Subprograms''.
Gtk.Scrolled_Window:
          See ``Example''.
Gtk.Selection:
          See ``Subprograms''.
Gtk.Signal:
          See ``Subprograms''.
Gtk.Socket:
          See ``Package Gtk.Signal''.
Gtk.Spin_Button:
          See ``Example''.
Gtk.Status_Bar:
          See ``Subprograms''.
Gtk.Table:
          See ``Subprograms''.
Gtk.Text:
          See ``Subprograms''.
Gtk.Toggle_Button:
          See ``Subprograms''.
Gtk.Toolbar:
          See ``Example''.
Gtk.Tooltips:
          See ``Package Gtk.Toolbar''.
Gtk.Tree:
          See ``Example''.
Gtk.Type_Conversion:
          See ``Subprograms''.
Gtk.Type_Conversion_Hooks:
          See ``Subprograms''.
Gtk.Vbutton_Box:
          See ``Subprograms''.
Gtk.Widget:
          See ``Subprograms''.
Gtk.Window:
          See ``Subprograms''.
Gtkada:
          See ``Subprograms''.
Gtkada.Canvas:
          See ``Package Gtkada''.
Gtkada.Dialogs:
          See ``Subprograms''.
Gtkada.File_Selection:
          See ``Subprograms''.
Gtkada.Handlers:
          See ``Subprograms''.
Gtkada.Intl:
          See ``Package Gtkada.Handlers''.
Gtkada.Pixmaps:
          See ``Subprograms''.
Gtkada.Types:
          See ``Subprograms''.
Interactive_Canvas:
          See ``Example''.
Table of Contents
*****************


GtkAda Reference Manual

Package Glib
  Types
  Subprograms
    Conversion services
    Quarks

Package Glib.GSlist

Package Glib.Glist
  Types
  Subprograms
  Example

Package Glib.Module
  Types
  Subprograms

Package Glib.XML
  Types
  Subprograms

Package Gtkada

Package Gtkada.Canvas
  Signals
  Types
  Subprograms
    Creating a canvas
    Links
    Selection
    Items manipulation
    Buffered items

Package Gtkada.Dialogs
  Types
  Subprograms

Package Gtkada.File`_'Selection
  Subprograms

Package Gtkada.Handlers

Package Gtkada.Intl
  Subprograms

Package Gtkada.Pixmaps
  Subprograms

Package Gtkada.Types
  Subprograms
    Handling of arrays of Strings

Package Gdk
  Types

Package Gdk.Art

Package Gdk.Art.Pixbuf
  Types

Package Gdk.Bitmap
  Types
  Subprograms

Package Gdk.Color
  Types
  Subprograms
    Creating and Destroying colors
    Setting/Getting the fields of Gdk_Color
  Example

Package Gdk.Color`_'Context

Package Gdk.Cursor
  Types
  Subprograms

Package Gdk.Drawable
  Types
  Subprograms
  Example

Package Gdk.Event
  Types
  Subprograms
    Access to fields of the event
    Modifying the fields of an event
    General functions

Package Gdk.Font
  Types
  Subprograms

Package Gdk.GC
  Types
  Subprograms
    Gdk_GC
    Gdk_Color_Values

Package Gdk.Main
  Subprograms

Package Gdk.Pixbuf
  Types
  Subprograms
    Accessing the fields
    Reference counting
    Libart interface
    Creating
    Rendering
    Scaling

Package Gdk.Pixmap
  Types
  Subprograms

Package Gdk.Rgb
  Types
  Subprograms
    Color manipulation
    Colormap manipulation
    Drawing Images

Package Gdk.Threads
  Subprograms

Package Glade
  Subprograms

Package Glade.XML
  Types
  Subprograms

Package Glade_XML

Package Gtk
  Types
  Subprograms
    Interfacing with C

Package Gtk.Accel`_'Label
  Widget Hierarchy
  Subprograms
  Example

Package Gtk.Adjustment
  Widget Hierarchy
  Signals
  Subprograms
    Read functions
    Write functions
    Misc functions
    Signals emission
  Example

Package Gtk.Alignment
  Widget Hierarchy
  Subprograms

Package Gtk.Arguments

Package Gtk.Arrow
  Widget Hierarchy
  Subprograms

Package Gtk.Aspect`_'Frame
  Widget Hierarchy
  Subprograms

Package Gtk.Bin
  Widget Hierarchy
  Subprograms

Package Gtk.Box
  Widget Hierarchy
  Subprograms

Package Gtk.Button
  Widget Hierarchy
  Signals
  Subprograms
    Signals emission

Package Gtk.Button`_'Box
  Widget Hierarchy
  Subprograms

Package Gtk.Calendar
  Widget Hierarchy
  Signals
  Types
  Subprograms

Package Gtk.Check`_'Button
  Widget Hierarchy
  Subprograms

Package Gtk.Check`_'Menu`_'Item
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Clist
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Creating a list and setting the attributes
    Visual aspects
    Modifying the contents
    Columns
    Rows
    Cells
    Reordering the list
    Row_Data
  Example

Package Gtk.Color`_'Selection
  Widget Hierarchy
  Signals
  Types
  Subprograms

Package Gtk.Color`_'Selection`_'Dialog
  Widget Hierarchy
  Subprograms
    Functions to get the fields of the dialog

Package Gtk.Combo
  Widget Hierarchy
  Subprograms
  Example

Package Gtk.Container
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Foreach functions
    Widget-level methods
    Signals emission

Package Gtk.Ctree
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Creation, insertion, deletion
    Tree, Node and Row basic manipulation
    Querying / finding tree information
    Tree signals: move, expand, collapse, (un)select
    Analogs of Gtk_Clist functions
    Ctree specific functions
    Tree sorting functions
    Row_Data handling

Package Gtk.Curve
  Widget Hierarchy
  Signals
  Types
  Subprograms

Package Gtk.Data
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Dialog
  Widget Hierarchy
  Subprograms

Package Gtk.Dnd
  Signals
  Types
  Subprograms
    Drag_Context
    To be moved to Gdk.Dnd
    Setting up a widget as a destination
    Setting up a widget as a source
    The drag-and-drop operation
    Icons

Package Gtk.Drawing`_'Area
  Widget Hierarchy
  Subprograms

Package Gtk.Editable
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Event`_'Box
  Widget Hierarchy
  Subprograms

Package Gtk.Extra

Package Gtk.Extra.Border`_'Combo
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Extra.Check`_'Item
  Widget Hierarchy
  Subprograms

Package Gtk.Extra.Color`_'Combo
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Extra.Combo`_'Box
  Widget Hierarchy
  Subprograms

Package Gtk.Extra.Font`_'Combo
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Extra.Item`_'Entry
  Widget Hierarchy
  Types
  Subprograms

Package Gtk.Extra.Plot
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Creating a plot
    Coordinates and sizes
    Axis
    Grids
    Legends
    Line
    Text
    Datasets
    Flags

Package Gtk.Extra.Plot`_'3D
  Widget Hierarchy
  Types
  Subprograms
    Axis
    Grid
    Rotating
    Planes
    Corners
    Misc

Package Gtk.Extra.Plot`_'Bar
  Widget Hierarchy
  Subprograms

Package Gtk.Extra.Plot`_'Box
  Widget Hierarchy
  Subprograms

Package Gtk.Extra.Plot`_'Canvas
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Creating and manipulating the canvas
    Canvas items
    Custom children
    Flags

Package Gtk.Extra.Plot`_'Data
  Widget Hierarchy
  Types
  Subprograms
    Creating a Data set
    Drawing a set
    Manipulating values
    Labels
    Symbols and Connectors
    Legends
    Gradients
    User Data

Package Gtk.Extra.Plot`_'Polar
  Widget Hierarchy
  Subprograms

Package Gtk.Extra.Plot`_'Ps
  Types
  Subprograms

Package Gtk.Extra.Plot`_'Surface
  Widget Hierarchy
  Subprograms
    Lightning model

Package Gtk.Extra.PsFont
  Types
  Subprograms

Package Gtk.Extra.Sheet
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Creation and modification
    Selection and Clipping
    Columns
    Rows
    Range
    Cells
    Children
    Links / User_Data
    Flags

Package Gtk.File`_'Selection
  Widget Hierarchy
  Subprograms
    Operations on the dialog
    Getting the fields

Package Gtk.Fixed
  Widget Hierarchy
  Subprograms

Package Gtk.Font`_'Selection
  Widget Hierarchy
  Types
  Subprograms
    Font_Selection functions
    Font_Selection_Dialog functions

Package Gtk.Font_Selection_Dialog

Package Gtk.Frame
  Widget Hierarchy
  Subprograms

Package Gtk.GEntry
  Widget Hierarchy
  Subprograms

Package Gtk.GLArea
  Widget Hierarchy
  Types
  Subprograms

Package Gtk.Gamma`_'Curve
  Widget Hierarchy
  Subprograms

Package Gtk.Handle`_'Box
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Handlers
  Example

Package Gtk.Hbutton`_'Box
  Widget Hierarchy
  Subprograms

Package Gtk.Image
  Widget Hierarchy
  Subprograms

Package Gtk.Item

Package Gtk.Label
  Widget Hierarchy
  Subprograms

Package Gtk.Layout
  Widget Hierarchy
  Signals
  Subprograms

Package Gtk.Main
  Types
  Subprograms
    Initialization and exit routines
    Init and Quit functions
    The main loop
    Grab functions
    Idle
    Timeout

Package Gtk.Marshallers

Package Gtk.Menu
  Widget Hierarchy
  Types
  Subprograms
    Creating a menu
    Displaying a menu
    Modifying the accelerators
    Attaching a menu to a widget
  Example

Package Gtk.Menu`_'Bar
  Widget Hierarchy
  Subprograms

Package Gtk.Menu_Item

Package Gtk.Menu`_'Shell
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Signals emission

Package Gtk.Misc
  Widget Hierarchy
  Subprograms

Package Gtk.Notebook
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Creating a notebook and inserting pages
    Modifying and getting the current page
    Style and visual aspect
    Popup Menu
    Page properties
    List of pages

Package Gtk.Object
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Flags
    Creating new widgets

Package Gtk.Option`_'Menu
  Widget Hierarchy
  Subprograms

Package Gtk.Packer
  Widget Hierarchy
  Types
  Subprograms
    Modifying the Packer
    Accessing children

Package Gtk.Paned
  Widget Hierarchy
  Subprograms

Package Gtk.Plug
  Widget Hierarchy
  Subprograms

Package Gtk.Radio`_'Button
  Widget Hierarchy
  Subprograms
  Example

Package Gtk.Scrolled`_'Window
  Widget Hierarchy
  Types
  Subprograms

Package Gtk.Selection
  Signals
  Types
  Subprograms
    Target_List
    Selection_Data
    Manipulating the selection

Package Gtk.Signal

Package Gtk.Socket
  Widget Hierarchy
  Subprograms
  Example

Package Gtk.Spin`_'Button
  Widget Hierarchy
  Subprograms

Package Gtk.Status`_'Bar
  Widget Hierarchy
  Signals
  Types
  Subprograms

Package Gtk.Table
  Widget Hierarchy
  Subprograms

Package Gtk.Text
  Widget Hierarchy
  Subprograms

Package Gtk.Toggle`_'Button
  Widget Hierarchy
  Signals
  Subprograms
    Signals emission
  Example

Package Gtk.Toolbar

Package Gtk.Tooltips
  Widget Hierarchy
  Subprograms
  Example

Package Gtk.Tree
  Widget Hierarchy
  Subprograms
    Creation, insertion, deletion

Package Gtk.Type`_'Conversion
  Subprograms

Package Gtk.Type`_'Conversion`_'Hooks
  Types
  Subprograms

Package Gtk.Vbutton`_'Box
  Widget Hierarchy
  Subprograms

Package Gtk.Widget
  Widget Hierarchy
  Signals
  Types
  Subprograms
    Widgets' life cycle
    Drawing a widget
    Size and position
    Accelerators
    Events and signals
    Colors and colormaps
    Styles
    Widgets' tree
    Misc functions
    Flags

Package Gtk.Window
  Widget Hierarchy
  Signals
  Subprograms
  Example

Package Interactive_Canvas

Index


