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


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

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

procedure Gtk_New
     (Widget             : out    Gtk_Plot_3D;
        Drawable           :        Gdk.Drawable.Gdk_Drawable;
        Width, Height      :        Gdouble := 0.0);

Create a new 3D plot.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with this widget.
procedure Autoscale
     (Plot               : access Gtk_Plot_3D_Record);

Chooses the best ranges for all coordinates depending on the data sets
put in Plot. Note that only data sets whose points you have set
explicitely are taken into account, not the ones based on functions.
function Get_Xfactor
     (Plot               : access Gtk_Plot_3D_Record)
        return Gdouble;

function Get_Zfactor
     (Plot               : access Gtk_Plot_3D_Record)
        return Gdouble;

Get the scaling factor along each of the coordinates.
procedure Set_Xfactor
     (Plot               : access Gtk_Plot_3D_Record;
        Xfactor            :        Gdouble);

procedure Set_Zfactor
     (Plot               : access Gtk_Plot_3D_Record;
        Zfactor            :        Gdouble);

Set the scaling factor along each of the coordinates
procedure Set_Xrange
     (Plot               : access Gtk_Plot_3D_Record;
        Min, Max           :        Gdouble);

procedure Set_Zrange
     (Plot               : access Gtk_Plot_3D_Record;
        Min, Max           :        Gdouble);

Set the minimal and maximal values for each axis.
Axis
----

procedure Axis_Hide_Title
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side);

Hide the title associated with the axis.
procedure Axis_Set_Major_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Major_Step         :        Gdouble);

Modify the step for major ticks.
This is a percentage value that indicates how many major ticks are
drawn along the axis. See also Axis_Set_Ticks.
procedure Axis_Set_Minor_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Nminor             :        Gint);

Modify the number of minor ticks between each major one.
See also Axis_Set_Ticks.
procedure Axis_Set_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Major_Step         :        Gdouble;
        Nminor             :        Gint);

Set up ticks for a specific orientation.
A horizontal orientation will match the left and right sides, whereas
a vertical orientation will match the top and bottom sides.
Major_Step is a percentage value of the widget size, and indicate the
step between each big ticks. For instance, if Major_Step has a value
of 0.2, there will be 5 big ticks drawn along the axis.   Num_Minor is
the number of minor ticks between each major one.
procedure Axis_Set_Ticks_Length
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Length             :        Gint);

Set the length (in pixels) of the big ticks.
The small ticks will have half this length.
procedure Axis_Set_Ticks_Width
     (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Width              :        Gfloat);

Set the width (in pixels) of the ticks.
This width is common to both the long and short ticks.
procedure Axis_Show_Labels
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Label_Mask         :        Gint);

Indicate whether a label should be drawn at each ticks to indicate
its value.   Not all values of Labels_Mask are relevant for all axis.
For instance,  for a vertical axis, the relevant values are Label_Right
and Label_Left.
procedure Axis_Show_Major_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Ticks_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the major ticks along one of the axis
procedure Axis_Show_Minor_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Ticks_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the minor ticks along one of the axis
procedure Axis_Show_Ticks
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Major_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos;
        Minor_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the ticks.
procedure Axis_Show_Title
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side);

Show the title associated with the axis.
function Get_Axis
     (Plot               : access Gtk_Plot_3D_Record;
        Orientation        :        Gtk.Extra.Plot.Plot_Orientation)
        return Gtk.Extra.Plot.Gtk_Plot_Axis;

Return a handle to a specific axis.
function Get_Side
     (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side)
        return Gtk.Extra.Plot.Gtk_Plot_Axis;

Get the axis for a specific side.
Grid
----

procedure Major_Grids_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Boolean);

Indicate whether the grid should be displayed for each coordinate
procedure Major_Grids_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            : out    Boolean);

Indicate whether the grid is currently displayed.
procedure Minor_Grids_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Boolean);

Indicate whether the grid should be displayed for each coordinate
procedure Minor_Grids_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            : out    Boolean);

Indicate whether the grid is currently displayed.
procedure Major_Zgrid_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the major grid
procedure Major_Zgrid_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the attributes of the major grid
procedure Minor_Zgrid_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the minor grid
procedure Minor_Zgrid_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the attributes of the minor grid
Rotating
--------

procedure Reset_Angles
     (Plot               : access Gtk_Plot_3D_Record);

