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

INFO-DIR-SECTION User Interface Toolkit
START-INFO-DIR-ENTRY
* GtkAda_Rm: (gtkada_rm).           Ada95 graphical tookit based on GTK+ (Reference Manual)
END-INFO-DIR-ENTRY


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

Example
=======

      Adding a new line in the model:
     
      declare
         Iter  : Gtk_Text_Iter;
         Value : Glib.Values.GValue;
      begin
         Append (Model, Iter, Null_Iter);
     
         --  First method:
     
         Init (Value, GType_String);
         Set_String (Value, "foo");
         Set_Value (Model, Iter, 0, Value);
         Unref (Value);
     
         --  Second method:
     
         Set (Model, Iter, 0, "foo");
      end;
     
     
     
      Defining your own Set function for your model: This can be done by directly
      importing the C function, with the appropriate number of parameters.
      Remember that you are passing data directly to C, thus you need to end
      strings with ASCII.NUL
     
      procedure My_Set
         (Tree_Store : access Gtk_Tree_Store_Record'Class;
          Iter       : Gtk.Tree_Model.Gtk_Tree_Iter;
          Column1 : Gint; Value1 : UTF8_String;
          Column2 : Gint; Value2 : Boolean)
      is
          procedure Internal
            (Tree : System.Address;
             Iter : Gtk.Tree_Model.Gtk_Tree_Iter;
             Column1 : Gint; Value1 : UTF8_String;
             Column2 : Gint; Value2 : Gint;
             Final : Gint := -1);
          pragma Import (C, Internal, "gtk_tree_store_set");
       begin
          Internal
            (Get_Object (Tree_Store), Iter,
             Column1, Value1 & ASCII.NUL, Column2, Boolean'Pos (Value2));
       end Set;


File: gtkada_rm.info,  Node: Package_Gtk.Tree_View,  Next: Package_Gtk.Tree_View_Column,  Prev: Package_Gtk.Tree_Store,  Up: Top

Package Gtk.Tree`_'View
***********************

See extended documentation in Gtk.Tree_View_Column and Gtk.Tree_Store.

* Menu:

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


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

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

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Tree_View   (*note Package_Gtk.Tree_View::)


File: gtkada_rm.info,  Node: Gtk.Tree_View Signals,  Next: Gtk.Tree_View Types,  Prev: Gtk.Tree_View Widget Hierarchy,  Up: Package_Gtk.Tree_View

Signals
=======

   * "columns_changed"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class);
   * "expand_collapse_cursor_row"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class;
     Logical : Boolean;
     Expand : Boolean;
     Open_All : Boolean);
   * "move_cursor"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class;
     Step : Gtk_Movement_Step;
     Count : Gint);
   * "row_activated"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class;
     Path : Gtk.Tree_Model.Gtk_Tree_Path;
     Column : Gtk.Tree_View_Column.Gtk_Tree_View_Column);
   * "row_collapsed"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class;
     Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class;
     Path : Gtk.Tree_Model.Gtk_Tree_Path);
   * "row_expanded"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class;
     Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class;
     Path : Gtk.Tree_Model.Gtk_Tree_Path);
   * "select_all"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class);
   * "select_cursor_parent"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class);
   * "select_cursor_row"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class;
     Start_Editing : Boolean);
   * "set_scroll_adjustments"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class;
     Hadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class;
     Vadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class);
   * "start_interactive_search"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class);
   * "test_collapse_row"

     function Handler (Widget : access Gtk_Tree_View_Record'Class;
     Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class;
     Path : Gtk.Tree_Model.Gtk_Tree_Path)
     return Gboolean;
   * "test_expand_row"

     function Handler (Widget : access Gtk_Tree_View_Record'Class;
     Iter : access Gtk.Tree_Iter.Gtk_Tree_Iter_Record'Class;
     Path : Gtk.Tree_Model.Gtk_Tree_Path)
     return Gboolean;
   * "toggle_cursor_row"

     procedure Handler (Widget : access Gtk_Tree_View_Record'Class);


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

Types
=====

type Gtk_Tree_View_Drop_Position is
         (Tree_View_Drop_Before,
          Tree_View_Drop_After,
          Tree_View_Drop_Into_Or_Before,
          Tree_View_Drop_Into_Or_After);


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

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

procedure Gtk_New
       (Widget             : out    Gtk_Tree_View);

function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with this widget.
procedure Gtk_New
       (Widget             : out    Gtk_Tree_View;
        Model              : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class);

function Get_Model
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gtk.Tree_Model.Gtk_Tree_Model;

Returns the model the the Gtk_Tree_View is based on.  Returns Null if
the model is unset.
procedure Set_Model
       (Tree_View          : access Gtk_Tree_View_Record;
        Model              :        Gtk.Tree_Model.Gtk_Tree_Model);

Sets the model for a Gtk_Tree_View.  If the Tree_View already has a
model set, it will remove it before setting the new model.   If Model
is Null, then it will unset the old model.
function Get_Selection
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gtk.Tree_Selection.Gtk_Tree_Selection;

Gets the Gtk_Tree_Selection associated with Tree_View.
function Get_Hadjustment
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Sets the Gtk_Adjustment for the current horizontal aspect.
procedure Set_Hadjustment
       (Tree_View          : access Gtk_Tree_View_Record;
        Adjustment         : access Gtk.Adjustment.Gtk_Adjustment_Record'Class);

Sets the Gtk_Adjustment for the current horizontal aspect.
function Get_Vadjustment
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Gets the Gtk_Adjustment currently being used for the vertical aspect.
procedure Set_Vadjustment
       (Tree_View          : access Gtk_Tree_View_Record;
        Adjustment         : access Gtk.Adjustment.Gtk_Adjustment_Record'Class);

Sets the Gtk_Adjustment for the current vertical aspect.
Column and header operations
----------------------------

function Get_Headers_Visible
       (Tree_View          : access Gtk_Tree_View_Record)
        return Boolean;

Returns True if the headers on the Tree_View are visible.
procedure Set_Headers_Visible
       (Tree_View          : access Gtk_Tree_View_Record;
        Headers_Visible    :        Boolean);

Sets the the visibility state of the headers.
procedure Columns_Autosize
       (Tree_View          : access Gtk_Tree_View_Record);

Resizes all columns to their optimal width.
procedure Set_Headers_Clickable
       (Tree_View          : access Gtk_Tree_View_Record;
        Setting            :        Boolean);

Allow the column title buttons to be clicked.
procedure Set_Rules_Hint
       (Tree_View          : access Gtk_Tree_View_Record;
        Setting            :        Boolean);

This function tells GtkAda that the user interface for your
application requires users to read across tree rows and associate
cells with one another. By default, GtkAda will then render the tree
with alternating row colors. Do *not* use it just because you prefer the
appearance of the ruled tree; that's a question for the theme. Some
themes will draw tree rows in alternating colors even when rules are
turned off, and users who prefer that appearance all the time can choose
those themes. You should call this function only as a *semantic*  hint
to the theme engine that your tree makes alternating colors  useful
from a functional standpoint (since it has lots of columns,  generally).
function Get_Rules_Hint
       (Tree_View          : access Gtk_Tree_View_Record)
        return Boolean;

Get the setting set by Set_Rules_Hint.
Public Column functions
-----------------------

function Append_Column
       (Tree_View          : access Gtk_Tree_View_Record;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column)
        return Gint;

Append Column to the list of columns.
function Remove_Column
       (Tree_View          : access Gtk_Tree_View_Record;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column)
        return Gint;

Remove Column from Tree_View.
Return value: The number of columns in Tree_View after removing.
function Insert_Column
       (Tree_View          : access Gtk_Tree_View_Record;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column;
        Position           :        Gint := -1)
        return Gint;

Insert the Column into the Tree_View at Position.
If Position is -1, then the column is inserted at the end.   Return the
number of columns in Tree_View after insertion.
function Get_Column
       (Tree_View          : access Gtk_Tree_View_Record;
        N                  :        Gint)
        return Gtk.Tree_View_Column.Gtk_Tree_View_Column;

Gets the Gtk_Tree_ViewColumn at the given position in the Tree_View.
function Get_Columns
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gtk.Tree_View_Column.Column_List.Glist;

Return a list of all the Gtk_Tree_View_Column s currently in Tree_View.
The returned list must be freed with g_list_free ().
procedure Move_Column_After
       (Tree_View          : access Gtk_Tree_View_Record;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column;
        Base_Column        :        Gtk.Tree_View_Column.Gtk_Tree_View_Column);

Move Column to be after to Base_Column.  If Base_Column is Null, then
Column is placed in the first position.
procedure Set_Expander_Column
       (Tree_View          : access Gtk_Tree_View_Record;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column);

Set the column to draw the expander arrow at. It must be in Tree_View.
If Column is Null, then the expander arrow is fixed at the first column.
function Get_Expander_Column
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gtk.Tree_View_Column.Gtk_Tree_View_Column;

Return the column that is the current expander column.
This column has the expander arrow drawn next to it.
procedure Scroll_To_Point
       (Tree_View          : access Gtk_Tree_View_Record;
        Tree_X             :        Gint;
        Tree_Y             :        Gint);

Scroll the tree view such that the top-left corner of the visible
area is Tree_X, Tree_Y, where Tree_X and Tree_Y are specified  in tree
window coordinates. The Tree_View must be realized before  this
function is called. If it isn't, you probably want to be  using
Scroll_To_Cell.
procedure Scroll_To_Cell
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column;
        Use_Align          :        Boolean;
        Row_Align          :        Gfloat;
        Col_Align          :        Gfloat);

Move the alignments of Tree_View to the position specified by Column and
Path. If Column is Null, then no horizontal scrolling occurs. Likewise,
if Path is Null no vertical scrolling occurs. Row_Align determines
where  the row is placed, and Col_align determines where Column is
placed. Both  are expected to be between 0.0 and 1.0. 0.0 means
left/top alignment,  1.0 means right/bottom alignment, 0.5 means center.
If Use_Align is False, then the alignment arguments are ignored, and
the  tree does the minimum amount of work to scroll the cell onto the
screen.
procedure Row_Activated
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column);

Activate the cell determined by Path and Column.
procedure Expand_All
       (Tree_View          : access Gtk_Tree_View_Record);

Recursively expand all nodes in the Tree_View.
procedure Collapse_All
       (Tree_View          : access Gtk_Tree_View_Record);

Recursively collapse all visible, expanded nodes in Tree_View.
function Expand_Row
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path;
        Open_All           :        Boolean)
        return Boolean;

Open the row so its children are visible
Return True if the row existed and had children
function Collapse_Row
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path)
        return Boolean;

Collapse a row (hides its child rows, if they exist.)
function Row_Expanded
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path)
        return Boolean;

Return True if the node pointed to by Path is expanded in Tree_View.
procedure Set_Reorderable
       (Tree_View          : access Gtk_Tree_View_Record;
        Reorderable        :        Boolean);

This function is a convenience function to allow you to reorder models
that support the Gtk_Drag_Source_Iface and the Gtk_Drag_Dest_Iface. Both
Gtk_Tree_Store and Gtk_List_Store support these.   If Reorderable is
True, then the user can reorder the model by dragging  and dropping
columns.  The developer can listen to these changes by  connecting to
the model's signals.   This function does not give you any degree of
control over the order
   * any reorderering is allowed. If more control is needed, you should
     probably handle drag and drop manually.

function Get_Reorderable
       (Tree_View          : access Gtk_Tree_View_Record)
        return Boolean;

Retrieve whether the user can reorder the tree via drag-and-drop.
See Set_Reorderable.
procedure Set_Cursor
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path;
        Focus_Column       :        Gtk.Tree_View_Column.Gtk_Tree_View_Column;
        Start_Editing      :        Boolean);

Sets the current keyboard focus to be at Path, and selects it.  This is
useful when you want to focus the user's attention on a particular row.
If Column is not Null, then focus is given to that column.
Additionally, if Column is specified, and Start_Editing is True, then
editing should be started in the specified cell.   Keyboard focus is
given to the widget after this is called.   Please note that editing
can only happen when the widget is realized.
procedure Get_Cursor
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               : out    Gtk.Tree_Model.Gtk_Tree_Path;
        Focus_Column       : out    Gtk.Tree_View_Column.Gtk_Tree_View_Column);

Fills in Path and Focus_Column with the current path and focus column.
If the cursor isn't currently set, then *path will be Null. If no column
currently has focus, then *focus_column will be Null.
function Get_Bin_Window
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gdk.Window.Gdk_Window;

Return the window that Tree_View renders to.
This is used primarily to compare to Get_Window (Event) to confirm that
the event on Tree_View is on the right window.
procedure Get_Path_At_Pos
       (Tree_View          : access Gtk_Tree_View_Record;
        X                  :        Gint;
        Y                  :        Gint;
        Path               : out    Gtk.Tree_Model.Gtk_Tree_Path;
        Column             : out    Gtk.Tree_View_Column.Gtk_Tree_View_Column;
        Cell_X             : out    Gint;
        Cell_Y             : out    Gint;
        Row_Found          : out    Boolean);

Find the path at the point (X, Y) relative to Window.
If Window is null, then the point is found relative to the widget
coordinates. This function is expected to be called after an event.
It is primarily for things like popup menus. Path will be filled  with
the Gtk_Tree_Path at that point. It should be freed with
Tree_Path_Free. Column will be filled with the column at that point.
Cell_X and Cell_Y return the coordinates relative to the cell background
(i.e. the background_area passed to gtk_cell_renderer_render()).
This function only works if Tree_View is realized.   Row_Found is set
to True if a row exists at that coordinate.
procedure Get_Cell_Area
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column;
        Rect               : out    Gdk.Rectangle.Gdk_Rectangle);

Fills the bounding rectangle in tree window coordinates for the cell at
the row specified by Path and the column specified by Column. If Path is
Null, or points to a path not currently displayed, the Y and Height
fields of the rectangle will be filled with 0. If Column is Null,  the
X and Width fields will be filled with 0.   The sum of all cell rects
does not cover the entire tree;  there are extra pixels in between
rows, for example. The  returned rectangle is equivalent to the
Cell_Area passed to  gtk_cell_renderer_render().  This function is only
valid if Tree_View is  realized.
procedure Get_Background_Area
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path;
        Column             :        Gtk.Tree_View_Column.Gtk_Tree_View_Column;
        Rect               :        Gdk.Rectangle.Gdk_Rectangle);

Fills the bounding rectangle in tree window coordinates for the cell
at the row specified by Path and the column specified by Column.  If
Path is Null, or points to a node not found in the tree, the Y and
Height fields of the rectangle will be filled with 0. If Column is Null,
the X and Width fields will be filled with 0.   The returned rectangle
is equivalent to the Background_Area passed to
Gtk.Cell_Renderer.Render.  These background areas tile to cover the
entire tree window (except for the area used for  header buttons).
Contrast with the cell_area, returned by
gtk_tree_view_get_cell_area(), which returns only the cell itself,
excluding surrounding borders and the tree expander area.
procedure Get_Visible_Rect
       (Tree_View          : access Gtk_Tree_View_Record;
        Visible_Rect       : out    Gdk.Rectangle.Gdk_Rectangle);

Fills Visible_Rect with the currently-visible region of the
buffer, in tree coordinates. Convert to widget coordinates with
gtk_tree_view_tree_to_widget_coords(). Tree coordinates start at  0,0
for row 0 of the tree, and cover the entire scrollable area of  the
tree.
procedure Widget_To_Tree_Coords
       (Tree_View          : access Gtk_Tree_View_Record;
        Wx                 :        Gint;
        Wy                 :        Gint;
        Tx                 : out    Gint;
        Ty                 : out    Gint);

Converts widget coordinates to coordinates for the
tree window (the full scrollable area of the tree).
procedure Tree_To_Widget_Coords
       (Tree_View          : access Gtk_Tree_View_Record;
        Tx                 :        Gint;
        Ty                 :        Gint;
        Wx                 : out    Gint;
        Wy                 : out    Gint);

Converts tree coordinates (coordinates in full scrollable area of
the tree) to widget coordinates.
procedure Unset_Rows_Drag_Source
       (Tree_View          : access Gtk_Tree_View_Record);

procedure Unset_Rows_Drag_Dest
       (Tree_View          : access Gtk_Tree_View_Record);

function Create_Row_Drag_Icon
       (Tree_View          : access Gtk_Tree_View_Record;
        Path               :        Gtk.Tree_Model.Gtk_Tree_Path)
        return Gdk.Pixmap.Gdk_Pixmap;

procedure Set_Enable_Search
       (Tree_View          : access Gtk_Tree_View_Record;
        Enable_Search      :        Boolean);

function Get_Enable_Search
       (Tree_View          : access Gtk_Tree_View_Record)
        return Boolean;

function Get_Search_Column
       (Tree_View          : access Gtk_Tree_View_Record)
        return Gint;

procedure Set_Search_Column
       (Tree_View          : access Gtk_Tree_View_Record;
        Column             :        Gint);


File: gtkada_rm.info,  Node: Package_Gtk.Tree_View_Column,  Next: Package_Gtk.Type_Conversion,  Prev: Package_Gtk.Tree_View,  Up: Top

Package Gtk.Tree`_'View`_'Column
********************************

General organization of the tree_view widgets:

   ______________Tree_View___________________________________   |
_________________________     ________________________|   |
|_____Tree_View_Column1__|    |___Tree_View_Column2 __||   |  |
              |    |                       ||   |  |  ----------
--------||    |                       ||   |  |  |Renderer1| |render2
||    |                       ||   |  |  |         | |        ||    |
                   ||   |  |  |         | |        ||    |
         ||   |  |  |         | |        ||    |
||   |  |  |--------| |-------||    |                       ||   |
|________________________|    |_______________________||
|_________________________________________________________|

   A tree view can contain multiple physical columns on the screen.
These  columns can have a button at the top, typically to force an
ordering  of the tree). They can also be reorganized interactively by
the user.

   Each physical column can display several information, like buttons,
