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

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


File: gtkada_rm.info,  Node: 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.

   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.

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

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

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

procedure Dest_Set
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Flags              :        Dest_Defaults
                            := Dest_No_Default;
        Targets            :        Target_Entry_Array
                            := Any_Target_Entry;
        Actions            :        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       :        Gdk.Window.Gdk_Window;
        Protocol           :        Drag_Protocol;
        Use_Coordinates    :        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.
function Dest_Find_Target
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Context            :        Drag_Context;
        Target_List        :        Gtk.Selection.Target_List)
        return Gdk.Types.Gdk_Atom;

function Dest_Get_Target_List
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class)
        return Target_List;

procedure Dest_Set_Target_List
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Target_List        :        Gtk.Selection.Target_List);

Setting up a widget as a source
-------------------------------

procedure Source_Set
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Start_Button_Mask  :        Gdk.Types.Gdk_Modifier_Type;
        Targets            :        Target_Entry_Array;
        Actions            :        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            :        Drag_Context;
        Success            :        Boolean;
        Del                :        Boolean;
        Time               :        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            :        Drag_Context;
        Target             :        Gdk.Types.Gdk_Atom;
        Time               :        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            :        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            :        Target_List;
        Actions            :        Drag_Action;
        Button             :        Gint;
        Event              :        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.
function Check_Threshold
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Start_X            :        Gint;
        Start_Y            :        Gint;
        Current_X          :        Gint;
        Current_Y          :        Gint)
        return Boolean;

Checks to see if a mouse drag starting at (Start_X, Start_Y) and ending
at (Current_X, Current_Y) has passed the GTK drag threshhold, and thus
should trigger the beginning of a drag-and-drop operation.   Return
True if the drag threshold has been passed.
Icons
-----

procedure Set_Icon_Widget
       (Context            :        Drag_Context;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Hot_X              :        Gint;
        Hot_Y              :        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            :        Drag_Context;
        Colormap           :        Gdk.Color.Gdk_Colormap;
        Pixmap             :        Gdk.Pixmap.Gdk_Pixmap;
        Mask               :        Gdk.Bitmap.Gdk_Bitmap;
        Hot_X              :        Gint;
        Hot_Y              :        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            :        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           :        Gdk.Color.Gdk_Colormap;
        Pixmap             :        Gdk.Pixmap.Gdk_Pixmap;
        Mask               :        Gdk.Bitmap.Gdk_Bitmap;
        Hot_X              :        Gint;
        Hot_Y              :        Gint);

Change the default drag icon. GtkAda retains a reference count for the
arguments, and will release them when they are no longer needed.   This
procedure is deprecated.
procedure Set_Icon_Pixbuf
       (Context            :        Drag_Context;
        Pixbuf             :        Gdk.Pixbuf.Gdk_Pixbuf;
        Hot_X              :        Gint;
        Hot_Y              :        Gint);

Sets Pixbuf as the icon for a given drag.
Context: the context for a drag. (This must be called             with
a  context for the source side of a drag)  Pixbuf: the Gdk_Pixbuf to
use as the drag icon.   Hot_x: the X offset within the pixbuf of the
hotspot.   Hot_y: the Y offset within the pixbuf of the hotspot.
procedure Set_Icon_Stock
       (Context            :        Drag_Context;
        Stock_Id           :        String;
        Hot_X              :        Gint;
        Hot_Y              :        Gint);

Sets the icon for a given drag from a stock ID
Context: the context for a drag. (This must be called             with
a  context for the source side of a drag)  Stock: the ID of the stock
icon to use for the drag.   Hot_x: the X offset within the icon of the
hotspot.   Hot_y: the Y offset within the icon of the hotspot.
procedure Source_Set_Icon
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Colormap           :        Gdk.Color.Gdk_Colormap;
        Pixmap             :        Gdk.Pixmap.Gdk_Pixmap;
        Mask               :        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.
procedure Source_Set_Icon_Pixbuf
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Pixbuf             :        Gdk.Pixbuf.Gdk_Pixbuf);

procedure Source_Set_Icon_Stock
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Stock_Id           :        String);


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_event" and "button_release_event"
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
================

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