reset all the angles to their default values
procedure Rotate
     (Plot               : access Gtk_Plot_3D_Record;
        Angle_X, Angle_Y, Angle_Z  :        Gdouble);

Rotate the plot along the three axis at the same time.
The angles are specified in degrees.
procedure Rotate_Vector
     (Plot               : access Gtk_Plot_3D_Record;
        Vector             :        Plot_Vector;
        A1, A2, A3         :        Gdouble);

Rotate Vector along the three axis.
The three angles A1, A2 and A3 are specified in degrees.
procedure Rotate_X
     (Plot               : access Gtk_Plot_3D_Record;
        Angle              :        Gdouble);

procedure Rotate_Z
     (Plot               : access Gtk_Plot_3D_Record;
        Angle              :        Gdouble);

Rotate the plot along a specific axis.
Angle is specific in degrees.
Planes
------

A 3D plot is associated, as usual, with three axis (one per coordinate
X, Y and Z). These three axis, together, define 3 planes that can be
shown or hidden, and on which a grid can be displayed to make it easy
to visualize the value of the data.

procedure Plane_Set_Color
     (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane;
        Color              :        Gdk.Color.Gdk_Color);

Define the background color to use for one of the planes. Each plane
can have its own color.
procedure Plane_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane;
        Visible            :        Boolean);

Indicate whether each plane should be displayed or not.
function Plane_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane)
        return Boolean;

Indicate whether a plane is currently visible or not.
Corners
-------

In addition to drawing the three planes defined by the axis, a 3D plot
can also draw some lines to draw a cube around the plot (although the
three new planes defined by these lines are left transparent so that
the plot is visible.

procedure Corner_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the style of the corner lines.
procedure Corner_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Define the style of the corner lines.
procedure Corner_Set_Visible
     (Plot               : access Gtk_Plot_3D_Record;
        Visible            :        Boolean);

Whether corners should be visible
function Corner_Visible
     (Plot               : access Gtk_Plot_3D_Record)
        return Boolean;

Indicate whether corners are visible
Misc
----

procedure Frame_Get_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

procedure Frame_Set_Attributes
     (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

procedure Get_Pixel
     (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Gdouble;
        Px, Py, Pz         : out    Gdouble);

function Get_Titles_Offset
     (Plot               : access Gtk_Plot_3D_Record)
        return Gint;

procedure Set_Titles_Offset
     (Plot               : access Gtk_Plot_3D_Record;
        Offset             :        Gint);


File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_Bar,  Next: Package_Gtk.Extra.Plot_Box,  Prev: Package_Gtk.Extra.Plot_3D,  Up: Top

Package Gtk.Extra.Plot`_'Bar
****************************

This special type of data set displays itself with bar (also known  as
histograms).

* Menu:

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


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)
              \___ Gtk_Plot_Bar    (*note Package_Gtk.Extra.Plot_Bar::)


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

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

procedure Gtk_New
     (Bar                : out    Gtk_Plot_Bar;
        Orientation        :        Gtk.Enums.Gtk_Orientation);

Create a new Plot bar.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Bar.
procedure Set_Width
     (Bar                : access Gtk_Plot_Bar_Record'Class;
        Width              :        Gdouble);

Set the width of the bars
function Get_Width
     (Bar                : access Gtk_Plot_Bar_Record'Class)
        return Gdouble;

Return the width used to draw the bars

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_Box,  Next: Package_Gtk.Extra.Plot_Canvas,  Prev: Package_Gtk.Extra.Plot_Bar,  Up: Top

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

This special type of data set displays itself with boxes

* Menu:

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


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)
              \___ Gtk_Plot_Box    (*note Package_Gtk.Extra.Plot_Box::)


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

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

procedure Gtk_New
     (Box                : out    Gtk_Plot_Box;
        Orientation        :        Gtk.Enums.Gtk_Orientation);

Create a new Plot bar.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Box

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_Canvas,  Next: Package_Gtk.Extra.Plot_Data,  Prev: Package_Gtk.Extra.Plot_Box,  Up: Top

Package Gtk.Extra.Plot`_'Canvas
*******************************

A Gtk_Plot_Canvas is a special kind of drawing area used with Gtk_Plot
widgets.   It provides drag-and-drop capabilities for the texts,
legends, points...   available in a Gtk_Plot.   Note that this widget
is specifically designed for Gtk_Plot widgets, and  won't provide any
other capability for other kinds of widgets.

   Like any child of Gtk_Layout, this widget can have an almost
unlimited  size for its children, and provides scrolling.

* Menu:

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


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

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

     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Fixed       (*note Package_Gtk.Fixed::)
                 \___ Gtk_Plot_Canvas (*note Package_Gtk.Extra.Plot_Canvas::)


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

Signals
=======

   * "changed"

     procedure Handler (Canvas : access Gtk_Plot_Canvas_Record'Class);
     Called when the contents of the canvas has changed (an item was
     moved interactively by the user).

     A region of the canvas was selected by the user.

   * "delete_item"

     procedure Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     Item   : Gtk_Plot_Canvas_Child);
     Called when an item is being removed from the canvas

   * "move_item"

     function Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     Item   : Gtk_Plot_Canvas_Child;
     New_X  : Gdouble;
     New_Y  : Gdouble)
     return Boolean;
     An item was moved on the canvas.  Its coordinates have not changed
     yet, but if the handler returns True they will become (New_X,
     New_Y). If the handler returns False, nothing happens.

   * "resize_item"

     function Handler (Canvas     : access Gtk_Plot_Canvas_Record'Class;
     Item       : Gtk_Plot_Canvas_Child;
     New_Width  : Gdouble;
     New_Height : Gdouble)
     return Boolean;
     An item is being resized.  Its size has not changed yet, but if
     the handler returns True it will become (New_Width, New_Height).
     If the handler returns False, nothing happens.

   * "select_item"

     function Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     Event  : Gdk_Button_Event;
     Item   : Gtk_Plot_Canvas_Child)
     return Boolean;
     Called when an item was selected.  An item can be anything, from a
     text to a plot When this signal is called, the item was simply
     selected, but not dragged.  The handler should return False if the
     item can not be selected.

   * "select_region"

     procedure Handler (Canvas : access Gtk_Plot_Canvas_Record'Class;
     X_Min  : Gdouble;
     Y_Min  : Gdouble;
     X_Max  : Gdouble;
     Y_Max  : Gdouble);


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

