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

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


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

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_Button   (*note Package_Gtk.Button::)
                    \___ Gtk_Toggle_Button (*note Package_Gtk.Toggle_Button::)
                       \___ Gtk_Check_Button (*note Package_Gtk.Check_Button::)
                          \___ Gtk_Radio_Button (*note Package_Gtk.Radio_Button::)


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

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

procedure Gtk_New
       (Radio_Button       : out    Gtk_Radio_Button;
        Group              :        Widget_SList.GSlist
                            := Widget_SList.Null_List;
        Label              :        UTF8_String := "");

Create a new radio button, belonging to Group.
If Label is left as the empty string, then the button will not have any
child and you are free to put any thing you want in it, including a
pixmap.   To initialize the group (when creating the first button),
leave Group  to the Null_List. You can later get the new group that is
created with  a call to the Group subprogram below.
procedure Gtk_New
       (Radio_Button       : out    Gtk_Radio_Button;
        Group              :        Gtk_Radio_Button;
        Label              :        UTF8_String := "");

Create a new radio button in the same group as Group.
If Label is left as the empty string, Radio_Button is created without
any child and you can put whatever you want in it, including a pixmap.

   To initialize a new group (when creating the first button), you
should  pass it null or a button that has not been created with
Gtk_New, as in  the example below.
procedure Gtk_New_With_Mnemonic
       (Radio_Button       : out    Gtk_Radio_Button;
        Group              :        Widget_SList.GSlist
                            := Widget_SList.Null_List;
        Label              :        UTF8_String);

Create a new Gtk_Radio_Button containing a Label. The Label is created
using Gtk.Label.New_With_Mnemonic, so underscores in Label indicate
the mnemonic for the button.

   To initialize a new group (when creating the first button), you
should  pass it null or a button that has not been created with
Gtk_New, as in  the example below.
procedure Gtk_New_With_Mnemonic
       (Radio_Button       : out    Gtk_Radio_Button;
        Group              :        Gtk_Radio_Button;
        Label              :        UTF8_String);

Create a new radio button in the same group as Group. The label is
created using Gtk.Label.New_With_Mnemonic, so underscores in Label
indicate the mnemonic for the button.

   To initialize a new group (when creating the first button), you
should  pass it null or a button that has not been created with
Gtk_New, as in  the example below.
procedure Initialize_With_Mnemonic
       (Radio_Button       : access Gtk_Radio_Button_Record'Class;
        Group              :        Widget_SList.GSlist;
        Label              :        UTF8_String);

procedure Initialize_With_Mnemonic
       (Radio_Button       : access Gtk_Radio_Button_Record'Class;
        Group              :        Gtk_Radio_Button;
        Label              :        UTF8_String);

function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Radio_Button.
function Get_Group
       (Radio_Button       : access Gtk_Radio_Button_Record)
        return Widget_SList.GSlist;

Return the group to which Radio_Button belongs.
This can be used as an argument to the first version of Gtk_New above,
or the list can also be traversed to get all the buttons.
function Group
       (Radio_Button       : access Gtk_Radio_Button_Record)
        return Widget_SList.GSlist;

This function is deprecated.
procedure Set_Group
       (Radio_Button       : access Gtk_Radio_Button_Record;
        Group              :        Widget_SList.GSlist);

Modify the group to which the button belongs.
This will not change anything visually.

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

Example
=======

      --  This creates a group of two buttons. Note how the group is initialized.
     
      declare
         Radio_Button : Gtk_Radio_Button;
      begin
         Gtk_New (Radio_Button,
                  Group       => Radio_Button,
                  Label       => "First button");
         Gtk_New (Radio_Button,
                  Group       => Radio_Button,
                  Label       => "Second button");
      end;


File: gtkada_rm.info,  Node: Package_Gtk.Scrolled_Window,  Next: Package_Gtk.Selection,  Prev: Package_Gtk.Radio_Button,  Up: Top