Request a new size for the area.
This queues a resize request for the area.   pragma Deprecated (Size);

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

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

   * "changed"

     procedure Handler (Widget : access Gtk_Editable_Record'Class);
     Called when the contents of Widget has changed

   * "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 UTF8_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.



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

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

function Get_Type              return Glib.GType;


Return the internal value associated with a Gtk_Editable.
procedure Select_Region
       (Editable           : access Gtk_Editable_Record;
        Start              :        Gint;
        The_End            :        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 Get_Selection_Bounds
       (Widget             : access Gtk_Editable_Record;
        Success            : out    Boolean;
        Start_Pos          : out    Guint;
        End_Pos            : out    Guint);

Return the position of the start and end of the current selection.
If success is false, Start_Pos and End_Pos are not modified.
procedure Insert_Text
       (Editable           : access Gtk_Editable_Record;
        New_Text           :        UTF8_String;
        Position           : in out Gint);

Insert the given string at the given position.
Position is set to the new cursor position.
procedure Delete_Text
       (Editable           : access Gtk_Editable_Record;
        Start_Pos          :        Gint := 0;
        End_Pos            :        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          :        Gint := 0;
        End_Pos            :        Gint := -1)
        return UTF8_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.
procedure Cut_Clipboard
       (Editable           : access Gtk_Editable_Record);

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

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

The contents of the clipboard is pasted into the given widget at
the current cursor position.
procedure Delete_Selection
       (Editable           : access Gtk_Editable_Record);

Disclaim and delete the current selection.
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.
procedure Set_Editable
       (Widget             : access Gtk_Editable_Record;
        Editable           :        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_Editable
       (Editable           : access Gtk_Editable_Record)
        return Boolean;

Get the editable status of the entry.

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

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

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_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.Color_Combo,  Next: Package_Gtk.Extra.Combo_Box,  Prev: Package_Gtk.Extra.Border_Combo,  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).

   The recommended solution is to put a Gtk_Pixmap as the  child of the
button of the combo box ("Add (Get_Button (Combo), Pixmap)"),  and
updated it in the handler for this 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
================

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Box         (*note Package_Gtk.Box::)
                 \___ Gtk_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              :        Gint;
        Ncols              :        Gint;
        Values             :        Gdk.Color.Gdk_Color_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 Gdk.Color.Gdk_Color;

Return the name of the color at specific coordinates.
procedure Find_Color
       (Color_Combo        : access Gtk_Color_Combo_Record;
        Color              :        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 Get_Selection
       (Color_Combo        : access Gtk_Color_Combo_Record)
        return Gdk.Color.Gdk_Color;

Return the current selection in the combo.
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_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).

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

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

A Gtk_Combo_Box is a general form for a combo box (ie a button
associated with a popup window to select its value).   This widget
should be used only if you intend to write your own kind  of combo box.
You should look at the following widgets for specific  implementation:
Gtk_Combo, Gtk_Color_Combo, Gtk_Border_Combo.

* Menu:

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


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

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

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


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

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

procedure Gtk_New
       (Widget             : out    Gtk_Combo_Box);

Create a new combo box.
This creates all the internal subwidgets (the popup window,...) but
this is your responsibility to put something inside the button or  the
popup window.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Combo_Box.
procedure Hide_Popdown_Window
       (Combobox           : access Gtk_Combo_Box_Record);

Hide the popup window, release the mouse grabs, and restore the
default aspect for the arrow.
function Get_Button
       (Combobox           : access Gtk_Combo_Box_Record)
        return Gtk.Button.Gtk_Button;

Return the button that shows the value of the combo.
function Get_Arrow
       (Combobox           : access Gtk_Combo_Box_Record)
        return Gtk.Arrow.Gtk_Arrow;

Return the arrow button.
The user has to click on it to open the popup window.
function Get_Frame
       (Combobox           : access Gtk_Combo_Box_Record)
        return Gtk.Frame.Gtk_Frame;

The frame displayed in the popup window.
You should add whatever value the popup window should display in it.

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Font_Combo,  Next: Package_Gtk.Extra.Item_Entry,  Prev: Package_Gtk.Extra.Combo_Box,  Up: Top

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

A Gtk_Font_Combo is a small toolbar used to select fonts.   This widget
takes less real-estate on the screen than a  Gtk_Font_Selection widget,
and thus can be kept permanently on the  screen.   This widget only
works with postscript fonts (see Gtk.Extra.PsFont).

* Menu:

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


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

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

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Toolbar     (*note Package_Gtk.Toolbar::)
                 \___ Gtk_Font_Combo (*note Package_Gtk.Extra.Font_Combo::)


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

Signals
=======

   * "changed"

     procedure Handler (Combo : access Gtk_Font_Combo_Record'Class);
     Emitted when a new font was selected by the user.



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

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

procedure Gtk_New
       (Widget             : out    Gtk_Font_Combo);

Create a new combo box
function Get_Type              return Guint;


Return the internal value associated with a Gtk_Font_Combo.
procedure Font_Combo_Select
       (Font_Combo         : access Gtk_Font_Combo_Record;
        Family             : in     String;
        Bold               : in     Boolean;
        Italic             : in     Boolean;
        Height             : in     Gint);

Selects a new font
Family is the name of the postscript font.
procedure Font_Combo_Select_Nth
       (Font_Combo         : access Gtk_Font_Combo_Record;
        N                  : in     Gint;
        Bold               : in     Boolean;
        Italic             : in     Boolean;
        Height             : in     Gint);

Selects the nth font in the combo box.
function Get_Font_Height
       (Font_Combo         : access Gtk_Font_Combo_Record)
        return Glib.Gint;

Return the height of the selected font
function Get_Font
       (Font_Combo         : access Gtk_Font_Combo_Record)
        return Gdk.Font.Gdk_Font;

Return the selected font.
function Get_Font_Description
       (Font_Combo         : access Gtk_Font_Combo_Record)
        return Pango.Font.Pango_Font_Description;

Return the selected font.

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Item_Entry,  Next: Package_Gtk.Extra.Plot,  Prev: Package_Gtk.Extra.Font_Combo,  Up: Top

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

A Gtk_Item_Entry is a special kind of entry item used in a  Gtk_Sheet
to edit the current cell.   It can be used independently, but you
should rather use a more general  Gtk_Entry widget.

* Menu:

* Gtk.Extra.Item_Entry Widget Hierarchy::
* Gtk.Extra.Item_Entry Types::
* Gtk.Extra.Item_Entry Subprograms::


File: gtkada_rm.info,  Node: Gtk.Extra.Item_Entry Widget Hierarchy,  Next: Gtk.Extra.Item_Entry Types,  Up: Package_Gtk.Extra.Item_Entry

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

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Editable       (*note Package_Gtk.Editable::)
              \___ Gtk_Entry       (*note Package_Gtk.GEntry::)
                 \___ Gtk_IEntry   (*note Package_Gtk.Extra.Item_Entry::)


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

Types
=====

subtype Gtk_Item_Entry is Gtk_IEntry;


This type is provided so as to be compatible with the new name used  in
gtk+extra. Both names are kept for backward compatibility.

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

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

procedure Gtk_New
       (Widget             : out    Gtk_IEntry;
        Max                : in     Guint16 := 0);

Create a new entry item.
By default, the maximal length depends only on the size of the widget.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Item_Entry.
procedure Set_Justification
       (Item_Entry         : access Gtk_IEntry_Record;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Change the justification of the text in the entry.
procedure Set_Text
       (Item_Entry         : access Gtk_IEntry_Record;
        Text               : in     String;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Change the text in the entry.
procedure Set_Cursor_Visible
       (Item_Entry         : access Gtk_IEntry_Record;
        Visible            :        Boolean);

Whether the cursor should be visible
function Get_Cursor_Visible
       (Item_Entry         : access Gtk_IEntry_Record)
        return Boolean;

Whether the cursor is visible

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot,  Next: Package_Gtk.Extra.Plot_3D,  Prev: Package_Gtk.Extra.Item_Entry,  Up: Top

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

This package implements a high-level, general purpose plotting widget.
You can display any set of data (set of points, curve defined by a
parametric function, ...). This widget can automatically display them
as a curve, along with labelled axis, axis tic marks, legends,...

   This is the base class, that provides 2D graphics. Some children
provide  polar-coordinates and 3D graphics in addition.

   It fully supports the drag-and-drop protocol for all of its children,
which means that the user can interactively move them in the Gtk_Plot
area.

   A Gtk_Plot is closely associated with a Gdk_Drawable, on which all
the  drawings are done. It can be done anywhere within that drawable,
its  "position" is indicated by a tuple (X, Y), which are two values
between  0.0 and 1.0 (from left to right, or from top to bottom).   Its
size is also given as a ratio other the drawable's size.

   Most points in the plot have also this relative coordinates systems,
which  makes it really easy to handle resizing of a plot window.

   See the package Gtk.Extra.Plot_Ps for a way to easily print a
Gtk_Plot to  a postscript file.

   In this package, font parameters are sometimes required. Here is the
list of possible fonts used by Gtk.Extra:

   * "Times-Roman",

   * "Times-Italic",

   * "Times-Bold",

   * "Times-BoldItalic",

   * "AvantGarde-Book",

   * "AvantGarde-BookOblique",

   * "AvantGarde-Demi",

   * "AvantGarde-DemiOblique",

   * "Bookman-Light",

   * "Bookman-LightItalic",

   * "Bookman-Demi",

   * "Bookman-DemiItalic",

   * "Courier",

   * "Courier-Oblique",

   * "Courier-Bold",

   * "Courier-BoldOblique",

   * "Helvetica",

   * "Helvetica-Oblique",

   * "Helvetica-Bold",

   * "Helvetica-BoldOblique",

   * "Helvetica-Narrow",

   * "Helvetica-Narrow-Oblique",

   * "Helvetica-Narrow-Bold",

   * "Helvetica-Narrow-BoldOblique",

   * "NewCenturySchoolbook-Roman",

   * "NewCenturySchoolbook-Italic",

   * "NewCenturySchoolbook-Bold",

   * "NewCenturySchoolbook-BoldItalic",

   * "Palatino-Roman",

   * "Palatino-Italic",

   * "Palatino-Bold",

   * "Palatino-BoldItalic",

   * "Symbol",

   * "ZapfChancery-MediumItalic",

   * "ZapfDingbats",


* Menu:

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


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

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

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


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

Signals
=======

   * "changed"

     procedure Handler (Plot : access Gtk_Plot_Record'Class);
     Called every time some property of the widget is changed, or the
     widget is moved or resized.

   * "moved"

     function Handler (Plot : access Gtk_Plot_Record'Class;
     X    : Gdouble;
     Y    : Gdouble)
     return Boolean;
     Called when the widget has been moved relative to its drawable.
     Its new position is given in parameters.

   * "resized"

     function Handler (Plot   : access Gtk_Plot_Record'Class;
     Width  : Gdouble;
     Height : Gdouble)
     return Boolean;
     Called when the widget has been resized relative to its drawable.
     Its new size is given in parameters.

   * "tick_label"

     function Handler (Axis  : access Gtk_Plot_Axis_Record'Class;
     Tick  : Gdouble_Access;
     Label : Interfaces.C.Strings.chars_ptr)
     return Boolean;
     Called when a label should be drawn. You can modify the contents
     of Label (up to 100 characters) a



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

Types
=====

type Gtk_Plot_Line is new Gdk.C_Proxy;


A simple line drawn on the plot.
type Gtk_Plot_Text is new Gdk.C_Proxy;


A text that can be displayed anywhere on the plot.
type Plot3D_Function is access function
         (Plot  : System.Address;

type Plot_Angle is
         (Angle_0, Angle_90, Angle_180, Angle_270);

Valid values for the angles of texts and titles.     pragma Convention
(C, Plot_Angle);
type Plot_Axis_Pos is
         (Axis_Left, Axis_Right, Axis_Top, Axis_Bottom);

Where the axis should be put    pragma Convention (C, Plot_Axis_Pos);
type Plot_Border_Style is
         (Border_None,
             -- No border is drawn
     
          Border_Line,
             -- A simple line on each side
     
          Border_Shadow
             -- The right and bottom lines are
             -- thicker
          );

Border types used for legends.     pragma Convention (C,
Plot_Border_Style);
type Plot_Error is
         (Error_Div_Zero, Error_Log_Neg);

Errors that can be encountered while calculating a graph.     pragma
Convention (C, Plot_Error);
type Plot_Label_Pos is new Integer;


Position of labels along an axis.
subtype Plot_Label_Style is Gtk.Extra.Plot_Data.Plot_Label_Style;


type Plot_Orientation is
         (Axis_X, Axis_Y, Axis_Z);

How to reference axis in 3D plots    pragma Convention (C,
Plot_Orientation);
subtype Plot_Scale is Gtk.Extra.Plot_Data.Plot_Scale;


type Plot_Ticks_Pos is new Integer;


The position and orientation of the ticks along an axis.   See the
constants below for the possible values.   Note also that not all the
values are valid with all types of axis.
