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


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

Package Gtk.Curve
*****************

The Gtk_Curve widget allows the user to edit a curve covering a range of
values. It is typically used to fine-tune color balances in graphics
applications like the Gimp.

   The Gtk_Curve widget has 3 modes of operation: spline, linear and
free.   In spline mode the user places points on the curve which are
automatically  connected together into a smooth curve. In linear mode
the user places  points on the curve which are connected by straight
lines. In free mode the  user can draw the points of the curve freely,
and they are not connected at  all.

* Menu:

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


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Drawing_Area   (*note Package_Gtk.Drawing_Area::)
              \___ Gtk_Curve       (*note Package_Gtk.Curve::)


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

Signals
=======

   * "curve-type-changed"

     procedure Handler (Curve : access Gtk_Curve_Record'Class);
     Emitted when the curve type has been changed. The curve type can be
     changed explicitly with a call to Set_Curve_Type. It is also
     changed as a side-effect of calling Reset or Set_Gamma.



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

Types
=====

type Gtk_Curve_Type is
     (Curve_Type_Linear,
          Curve_Type_Spline,
          Curve_Type_Free);


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

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

procedure Gtk_New
     (Curve              : out    Gtk_Curve);

Create a new Curve.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Curve.
procedure Reset
     (Curve              : access Gtk_Curve_Record);

Reset the curve.
Reset to a straight line from the minimum x & y values to the maximum
x & y values (i.e. from the bottom-left to the top-right corners).
The curve type is not changed.
procedure Set_Gamma
     (Curve              : access Gtk_Curve_Record;
        Gamma              : in     Gfloat);

Recompute the entire curve using the given gamma value.
A gamma value of 1.0 results in a straight line. Values greater than 1.0
result in a curve above the straight line. Values less than 1.0 result
in a curve below the straight line. The curve type is changed to
Curve_Type_Free.
procedure Set_Range
     (Curve              : access Gtk_Curve_Record;
        Min_X              : in     Gfloat;
        Max_X              : in     Gfloat;
        Min_Y              : in     Gfloat;
        Max_Y              : in     Gfloat);

Set the minimum and maximum x & y values of the curve.
The curve is also reset with a call to Reset.
procedure Set_Vector
     (Curve              : access Gtk_Curve_Record;
        Vector             : in     Gfloat_Array);

Set the vector of points on the curve.
The curve type is set to Curve_Type_Free.
procedure Get_Vector
     (Curve              : access Gtk_Curve_Record;
        Vector             : in out Gfloat_Array);

Return a vector of points representing the curve.
procedure Set_Curve_Type
     (Curve              : access Gtk_Curve_Record;
        Curve_Type         : in     Gtk_Curve_Type);

Set the type of the curve.
The curve will remain unchanged except when changing from a free curve
to a linear or spline curve, in which case the curve will be changed as
little as possible.

File: gtkada_rm.info,  Node: Package_Gtk.Data,  Next: Package_Gtk.Dialog,  Prev: Package_Gtk.Curve,  Up: Top

Package Gtk.Data
****************

Abstract class for objects containing data  This object is currently
not very useful since it only provides  a single "disconnect" signal.

   This is the "Model" in the Model/View/Controller framework.

* Menu:

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


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

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

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


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

Signals
=======

   * "disconnect"

     procedure Handler (Data : access Gtk_Data_Record'Class);
     Emitted just before Data is destroyed.



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

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

function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Data.

File: gtkada_rm.info,  Node: Package_Gtk.Dialog,  Next: Package_Gtk.Dnd,  Prev: Package_Gtk.Data,  Up: Top

Package Gtk.Dialog
******************

Dialog boxes are a convenient way to prompt the user for a small amount
of  input, eg. to display a message, ask a question, or anything else
that does  not require extensive effort on the user's part.

   Gtkada treats a dialog as a window split horizontally. The top
section is a  Gtk_Vbox, and is where widgets such as a Gtk_Label or a
Gtk_Entry should be  packed. The second area is known as the
action_area. This is generally used  for packing buttons into the
dialog which may perform functions such as  cancel, ok, or apply. The
two areas are separated by a Gtk_Hseparator.

   If 'dialog' is a newly created dialog, the two primary areas of the
window  can be accessed using Get_Vbox and Get_Action_Area as can be
seen from the  example, below.

   A 'modal' dialog (that is, one which freezes the rest of the
application  from user input), can be created by calling Set_Modal on
the dialog.

   *note Package_Gtkada.Dialogs:: for a higher level dialog interface.

* Menu:

* Gtk.Dialog Widget Hierarchy::
* Gtk.Dialog Subprograms::


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

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

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


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

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

procedure Gtk_New
     (Dialog             : out    Gtk_Dialog);

Create a new dialog.
Widgets should not be packed into this widget directly, but into the
vbox and action_area, as described above.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Dialog.
function Get_Action_Area
     (Dialog             : access Gtk_Dialog_Record)
        return Gtk.Box.Gtk_Box;

Return the action area box associated with a Dialog.
function Get_Vbox
     (Dialog             : access Gtk_Dialog_Record)
        return Gtk.Box.Gtk_Box;

Return the vertical box associated with a Dialog.

File: gtkada_rm.info,  Node: Package_Gtk.Dnd,  Next: Package_Gtk.Drawing_Area,  Prev: Package_Gtk.Dialog,  Up: Top

Package Gtk.Dnd
***************

Like all modern GUI toolkits, GtkAda has a full support for
drag-and-drop  operations. This is a mechanism for interactively
transferring data between  two widgets, either in the same application
or in two different  applications. The user clicks on a widget (called
a "drag source"), and,  while keeping the mouse button pressed, moves
it to another widget, where  the mouse button is released (this other
widget is called a "drop site").   As a result, and if both widgets can
handle the same type of data, some  data is either copied or moved to
this new widget.

   This is a very intuitive way, in some cases, to enhance the
usability of  your application, although you should carefully consider
whether this  should be used or not.

   GtkAda supports several drag-and-drop protocols, so as to be able to
communicate with the maximum number of applications. These protocols
are  Xdnd and Motif.

   Note that drag-and-drop is currently not supported under Windows
systems.

   Below is a summary of what is needed to add drag-and-drop
capabilities to  your application. We highly recommend that you look
at, and understand,  the example in testgtk (create_dnd.adb), before
using these features in  your own application.

   See also the package Gtk.Selection, that contains some lower
subprograms  and data types that are used when implementing
drag-and-drop.

   * Defining a widget as a possible drag source

    You need to call Source_Set, specifying which mouse buttons can
activate  the drag, which types of data will be given, and which kind
of action  will be performed.   You then need to connect to the signal
"drag_data_get", that will be  emitted when the user has dropped the
item and GtkAda needs to find the  data. You must call
Selection_Data_Set in the handler to set the actual  data.   You can
also connect the widget to "drag_data_delete", which will be  called
whenever the data set for the selection is no longer required and
should be deleted. The signal will be emitted only if the drop site
requests it, or if the selected action for the drag-and-drop operation
was Action_Move. It will not be called automatically for an Action_Copy.
Note that the callback might be called several times, if for instance
this  was an Action_Move, and the drop site requires explicitly to
delete the  data in its call to Finish.

   * Defining a widget as a possible drop site

    You need to call Dest_Set, specifying which types of Data are
accepted  by the widget, which actions are recognized, and whether you
accept drops  from external applications.   You also need to connect to
"drag_data_received", that will be emitted  when the user has dropped
some data on the widget. The handler should  call Finish, to warn the
source widget that the drag and drop operation  is finished, and
whether it was successful or not.

* Menu:

* Gtk.Dnd Signals::
* Gtk.Dnd Types::
* Gtk.Dnd Subprograms::


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

Signals
=======

   * "drag_begin"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context);
     A new drag-and-drop operation has just been started from Widget.
     This callback can be used for instance to modify the visual aspect
     of the widget, so as to give a visual clue as to what widget is
     the source.

   * "drag_data_delete"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context);
     This handler is called whenever the drop site of a drag-and-drop
     operation has decided that the data should be deleted, or
     automaticallyif the selected action was Action_Move.  Widget is
     the drag source.

   * "drag_data_get"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     Data    : Selection_Data;
     Info    : Guint;
     Time    : Guint);
     This should be connected to every drag source.  This is used to
     request the actual data to be transfered to the drop site once the
     drop has been done.  Info is the type of the expected Data, and is
     in fact the third field of the Target_Entry record, whose value
     you have define yourself.  Data should be modified to include a
     pointer or a copy of the data, through Selection_Data_Set.

   * "drag_data_received"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     X       : Gint;
     Y       : Gint;
     Data    : Selection_Data;
     Info    : Guint;
     Time    : Guint);
     This signal should be connected to every drop site.  The handler
     is called every time some new data has been dropped onto Widget.
     (X, Y) are the mouse coordinates, relative to the widget's window,
     where the data was dropped. Info is the type of the data, has set
     in the third field of the Target_Entry record, and Data contains a
     pointer to the actual data.

   * "drag_drop"

     function Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     X       : Gint;
     Y       : Gint;
     Time    : Guint)
     return Boolean;
     This is called whenever a drop is about to be performed on the
     widget.  Note that this is called even if no common target type
     has been found between the drag source and the drop site. Thus,
     you will need to analyze the result of Get_Targets (Context) to
     find the possible targets.  The data is sent separately through
     the "drag_data_received" signal, and might not even be available
     when "drag_drop" is emitted.  This signal is mostly used if you
     have chosen not to use any of the default behavior when calling
     Dest_Set. Otherwise, everything is already handled directly by
     GtkAda.

     This handler should return True if Widget acknowledges that it is a
     possible drop site for the particular targets provided by the drag
     source.

   * "drag_end"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context);
     The drag-and-drop operation that was started from the widget has
     been completed, and the standard set of the widget can be restored.

   * "drag_leave"

     procedure Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     Time    : Guint);
     Signal emitted whenever a drag-and-drop operation is being
     performed, and the mouse has just left the area covered by a
     widget on the screen. This can be used to restore the default
     visual aspect of the widget. This is also emitted when the drop
     has been performed on the widget.

   * "drag_motion"

     function Handler (Widget  : access Gtk_Widget_Record'Class;
     Context : Drag_Context;
     X       : Gint;
     Y       : Gint;
     Time    : Guint)
     return Boolean;
     This is called every time the user is doing a dnd operation, and
     the mouse is currently over Widget (but not released yet).  This
     can be used to change the visual aspect of Widget to provide
     visual clues to the user. The "opposite" signal is drag_leave.

     The return value is ignored if Dest_Default_Motion was set when
     Source_Set was called. This handler should return True if Widget
     acknowledges that it is a possible drop site for the particular
     targets provided by the drag source.



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