Types
=====

type Child_Draw_Func is access procedure
     (Canvas : System.Address;
          Child  : Gtk_Plot_Canvas_Child);

Generic format of functions used to draw a child of the canvas.
Canvas is a System.Address since these functions are called directly
from C and GtkAda can't insert its hooks. However, you can use the
Convert function below to convert to a Gtk_Plot_Canvas.
type Gtk_Plot_Canvas_Child is new Gdk.C_Proxy;

type Plot_Canvas_Action is
     (Action_Inactive,
          Action_Selection,
          Action_Drag,
          Action_Resize);

The action being performed on the canvas.
type Plot_Canvas_Arrow is new Gint;

type Plot_Canvas_Flag is new Gint;

type Plot_Canvas_Pos is
     (Canvas_Out,
          Canvas_In,
          Canvas_Left,
          Canvas_Right,
          Canvas_Top,
          Canvas_Bottom,
          Canvas_Top_Left,
          Canvas_Top_Right,
          Canvas_Bottom_Left,
          Canvas_Bottom_Right);

The position of the items in the canvas.
type Plot_Canvas_Type is
     (None,
          Plot,
          Axis,
          Legends,
          Title,
          Text,
          Data,
          Line,
          Rectangle,
          Ellipse,
          Custom);

The type of data that can be put in a canvas.   Plot is only for a
Gtk.Extra.Plot.Gtk_Plot widget.

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

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

Creating and manipulating the canvas
------------------------------------

procedure Gtk_New
     (Widget             : out    Gtk_Plot_Canvas;
        Width              : in     Gint;
        Height             : in     Gint;
        Magnification      : in     Gdouble := 1.0);

Create a new Gtk_Plot_Canvas, with a specific screen size.
Since the widget can have an unlimited internal size, it does not try
to set its size to accommodate all of its children.
function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Plot_Canvas.
function Child_Get_Type        return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Plot_Canvas_Child.
procedure Refresh
     (Canvas             : access Gtk_Plot_Canvas_Record);

Force a refresh of the canvas on the screen. The screen is updated from
the contents of the double-buffer.
procedure Paint
     (Canvas             : access Gtk_Plot_Canvas_Record);