Package Gtk.Scrolled`_'Window
*****************************

Gtk_Scrolled_Window is a Gtk_Bin child: it's a container the accepts a
single child widget. Gtk_Scrolled_Window adds scrollbars to the child
widget.

   The scrolled window can work in two ways. Some widgets have native
scrolling support; these widgets have "slots" for Gtk_Adjustment
objects.   The scrolled window installs Gtk_Adjustment objects in the
child window's  slots using the "set_scroll_adjustments" signal
(Conceptually, these  widgets implement a "Scrollable" interface).

   The second way to use the scrolled window is useful with widgets
that lack  the "set_scroll_adjustments" signal. The Gtk_Viewport widget
acts as a  proxy, implementing scrollability for child widgets that
lack their own  scrolling capabilities.

   If a widget has native scrolling abilities, it can be added to the
Gtk_Scrolled_Window with Gtk.Container.Add. If a widget does not, you
must  first add the widget to a Gtk_Viewport, then add the Gtk_Viewport
to the  scrolled window. The convenience function Add_With_Viewport
does exactly  this, so you can ignore the presence of the viewport.

   If you want to create your own new widget type that can be inserted
directly into a scrolled_window, you need to specify a signal for
Set_Scroll_Adjustments in the call to
Gtk.Object.Initialize_Class_Record.

* Menu:

* Gtk.Scrolled_Window Widget Hierarchy::
* Gtk.Scrolled_Window Subprograms::


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

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_Scrolled_Window (*note Package_Gtk.Scrolled_Window::)


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

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

procedure Gtk_New
       (Scrolled_Window    : out    Gtk_Scrolled_Window;
        Hadjustment        :        Gtk_Adjustment
                            := Null_Adjustment;
        Vadjustment        :        Gtk_Adjustment
                            := Null_Adjustment);

Create a new scrolled window.
The two arguments are the scrolled window's horizontal and vertical
adjustments; these will be shared with the scrollbars and the child
widget to keep the bars in sync with the child. Usually you want to use
the default value Null_Adjustment for the adjustments, which will cause
the scrolled window to create them for you.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Scrolled_Window.
procedure Set_Hadjustment
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Hadjustment        :        Gtk_Adjustment);

Set the Gtk_Adjustment for the horizontal scrollbar.
procedure Set_Vadjustment
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Vadjustment        :        Gtk_Adjustment);

Set the Gtk_Adjustment for the vertical scrollbar.
function Get_Hadjustment
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record)
        return Gtk_Adjustment;

Return the horizontal scrollbar's adjustment.
This adjustment is used to connect the horizontal scrollbar to the child
widget's horizontal scroll functionality.
function Get_Vadjustment
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record)
        return Gtk_Adjustment;

Return the vertical scrollbar's adjustment.
This adjustment is used to connect the vertical scrollbar to the child
widget's vertical scroll functionality.
procedure Set_Policy
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        H_Scrollbar_Policy  :        Enums.Gtk_Policy_Type;
        V_Scrollbar_Policy  :        Enums.Gtk_Policy_Type);

Set the scrollbar policy for the horizontal and vertical scrollbars.
It determines when the scrollbar should appear; it is a value  from the
Gtk_Policy_Type enumeration. If Policy_Always, the scrollbar is  always
present; if Policy_Never, the scrollbar is never present; if
Policy_Automatic, the scrollbar is present only if needed (that is, if
the slider part of the bar would be smaller than the trough - the
display is larger than the page size).
procedure Get_Policy
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        H_Scrollbar_Policy  : out    Enums.Gtk_Policy_Type;
        V_Scrollbar_Policy  : out    Enums.Gtk_Policy_Type);

Return the scrollbar policy for the horizontal and vertical scrollbars.
procedure Set_Placement
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Window_Placement   :        Gtk.Enums.Gtk_Corner_Type);

Determine the location of the widget with respect to the scrollbars.
The default is Corner_Top_Left.
function Get_Placement
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record)
        return Gtk.Enums.Gtk_Corner_Type;

Return the location of the widget with respect to the scrollbars.
procedure Set_Shadow_Type
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Shadow_Type        :        Gtk.Enums.Gtk_Shadow_Type);

Change the type of shadow drawn around the contents of Scrolled_Window.
function Get_Shadow_Type
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record)
        return Gtk.Enums.Gtk_Shadow_Type;

Return the type of shadow drawn around the contents of Scrolled_Window.
procedure Add_With_Viewport
       (Scrolled_Window    : access Gtk_Scrolled_Window_Record;
        Child              : access Gtk.Widget.Gtk_Widget_Record'Class);

Used to add children without native scrolling capabilities.
This is simply a convenience function; it is equivalent to adding the
unscrollable child to a viewport, then adding the viewport to the
scrolled window. If a child has native scrolling, use Gtk.Container.Add
instead of this function.

   The viewport scrolls the child by moving its Gdk_Window, and takes
the  size of the child to be the size of its toplevel Gdk_Window. This
will  be very wrong for most widgets that support native scrolling; for
example, if you add a Gtk_Clist with a viewport, the whole widget will
scroll, including the column headings. Thus Gtk_Clist supports
scrolling  already, and should not be used with the GtkViewport proxy.

   A widget supports scrolling natively if it contains a valid
"set_scroll_adjustments" signal.

File: gtkada_rm.info,  Node: Package_Gtk.Selection,  Next: Package_Gtk.Separator_Menu_Item,  Prev: Package_Gtk.Scrolled_Window,  Up: Top

Package Gtk.Selection
*********************

This package implements support for the selection mechanism (ie a way to
get a currently active selection anywhere on your Xserver or on your
Windows machine).

   This also acts as the low-level support for drag-and-drop, as
described  in Gtk.Dnd.

   A lot of subprograms in this package work on Gdk_Atom types, instead
of  strings. Converting from one to the other can easily be done through
calls to the subprograms in Gdk.Property (Atom_Intern and Atom_Name).
The reason we use Gdk_Atom is for efficiency, since comparing two
integers  is of course faster than comparing two strings.

   The selection mechanism is the primary mechanism by which
applications  can transfer data to each other on a given system. Even
though both  applications must be visible on the same screen, this does
not mean that  they can access the same files or ressources, since they
might in fact  be running on different machines. You should always keep
this in mind  when setting the data to be transfered.

   A selection is a essentially a named clipboard, identified by a
string  interned as a Gdk_Atom. By claiming ownership of a selection, an
application indicates that it will be responsible for supplying its
contents.

   The contents of a selection can be represented in a number of
formats,  called targets. Each target is identified by an atom. A list
of all  possible targets supported by the selection owner can be
retrieved by  requesting the special target TARGETS. When a selection
is retrieved, the  data is accompanied by a type (an atom), and a
format (an integer,  representing the number of bits per item).

   See also `http://www.freedesktop.org/standards/clipboards.txt' for