Types
=====

type Dest_Defaults is new Integer;

Specify the various types of action that will be taken on behalf of the
user for a drag destination site.
type Drag_Action is new Integer;

Possible actions for a drop onto a widget, during a drag-and-drop.
The drag widgets (ie the ones from which the user can start a
drag-and-drop operation) should set a mask, indicating which actions
it wants to do. The first action in the list below has the highest
priority, the last one the lowest. The actual action chosen for the
drag-and-drop will be the highest-priority one that is also accepted
by the drop site.    Note that in the case where the drag source
supports multiple actions,  the user can select the one he wants. As
explained above, the default  one is the highest priority one. But if
the user pressed Shift at the  same time, Action_Move will be used if
present. Ctrl-Shift selects  an Action_Link, and Ctrl selects an
Action_Copy.
type Drag_Context is new Gdk.C_Proxy;

Structure that holds information about a drag in progress.   This is
used on both source and destination sides.
type Drag_Protocol is
     (Drag_Proto_Motif,
          Drag_Proto_Xdnd,
          Drag_Proto_Rootwin,
             -- A root window with nobody claiming the drag
          Drag_Proto_None
             -- Not a valid drag window
          );

The various dnd protocols recognized by a window.   Note that not every
window recognizes every protocol, and you should  be careful as to
which one you use. The function Gdk.Drag.Get_Protocol  returns which
one is recognized by a window.

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

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