strings, ... Each of this display comes from a cell_renderer, that
displays  some data it reads from the model associated with the
tree_view.

   The renderers are then divided into lines, which are typically
pointed to  by iterators (Gtk_Tree_Iter).

* Menu:

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


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

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

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Tree_View_Column  (*note Package_Gtk.Tree_View_Column::)


File: gtkada_rm.info,  Node: Gtk.Tree_View_Column Signals,  Next: Gtk.Tree_View_Column Types,  Prev: Gtk.Tree_View_Column Widget Hierarchy,  Up: Package_Gtk.Tree_View_Column

Signals
=======

   * "clicked"

     procedure Handler (Widget : access
     Gtk_Tree_View_Column_Record'Class);


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

Types
=====

type Cell_Data_Func is access procedure


type Data_Type is
         (<>);

type Gtk_Tree_View_Column_Sizing is
         (Tree_View_Column_Grow_Only,
          Tree_View_Column_Autosize,
          Tree_View_Column_Fixed);


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

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

procedure Convert;


procedure Gtk_New
       (Widget             : out    Gtk_Tree_View_Column);

Create a new Gtk_Tree_View_Column.
function Get_Type              return Glib.GType;


Return the internal value associated with this widget.
Visual representation of the data
---------------------------------

All the cells in a column have a similar graphical representation. This
could be either a simple text, an editable text, a toggle button, ...
This visual representation is independent from the actual data to
represent. For instance, the same data from the model could be used for
two different columns, once for a text and once for a button.

   The visual representation is specified through a "renderer". See the
various Gtk.Cell_Renderer* packages for more information on the
available renderers.

   Note that the same renderer can be used for multiple columns, even
though its properties can be different each time. This means that for
instance you can instantiate only one Gtk_Cell_Renderer_Text, and use it
for all the columns that need to display text.

procedure Pack_Start
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Cell               : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
        Expand             :        Boolean);

