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


File: gtkada_rm.info,  Node: Gdk.Rgb Types,  Next: Gdk.Rgb Subprograms,  Up: Package_Gdk.Rgb

Types
=====

type Gdk_Rgb_Cmap is new Gdk.C_Proxy;

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

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

See Rgb_Buffer_Access.
type Rgb_Buffer_Access is access all Rgb_Buffer;

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

subtype Rgb_Item is Glib.Guint32;

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

File: gtkada_rm.info,  Node: Gdk.Rgb Subprograms,  Prev: Gdk.Rgb Types,  Up: Package_Gdk.Rgb

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

procedure Init;

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

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

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

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

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

   * Gtk_New (....)

   * Gtk.Widget.Pop_Visual;

   * Gtk.Widget.Pop_Colormap;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

   * Height: Number of rows in the image.

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

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

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

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

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

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

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

File: gtkada_rm.info,  Node: Package_Gdk.Threads,  Next: Package_Glade,  Prev: Package_Gdk.Rgb,  Up: Top

Package Gdk.Threads
*******************

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

* Menu:

* Gdk.Threads Subprograms::


File: gtkada_rm.info,  Node: Gdk.Threads Subprograms,  Up: Package_Gdk.Threads

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

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

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

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

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

File: gtkada_rm.info,  Node: Package_Glade,  Next: Package_Glade.XML,  Prev: Package_Gdk.Threads,  Up: Top

Package Glade
*************

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

* Menu:

* Glade Subprograms::


File: gtkada_rm.info,  Node: Glade Subprograms,  Up: Package_Glade

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

procedure Init;

must be called before use of libglade
procedure Gnome_Init;

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

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

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

File: gtkada_rm.info,  Node: Package_Glade.XML,  Next: Package_Glade_XML,  Prev: Package_Glade,  Up: Top

Package Glade.XML
*****************

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

* Menu:

* Glade.XML Types::
* Glade.XML Subprograms::


File: gtkada_rm.info,  Node: Glade.XML Types,  Next: Glade.XML Subprograms,  Up: Package_Glade.XML

Types
=====

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


File: gtkada_rm.info,  Node: Glade.XML Subprograms,  Prev: Glade.XML Types,  Up: Package_Glade.XML

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

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

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

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

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

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

procedure Signal_Autoconnect
     (XML                : access Glade_XML_Record);

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

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

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

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

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

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

procedure Set_Custom_Handler
     (Handler            :        Custom_Widget_Handler);


File: gtkada_rm.info,  Node: Package_Glade_XML,  Next: Package_Glib,  Prev: Package_Glade.XML,  Up: Top

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


File: gtkada_rm.info,  Node: Package_Gtk,  Next: Package_Gtk.Accel_Label,  Prev: Package_Glib.XML,  Up: Top

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

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

* Menu:

* Gtk Types::
* Gtk Subprograms::


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

Types
=====

type Gtk_Notebook_Page is new Gdk.C_Proxy;

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

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

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

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

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

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

function Major_Version         return Guint;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return the type of the num-th argument for the handlers of signal name.
If Num is negative, return the type returned by the handlers for this
signal.   Note that we provide this procedure here to avoid
circularities.

File: gtkada_rm.info,  Node: Package_Gtk.Accel_Label,  Next: Package_Gtk.Adjustment,  Prev: Package_Gtk,  Up: Top

Package Gtk.Accel`_'Label
*************************

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

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

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

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

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

* Menu:

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


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

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

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


File: gtkada_rm.info,  Node: Gtk.Accel_Label Subprograms,  Next: Gtk.Accel_Label Example,  Prev: Gtk.Accel_Label Widget Hierarchy,  Up: Package_Gtk.Accel_Label

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

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

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

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

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

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

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

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

Example
=======

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


File: gtkada_rm.info,  Node: Package_Gtk.Adjustment,  Next: Package_Gtk.Alignment,  Prev: Package_Gtk.Accel_Label,  Up: Top

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

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

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

* Menu:

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


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

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

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


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

Signals
=======

   * "changed"

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

   * "value_changed"

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



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

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

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

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

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

function Get_Value
     (Adjustment         : access Gtk_Adjustment_Record)
        return Gfloat;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

procedure Changed
     (Adjustment         : access Gtk_Adjustment_Record);

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

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

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

Example
=======


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


File: gtkada_rm.info,  Node: Package_Gtk.Alignment,  Next: Package_Gtk.Arguments,  Prev: Package_Gtk.Adjustment,  Up: Top

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

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

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

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

* Menu:

* Gtk.Alignment Widget Hierarchy::
* Gtk.Alignment Subprograms::


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

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

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


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

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

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

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

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

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

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

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

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

Return the Y expansion value, in the range 0.0 .. 1.0
0.0 means no expansion while 1.0 means full expansion.

File: gtkada_rm.info,  Node: Package_Gtk.Arguments,  Next: Package_Gtk.Arrow,  Prev: Package_Gtk.Alignment,  Up: Top

Package Gtk.Arguments
*********************

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

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

* Menu:


File: gtkada_rm.info,  Node: Package_Gtk.Arrow,  Next: Package_Gtk.Aspect_Frame,  Prev: Package_Gtk.Arguments,  Up: Top

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

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

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

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

* Menu:

* Gtk.Arrow Widget Hierarchy::
* Gtk.Arrow Subprograms::


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

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

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


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

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

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

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

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

Set the direction and style of the Arrow.

File: gtkada_rm.info,  Node: Package_Gtk.Aspect_Frame,  Next: Package_Gtk.Bin,  Prev: Package_Gtk.Arrow,  Up: Top

Package Gtk.Aspect`_'Frame
**************************

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

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

* Menu:

* Gtk.Aspect_Frame Widget Hierarchy::
* Gtk.Aspect_Frame Subprograms::


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

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

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


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

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

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

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

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

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

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

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

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

File: gtkada_rm.info,  Node: Package_Gtk.Bin,  Next: Package_Gtk.Box,  Prev: Package_Gtk.Aspect_Frame,  Up: Top

Package Gtk.Bin
***************

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

* Menu:

* Gtk.Bin Widget Hierarchy::
* Gtk.Bin Subprograms::


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

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


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

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

function Get_Type              return Gtk.Gtk_Type;

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

Return the child associated with Bin.

File: gtkada_rm.info,  Node: Package_Gtk.Box,  Next: Package_Gtk.Button,  Prev: Package_Gtk.Bin,  Up: Top

Package Gtk.Box
***************

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

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

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

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

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

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

* Menu:

* Gtk.Box Widget Hierarchy::
* Gtk.Box Subprograms::


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File: gtkada_rm.info,  Node: Package_Gtk.Button,  Next: Package_Gtk.Button_Box,  Prev: Package_Gtk.Box,  Up: Top

Package Gtk.Button
******************

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

* Menu:

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


File: gtkada_rm.info,  Node: Gtk.Button Widget Hierarchy,  Next: Gtk.Button Signals,  Up: Package_Gtk.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::)


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

Signals
=======

   * "clicked"

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

   * "enter"

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

   * "leave"

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

   * "pressed"

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

   * "released"

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


