This is gtkada_rm.info, produced by makeinfo version 4.0 from
gtkada_rm.texi.


File: gtkada_rm.info,  Node: Package_Gtk.Color_Selection,  Next: Package_Gtk.Color_Selection_Dialog,  Prev: Package_Gtk.Clist,  Up: Top

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.

* Menu:

* Gtk.Color_Selection Widget Hierarchy::
* Gtk.Color_Selection Signals::
* Gtk.Color_Selection Types::
* Gtk.Color_Selection Subprograms::


File: gtkada_rm.info,  Node: Gtk.Color_Selection Widget Hierarchy,  Next: Gtk.Color_Selection Signals,  Up: Package_Gtk.Color_Selection

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::)


File: gtkada_rm.info,  Node: Gtk.Color_Selection Signals,  Next: Gtk.Color_Selection Types,  Prev: Gtk.Color_Selection Widget Hierarchy,  Up: 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



File: gtkada_rm.info,  Node: Gtk.Color_Selection Types,  Next: Gtk.Color_Selection Subprograms,  Prev: Gtk.Color_Selection Signals,  Up: Package_Gtk.Color_Selection

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.

File: gtkada_rm.info,  Node: Gtk.Color_Selection Subprograms,  Prev: Gtk.Color_Selection Types,  Up: Package_Gtk.Color_Selection

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.

File: gtkada_rm.info,  Node: Package_Gtk.Color_Selection_Dialog,  Next: Package_Gtk.Combo,  Prev: Package_Gtk.Color_Selection,  Up: Top

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.

* Menu:

* Gtk.Color_Selection_Dialog Widget Hierarchy::
* Gtk.Color_Selection_Dialog Subprograms::


File: gtkada_rm.info,  Node: Gtk.Color_Selection_Dialog Widget Hierarchy,  Next: Gtk.Color_Selection_Dialog Subprograms,  Up: Package_Gtk.Color_Selection_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_Color_Selection_Dialog (*note Package_Gtk.Color_Selection_Dialog::)


File: gtkada_rm.info,  Node: Gtk.Color_Selection_Dialog Subprograms,  Prev: Gtk.Color_Selection_Dialog Widget Hierarchy,  Up: 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.

File: gtkada_rm.info,  Node: Package_Gtk.Combo,  Next: Package_Gtk.Container,  Prev: Package_Gtk.Color_Selection_Dialog,  Up: Top

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.

* Menu:

* Gtk.Combo Widget Hierarchy::
* Gtk.Combo Subprograms::
* Gtk.Combo Example::


File: gtkada_rm.info,  Node: Gtk.Combo Widget Hierarchy,  Next: Gtk.Combo Subprograms,  Up: Package_Gtk.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    (*note Package_Gtk.Combo::)


File: gtkada_rm.info,  Node: Gtk.Combo Subprograms,  Next: Gtk.Combo Example,  Prev: Gtk.Combo Widget Hierarchy,  Up: 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.

File: gtkada_rm.info,  Node: Gtk.Combo Example,  Prev: Gtk.Combo Subprograms,  Up: Package_Gtk.Combo

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);


File: gtkada_rm.info,  Node: Package_Gtk.Container,  Next: Package_Gtk.Ctree,  Prev: Package_Gtk.Combo,  Up: Top

Package Gtk.Container
*********************

Base class for widgets that have children.

* Menu:

* Gtk.Container Widget Hierarchy::
* Gtk.Container Signals::
* Gtk.Container Types::
* Gtk.Container Subprograms::


File: gtkada_rm.info,  Node: Gtk.Container Widget Hierarchy,  Next: Gtk.Container Signals,  Up: Package_Gtk.Container

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

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


File: gtkada_rm.info,  Node: Gtk.Container Signals,  Next: Gtk.Container Types,  Prev: Gtk.Container Widget Hierarchy,  Up: 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.



File: gtkada_rm.info,  Node: Gtk.Container Types,  Next: Gtk.Container Subprograms,  Prev: Gtk.Container Signals,  Up: Package_Gtk.Container

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.

File: gtkada_rm.info,  Node: Gtk.Container Subprograms,  Prev: Gtk.Container Types,  Up: Package_Gtk.Container

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.

File: gtkada_rm.info,  Node: Package_Gtk.Ctree,  Next: Package_Gtk.Curve,  Prev: Package_Gtk.Container,  Up: Top

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.

* Menu:

* Gtk.Ctree Widget Hierarchy::
* Gtk.Ctree Signals::
* Gtk.Ctree Types::
* Gtk.Ctree Subprograms::


File: gtkada_rm.info,  Node: Gtk.Ctree Widget Hierarchy,  Next: Gtk.Ctree Signals,  Up: Package_Gtk.Ctree

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::)


File: gtkada_rm.info,  Node: Gtk.Ctree Signals,  Next: Gtk.Ctree Types,  Prev: Gtk.Ctree Widget Hierarchy,  Up: 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.



File: gtkada_rm.info,  Node: Gtk.Ctree Types,  Next: Gtk.Ctree Subprograms,  Prev: Gtk.Ctree Signals,  Up: Package_Gtk.Ctree

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.

File: gtkada_rm.info,  Node: Gtk.Ctree Subprograms,  Prev: Gtk.Ctree Types,  Up: Package_Gtk.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.