Redraw each of the items included in the canvas. The painting is done
in the double-buffer, and must be drawn on the screen with Refresh.
function Get_Pixmap
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gdk.Pixmap.Gdk_Pixmap;

Return the pixmap associated with the Canvas.
If you add your own items on the canvas (see Child_New below), you  can
draw them on this pixmap to make them visible on the canvas. You  need
to call Refresh to send this pixmap to the screen.
procedure Grid_Set_Visible
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Visible            : in     Boolean);

Indicate whether the grid should be visible or not.
procedure Grid_Set_Step
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Step               : in     Gint);

Set the space between two lines of the grid.
procedure Grid_Set_Attributes
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Style              : in     Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : in     Gint;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes of the grid.
procedure Add_Plot
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Plot               : access Gtk.Extra.Plot.Gtk_Plot_Record'Class;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Add a new plot to the list handled by the canvas.
The canvas will then provide drag-and-drop functionalities for that
plot.   The plot is displayed at the relative screen coordinates (X, Y).
Plot becomes the new active plot, and its associated pixmap becomes the
Plot_Canvas itself.
procedure Set_Active_Plot
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Plot               : access Gtk.Extra.Plot.Gtk_Plot_Record'Class);

Modify the active plot in the canvas.
The active plot is generally the one that received the last click
event (drag-and-drop, etc.). This should be set before emitting any  of
the signals in this class.
procedure Cancel_Action
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record);

Cancel the current action.
This can be called in the user callbacks to ignore temporarily some of
the signals below.
function Get_Active_Plot
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gtk.Extra.Plot.Gtk_Plot;

Return the active plot.
In the callbacks for the signals below, this is the widget that got
the signal.
function Get_Active_Data
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gtk.Extra.Plot_Data.Gtk_Plot_Data;

Return the active dataset (which of course belongs to the active plot).
This is the dataset that was last clicked on.
procedure Get_Active_Point
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X                  : out    Gdouble;
        Y                  : out    Gdouble;
        Index              : out    Gint);

Return the relative coordinates of the active point in the
active dataset. Index will contain the index of the active point in the
list of the canvas'children, or -1 if there is no active point.   This
is the index in the coordinates arrays of Get_Active_Data.   This is
the one that was last clicked on.
procedure Set_Size
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Width              : in     Gint;
        Height             : in     Gint);

Modify the size allocated for the canvas, and the size of the pixmap
the plots are displayed on.
procedure Unselect
     (Canvas             : access Gtk_Plot_Canvas_Record);

Unselect the currently selected item.
procedure Set_Magnification
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Magnification      :        Gdouble := 1.0);

Changes the magnification for the canvas.
1.0 is the default value. Higher values will zoom in, while lower values
will zoom out.
procedure Set_Background
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Background         :        Gdk.Color.Gdk_Color);

Set the background color for the canvas.
procedure Get_Pixel
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Px                 : in     Gdouble;
        Py                 : in     Gdouble;
        X                  : out    Gint;
        Y                  : out    Gint);

Convert from relative coordinates to absolute ones.
procedure Get_Position
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X                  : in     Gint;
        Y                  : in     Gint;
        Px                 : out    Gdouble;
        Py                 : out    Gdouble);

Convert from absolute coordinates to relative ones.
Canvas items
------------

There are several different types of items that can be put on the
canvas, and then manipulated interactively by the user.

function Convert
     (Canvas             :        System.Address)
        return Gtk_Plot_Canvas;

Convert from a System.Address returned by C to a real Gtk_Plot_Canvas
structure.
procedure Set_Draw_Func
     (Child              :        Gtk_Plot_Canvas_Child;
        Draw               :        Child_Draw_Func);

Set the function used to draw the item.
This should be used only for items whose type is Custom, since other
items have their own drawing functions.
function Get_Active_Item
     (Canvas             : access Gtk_Plot_Canvas_Record)
        return Gtk_Plot_Canvas_Child;

Return the currently selected item.
function Put_Text
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble;
        Ps_Font            : in     String;
        Height             : in     Gint;
        Angle              : in     Gint;
        Fg                 : in     Gdk.Color.Gdk_Color;
        Bg                 : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean;
        Justification      : in     Gtk.Enums.Gtk_Justification;
        Text               : in     String)
        return Gtk_Plot_Canvas_Child;