more information on the way selection works on X-Window systems.

* Menu:

* Gtk.Selection Signals::
* Gtk.Selection Types::
* Gtk.Selection Subprograms::


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

Signals
=======

   * "selection_get"

     procedure Handler (Widget : access Gtk_Widget_Record'Class;
     Data   : Selection_Data;
     Info   : Guint;
     Time   : Guint);
     This signal is sent to the owner of a selection whenever some other
     widget wants to get data from that selection. The type of the data
     is indicated in Info, and is the third field that was set in the
     Target_Entrys for that specific widget and selection.

     The handler should modify the Data in the selection.

   * "selection_received"

     procedure Handler (Widget : access Gtk_Widget_Record'Class;
     Data   : Selection_Data;
     Time   : Guint);
     This signal is sent to the receiver end of a selection, when the
     data has been sent by the owner. The receiver should call Convert,
     which will emit the signal selection_get to ask for the contents
     of the selection, and then selection_received will be emitted to
     warn the receiver.

     Note: you can not connect this signal to a widget that does not
     have an associated Gdk_Window (i.e the flag Gtk.Widget.No_Window
     must not be set for this widget), since it needs to be able to
     receive Property_Notify events from the server. It will not work
     with a Gtk_Label for instance.



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

Types
=====

subtype Gdk_Selection is Gdk.Types.Gdk_Atom;


These are predefined atom values for several common selections.   You
are of course free to create new ones, but most of the time you  should
simply use Selection_Primary unless you foresee the need for  multiple
simultaneous selections.   To access the clipboard on windows machines,
you might need to create  a new selection with Gdk.Property.Atom_Intern
("CLIPBOARD");
subtype Gdk_Selection_Type is Gdk.Types.Gdk_Atom;


Predefined atom values for selection types.   Although the preferred
way in GtkAda to indicate the type of a selection  is to use mime
types, these values are provided for compatibility with  older X11
applications.
subtype Gdk_Target is Gdk.Types.Gdk_Atom;


Predefined atom values which are used to describe possible targets for
a selection. Other atoms can be used, and the recommended practice for
GtkAda is to to use mime types for this purpose. However, supporting
these types may be useful for compatibility with older programs.
type Selection_Data is new Gdk.C_Proxy;


Contents of a selection or a drag-and-drop operation.   This structure
can only be created internally by GtkAda. However, you  need to be able
to access it to get the selection.   - Selection and Target identify
the request.   - Type specifies the type of the return.   - if Length
is negative, the Data should be ignored. Otherwise, it  contains the
data itself.   - Time gives the timestamp at which the data was sent.
type Target_Entry is record
         Target : Gtkada.Types.Chars_Ptr;
         Flags  : Target_Flags;
         Info   : Guint;
         end record;

