GtkDataboxMarkers

## GtkDataboxMarkers GtkDataboxMarkers — A GtkDataboxGraph used for displaying labeled markers for xy-values. |

## Synopsis

    #include <gtkdatabox_markers.h>

                        GtkDataboxMarkersPrivate;
    enum                GtkDataboxMarkersPosition;
    enum                GtkDataboxMarkersTextPosition;
    enum                GtkDataboxMarkersType;
                        GtkDataboxMarkers;
    GtkDataboxGraph*    gtk_databox_markers_new             (guint len,
                                                             gfloat *X,
                                                             gfloat *Y,
                                                             GdkColor *color,
                                                             guint size,
                                                             GtkDataboxMarkersType type);
    void                gtk_databox_markers_set_position    (GtkDataboxMarkers *markers,
                                                             guint index,
                                                             GtkDataboxMarkersPosition position);
    void                gtk_databox_markers_set_label       (GtkDataboxMarkers *markers,
                                                             guint index,
                                                             GtkDataboxMarkersTextPosition label_position,
                                                             gchar *text,
                                                             gboolean boxed);

## Object Hierarchy

      GObject
       +----GtkDataboxGraph
             +----GtkDataboxXYCGraph
                   +----GtkDataboxMarkers
                         +----GtkDataboxCrossSimple

## Properties

      "markers-type"             gint                  : Read / Write / Construct

## Description

GtkDataboxMarkers is a GtkDataboxGraph class for displaying labeled markers (circles, triangles, lines) for xy-values.

## Details

### GtkDataboxMarkersPrivate

    typedef struct _GtkDataboxMarkersPrivate GtkDataboxMarkersPrivate;

A private data structure used by the GtkDataboxMarkers. It shields all internal things from developers who are just using the object.

### enum GtkDataboxMarkersPosition

       typedef enum
       {
          GTK_DATABOX_MARKERS_C = 0,
          GTK_DATABOX_MARKERS_N,
          GTK_DATABOX_MARKERS_E,
          GTK_DATABOX_MARKERS_S,
          GTK_DATABOX_MARKERS_W
       }
       GtkDataboxMarkersPosition;

Position of a marker relative to its respective X/Y value.

`GTK_DATABOX_MARKERS_C` | centered on data
`GTK_DATABOX_MARKERS_N` | marker is positioned north of data
`GTK_DATABOX_MARKERS_E` | marker is positioned east of data
`GTK_DATABOX_MARKERS_S` | marker is positioned south of data
`GTK_DATABOX_MARKERS_W` | marker is positioned west of data

### enum GtkDataboxMarkersTextPosition

       typedef enum
       {
          GTK_DATABOX_MARKERS_TEXT_CENTER = 0,/* text centered   on marker */
          GTK_DATABOX_MARKERS_TEXT_N,	  /* text north      of marker */
          GTK_DATABOX_MARKERS_TEXT_NE,	  /* text north-east of marker */
          GTK_DATABOX_MARKERS_TEXT_E,	  /* text east       of marker */
          GTK_DATABOX_MARKERS_TEXT_SE,	  /* text south-east of marker */
          GTK_DATABOX_MARKERS_TEXT_S,	  /* text south      of marker */
          GTK_DATABOX_MARKERS_TEXT_SW,	  /* text south-west of marker */
          GTK_DATABOX_MARKERS_TEXT_W,	  /* text west       of marker */
          GTK_DATABOX_MARKERS_TEXT_NW	  /* text north-west of marker */
       }
       GtkDataboxMarkersTextPosition;

Position of a label relative to its repective marker.

`GTK_DATABOX_MARKERS_TEXT_CENTER` | text centered on marker
`GTK_DATABOX_MARKERS_TEXT_N` | text north of marker
`GTK_DATABOX_MARKERS_TEXT_NE` | text north-east of marker
`GTK_DATABOX_MARKERS_TEXT_E` | text east of marker
`GTK_DATABOX_MARKERS_TEXT_SE` | text south-east of marker
`GTK_DATABOX_MARKERS_TEXT_S` | text south of marker
`GTK_DATABOX_MARKERS_TEXT_SW` | text south-west of marker
`GTK_DATABOX_MARKERS_TEXT_W` | text west of marker
`GTK_DATABOX_MARKERS_TEXT_NW` | text north-west of marker

### enum GtkDataboxMarkersType

       typedef enum
       {
          GTK_DATABOX_MARKERS_NONE = 0,	/* No Marker (just text) */
          GTK_DATABOX_MARKERS_TRIANGLE,	/* Marker is a triangle */
          GTK_DATABOX_MARKERS_SOLID_LINE,	/* Marker is a solid line */
          GTK_DATABOX_MARKERS_DASHED_LINE	/* Marker is a dashed line */
       }
       GtkDataboxMarkersType;

Type of the marker

`GTK_DATABOX_MARKERS_NONE` | No Marker (just text)
`GTK_DATABOX_MARKERS_TRIANGLE` | Marker is a triangle
`GTK_DATABOX_MARKERS_SOLID_LINE` | Marker is a solid line
`GTK_DATABOX_MARKERS_DASHED_LINE` | Marker is a dashed line

### GtkDataboxMarkers

    typedef struct _GtkDataboxMarkers GtkDataboxMarkers;

GtkDataboxMarkers is a GtkDataboxGraph class for displaying labeled markers (circles, triangles, lines) for xy-values.

### gtk_databox_markers_new ()

    GtkDataboxGraph*    gtk_databox_markers_new             (guint len,
                                                             gfloat *X,
                                                             gfloat *Y,
                                                             GdkColor *color,
                                                             guint size,
                                                             GtkDataboxMarkersType type);

Creates a new GtkDataboxMarkers object which can be added to a GtkDatabox widget as nice decoration for other graphs.

`len` : | length of `X` and `Y`
`X` : | array of horizontal position values of markers
`Y` : | array of vertical position values of markers
`color` : | color of the markers
`size` : | marker size or line width (depending on the `type`)
`type` : | type of markers (e.g. triangle or circle)
Returns : | A new GtkDataboxMarkers object

### gtk_databox_markers_set_position ()

    void                gtk_databox_markers_set_position    (GtkDataboxMarkers *markers,
                                                             guint index,
                                                             GtkDataboxMarkersPosition position);

Sets a position for one of the markers.

`markers` : | A GtkDataboxMarkers object
`index` : | index within the array of X/Y values
`position` : | position of the marker (e.g. circle or triangle relative to their X/Y value

### gtk_databox_markers_set_label ()

    void                gtk_databox_markers_set_label       (GtkDataboxMarkers *markers,
                                                             guint index,
                                                             GtkDataboxMarkersTextPosition label_position,
                                                             gchar *text,
                                                             gboolean boxed);

Sets a label for one of the markers.

`markers` : | A GtkDataboxMarkers object
`index` : | index within the array of X/Y values
`label_position` : | position of the label relative to the marker
`text` : | text to be displayed in the label
`boxed` : | Whether the label is to be enclosed in a box (true) or not (false)

## Property Details

### The `"markers-type"` property

      "markers-type"             gint                  : Read / Write / Construct

Type of markers for this graph, e.g. triangles or lines.

Default value: 0

## See Also

GtkDatabox, GtkDataboxGraph, GtkDataboxPoints, GtkDataboxLines, GtkDataboxBars