Put an arbitrary text in the layout.
Ps_Font should be the name of a postscript font.   (X, Y) are the
relative coordinates to which the text should be drawn.   The only
legal values for Angle are 0, 90, 180 and 270 degrees.

   Text can contain some special characters, that change is renderering.
They all begin with a '\' (backslash) character, followed by one of:
   * '0' .. '9' : Change the font (take the nth font in the family

   * 'g' : Select the "Symbol" font

   * 'B' : Activate bold characters.

   * 'i' : Activate italic characters.

   * 'S' or '^' : Activate superscripts.

   * 's' or '_' : Activate subscripts.

   * '+' : Increment the fontsize by 3 pixels.

   * '-' : Decrement the fontsize by 3 pixels.

   * 'N' : Restore the default characteristics of the font.

   * 'b' : Move back one character.

function Put_Line
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color;
        Arrow_Mask         :        Plot_Canvas_Arrow)
        return Gtk_Plot_Canvas_Child;

Draw a line in the background of the canvas.
function Put_Rectangle
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Border             :        Gtk.Extra.Plot.Plot_Border_Style;
        Fill               :        Boolean := False)
        return Gtk_Plot_Canvas_Child;

Draw a rectangle in the canvas.
function Put_Ellipse
     (Canvas             : access Gtk_Plot_Canvas_Record;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Fill               :        Boolean := False)
        return Gtk_Plot_Canvas_Child;

Draw an ellipse in the canvas.
procedure Line_Set_Attributes
     (Child              :        Gtk_Plot_Canvas_Child;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color;
        Mask               :        Plot_Canvas_Arrow);

Change the attributes of a line.
procedure Rectangle_Set_Attributes
     (Child              :        Gtk_Plot_Canvas_Child;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Border             :        Gtk.Extra.Plot.Plot_Border_Style;
        Fill               :        Boolean := False);

Change the attributes of a rectangle.
procedure Ellipse_Set_Attributes
     (Child              :        Gtk_Plot_Canvas_Child;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Fg                 :        Gdk.Color.Gdk_Color;
        Bg                 :        Gdk.Color.Gdk_Color;
        Fill               :        Boolean := False);

Change the attributes for an ellipse.
Custom children
---------------

You can insert your own items in a canvas.
While the canvas will take care of moving the item, it is your
responsability to provide a visual rendering for it.

function Child_New
     (Child_Type         :        Plot_Canvas_Type := Custom)
        return Gtk_Plot_Canvas_Child;

Create a new child.
procedure Put_Child
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Child              :        Gtk_Plot_Canvas_Child;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble);

Insert a new item in the canvas. It will occupy the area defined by
the four coordinates.
procedure Child_Move
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Child              :        Gtk_Plot_Canvas_Child;
        X1                 :        Gdouble;
        Y1                 :        Gdouble);

Move an item, but does not change its size.
procedure Child_Move_Resize
     (Canvas             : access Gtk_Plot_Canvas_Record;
        Child              :        Gtk_Plot_Canvas_Child;
        X1                 :        Gdouble;
        Y1                 :        Gdouble;
        X2                 :        Gdouble;
        Y2                 :        Gdouble);

Move an resize an item in the canvas.
function Get_Item_Type
     (Item               :        Gtk_Plot_Canvas_Child)
        return Plot_Canvas_Type;

Return the type of the item.
function Get_Allocation_Width
     (Child              :        Gtk_Plot_Canvas_Child)
        return Guint;

Return the current width of the child.
function Get_Allocation_Height
     (Child              :        Gtk_Plot_Canvas_Child)
        return Guint;

Return the current height of the child.
function Get_Allocation_X
     (Child              :        Gtk_Plot_Canvas_Child)
        return Gint;

Return the current position of the child, relative to its canvas.
function Get_Allocation_Y
     (Child              :        Gtk_Plot_Canvas_Child)
        return Gint;

Return the current position of the child, relative to its canvas.
function Get_Flags
     (Child              :        Gtk_Plot_Canvas_Child)
        return Plot_Canvas_Flag;

Return the list of actions currently possible on the child.
procedure Set_Flags
     (Child              :        Gtk_Plot_Canvas_Child;
        Flags              :        Plot_Canvas_Flag);

Modify the list of actions possible for a child.
Flags
-----