A single type of data that can be supplied or received during a
drag-and-drop or a selection.    Target is a string that represents the
drag type. This can be any  string if you want to implement
drag-and-drop inside your application.   However, if you want to
communicate with other external application,  you should use MIME
types, ie "text/plain", "text/uri-list", ...   See the RFCs 2045, 2046,
2047, 2048, 2049 for more information on  MIME types.    For more
information, see
ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/   Another set
of supported names are the ones associated with the X  Inter-Client
Communications Conventions Manual (ICCCM).   Here some of the default
names and their meaning. See the ICCCM manual  online for a complete
list (for instance at  http://www.tronche.com/gui/x/icccm/).    -
"TIMESTAMP"   (type Integer)  Timestamp used to acquire the selection
- "TEXT"        (type Text)     Text in owner's encoding  - "STRING"
 (type String)   Iso Latin1 text  - "PIXMAP"      (type Drawable)
Pixmap Id  - "BITMAP"      (type Bitmap)   Bitmap Id  - "FOREGROUND"
(type Pixel)    Pixel Value  - "BACKGROUND"  (type Pixel)    Pixel Value
 Info is an application-assigned integer (i.e. that you choose), that
will be passed as a signal parameter for all the dnd-related signals,
like "selection_get". This saves a lot of expensive string compares,
and in fact replaced Target everywhere in your application expect in
Source_Set and Dest_Set.
type Target_Entry_Array is array (Natural range <>) of Target_Entry;


type Target_Flags is new Integer;


Used to specify constraints on an entry
type Target_List is new Gdk.C_Proxy;


A list of targets.   You can only manipulate this list through the
functions below.

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

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

Target_List
-----------

function Target_List_New
       (Targets            :        Target_Entry_Array)
        return Target_List;

Create a new list of target, starting from an array.
procedure Target_List_Ref
       (List               :        Target_List);

Increment the reference count for the list.
You should almost never have to use this function, this is done
transparently by GtkAda.
procedure Target_List_Unref
       (List               :        Target_List);

Decrement the reference count for the list.
You should almost never have to use this function, since everything is
done transparently by GtkAda.   As usual, the list is freed when the
reference count reaches 0.
procedure Target_List_Add
       (List               :        Target_List;
        Target             :        Gdk.Types.Gdk_Atom;
        Flags              :        Guint;
        Info               :        Guint);

Add a new target to the list.
You can for instance use the result of Get_Targets (Drag_Context) for
the value of Target.
procedure Target_List_Add_Table
       (List               :        Target_List;
        Targets            :        Target_Entry_Array);

Add a new set of targets to the list.
procedure Target_List_Remove
       (List               :        Target_List;
        Target             :        Gdk.Types.Gdk_Atom);

Remove a specific target from the list.
procedure Target_List_Find
       (List               :        Target_List;
        Target             :        Gdk.Types.Gdk_Atom;
        Info               : out    Guint;
        Found              : out    Boolean);

Search for a specific target in the list.
If the target was found, Found is set to True and Info contains the
integer that was associated with the target when it was created.
Selection_Data
--------------

function Get_Selection
       (Selection          :        Selection_Data)
        return Gdk_Selection;

Return the selection used (primary, clipboard, ...)
function Get_Target
       (Selection          :        Selection_Data)
        return Gdk.Types.Gdk_Atom;

Return the target of the selection (ie a MIME string that identifies
the selection).
function Get_Type
       (Selection          :        Selection_Data)
        return Gdk.Types.Gdk_Atom;

Return the type of the selection, as defined in Gdk_Selection_Type,
ie for compatibility with older X11 applications.
function Get_Format
       (Selection          :        Selection_Data)
        return Gint;

Return the format of the data.
The semantics depends on the type of data. For instance, for strings
this is the number of bits per character.
function Get_Data
       (Selection          :        Selection_Data)
        return System.Address;

Return the data of the selection.
This should be ignored if Get_Length returns a value < 0.
function Get_Data_As_String
       (Selection          :        Selection_Data)
        return String;

Return the data as a string.
This is only a convenience function, since it simply creates a string
from the return of Get_Data.
function Get_Length
       (Selection          : in     Selection_Data)
        return Gint;

Return the length of the data.
procedure Selection_Data_Set
       (Selection          :        Selection_Data;
        The_Type           :        Gdk.Types.Gdk_Atom;
        Format             :        Gint;
        Data               :        System.Address;
        Length             :        Gint);

General form of Selection_Data_Set.
Any data can be transmitted. Length is the number of bytes in Data.
procedure Selection_Data_Set
       (Selection          :        Selection_Data;
        The_Type           :        Gdk.Types.Gdk_Atom;
        Format             :        Gint;
        Data               :        String);

Set the data for a selection (special case for strings)
This function is generally called when a drag-and-drop operation  ask
the source widget for the data to be transmitted. In that case,  a
Selection_Data was already transmitted and is given as a handler
parameter for the signal "drag_data_get". The_Type can simply be
extracted from the Selection_Data.
function Selection_Data_Copy
       (Selection          :        Selection_Data)
        return Selection_Data;

Make a copy of a selection data.
procedure Selection_Data_Free
       (Selection          :        Selection_Data);

Free a Selection_Data structure returned from Selection_Data_Copy.
Manipulating the selection
--------------------------

function Owner_Set
       (Widget             :        Gtk.Widget.Gtk_Widget;
        Selection          :        Gdk_Selection
                            := Selection_Primary;
        Time               :        Guint32 := 0)
        return Boolean;

Claim ownership of a given selection for a particular widget,
or, if widget is null, release ownership of the selection.

   Once a Widget has claimed selection, it is responsible for delivering
the data whenever it is needed.

   Time is the timestamp for claiming the selection (default is the
current  time).   This function returns True if the operation succeeded.
procedure Add_Target
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Selection          :        Gdk_Selection;
        Target             :        Gdk.Types.Gdk_Atom;
        Info               :        Guint);