Add a renderer to the Tree_Column.
Multiple renderers can be put in a specific column, and each of them can
be associated with different data from the model. This provides a very
powerful way to display different data in the same column.
procedure Pack_End
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Cell               : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
        Expand             :        Boolean);

Same as the above. See the description of Pack_Start and Pack_End in
Gtk.Box for the precise difference between the two
procedure Clear
       (Tree_Column        : access Gtk_Tree_View_Column_Record);

Remove all the renderers set in the column.
The column will always be empty until you put some new renderers.
function Get_Cell_Renderers
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gtk.Cell_Renderer.Cell_Renderer_List.Glist;

Return the list of cell renderers set in the column
Specifying the data to display
------------------------------

The data to display in a column is always read from the model associated
with the tree. In some cases (like if you are using the Gtk_Tree_Store
model), this means that is has to be physically stored in a data
structure. However, if you define your own models, you could also
compute it on the fly.

   For instance, if you have a database that contains some distance and
time information, and you want to display the speed in a tree view: if
you are using a Gtk_Tree_Store model, you have to create a third column
in the model to store the string, and have a renderer point to that
third column.

   However, if you are using your own model, it is conceivable that the
speed is computed on the fly from the distance and time.

   The subprograms below use two or three parameters to precisely
identify  the part of the tree they impact: the column, the renderer in
the  column, and in some cases the specific line.

   A renderer is always associated with a column in the model (even if
that  is a virtual column not associated with physical data). This is
done  through the Add_Attribute subprogram. This will read the data
from the  model. The type of the data read depends on the type of the
column in  the model.   The type of data that Add_Attribute excepts to
find in the column is  documented in the packages for each of the
renderer.