Drag_Context
------------

function Get_Actions
     (Context            : in     Drag_Context)
        return Drag_Action;

Return the possible actions associated with the context.
This is the list of actions defined by the source of the drag-and-drop
operation, in Source_Set.   (for instance, if Source_Set was used with
Action_Copy + Action_Move,  the result will be exactly this sum,
whatever was used for Dest_Set).
function Get_Suggested_Action
     (Context            : in     Drag_Context)
        return Drag_Action;

Return the suggested action for that context.
This is the highest priority action that was set by the source of the
drag-and-drop, ie the one it would rather use. The action that is
actually used is the one returned by Get_Action, and depends on the
mask set by the target.
function Get_Action
     (Context            : in     Drag_Context)
        return Drag_Action;

Return the action selected for the drag-and-drop operation.
This is the highest priority action common between the drag site and the
drop widget (for instance, if Source_Set was used with Action_Copy +
Action_Move and Dest_Set was used with only Action_Move, this will  be
Action_Move).
function Get_Targets
     (Context            : in     Drag_Context)
        return Gtk.Enums.Guint_List.Glist;

List of all the targets common to the drag source and the drop site.
The Guint in the list are the ones given in the Info field in the
Target_Entry structure below.
To be moved to Gdk.Dnd
----------------------

procedure Drag_Status
     (Context            : in     Drag_Context;
        Action             : in     Drag_Action;
        Time               : in     Guint32 := 0);