Add specified target to the list of supported targets for a given
widget and selection.   Info is an integer which will be passed back to
the application instead  of a string when the target is used.
procedure Add_Targets
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Selection          :        Gdk_Selection;
        Targets            :        Target_Entry_Array);

Add a set of targets to the list of supported targets for a given widget
and selection.
procedure Clear_Targets
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Selection          :        Gdk_Selection);

Clear the list of supported targets for a given widget and selection.
function Convert
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class;
        Selection          :        Gdk_Selection
                            := Selection_Primary;
        Target             :        Gdk.Types.Gdk_Atom;
        Time               :        Guint32 := 0)
        return Boolean;

Request the contents of a selection.
When received, a "selection_received" signal will be generated, and the
widget needs to have a handler for it.

   Target is the form of information desired, for instance an intern
Gdk_Atom whose name is "text/plain", or one of the Gdk_Target values.

   This function returns True if the request succeeded, False if the
request could not be processed, for instance if there was already a
request in process for this widget or this target is not known by the
owner of the selection.

   Widget is the widget which acts as a requestor.
procedure Remove_All
       (Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Remove all handlers and unsets ownership of all selections for a widget.
Called when widget is being destroyed. This function will not generally
be called by applications.
Signals
-------

function Make_Atom
       (Num                :        Gulong)
        return Gdk.Types.Gdk_Atom;


File: gtkada_rm.info,  Node: Package_Gtk.Separator_Menu_Item,  Next: Package_Gtk.Size_Group,  Prev: Package_Gtk.Selection,  Up: Top

Package Gtk.Separator`_'Menu`_'Item
***********************************

This widget serves as separator between menu items.

* Menu:

* Gtk.Separator_Menu_Item Widget Hierarchy::
* Gtk.Separator_Menu_Item Subprograms::


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

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_Item     (*note Package_Gtk.Item::)
                    \___ Gtk_Menu_Item (*note Package_Gtk.Menu_Item::)
                       \___ Gtk_Separator_Menu_Item (*note Package_Gtk.Separator_Menu_Item::)


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

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

procedure Gtk_New
       (Widget             : out    Gtk_Separator_Menu_Item);

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


Return the internal value associated with this widget.

File: gtkada_rm.info,  Node: Package_Gtk.Size_Group,  Next: Package_Gtk.Socket,  Prev: Package_Gtk.Separator_Menu_Item,  Up: Top

Package Gtk.Size`_'Group
************************

Gtk_Size_Group provides a mechanism for grouping a number of widgets
together so they all request the same amount of space. This is typically
useful when you want a column of widgets to have the same size, but you
can't use a Gtk_Table widget.

   Note that size groups only affect the amount of space requested, not
the  size that the widgets finally receive. If you want the widgets in a
Gtk_Size_Group to actually be the same size, you need to pack them in
such  a way that they get the size they request and not more. For
example, if you  are packing your widgets into a table, you would not
include the Fill flag.

* Menu:

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


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

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

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Size_Group        (*note Package_Gtk.Size_Group::)


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

Types
=====

type Property_Size_Group_Mode is new Size_Group_Mode_Properties.Property;


type Size_Group_Mode is
         (None, Horizontal, Vertical, Both);


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

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

procedure Gtk_New
       (Size_Group         : out    Gtk_Size_Group;
        Mode               :        Size_Group_Mode := Both);

Create a new group.
Initially, it doesn't contain any widget, and you need to add them with
the Add_Widget procedure.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Size_Group
procedure Set_Mode
       (Size_Group         : access Gtk_Size_Group_Record;
        Mode               :        Size_Group_Mode);

Change the way the group effects the size of its component widgets.
function Get_Mode
       (Size_Group         : access Gtk_Size_Group_Record)
        return Size_Group_Mode;

Indicate the way the group effects the size of its component widgets.
procedure Add_Widget
       (Size_Group         : access Gtk_Size_Group_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Add a new widget in the group.
Its size will be effected by all other widgets in the group: the size
requisition of the widget will be the maximum of its requisition and the
requisition of the other widgets in the group (depending on the group
mode).

   A given widget can belong to only one size group. It is removed from
its  previous group before being added to Size_Group.
procedure Remove_Widget
       (Size_Group         : access Gtk_Size_Group_Record;
        Widget             : access Gtk.Widget.Gtk_Widget_Record'Class);

Remove a widget from the group.

File: gtkada_rm.info,  Node: Package_Gtk.Socket,  Next: Package_Gtk.Spin_Button,  Prev: Package_Gtk.Size_Group,  Up: Top

Package Gtk.Socket
******************

Note that this package is currently not supported under Win32 systems.

   Together with Gtk_Plug, Gtk_Socket provides the ability to embed
widgets  from one process into another process in a fashion that is
transparent to  the user. One process creates a Gtk_Socket widget and,
passes the XID of  that widget's window to the other process, which
then creates a Gtk_Plug  window with that XID.   Any widgets contained
in the Gtk_Plug then will appear inside the first  applications window.

   The XID of the socket's window is obtained by using the  XWindow
function provided in this package. Before using  this macro, the socket
must have been realized, and for hence, have been  added to its parent.

   Note that if you pass the XID of the socket to another process that
will  create a plug in the socket, you must make sure that the socket
widget is  not destroyed until that plug is created. Violating this
rule will cause  unpredictable consequences, the most likely
consequence being that the plug  will appear as a separate toplevel
window. You can check if the plug has  been created by examining the
plug_window field of the Gtk_Socket  structure. If this field is
non-NULL, then the plug has been succesfully  created inside of the
socket.

   When GtkAda is notified that the embedded window has been destroyed,
then  it will destroy the socket as well. You should always, therefore,
be  prepared for your sockets to be destroyed at any time when the main
event  loop is running.

   A socket can also be used to swallow arbitrary pre-existing top-level
windows using Steal, though the integration when this is done will not
be  as close as between a Gtk_Plug and a Gtk_Socket. All you need in
that case  is the X11 window identifier for the external process.

   Note that it is recommended that the external window be first hidden
before  being swallowed, so that Gtk.Socket works with most window
managers. If  you start with visible windows, some window managers will
not be able to  correctly merge the two windows (Enlightenment for
instance).

* Menu:

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


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

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_Socket      (*note Package_Gtk.Socket::)


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

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

procedure Gtk_New
       (Widget             : out    Gtk_Socket);

Create a new empty GtkSocket.
function Get_Type              return Glib.GType;


Return the internal value associated with a Gtk_Socket.
procedure Add_Id
       (Socket             : access Gtk_Socket_Record;
        Id                 :        Guint32);

Add an XEMBED client, such as a Gtk_Plug, to the Gtk_Socket.
The client may be in the same process or in a different process.

   To embed a Gtk_Plug in a Gtk_Socket, you can either create the
Gtk_Plug with Gtk_New (0), call Gtk.Plug.Get_Id to get the  window ID
of the plug, and then pass that to the Gtk.Socket.Add_Id, or  you can
call Gtk.Socket.Get_Id to get the window ID for the socket, and  call
Gtk.Plug.Gtk_New passing in that ID.

   Id: the XID of a client participating in the XEMBED protocol.

   The Gtk_Socket must have already be added into a toplevel window
before you can make this call.
function Get_Id
       (Socket             : access Gtk_Socket_Record)
        return Guint32;

Get the window ID of a Gtk_Socket widget, which can then be used to
create a client embedded inside the socket, for instance with
Gtk.Socket.Gtk_New (Id). The Gtk_Socket must have already been added
into a toplevel window before you can make this call.
function Get_Plug_Window
       (Socket             : access Gtk_Socket_Record)
        return Gdk.Window.Gdk_Window;

Return the id of the embedded window.

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

Example
=======

      Obtaining the XID of a socket
     
      with Gtk.Socket;
      use Gtk.Socket;
     
      Socket : Gtk_Socket;
     
      Gtk_New (Socket);
      Show (Socket);
      Add (Parent, Socket);
     
      --  The following call is only necessary if one of
      --  the ancestors of the socket is not yet visible.
     
      Realize (Socket);
      Put_Line ("The XID of the sockets window is" &
                Guint32'Image (Get_Id (Socket)));


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

Package Gtk.Spin`_'Button
*************************

A Gtk_Spin_Button is a single line text editing widget for text that
represents a number. At the right hand side of the text line there are
small up- and down arrow buttons for incrementing or decrementing
(spinning) the number within a given range.   It allows the value to
have zero or a number of decimal places and  to be
incremented/decremented in configurable steps.   The action of holding
down one of the buttons optionally results in an  acceleration of
change in the value according to how long it is  depressed.

   *note Package_Gtk.GEntry:: for a text editing widget without spin
buttons.

* Menu:

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


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

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_Spin_Button (*note Package_Gtk.Spin_Button::)


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

Types
=====

type Gtk_Spin_Button_Update_Policy is
         (Update_Always,
             -- Update always, errors are ignored while converting text into a
             -- numeric value.
     
          Update_If_Valid
             -- The spin button's value gets changed if the text input is a numeric
             -- value that is within the range specified by the adjustment.
          );

Determine the update policy of the spin button which affects the
behaviour when parsing inserted text and syncing its value with the
values of the adjustment.     pragma Convention (C,
Gtk_Spin_Button_Update_Policy);
type Gtk_Spin_Type is
         (Spin_Step_Forward,
          Spin_Step_Backward,
          Spin_Page_Forward,
          Spin_Page_Backward,
          Spin_Home,
          Spin_End,
          Spin_User_Defined);

Determine how manual spinning should be done.   See also the Spin
procedure.     pragma Convention (C, Gtk_Spin_Type);

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

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

procedure Gtk_New
       (Spin_Button        : out    Gtk_Spin_Button;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment;
        Climb_Rate         :        Gdouble;
        The_Digits         :        Gint);

Create a spin button with the given parameters.
Adjustment contains the range, current value, step value and  "page"
value. The step value is the increment/decrement when pressing  mouse
button 1 on a button; the page value when mouse button 2 is  pressed.
Additionally, mouse button 3 can be used to jump directly to  the or
lower values when used to select one of the buttons.   Climb_Rate takes
a value between 0.0 and 1.0 and indicates the  amount of acceleration
that the Spin Button has.   The_Digits is the number of digits behind
the decimal point to be  displayed for the value.
procedure Gtk_New
       (Spin_Button        : out    Gtk_Spin_Button;
        Min                :        Gdouble;
        Max                :        Gdouble;
        Step               :        Gdouble);

Same as above, but with explicit range instead of an adjustment.
The adjustment associated with Spin_Button is created internally.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Spin_Button.
procedure Set_Adjustment
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Adjustment         :        Gtk.Adjustment.Gtk_Adjustment);