procedure Add_Attribute
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Cell_Renderer      : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
        Attribute          :        String;
        Column             :        Gint);

Add an attribute mapping to the list in Tree_Column.
The Column is the column of the model to get a value from, and the
Attribute is the parameter on Cell_Renderer to be set from the value. So
for example if column 2 of the model contains strings, you could have
the "text" attribute of a Gtk_Cell_Renderer_Text get its values from
column 2.

   For a list of properties available for each Cell_Renderer, please
refer to the corresponding package specifications.

   See also the function Set_Cell_Data_Func for another way to query the
data to display in the tree.
procedure Set_Cell_Data_Func
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Cell               : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
        Func               :        Cell_Data_Func);

Set the function to use for the column.
This function is used instead of the standard attributes mapping for
setting the column value, and should set the value of Tree_Column's cell
renderer as appropriate.   Func may be null to remove an older one.
It should be used when values from the model should be computed from
application-specific data structures rather than stored in the model.
procedure Set_Cell_Data_Func
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Cell               : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class;
        Func               :        Cell_Data_Func;
        Data               :        Data_Type);

procedure Clear_Attributes
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Cell_Renderer      : access Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record'Class);

Clear all existing attributes previously set with
Gtk.Tree_View_Column.Set_Attributes.
Options for manipulating the columns
------------------------------------