Set the action for the context and warns the drag source about the
change.
function Drag_Get_Selection
     (Context            : in     Drag_Context)
        return Gdk.Types.Gdk_Atom;

Setting up a widget as a destination
------------------------------------

procedure Dest_Set
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Flags              : in     Dest_Defaults
                            := Dest_No_Default;
        Targets            : in     Target_Entry_Array
                            := Any_Target_Entry;
        Actions            : in     Drag_Action := Action_Any);

Set a widget as a potential drop destination.
Flags specifies what action GtkAda should take on behalf of a widget for
drops onto that widget. The Targets and Actions fields are used only
if Dest_Default_Motion or Dest_Default_Drop are given.

   Targets indicates the drop types that Widget accepts. If no item from
Targets matches the list of targets emitted by the source (as set in
Source_Set), then the drop will be considered illegal and refused.

   Actions is a bitmask of possible actions for a drop onto Widget. At
least of the actions must be in common with what was set for the source
in Source_Set, or the drop is considered illegal.
procedure Dest_Set_Proxy
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Proxy_Window       : in     Gdk.Window.Gdk_Window;
        Protocol           : in     Drag_Protocol;
        Use_Coordinates    : in     Boolean);

Set this widget as a proxy for drops to another window.
All drag events on Widget will be forwarded to Proxy_Window.   Protocol
is the drag protocol that Proxy_Window accepts. You can use
Gdk.Drag.Get_Protocol to determine this.   If Use_Coordinates is True,
send the same coordinates to the destination  because it is an embedded
subwindow.
procedure Dest_Unset
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Clear information about a drop destination set with Dest_Set. The
widget will no longer receive notification of drags.
Setting up a widget as a source
-------------------------------

procedure Source_Set
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Start_Button_Mask  : in     Gdk.Types.Gdk_Modifier_Type;
        Targets            : in     Target_Entry_Array;
        Actions            : in     Drag_Action);

Set up a widget so that GtkAda will start a drag operation when the
user clicks and drags on the widget. The widget must have a window.

   Targets is the list of targets that the drag can provide. The first
possible target accepted by the drop site will be used. For instance,
it Targets contains "text/plain" and "text/url", and the drop site only
accepts "text/url", this will be the one used. However, if the drop
site  also accepts "text/plain", the latter will be prefered.

   Widget needs to be able to convert the data to any of the types in
Target, as any of them might be requested by the drop site.

   Actions is a list of possible actions for drags from Widget. At least
one of the actions must be in common with the drop site for the
drag-and-drop operation to succeed.
procedure Source_Unset
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Undo the effects of Source_Set.
The drag-and-drop operation
---------------------------

procedure Finish
     (Context            : in     Drag_Context;
        Success            : in     Boolean;
        Del                : in     Boolean;
        Time               : in     Guint32 := 0);

Inform the drag source that the drop is finished, and that the data of
the drag will no longer be required.   Success should indicate whether
the drop was successful.   Del should be set to True if the source
should delete the original  data (this should be True for a move).
procedure Get_Data
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Context            : in     Drag_Context;
        Target             : in     Gdk.Types.Gdk_Atom;
        Time               : in     Guint32 := 0);

Get the data associated with a drag. When the data is received or the
retrieval fails, GtkAda will emit a "drag_data_received"  signal.
Failure of the retrieval is indicated by the length field of  the
selection_data signal parameter being negative. However, when  Get_Data
is called implicitely because the Drag_Default_Drop was set,  then the
widget will not receive notification of failed drops.

   Target is the target (form of the data) to retrieve.   Time is a
timestamp to retrive the data, and will be given to  "drag_data_motion"
or "drag_data_drop" signals.
function Get_Source_Widget
     (Context            : in     Drag_Context)
        return Gtk.Widget.Gtk_Widget;

Determine the source widget for a drag.
If the drag is occuring within a single application, this function
returns the source widget. Otherwise, it returns null.
procedure Highlight
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Draw a highlight around a widget.
procedure Unhighlight
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Remove a highlight set by Highlight.
function Drag_Begin
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Targets            : in     Target_List;
        Actions            : in     Drag_Action;
        Button             : in     Gint;
        Event              : in     Gdk.Event.Gdk_Event)
        return Drag_Context;