Set the adjustment settings of the spin button.
function Get_Adjustment
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Gtk.Adjustment.Gtk_Adjustment;

Return the adjustment settings of the spin button.
procedure Set_Digits
       (Spin_Button        : access Gtk_Spin_Button_Record;
        The_Digits         :        Guint);

Set number of decimals of the spin button.
function Get_Digits
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Guint;

Return the number of decimals of the spin button.
procedure Set_Increments
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Step               :        Gdouble;
        Page               :        Gdouble);

Set increments for a single step and a page move.
procedure Get_Increments
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Step               : out    Gdouble;
        Page               : out    Gdouble);

Return increments for a single step and a page move.
procedure Set_Range
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Min                :        Gdouble;
        Max                :        Gdouble);

Set range of the spin button.
procedure Get_Range
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Min                : out    Gdouble;
        Max                : out    Gdouble);

Return range of the spin button.
function Get_Value
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Gdouble;

Return the current value of the spin button in a float.
function Get_Value_As_Int
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Gint;

Return the current value of the spin button in an integer.
procedure Set_Value
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Value              :        Gdouble);

Set the current value of the spin button.
procedure Set_Update_Policy
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Policy             :        Gtk_Spin_Button_Update_Policy);

Set the update policy of the spin button.
See Gtk_Spin_Button_Update_Policy for the meaning of Policy.
function Get_Update_Policy
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Gtk_Spin_Button_Update_Policy;