procedure Set_Spacing
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Spacing            :        Gint);

Set the spacing field of Tree_Column.
The spacing field is the number of pixels to place between cell
renderers packed into it.
function Get_Spacing
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gint;

Return the spacing of Tree_Column.
procedure Set_Visible
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Visible            :        Boolean);

Set the visibility of Tree_Column.
function Get_Visible
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Boolean;

Return True if Tree_Column is visible.
procedure Set_Resizable
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Resizable          :        Boolean);

Set whether the Tree_Column is resizable.
function Get_Resizable
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Boolean;

Return whether Tree_Column is resizable.
procedure Set_Sizing
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        The_Type           :        Gtk_Tree_View_Column_Sizing);

Set the growth behavior of Tree_Column to The_Type.
function Get_Sizing
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gtk_Tree_View_Column_Sizing;

Return the current type of Tree_Column.
function Get_Width
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gint;

Return the current size of the Tree_Column in pixels.
function Get_Fixed_Width
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gint;

Get the fixed width of the column.
This value may not be the actual width of the column on the screen, just
what is requested.
procedure Set_Fixed_Width
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Fixed_Width        :        Gint);

Set the size of the column in pixels.
This is meaningful only if the sizing type is
Gtk_Tree_View_Column_Fixed. In this case, the value is discarded as the
size of the column is based on the calculated width of the column. The
width is clamped to the min/max width for the column.
procedure Set_Min_Width
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Min_Width          :        Gint);

