GtkDatabox: gtk/gtkdatabox_ruler.h File Reference

GtkDatabox A set of GTK+ widgets to display large amounts of numerical data quickly and easily.

- Main Page
- Data Structures
- Files

- File List
- Globals

Data Structures | Defines | Typedefs | Functions
gtk/gtkdatabox_ruler.h File Reference
`#include <gdk/gdk.h>`
`#include <gtk/gtkwidget.h>`
`#include <gtkdatabox_scale.h>`
Include dependency graph for gtkdatabox_ruler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | _GtkDataboxRuler
struct | _GtkDataboxRulerClass
## Defines
#define | GTK_DATABOX_TYPE_RULER (gtk_databox_ruler_get_type ())
#define | GTK_DATABOX_RULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_DATABOX_TYPE_RULER, GtkDataboxRuler))
#define | GTK_DATABOX_RULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_DATABOX_TYPE_RULER, GtkDataboxRulerClass))
#define | GTK_DATABOX_IS_RULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_DATABOX_TYPE_RULER))
#define | GTK_DATABOX_IS_RULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_DATABOX_TYPE_RULER))
#define | GTK_DATABOX_RULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_DATABOX_TYPE_RULER, GtkDataboxRulerClass))
#define | GTK_DATABOX_RULER_MAX_MAX_LENGTH 63
## Typedefs
typedef struct _GtkDataboxRuler | GtkDataboxRuler
typedef struct _GtkDataboxRulerClass | GtkDataboxRulerClass
typedef struct _GtkDataboxRulerPrivate | GtkDataboxRulerPrivate
## Functions
GType | gtk_databox_ruler_get_type (void) G_GNUC_CONST
GtkWidget * | gtk_databox_ruler_new (GtkOrientation orientation)
void | gtk_databox_ruler_set_range (GtkDataboxRuler *ruler, gdouble lower, gdouble upper, gdouble position)
void | gtk_databox_ruler_set_max_length (GtkDataboxRuler *ruler, guint max_length)
void | gtk_databox_ruler_set_scale_type (GtkDataboxRuler *ruler, guint scale_type)
void | gtk_databox_ruler_get_range (GtkDataboxRuler *ruler, gdouble *lower, gdouble *upper, gdouble *position)
guint | gtk_databox_ruler_get_max_length (GtkDataboxRuler *ruler)
GtkDataboxScaleType | gtk_databox_ruler_get_scale_type (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_orientation (GtkDataboxRuler *ruler, GtkOrientation orientation)
GtkOrientation | gtk_databox_ruler_get_orientation (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_text_orientation (GtkDataboxRuler *ruler, GtkOrientation orientation)
GtkOrientation | gtk_databox_ruler_get_text_orientation (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_text_alignment (GtkDataboxRuler *ruler, PangoAlignment alignment)
PangoAlignment | gtk_databox_ruler_get_text_alignment (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_text_hoffset (GtkDataboxRuler *ruler, gint offset)
gint | gtk_databox_ruler_get_text_hoffset (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_draw_ticks (GtkDataboxRuler *ruler, gboolean draw)
gboolean | gtk_databox_ruler_get_draw_ticks (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_draw_position (GtkDataboxRuler *ruler, gboolean draw)
gboolean | gtk_databox_ruler_get_draw_position (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_draw_subticks (GtkDataboxRuler *ruler, gboolean draw)
gboolean | gtk_databox_ruler_get_draw_subticks (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_invert_edge (GtkDataboxRuler *ruler, gboolean invert)
gboolean | gtk_databox_ruler_get_invert_edge (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_linear_label_format (GtkDataboxRuler *ruler, gchar *format)
void | gtk_databox_ruler_set_log_label_format (GtkDataboxRuler *ruler, gchar *format)
gchar * | gtk_databox_ruler_get_linear_label_format (GtkDataboxRuler *ruler)
gchar * | gtk_databox_ruler_get_log_label_format (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_manual_ticks (GtkDataboxRuler *ruler, gfloat *manual_ticks)
gfloat * | gtk_databox_ruler_get_manual_ticks (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_manual_tick_cnt (GtkDataboxRuler *ruler, guint manual_tick_cnt)
guint | gtk_databox_ruler_get_manual_tick_cnt (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_manual_tick_labels (GtkDataboxRuler *ruler, gchar *labels[])
gchar ** | gtk_databox_ruler_get_manual_tick_labels (GtkDataboxRuler *ruler)
void | gtk_databox_ruler_set_box_shadow (GtkDataboxRuler *ruler, GtkShadowType which_shadow)
GtkShadowType | gtk_databox_ruler_get_box_shadow (GtkDataboxRuler *ruler)

## Define Documentation

#define GTK_DATABOX_IS_RULER | ( |  | obj | ) | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_DATABOX_TYPE_RULER))

#define GTK_DATABOX_IS_RULER_CLASS | ( |  | klass | ) | (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_DATABOX_TYPE_RULER))

#define GTK_DATABOX_RULER | ( |  | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_DATABOX_TYPE_RULER, GtkDataboxRuler))

#define GTK_DATABOX_RULER_CLASS | ( |  | klass | ) | (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_DATABOX_TYPE_RULER, GtkDataboxRulerClass))

#define GTK_DATABOX_RULER_GET_CLASS | ( |  | obj | ) | (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_DATABOX_TYPE_RULER, GtkDataboxRulerClass))

#define GTK_DATABOX_RULER_MAX_MAX_LENGTH 63

GTK_DATABOX_RULER_MAX_MAX_LENGTH

The maximum upper limit of label length in characters

#define GTK_DATABOX_TYPE_RULER (gtk_databox_ruler_get_type ())

SECTION:gtkdatabox_ruler : An improved version of the #GtkRuler. gtkdatabox_ruler.h : GtkDatabox

GtkDataboxRuler is a widget for the GTK+ library similar to GtkRuler.

It is improved in several ways:

<itemizedlist> <listitem>

It supports linear and logarithmic scales.

</listitem> <listitem>

In the vertical orientation, the labels are rotated 90° (instead of being written as a vertical column of horizontal characters). This increases readability.

</listitem> <listitem>

It works for very small and very large value ranges.

</listitem> </itemizedlist>

## Typedef Documentation

typedef struct _GtkDataboxRuler GtkDataboxRuler

GtkDataboxRuler:

An improved version (see above) of GtkRuler which supports linear and logarithmic scales.

typedef struct _GtkDataboxRulerClass GtkDataboxRulerClass

typedef struct _GtkDataboxRulerPrivate GtkDataboxRulerPrivate

GtkDataboxRulerPrivate

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

## Function Documentation

GtkShadowType gtk_databox_ruler_get_box_shadow | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_box_shadow: : a GtkDataboxRuler

Gets the type of shadow being rendered to the (GTK_SHADOW_NONE, GTK_SHADOW_IN, GTK_SHADOW_OUT, GTK_SHADOW_ETCHED_IN, GTK_SHADOW_ETCHED_OUT).

Return value: The currently used shadow type of the , -1 on failure.

gboolean gtk_databox_ruler_get_draw_position | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_draw_position: : a GtkDataboxRuler

Gets the draw position arrows option from the (horizontal or vertical).

Return value: Position drawing option of the .

gboolean gtk_databox_ruler_get_draw_subticks | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_draw_subticks: : a GtkDataboxRuler

Gets the draw subticks option from the (horizontal or vertical).

Return value: Subtick drawing option of the .

gboolean gtk_databox_ruler_get_draw_ticks | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_draw_ticks: : a GtkDataboxRuler

Gets the draw ticks option from the (horizontal or vertical).

Return value: Tick drawing option of the .

gboolean gtk_databox_ruler_get_invert_edge | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_invert_edge: : a GtkDataboxRuler

Gets the invert edge option from the (horizontal or vertical).

Return value: Edge inversion option of the .

gchar* gtk_databox_ruler_get_linear_label_format | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_linear_label_format: : a GtkDataboxRuler

Gets the linear label meta format of the (horizontal or vertical).

Return value: The string meta format the NULL on failure.

gchar* gtk_databox_ruler_get_log_label_format | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_log_label_format: : a GtkDataboxRuler

Gets the log label meta format of the (horizontal or vertical).

Return value: The string meta format the , NULL on failure.

guint gtk_databox_ruler_get_manual_tick_cnt | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_grid_get_manual_tick_cnt: : a GtkDataboxRuler

Gets the number manual tick values for the .

Return value: The number of manual tick values for the .

gchar** gtk_databox_ruler_get_manual_tick_labels | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_grid_get_manual_tick_labels: : a GtkDataboxRuler

Gets the pointer to the manual tick labels for the .

Return value: Pointer to the manual tick labels for the .

gfloat* gtk_databox_ruler_get_manual_ticks | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_grid_get_manual_ticks: : a GtkDataboxRuler

Gets the pointer to the manual tick values for the .

Return value: Pointer to the manual tick values for the .

guint gtk_databox_ruler_get_max_length | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_max_length: : A GtkDataboxRuler widget

This function returns the maximum number of digits to be used for each tick label of the .

Return value: The maximum length of the tick labels.

GtkOrientation gtk_databox_ruler_get_orientation | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_orientation: : a GtkDataboxRuler

Gets the orientation of the (horizontal or vertical).

Return value: Orientation of the .

Here is the caller graph for this function:

void gtk_databox_ruler_get_range | ( | GtkDataboxRuler * | ruler,
|  | gdouble * | lower,
|  | gdouble * | upper,
|  | gdouble * | position
| ) |  |

gtk_databox_ruler_get_range: : a GtkDataboxRuler : location to store lower limit of the ruler, or NULL : location to store upper limit of the ruler, or NULL : location to store the current position of the mark on the ruler, or NULL

Retrieves values indicating the range and current position of a GtkDataboxRuler. See gtk_databox_ruler_set_range().

GtkDataboxScaleType gtk_databox_ruler_get_scale_type | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_scale_type: : A GtkDataboxRuler widget

This function returns the scale type of the (linear or logarithmic).

Return value: The scale type (linear or logarithmic)

PangoAlignment gtk_databox_ruler_get_text_alignment | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_text_alignment: : a GtkDataboxRuler

Gets the text alignment of the (vertical). Vertical rulers with vertical text do not use this flag

Return value: Text alignment of the .

gint gtk_databox_ruler_get_text_hoffset | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_text_hoffset: : a GtkDataboxRuler

Gets the text x (horizontal) offset of the .

Return value: Text horizontal (x) offset of the .

GtkOrientation gtk_databox_ruler_get_text_orientation | ( | GtkDataboxRuler * | ruler | ) |

gtk_databox_ruler_get_text_orientation: : a GtkDataboxRuler

Gets the text orientation of the (horizontal or vertical). Horizontal rulers always have horizontal text

Return value: Text orientation of the .

GType gtk_databox_ruler_get_type | ( | void |  | ) |

GtkWidget* gtk_databox_ruler_new | ( | GtkOrientation | orientation | ) |

gtk_databox_ruler_new: : orientation of the ruler

Creates a new GtkDataboxRuler widget with the given (horizontal or vertical).

Return value: A new GtkDataboxRuler

Here is the caller graph for this function:

void gtk_databox_ruler_set_box_shadow | ( | GtkDataboxRuler * | ruler,
|  | GtkShadowType | which_shadow
| ) |  |

gtk_databox_ruler_set_box_shadow: : a GtkDataboxRuler : How to render the box shadow on the ruler edges.

Sets the shadow type when using gtk_paint_box. This will draw the desired edge shadow.

void gtk_databox_ruler_set_draw_position | ( | GtkDataboxRuler * | ruler,
|  | gboolean | draw
| ) |  |

gtk_databox_ruler_set_draw_position: : a GtkDataboxRuler : whether to draw the position arrows on the ruler at all

Sets the option for drawing the position arrows. If false, don't draw any arrows, If true draw arrows.

void gtk_databox_ruler_set_draw_subticks | ( | GtkDataboxRuler * | ruler,
|  | gboolean | draw
| ) |  |

gtk_databox_ruler_set_draw_subticks: : a GtkDataboxRuler : whether to draw the subticks on the ruler

Sets the option for drawing the subticks

void gtk_databox_ruler_set_draw_ticks | ( | GtkDataboxRuler * | ruler,
|  | gboolean | draw
| ) |  |

gtk_databox_ruler_set_draw_ticks: : a GtkDataboxRuler : whether to draw the ticks on the ruler at all

Sets the option for drawing the ticks. If false, don't draw any ticks, If true draw major ticks and subticks if the draw_subticks boolean is set.

void gtk_databox_ruler_set_invert_edge | ( | GtkDataboxRuler * | ruler,
|  | gboolean | invert
| ) |  |

gtk_databox_ruler_set_invert_edge: : a GtkDataboxRuler : whether to draw the ruler detail with the edge inverted

Sets the option for drawing the ruler detail on the opposite edge

Here is the caller graph for this function:

void gtk_databox_ruler_set_linear_label_format | ( | GtkDataboxRuler * | ruler,
|  | gchar * | format
| ) |  |

gtk_databox_ruler_set_linear_label_format: : a GtkDataboxRuler : How to format the labels for linear rulers

Sets the meta format string for the labels of linear rulers, for example "%%+-%dg" will become "%+-#g" where # is the int variable

void gtk_databox_ruler_set_log_label_format | ( | GtkDataboxRuler * | ruler,
|  | gchar * | format
| ) |  |

gtk_databox_ruler_set_log_label_format: : a GtkDataboxRuler : How to format the labels for log scaled rulers

Sets the meta format string for the labels of log scaled rulers, for example "%%-%dg" will become "%-#g" where # is the int variable

void gtk_databox_ruler_set_manual_tick_cnt | ( | GtkDataboxRuler * | ruler,
|  | guint | manual_tick_cnt
| ) |  |

gtk_databox_grid_set_manual_tick_cnt: : a GtkDataboxRuler : sets the number of manual ticks for the

Sets the number of manual ticks for the (horizontal or vertical).

void gtk_databox_ruler_set_manual_tick_labels | ( | GtkDataboxRuler * | ruler,
|  | gchar * | labels[]
| ) |  |

void gtk_databox_ruler_set_manual_ticks | ( | GtkDataboxRuler * | ruler,
|  | gfloat * | manual_ticks
| ) |  |

gtk_databox_grid_set_manual_ticks: : a GtkDataboxRuler : sets the pointer to the hline values for the

Sets the ticks for the (horizontal or vertical).

void gtk_databox_ruler_set_max_length | ( | GtkDataboxRuler * | ruler,
|  | guint | max_length
| ) |  |

gtk_databox_ruler_set_max_length: : A GtkDataboxRuler widget : Maximum length (digits) of tick labels

This function sets the maximum number of digits to be used for each tick label of the .

The cannot be smaller than 2 and not bigger than GTK_DATABOX_RULER_MAX_MAX_LENGTH.

void gtk_databox_ruler_set_orientation | ( | GtkDataboxRuler * | ruler,
|  | GtkOrientation | orientation
| ) |  |

gtk_databox_ruler_set_orientation: : a GtkDataboxRuler : new orientation of the ruler

Sets the orientation of the (horizontal or vertical).

void gtk_databox_ruler_set_range | ( | GtkDataboxRuler * | ruler,
|  | gdouble | lower,
|  | gdouble | upper,
|  | gdouble | position
| ) |  |

gtk_databox_ruler_set_range: : a GtkDataboxRuler : lower limit of the ruler : upper limit of the ruler : current position of the mark on the ruler

Sets values indicating the range and current position of a GtkDataboxRuler.

See gtk_databox_ruler_get_range().

void gtk_databox_ruler_set_scale_type | ( | GtkDataboxRuler * | ruler,
|  | guint | scale_type
| ) |  |

void gtk_databox_ruler_set_text_alignment | ( | GtkDataboxRuler * | ruler,
|  | PangoAlignment | alignment
| ) |  |

gtk_databox_ruler_set_text_alignment: : a GtkDataboxRuler : new alignment of the tick label in the vertical ruler when horizontal text is set

Sets the text alignment of the (vertical with horizontal text).

void gtk_databox_ruler_set_text_hoffset | ( | GtkDataboxRuler * | ruler,
|  | gint | offset
| ) |  |

gtk_databox_ruler_set_text_hoffset: : a GtkDataboxRuler : new x offset of the tick label in the ruler

Sets the text x (horizontal) offset of the .

void gtk_databox_ruler_set_text_orientation | ( | GtkDataboxRuler * | ruler,
|  | GtkOrientation | orientation
| ) |  |

gtk_databox_ruler_set_text_orientation: : a GtkDataboxRuler : new orientation of the tick marks in the vertical ruler

Sets the text orientation of the (vertical).

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines