GwyColorAxis

GwyColorAxis — Simple axis with a false color scale

Synopsis

#include <libgwydgets/gwydgets.h>

struct              GwyColorAxis;
struct              GwyColorAxisClass;
GtkWidget *         gwy_color_axis_new                  (GtkOrientation orientation);
GtkWidget *         gwy_color_axis_new_with_range       (GtkOrientation orientation,
                                                         gdouble min,
                                                         gdouble max);
void                gwy_color_axis_get_range            (GwyColorAxis *axis,
                                                         gdouble *min,
                                                         gdouble *max);
void                gwy_color_axis_set_range            (GwyColorAxis *axis,
                                                         gdouble min,
                                                         gdouble max);
GwySIUnit *         gwy_color_axis_get_si_unit          (GwyColorAxis *axis);
void                gwy_color_axis_set_si_unit          (GwyColorAxis *axis,
                                                         GwySIUnit *unit);
void                gwy_color_axis_set_gradient         (GwyColorAxis *axis,
                                                         const gchar *gradient);
const gchar *       gwy_color_axis_get_gradient         (GwyColorAxis *axis);
GwyTicksStyle       gwy_color_axis_get_ticks_style      (GwyColorAxis *axis);
void                gwy_color_axis_set_ticks_style      (GwyColorAxis *axis,
                                                         GwyTicksStyle ticks_style);
gboolean            gwy_color_axis_get_labels_visible   (GwyColorAxis *axis);
void                gwy_color_axis_set_labels_visible   (GwyColorAxis *axis,
                                                         gboolean labels_visible);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GwyColorAxis

Implemented Interfaces

GwyColorAxis implements AtkImplementorIface and GtkBuildable.

Properties

  "gradient"                 gchar*                : Read / Write
  "labels-visible"           gboolean              : Read / Write
  "orientation"              GtkOrientation        : Read / Write / Construct Only
  "si-unit"                  GwySIUnit*            : Read / Write
  "ticks-style"              GwyTicksStyle         : Read / Write

Description

Details

struct GwyColorAxis

struct GwyColorAxis;


struct GwyColorAxisClass

struct GwyColorAxisClass {
    GtkWidgetClass parent_class;

    void (*reserved1)(void);
    void (*reserved2)(void);
};


gwy_color_axis_new ()

GtkWidget *         gwy_color_axis_new                  (GtkOrientation orientation);

Creates a new color axis.

orientation :

The orientation of the axis.

Returns :

The newly created color axis as a GtkWidget.

gwy_color_axis_new_with_range ()

GtkWidget *         gwy_color_axis_new_with_range       (GtkOrientation orientation,
                                                         gdouble min,
                                                         gdouble max);

Creates a new color axis.

orientation :

The orientation of the axis.

min :

The minimum.

max :

The maximum.

Returns :

The newly created color axis as a GtkWidget.

gwy_color_axis_get_range ()

void                gwy_color_axis_get_range            (GwyColorAxis *axis,
                                                         gdouble *min,
                                                         gdouble *max);

Gets the range of a color axis.

axis :

A color axis.

min :

Location to store the range maximum (or NULL).

max :

Location to store the range minimum (or NULL).

gwy_color_axis_set_range ()

void                gwy_color_axis_set_range            (GwyColorAxis *axis,
                                                         gdouble min,
                                                         gdouble max);

Sets the range of a color axis.

axis :

A color axis.

min :

The range minimum.

max :

The range maximum.

gwy_color_axis_get_si_unit ()

GwySIUnit *         gwy_color_axis_get_si_unit          (GwyColorAxis *axis);

Gets the SI unit a color axis displays.

axis :

A color axis.

Returns :

The SI unit.

gwy_color_axis_set_si_unit ()

void                gwy_color_axis_set_si_unit          (GwyColorAxis *axis,
                                                         GwySIUnit *unit);

Sets the SI unit a color axis displays.

axis :

A color axis.

unit :

A SI unit to display next to minimum and maximum value.

gwy_color_axis_set_gradient ()

void                gwy_color_axis_set_gradient         (GwyColorAxis *axis,
                                                         const gchar *gradient);

Sets the color gradient a color axis should use.

axis :

A color axis.

gradient :

Name of gradient axis should use. It should exist.

gwy_color_axis_get_gradient ()

const gchar *       gwy_color_axis_get_gradient         (GwyColorAxis *axis);

Gets the color gradient a color axis uses.

axis :

A color axis.

Returns :

The color gradient.

gwy_color_axis_get_ticks_style ()

GwyTicksStyle       gwy_color_axis_get_ticks_style      (GwyColorAxis *axis);

Gets ticks style of a color axis.

axis :

A color axis.

Returns :

The ticks style.

gwy_color_axis_set_ticks_style ()

void                gwy_color_axis_set_ticks_style      (GwyColorAxis *axis,
                                                         GwyTicksStyle ticks_style);

Sets the ticks style of a color axis.

axis :

A color axis.

ticks_style :

The ticks style to use.

gwy_color_axis_get_labels_visible ()

gboolean            gwy_color_axis_get_labels_visible   (GwyColorAxis *axis);

Gets the visibility of labels of a color axis.

axis :

A color axis.

Returns :

TRUE if labels are displayed, FALSE if they are omitted.

gwy_color_axis_set_labels_visible ()

void                gwy_color_axis_set_labels_visible   (GwyColorAxis *axis,
                                                         gboolean labels_visible);

Sets the visibility of labels of a color axis.

axis :

A color axis.

labels_visible :

TRUE to display labels with minimum and maximum values, FALSE to display no labels.

Property Details

The "gradient" property

  "gradient"                 gchar*                : Read / Write

Name of color gradient the axis displays.

Default value: NULL


The "labels-visible" property

  "labels-visible"           gboolean              : Read / Write

Whether minimum and maximum labels are visible.

Default value: TRUE


The "orientation" property

  "orientation"              GtkOrientation        : Read / Write / Construct Only

Axis orientation.

Default value: GTK_ORIENTATION_VERTICAL


The "si-unit" property

  "si-unit"                  GwySIUnit*            : Read / Write

SI unit to display in labels.


The "ticks-style" property

  "ticks-style"              GwyTicksStyle         : Read / Write

The style of axis ticks.

Default value: GWY_TICKS_STYLE_AUTO

See Also

GwyAxis -- Axis for use in graphs, GwyRuler -- Horizontal and vertical rulers