Set the minimum width of the Tree_Column.
If Min_Width is -1, then the minimum width is unset.
function Get_Min_Width
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gint;

Return the minimum width in pixels of the Tree_Column, or -1 if no
minimum width is set.
procedure Set_Max_Width
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Max_Width          :        Gint);

Set the maximum width of the Tree_Column.
If Max_Width is -1, then the maximum width is unset.   Note, the column
can actually be wider than max width if it's the last  column in a
view. In this case, the column expands to fill the view.
function Get_Max_Width
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gint;

Return the maximum width in pixels of the Tree_Column, or -1 if no
maximum width is set.
procedure Clicked
       (Tree_Column        : access Gtk_Tree_View_Column_Record);

Emit the "clicked" signal on the column.
This function will only work if the user could have conceivably clicked
on the button.
procedure Set_Title
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Title              :        UTF8_String);

Set the title of the Tree_Column.
If a custom widget has been set, then this value is ignored.
function Get_Title
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return UTF8_String;

Return the title of the Tree_Column.
procedure Set_Clickable
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Clickable          :        Boolean);

Set the header to be active if Active is True.
When the header is active, then it can take keyboard focus, and can be
clicked.
function Get_Clickable
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Boolean;

Return True if the user can click on the header for the column.
procedure Set_Widget
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

