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


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

File: gtkada_rm.info,  Node: Package_Gtk.Status_Bar,  Next: Package_Gtk.Table,  Prev: Package_Gtk.Spin_Button,  Up: Top

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.

* Menu:

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


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

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


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



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

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.

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

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.

File: gtkada_rm.info,  Node: Package_Gtk.Table,  Next: Package_Gtk.Text,  Prev: Package_Gtk.Status_Bar,  Up: Top

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.

* Menu:

* Gtk.Table Widget Hierarchy::
* Gtk.Table Subprograms::


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

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


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

File: gtkada_rm.info,  Node: Package_Gtk.Text,  Next: Package_Gtk.Toggle_Button,  Prev: Package_Gtk.Table,  Up: Top

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.

* Menu:

* Gtk.Text Widget Hierarchy::
* Gtk.Text Subprograms::


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

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


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

File: gtkada_rm.info,  Node: Package_Gtk.Toggle_Button,  Next: Package_Gtk.Toolbar,  Prev: Package_Gtk.Text,  Up: Top

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.

* Menu:

* Gtk.Toggle_Button Widget Hierarchy::
* Gtk.Toggle_Button Signals::
* Gtk.Toggle_Button Subprograms::
* Gtk.Toggle_Button Example::


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

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


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



File: gtkada_rm.info,  Node: Gtk.Toggle_Button Subprograms,  Next: Gtk.Toggle_Button Example,  Prev: Gtk.Toggle_Button Signals,  Up: Package_Gtk.Toggle_Button

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.

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

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;


File: gtkada_rm.info,  Node: Package_Gtk.Toolbar,  Next: Package_Gtk.Tooltips,  Prev: Package_Gtk.Toggle_Button,  Up: Top

Package Gtk.Toolbar
*******************


File: gtkada_rm.info,  Node: Package_Gtk.Tooltips,  Next: Package_Gtk.Tree,  Prev: Package_Gtk.Toolbar,  Up: Top

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.

* Menu:

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


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Data              (*note Package_Gtk.Data::)
           \___ Gtk_Tooltips       (*note Package_Gtk.Tooltips::)


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

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

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;


File: gtkada_rm.info,  Node: Package_Gtk.Tree,  Next: Package_Gtk.Type_Conversion,  Prev: Package_Gtk.Tooltips,  Up: Top

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.

* Menu:

* Gtk.Tree Widget Hierarchy::
* Gtk.Tree Subprograms::


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

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


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

File: gtkada_rm.info,  Node: Package_Gtk.Type_Conversion,  Next: Package_Gtk.Type_Conversion_Hooks,  Prev: Package_Gtk.Tree,  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.Type_Conversion_Hooks,  Next: Package_Gtk.Vbutton_Box,  Prev: Package_Gtk.Type_Conversion,  Up: Top

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.

* Menu:

* Gtk.Type_Conversion_Hooks Types::
* Gtk.Type_Conversion_Hooks Subprograms::


File: gtkada_rm.info,  Node: Gtk.Type_Conversion_Hooks Types,  Next: Gtk.Type_Conversion_Hooks Subprograms,  Up: Package_Gtk.Type_Conversion_Hooks

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;


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

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.

File: gtkada_rm.info,  Node: Package_Gtk.Vbutton_Box,  Next: Package_Gtk.Widget,  Prev: Package_Gtk.Type_Conversion_Hooks,  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
================

     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 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.

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
================

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