Return the update policy of the spin button.
procedure Set_Numeric
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Numeric            :        Boolean);

If Numeric is True, then only a numeric value can be typed in the
text entry, otherwise also nonnumeric text.
function Get_Numeric
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Boolean;

Return whether only numeric values can be typedin the text entry.
procedure Spin
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Direction          :        Gtk_Spin_Type;
        Step               :        Gdouble);

Set the value of the spin button relative to its current value.
Depending on Direction, it will be incremented or decremented with  the
step value.
procedure Set_Wrap
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Wrap               :        Boolean);

Set whether the spin button should "wrap around" when exceeding the
upper and lower limits.
function Get_Wrap
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Boolean;

Return whether the spin button will "wrap around" when exceeding the
upper and lower limits.
procedure Set_Snap_To_Ticks
       (Spin_Button        : access Gtk_Spin_Button_Record;
        Snap_To_Ticks      :        Boolean);

Set the spin button to round the value to the nearest step value
which is set within its adjustment settings.
function Get_Snap_To_Ticks
       (Spin_Button        : access Gtk_Spin_Button_Record)
        return Boolean;

Return whether the spin button rounds the value to the nearest step
value which is set within its adjustment settings.
procedure Update
       (Spin_Button        : access Gtk_Spin_Button_Record);