function Get_Widget
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gtk.Widget.Gtk_Widget;

Return the Gtk_Widget in the button in the column header.
If a custom widget has not been set, then this will be a Gtk_Alignment
with a Gtk_Label in it.
procedure Set_Alignment
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Xalign             :        Gfloat);

Set the alignment of the title or custom widget inside the column header
The alignment determines its location inside the button  0.0 for left,
0.5 for center, 1.0 for right.
function Get_Alignment
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gfloat;

Return the current x alignment of Tree_Column.
This value can range between 0.0 and 1.0.
procedure Set_Reorderable
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Reorderable        :        Boolean);

function Get_Reorderable
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Boolean;

procedure Set_Sort_Column_Id
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Sort_Column_Id     :        Gint);

Set the logical sort_column_id that this column sorts on when this
column is selected for sorting. Doing so makes the column header
clickable.
function Get_Sort_Column_Id
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gint;

Get the logical sort_column_id that the model sorts on when this
column is selected for sorting.   See
Gtk.Tree_View_Column.Set_Sort_Column_Id.   Return value: the current
sort_column_id for this column, or -1 if  this column can't be used for
sorting.
procedure Set_Sort_Indicator
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Setting            :        Boolean);

Call this function with a Setting of True to display an arrow in
the header button indicating the column is sorted. Call  Set_Sort_Order
to change the direction of the arrow.
function Get_Sort_Indicator
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Boolean;