Initiate a drag on the source side. The function only needs to be used
when the application is starting drags itself, and is not needed when
Source_Set is used.   Targets is the list of targets (data formats) in
which the source can  provide the data.   Actions is a bitmask of the
allowed drag actions for this drag.   Button is the button the user
clicked to start the drag.   Event is the event that triggered the
start of the drag.
Icons
-----

procedure Set_Icon_Widget
     (Context            : in     Drag_Context;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Hot_X              : in     Gint;
        Hot_Y              : in     Gint);

Change the icon for a drag.
GtkAda will not destroy the icon, so if you don't want it to persist,
you should connect to the "drag_end" signal and destroy it yourself.
Context is the reference to the current drag operation.   Widget is the
toplevel window to use as an icon. (Hot_X, Hot_Y) is the  coordinates
of the hot point (that will be just under the mouse) within  Widget.
procedure Set_Icon_Pixmap
     (Context            : in     Drag_Context;
        Colormap           : in     Gdk.Color.Gdk_Colormap;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap;
        Hot_X              : in     Gint;
        Hot_Y              : in     Gint);

Sets a given pixmap as the icon for a given drag. GtkAda retains a
reference count for the arguments, and will release them when they are
no longer needed.   (Hot_X, Hot_Y) is the coordinates of the hotspot
within Pixmap.
procedure Set_Icon_Default
     (Context            : in     Drag_Context);

Set the icon for a particular drag to the default icon.
This must be called with a context for the source side of a drag.
procedure Set_Default_Icon
     (Colormap           : in     Gdk.Color.Gdk_Colormap;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap;
        Hot_X              : in     Gint;
        Hot_Y              : in     Gint);

Change the default drag icon. GtkAda retains a reference count for the
arguments, and will release them when they are no longer needed.
procedure Source_Set_Icon
     (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Colormap           : in     Gdk.Color.Gdk_Colormap;
        Pixmap             : in     Gdk.Pixmap.Gdk_Pixmap;
        Mask               : in     Gdk.Bitmap.Gdk_Bitmap);

Set the icon that will be used for drags from a particular widget.
GtkAda retains a reference count for the arguments, and will release
them when they are no longer needed.

File: gtkada_rm.info,  Node: Package_Gtk.Drawing_Area,  Next: Package_Gtk.Editable,  Prev: Package_Gtk.Dnd,  Up: Top