Some flags are defined for this widget. You can not access them through
the usual interface in Gtk.Object.Flag_Is_Set since this widget is not
part of the standard gtk+ packages. Instead, use the functions below.

   * "can_select"    True if it is possible to select a region of the
     canvas

   * "can_select_item"    True if it is possible to select any of the
     item on the canvas.

   * "can_select_point"    True if the individual points in the plots
     can be selected and    interactively moved by the user.

   * "can_dnd"    True if it is possible to drag an item on the canvas.

   * "can_dnd_point"    True if the points of the plots can be moved
     interactively.

function Plot_Canvas_Flag_Is_Set
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Flag               : in     Guint16)
        return Boolean;

Test whether one of the flags for a Gtk_Plot_Canvas widget or its
children is set.
procedure Plot_Canvas_Set_Flags
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Flags              : in     Guint16);

Set the flags for a Gtk_Plot_Canvas widget or its children.
Note that the flags currently set are not touched by this function.
This can only be used for the flags defined in the
Gtk.Extra.Gtk_Plot_Canvas package.
procedure Plot_Canvas_Unset_Flags
     (Plot_Canvas        : access Gtk_Plot_Canvas_Record;
        Flags              : in     Guint16);

Unset the flags for a Gtk_Plot_Canvas.

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_Data,  Next: Package_Gtk.Extra.Plot_Polar,  Prev: Package_Gtk.Extra.Plot_Canvas,  Up: Top

Package Gtk.Extra.Plot`_'Data
*****************************

This package defines the root of the plot hierarchy. It defines several
display strategies that can be used to show scientific data on the
screen (see the children for 3D, polar, bars,...)

   All coordinates are in percent of the total size allocates for the
data  set (ie the actual position is (x * width, y * height), where (x,
y) is  the value stored in the data set and (width, height) its
allocated screen  size.

* Menu:

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


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

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

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


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

Types
=====

type Gdouble_Array_Access is access all Glib.Gdouble_Array;

The reason we use this type in the functions below is because
gtk+-extra does not keep a copy of the arrays, but points to the one
given in argument. Thus, the Ada arrays should not be allocated on the
stack, or at least they should be at library level. Using this 'Access
will force the compiler to do the check for us.
type No_Range_Gdouble_Array is array (Natural) of Gdouble;

An array of values.   This is used to represent the data values
displayed in the plot.   This array does not have any range information
(so that it can be  easily returned from a C function, without
requiring an extra  copy of the table). You can not use 'Range on this
array.
type No_Range_Gdouble_Array_Access is access all No_Range_Gdouble_Array;

An access to a flat array.
type Plot_Connector is
     (Connect_None,
             -- No connection
     
          Connect_Straight,
             -- straight line
     
          Connect_Spline,
             -- spline or Bezier curve
     
          Connect_Hv_Step,
             -- Horizontal then vertical
     
          Connect_Vh_Step,
             -- Vertical then horizontal
     
          Connect_Middle_Step
             -- Split in the middle
          );

The type of connection between two adjacent points in a graph.
type Plot_Function is access function
     (Plot  : System.Address;

type Plot_Gradient is new Integer;

Indicate which color components vary along the gradient
type Plot_Line_Style is
     (Line_None,
          Line_Solid,
          Line_Dotted,
          Line_Dashed,
          Line_Dot_Dash,
          Line_Dot_Dot_Dash,
          Line_Dot_Dash_Dash);

Lines used to connect two adjacent points in a graph.
type Plot_Symbol_Style is
     (Symbol_Empty,
          Symbol_Filled,
          Symbol_Opaque);

Style used to draw the points in a graph.
type Plot_Symbol_Type is
     (Symbol_None,
          Symbol_Square,
          Symbol_Circle,
          Symbol_Up_Triangle,
          Symbol_Down_Triangle,
          Symbol_Right_Triangle,
          Symbol_Left_Triangle,
          Symbol_Diamond,
          Symbol_Plus,
          Symbol_Cross,
          Symbol_Star,
          Symbol_Dot,
          Symbol_Impulse);

Type of symbol used to represent the points in a graph.
type Points_Array is record
     Points     : No_Range_Gdouble_Array_Access;
         Num_Points : Gint := 0;
         end record;

The points are indexed from 0 to Num_Points-1.   Note that you can't
use 'Range, 'First or 'Last on Points.