Manually force an update of the spin button.

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

Package Gtk.Status`_'Bar
************************

A status bar is a special widget in which you can display messages.
This type of widget is generally found at the bottom of application
windows, and is used to display help or error messages.

   This widget works as a stack of messages, ie all older messages are
kept when a new one is inserted. It is of course possible to remove the
most recent message from the stack.   This stack behavior is
especially useful when messages can be displayed  from several places
in your application. Thus, each one subprogram that  needs to print a
message can simply push it on the stack, and does not  need to make
sure that the user has had enough time to read the previous  message (a
timeout can be set to automatically remove the message after  a
specific delay)

   Each message is associated with a specific Context_Id. Each of this
context  can have a special name, and these context can be used to
organize the  messages into categories (for instance one for help
messages and one for  error messages). You can then selectively remove
the most recent message  of each category.

* Menu:

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


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

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

     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_Status_Bar (*note Package_Gtk.Status_Bar::)


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

Signals
=======

   * "text_popped"

     procedure Handler (Status_Bar : access Gtk_Status_Bar_Record'Class;
     Context    : Context_Id;
     Text       : Interfaces.C.Strings.chars_ptr);
     Emitted when a message has been removed from the queue.

   * "text_pushed"

     procedure Handler (Status_Bar : access Gtk_Status_Bar_Record'Class;
     Context    : Context_Id;
     Text       : Interfaces.C.Strings.chars_ptr);
     Emitted when a new message has been in the queue.



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

Types
=====

type Context_Id is new Guint;


subtype Gtk_Statusbar is Gtk_Status_Bar;


This is needed by Gate since the C name is GtkStatusbar
type Message_Id is new Guint;


type Status_Bar_Msg is record
         Text    : Interfaces.C.Strings.chars_ptr;
         Context : Context_Id;
         Message : Message_Id;
         end record;

A message from the queue. Each of this message is associated with a
specific context, and has a specific number.

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

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

function Convert
       (Msg                :        Status_Bar_Msg)
        return System.Address;

procedure Gtk_New
       (Statusbar          : out    Gtk_Status_Bar);

Create a new status bar, in which messages will be displayed.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Status_Bar.
function Get_Context_Id
       (Statusbar          : access Gtk_Status_Bar_Record;
        Context_Description  :        String)
        return Context_Id;

Create the context id associated with a special name.
If no context is currently associated with Context_Description, then  a
new context is created.
function Get_Messages
       (Statusbar          : access Gtk_Status_Bar_Record)
        return Messages_List.GSlist;

Return a list of all the messages currently stored in the queue.
The first item in the list is the most recent message.
function Push
       (Statusbar          : access Gtk_Status_Bar_Record;
        Context            :        Context_Id;
        Text               :        UTF8_String)
        return Message_Id;

Push a new message on the queue, associated with a specific context.
This message is directly displayed in the status bar.   A new unique
message id is associated with this message.
procedure Pop
       (Statusbar          : access Gtk_Status_Bar_Record;
        Context            :        Context_Id);

Remove the most recent message from a specific context. All other
contexts are ignored, and no error is raised if there is no message in
Context.
procedure Remove
       (Statusbar          : access Gtk_Status_Bar_Record;
        Context            :        Context_Id;
        Message            :        Message_Id);

Remove a message from the list.
The message is only removed if it is in a specific context.   Nothing
happens if no matching message is found.
procedure Set_Has_Resize_Grip
       (Statusbar          : access Gtk_Status_Bar_Record;
        Setting            :        Boolean);

Set the value of the resize_grip attribute for a given status bar.
function Get_Has_Resize_Grip
       (Statusbar          : access Gtk_Status_Bar_Record)
        return Boolean;

Return the value of the resize_grip attribute for a given status bar.