Package Gtk.Drawing`_'Area
**************************

This widget provides an empty canvas on which the application can draw
anything.   Note that this widget is simply an empty space, and that
you need to  connect it to events to make it useful. For instance, you
might want to do  one of the following :

   * Connect it to "expose_event": The handlers are called every time
the    widget needs to be redrawn. You can then draw anything you want
on the    canvas, after getting its associated window with a call to
Gtk.Widget.Get_Window. Note that the event mask is automatically set up
  to accept expose_events.

   * Connect it to "button_press" and "button_release" events, when you
want    it to react to user input. Note that you need to set up the
event mask    with a call to Gtk.Widget.Set_Events.

   See also the Double_Buffer widget provided in the GtkAda examples
for an  advanced example that demonstrates how to use double buffering,
to avoid  flickering in your drawings.

* Menu:

* Gtk.Drawing_Area Widget Hierarchy::
* Gtk.Drawing_Area Subprograms::


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

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

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


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

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

procedure Gtk_New
     (Drawing_Area       : out    Gtk_Drawing_Area);

Create a new blank Drawing_Area.
Note that the background of the widget is uninitialized, and that you
have to draw on it yourself.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Drawing_Area.
procedure Size
     (Darea              : access Gtk_Drawing_Area_Record;
        Width              : in     Gint;
        Height             : in     Gint);

Request a new size for the area.
This queues a resize request for the area.

File: gtkada_rm.info,  Node: Package_Gtk.Editable,  Next: Package_Gtk.Event_Box,  Prev: Package_Gtk.Drawing_Area,  Up: Top

Package Gtk.Editable
********************

This widget is an abstract widget designed to support the common
functionalities of all widgets for editing text. It provides general
services to manipulate an editable widget, a large number of action
signals used for key bindings, and several signals that an  application
can connect to to modify the behavior of a widget.

* Menu:

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


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

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

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


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

Signals
=======

   * "activate"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitted when the user has activated the widget in some fashion.

   * "changed"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     emitted when the user has changed the text of the widget.

   * "copy_clipboard"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitting this signal will copy the current selection to the
     clipboard.

   * "cut_clipboard"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitting this signal will cut the current selection to the
     clipboard.

   * "delete_text"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Start_Pos : in Gint;
     End_Pos   : in Gint);
     Emitted when some text is deleted by the user. As for the
     "insert-text" handler, it is possible to override the default
     behavior by connecting a handler to this signal, and then stopping
     the signal.

   * "insert_text"

     procedure Handler (Widget   : access Gtk_Editable_Record'Class;
     Text     : in String;
     Length   : in Gint;
     Position : in Gint_Access);
     Emitted when some text is inserted inside the widget by the user.
     The default handler inserts the text into the widget.  By
     connecting a handler to this signal, and then by stopping the
     signal with Gtk.Handlers.Emit_Stop_By_Name, it is possible to
     modify the inserted text, or even prevent it from being inserted.
     Position.all should be modified by the callback, and indicates the
     new position of the cursor after the text has been inserted.

   * "kill_char"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Direction : in Gint);
     Emitting this signal deletes a single character. If Direction is
     positive, delete forward, else delete backward.

   * "kill_line"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Direction : in Gint);
     Emitting this signal deletes a single line. If Direction is
     positive, delete forward, otherwise delete backward.

   * "kill_word"

     procedure Handler (Widget    : access Gtk_Editable_Record'Class;
     Direction : in Gint);
     Emitting this signal deletes a single word. If Direction is
     positive, delete forward, otherwise delete backward.

   * "move_cursor"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     X, Y   : in Gint);
     Emitting this signal will move the cursor position for X
     characters horizontally, and Y characters vertically.

   * "move_page"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     X, Y   : in Gint);
     Emitting this signal will move the cursor for X pages
     horizontally, and Y pages vertically.

   * "move_to_column"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     Column : in Gint);
     Emitting this signal will move the cursor to the given column.

   * "move_to_row"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     Row    : in Gint);
     Emitting this signal will move the cursor to the given row.

   * "move_word"

     procedure Handler (Widget : access Gtk_Editable_Record'Class;
     N      : in Gint);
     Emitting this signal will move the cursor by N words (N can be
     negative).

   * "paste_clipboard"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Emitting this signal will paste the clipboard into the text of the
     widget at the current cursor position.

   * "set-editable"

     procedure Handler (Widget     : access Gtk_Editable_Record'Class;
     Is_Editable: in Boolean);
     Emitting this signal is equivalent to calling Set_Editable.



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

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

function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Editable.
procedure Changed
     (Editable           : access Gtk_Editable_Record);

Cause the "changed" signal to be emitted.
procedure Claim_Selection
     (Editable           : access Gtk_Editable_Record;
        Claim              : in     Boolean := True;
        Time               : in     Guint32);

If Claim is set to True, claim the ownership of the primary X selection.
Otherwise, release it. "Time" should be set to the  time of the
last-change time for the specified selection. It is  discarded if it is
earlier than the current last-change time, or  later than the current X
server time.
procedure Copy_Clipboard
     (Editable           : access Gtk_Editable_Record;
        Time               : in     Guint32);

Copy the characters in the current selection to the clipboard.
procedure Cut_Clipboard
     (Editable           : access Gtk_Editable_Record;
        Time               : in     Guint32);

Copy the characters in the current selection to the clipboard.
The selection is then deleted.
procedure Delete_Selection
     (Editable           : access Gtk_Editable_Record);

Disclaim and delete the current selection.
procedure Delete_Text
     (Editable           : access Gtk_Editable_Record;
        Start_Pos          : in     Gint := 0;
        End_Pos            : in     Gint := -1);

Delete the characters from Start_Pos to End_Pos.
If End_Pos is negative, the characters are deleted from Start_Pos to the
end of the text.
function Get_Chars
     (Editable           : access Gtk_Editable_Record;
        Start_Pos          : in     Gint := 0;
        End_Pos            : in     Gint := -1)
        return String;

Get the text from Start_Pos to End_Pos.
If End_Pos is negative, the text from Start_Pos to the end is returned.
function Get_Clipboard_Text
     (Widget             : access Gtk_Editable_Record)
        return String;

Return the last text copied from the clipboard.
function Get_Editable
     (Widget             : access Gtk_Editable_Record)
        return Boolean;

Return True if the widget is editable by the user.
procedure Set_Editable
     (Widget             : access Gtk_Editable_Record;
        Editable           : in     Boolean := True);

Set the editable status of the entry.
If Editable is False, the user can not modify the contents of the entry.
This does not affect the user of the insertion functions above.
function Get_Has_Selection
     (Widget             : access Gtk_Editable_Record)
        return Boolean;

Return True if the selection is owned by the widget.
function Get_Selection_End_Pos
     (Widget             : access Gtk_Editable_Record)
        return Guint;

Return the position of the end of the current selection.
function Get_Selection_Start_Pos
     (Widget             : access Gtk_Editable_Record)
        return Guint;

Return the position of the beginning of the current selection.
procedure Insert_Text
     (Editable           : access Gtk_Editable_Record;
        New_Text           : in     String;
        Position           : in out Gint);

Insert the given string at the given position.
Position is set to the new cursor position.
procedure Paste_Clipboard
     (Editable           : access Gtk_Editable_Record;
        Time               : in     Guint32);

The contents of the clipboard is pasted into the given widget at
the current cursor position.
procedure Select_Region
     (Editable           : access Gtk_Editable_Record;
        Start              : in     Gint;
        The_End            : in     Gint := -1);

Select the region of text from Start to The_End.
The characters that are selected are those characters at positions
from Start up to, but not including The_End. If The_End_Pos is
negative, then the characters selected will be those characters  from
Start to the end of the text.
procedure Set_Position
     (Editable           : access Gtk_Editable_Record;
        Position           :        Gint);

Change the position of the cursor in the entry.
The cursor is displayed before the character with the given  index in
the widget (the first character has index 0). The  value must be less
than or equal to the number of characters in the  widget. A value of -1
indicates that the position  should be set after the last character in
the entry.   Note that this position is in characters, not in bytes.
function Get_Position
     (Editable           : access Gtk_Editable_Record)
        return Gint;

Return the position of the cursor.

File: gtkada_rm.info,  Node: Package_Gtk.Event_Box,  Next: Package_Gtk.Extra,  Prev: Package_Gtk.Editable,  Up: Top

Package Gtk.Event`_'Box
***********************