Get the value set by Set_Sort_Indicator.
procedure Set_Sort_Order
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Order              :        Gtk_Sort_Type);

Change the appearance of the sort indicator.
This does *not* actually sort the model. Use
Gtk.Tree_View_Column.Set_Sort_Column_Id if you want automatic sorting
support. This function is primarily for custom sorting behavior, and
should be used in conjunction with Gtk.Tree_Sortable.Set_Sort_Column
to do that. For custom models, the mechanism will vary. The sort
indicator changes direction to indicate normal sort or reverse sort.
Note that you must have the sort indicator enabled to see anything
when calling this function; see Set_Sort_Indicator.
function Get_Sort_Order
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Gtk_Sort_Type;

Get the value set by Set_Sort_Order.
procedure Cell_Set_Cell_Data
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Tree_Model         : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class;
        Iter               :        Gtk.Tree_Model.Gtk_Tree_Iter;
        Is_Expander        :        Boolean;
        Is_Expanded        :        Boolean);

Set the cell renderer based on the Tree_Model and Tree_Node.
That is, for every attribute mapping in Tree_Column, it will get a
value from the set column on the Tree_Node, and use that value to  set
the attribute on the cell renderer.  This is used primarily by  the
Gtk_Tree_View.
procedure Cell_Get_Size
       (Tree_Column        : access Gtk_Tree_View_Column_Record;
        Cell_Area          :        Gdk.Rectangle.Gdk_Rectangle;
        X_Offset           : out    Gint;
        Y_Offset           : out    Gint;
        Width              : out    Gint;
        Height             : out    Gint);

Obtain the width and height needed to render the column.
This is used primarily by the Gtk_Tree_View.
function Cell_Is_Visible
       (Tree_Column        : access Gtk_Tree_View_Column_Record)
        return Boolean;


File: gtkada_rm.info,  Node: Package_Gtk.Type_Conversion,  Next: Package_Gtk.Vbutton_Box,  Prev: Package_Gtk.Tree_View_Column,  Up: Top

Package Gtk.Type`_'Conversion
*****************************

Provides full dynamic typing within GtkAda.

* Menu:

* Gtk.Type_Conversion Subprograms::


File: gtkada_rm.info,  Node: Gtk.Type_Conversion Subprograms,  Up: Package_Gtk.Type_Conversion

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.

File: gtkada_rm.info,  Node: Package_Gtk.Vbutton_Box,  Next: Package_Gtk.Widget,  Prev: Package_Gtk.Type_Conversion,  Up: Top

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.

* Menu:

* Gtk.Vbutton_Box Widget Hierarchy::
* Gtk.Vbutton_Box Subprograms::


File: gtkada_rm.info,  Node: Gtk.Vbutton_Box Widget Hierarchy,  Next: Gtk.Vbutton_Box Subprograms,  Up: Package_Gtk.Vbutton_Box

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

     GObject                       (*note Package_Glib.Object::)
     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::)


File: gtkada_rm.info,  Node: Gtk.Vbutton_Box Subprograms,  Prev: Gtk.Vbutton_Box Widget Hierarchy,  Up: Package_Gtk.Vbutton_Box

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

procedure Gtk_New
       (Widget             : out    Gtk_Vbutton_Box);

Create a new vertical button box.
function Get_Type              return Glib.GType;


Return the internal value associated with a Gtk_Vbutton_Box.

File: gtkada_rm.info,  Node: Package_Gtk.Widget,  Next: Package_Gtk.Window,  Prev: Package_Gtk.Vbutton_Box,  Up: Top

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.

* Menu:

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


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

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

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)