This widget is a container that catches events for its child when its
child does not have its own window (like a Gtk_Scrolled_Window or a
Gtk_Label for instance).   Some widgets in GtkAda do not have their own
window, and thus can not  directly get events from the server. The
Gtk_Event_Box widget can be  used to force its child to receive events
anyway.

   For instance, this widget is used internally in a Gtk_Combo_Box so
that  the application can change the cursor when the mouse is in the
popup  window. In that case, it contains a frame, that itself contains
the  scrolled window of the popup.

* Menu:

* Gtk.Event_Box Widget Hierarchy::
* Gtk.Event_Box Subprograms::


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

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

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


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

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

procedure Gtk_New
     (Event_Box          : out    Gtk_Event_Box);

Create a new box.
The box's child can then be set using the Gtk.Container.Add function.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Event_Box.

File: gtkada_rm.info,  Node: Package_Gtk.Extra,  Next: Package_Gtk.Extra.Border_Combo,  Prev: Package_Gtk.Event_Box,  Up: Top

Package Gtk.Extra
*****************

This is the top level package of the Gtk.Extra widget hierarchy.

* Menu:


File: gtkada_rm.info,  Node: Package_Gtk.Extra.Border_Combo,  Next: Package_Gtk.Extra.Check_Item,  Prev: Package_Gtk.Extra,  Up: Top

Package Gtk.Extra.Border`_'Combo
********************************

A Gtk_Border_Combo is a special kind of combo box that allows the  user
to select the border to apply to cells in a spreadsheet.   Its main
usage seems to be with a Gtk_Sheet.

* Menu:

* Gtk.Extra.Border_Combo Widget Hierarchy::
* Gtk.Extra.Border_Combo Signals::
* Gtk.Extra.Border_Combo Subprograms::


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Combo_Box (*note Package_Gtk.Extra.Combo_Box::)
                    \___ Gtk_Border_Combo (*note Package_Gtk.Extra.Border_Combo::)


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

Signals
=======

   * "changed"

     procedure Handler (Combo : access Gtk_Border_Combo_Record'Class;
     Selection : Gint);
     Emitted when a new font has been selected.  Selection is the
     number of the selection font.



File: gtkada_rm.info,  Node: Gtk.Extra.Border_Combo Subprograms,  Prev: Gtk.Extra.Border_Combo Signals,  Up: Package_Gtk.Extra.Border_Combo

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

procedure Gtk_New
     (Widget             : out    Gtk_Border_Combo);

Create a new border combo.
The button contains the currently selected border.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Border_Combo.

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Check_Item,  Next: Package_Gtk.Extra.Color_Combo,  Prev: Package_Gtk.Extra.Border_Combo,  Up: Top

Package Gtk.Extra.Check`_'Item
******************************

This package implements a toggle button that has a different visual
aspect than the standard button. When a Gtk_Check_Item is active, a
tick is drawn into the button, instead of the standard "in/out/ aspect.

   Note that the style given could be achieved easily with the standard
Gtk_Toggle_Button widget by defining a "theme", ie a special
configuration  file that specifies a pixmap to use for toggle buttons.
However, this  Gtk_Check_Item does not need any pixmap, and thus might
be a little bit  lighter if you need to use a lot of them in your
application.

   Note also that the visual aspect of the buttons should probably be
left up  to the user of your application through configuration files.

* Menu:

* Gtk.Extra.Check_Item Widget Hierarchy::
* Gtk.Extra.Check_Item Subprograms::


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Bin         (*note Package_Gtk.Bin::)
                 \___ Gtk_Button   (*note Package_Gtk.Button::)
                    \___ Gtk_Toggle_Button (*note Package_Gtk.Toggle_Button::)
                       \___ Gtk_Check_Item (*note Package_Gtk.Extra.Check_Item::)


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

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

procedure Gtk_New
     (Item               : out    Gtk_Check_Item;
        Label              : in     String := "");

Initialize a button.
If Label is "", then no label is created inside the button and  you
will have to provide your own child through a call to
Gtk.Container.Add.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Check_Item.

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Color_Combo,  Next: Package_Gtk.Extra.Combo_Box,  Prev: Package_Gtk.Extra.Check_Item,  Up: Top

Package Gtk.Extra.Color`_'Combo
*******************************

A Gtk_Color_Combo is a widget that ease the selection of colors  by the
user. It is a special form of a Gtk_Combo_Box, that displays  a special
popup window, with a list of colors.

   Note that nothing appears in the button, this your responsibility to
update it when the user selects a new color (see the "changed" signal).

* Menu:

* Gtk.Extra.Color_Combo Widget Hierarchy::
* Gtk.Extra.Color_Combo Signals::
* Gtk.Extra.Color_Combo Subprograms::


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_Combo_Box (*note Package_Gtk.Extra.Combo_Box::)
                    \___ Gtk_Color_Combo (*note Package_Gtk.Extra.Color_Combo::)


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

Signals
=======

   * "changed"

     procedure Handler (Color_Combo : access
     Gtk_Color_Combo_Record'Class;
     Selection   : Gint;
     Color_Name  : String);
     Emitted when the color has selected a new color.  Selection is the
     number of the selection (this is the total row * Ncols + col).
     Color_Name is the name of the selected color.



File: gtkada_rm.info,  Node: Gtk.Extra.Color_Combo Subprograms,  Prev: Gtk.Extra.Color_Combo Signals,  Up: Package_Gtk.Extra.Color_Combo

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

procedure Gtk_New
     (Widget             : out    Gtk_Color_Combo);

Create a new default combo box.
It shows a list of 40 default colors.
procedure Gtk_New
     (Widget             : out    Gtk_Color_Combo;
        Nrows              : in     Gint;
        Ncols              : in     Gint;
        Color_Names        : in     Gtkada.Types.Chars_Ptr_Array);

Create a new combo box with a specific list of colors.
Note that Color_Names must contain at least Nrows * Ncols elements.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Color_Combo.
function Get_Color_At
     (Widget             : access Gtk_Color_Combo_Record;
        Row                :        Gint;
        Col                :        Gint)
        return String;

Return the name of the color at specific coordinates.
procedure Find_Color
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Color              : in     Gdk.Color.Gdk_Color;
        Row                : out    Gint;
        Col                : out    Gint);

Return the coordinates in which a color appear in the popup window.
(-1, -1) is returned if the color was not found in the combo box.
function Set_Color
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Name               :        String)
        return Boolean;

Set the new current color. If the color is not found in the list of
colors provided in the popup window, False is returned.
function Set_Color
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Color              :        Gdk.Color.Gdk_Color)
        return Boolean;

Set the new current color. Color must have been allocated first.  If the
color is not found in the list of colors provided in the popup window,
False is returned.
function Get_Column
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return the currently selected column in the popup window. You can get
the currently selected color by using Get_Color_At and passing it the
current Row and Column.
function Get_Row
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return The currently selected row.
function Get_Ncols
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return the number of columns in the popup window
function Get_Nrows
     (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gint;

Return the number of rows in the popup window
procedure Changed
     (Color_Combo        : access Gtk_Color_Combo_Record;
        Row                :        Gint;
        Col                :        Gint);

Emit the changed signal for the widget, as if the color at coordinates
(Row, Col) had been selected.   Note that this doesn't change the
internal state of the widget (use  Set_Color for that).
