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

- Main Page
- Data Structures
- Files

- File List
- Globals

gtk/gtkdatabox_ruler.h
Go to the documentation of this file.

    00001 /* $Id: gtkdatabox_ruler.h 4 2008-06-22 09:19:11Z rbock $ */
    00002 /* GTK - The GIMP Toolkit
    00003  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
    00004  *
    00005  * This library is free software; you can redistribute it and/or
    00006  * modify it under the terms of the GNU Lesser General Public
    00007  * License as published by the Free Software Foundation; either
    00008  * version 2 of the License, or (at your option) any later version.
    00009  *
    00010  * This library is distributed in the hope that it will be useful,
    00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013  * Lesser General Public License for more details.
    00014  *
    00015  * You should have received a copy of the GNU Lesser General Public
    00016  * License along with this library; if not, write to the
    00017  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018  * Boston, MA 02111-1307, USA.
    00019  */
    00020
    00021 /*
    00022  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
    00023  * file for a list of people on the GTK+ Team.  See the ChangeLog
    00024  * files for a list of changes.  These files are distributed with
    00025  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
    00026  */
    00027
    00028 /*
    00029  * Modified by Roland Bock 2007 - 2008.
    00030  */
    00031
    00061 #ifndef __GTK_DATABOX_RULER_H__
    00062 #define __GTK_DATABOX_RULER_H__
    00063
    00064 #ifdef _MSC_VER
    00065 #define log2(x) (log(x)/log(2))
    00066 #endif
    00067
    00068 #include <gdk/gdk.h>
    00069 #include <gtk/gtkwidget.h>
    00070 #include <gtkdatabox_scale.h>
    00071
    00072 G_BEGIN_DECLS
    00073 #define GTK_DATABOX_TYPE_RULER            (gtk_databox_ruler_get_type ())
    00074 #define GTK_DATABOX_RULER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_DATABOX_TYPE_RULER, GtkDataboxRuler))
    00075 #define GTK_DATABOX_RULER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_DATABOX_TYPE_RULER, GtkDataboxRulerClass))
    00076 #define GTK_DATABOX_IS_RULER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_DATABOX_TYPE_RULER))
    00077 #define GTK_DATABOX_IS_RULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_DATABOX_TYPE_RULER))
    00078 #define GTK_DATABOX_RULER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_DATABOX_TYPE_RULER, GtkDataboxRulerClass))
    00079
    00085 typedef struct _GtkDataboxRuler GtkDataboxRuler;
    00086 typedef struct _GtkDataboxRulerClass GtkDataboxRulerClass;
    00087
    00093 #define GTK_DATABOX_RULER_MAX_MAX_LENGTH 63
    00094
    00102  typedef struct _GtkDataboxRulerPrivate GtkDataboxRulerPrivate;
    00103
    00104 struct _GtkDataboxRuler
    00105 {
    00106    GtkWidget widget;
    00107
    00108    GtkDataboxRulerPrivate *priv;
    00109 };
    00110
    00111 struct _GtkDataboxRulerClass
    00112 {
    00113    GtkWidgetClass parent_class;
    00114 };
    00115
    00116
    00117 GType
    00118 gtk_databox_ruler_get_type (void)
    00119    G_GNUC_CONST;
    00120      GtkWidget *gtk_databox_ruler_new (GtkOrientation orientation);
    00121
    00122      void gtk_databox_ruler_set_range (GtkDataboxRuler * ruler,
    00123                                        gdouble lower,
    00124                                        gdouble upper, gdouble position);
    00125      void gtk_databox_ruler_set_max_length (GtkDataboxRuler * ruler,
    00126                                             guint max_length);
    00127      void gtk_databox_ruler_set_scale_type (GtkDataboxRuler * ruler,
    00128                                             guint scale_type);
    00129
    00130      void gtk_databox_ruler_get_range (GtkDataboxRuler * ruler,
    00131                                        gdouble * lower,
    00132                                        gdouble * upper, gdouble * position);
    00133      guint gtk_databox_ruler_get_max_length (GtkDataboxRuler * ruler);
    00134      GtkDataboxScaleType gtk_databox_ruler_get_scale_type (GtkDataboxRuler *
    00135                                                            ruler);
    00136
    00137      void gtk_databox_ruler_set_orientation (GtkDataboxRuler * ruler, GtkOrientation orientation);
    00138      GtkOrientation gtk_databox_ruler_get_orientation (GtkDataboxRuler *ruler);
    00139
    00140      void gtk_databox_ruler_set_text_orientation (GtkDataboxRuler * ruler, GtkOrientation orientation);
    00141      GtkOrientation gtk_databox_ruler_get_text_orientation (GtkDataboxRuler *ruler);
    00142
    00143      void gtk_databox_ruler_set_text_alignment (GtkDataboxRuler * ruler, PangoAlignment alignment);
    00144      PangoAlignment gtk_databox_ruler_get_text_alignment (GtkDataboxRuler * ruler);
    00145
    00146     void gtk_databox_ruler_set_text_hoffset (GtkDataboxRuler * ruler,gint offset);
    00147     gint gtk_databox_ruler_get_text_hoffset (GtkDataboxRuler * ruler);
    00148
    00149      void gtk_databox_ruler_set_draw_ticks(GtkDataboxRuler * ruler, gboolean draw);
    00150     gboolean gtk_databox_ruler_get_draw_ticks(GtkDataboxRuler * ruler);
    00151
    00152      void gtk_databox_ruler_set_draw_position(GtkDataboxRuler * ruler, gboolean draw);
    00153     gboolean gtk_databox_ruler_get_draw_position(GtkDataboxRuler * ruler);
    00154
    00155      void gtk_databox_ruler_set_draw_subticks(GtkDataboxRuler * ruler, gboolean draw);
    00156     gboolean gtk_databox_ruler_get_draw_subticks(GtkDataboxRuler * ruler);
    00157
    00158      void gtk_databox_ruler_set_invert_edge(GtkDataboxRuler * ruler, gboolean invert);
    00159     gboolean gtk_databox_ruler_get_invert_edge(GtkDataboxRuler * ruler);
    00160
    00161     void gtk_databox_ruler_set_linear_label_format(GtkDataboxRuler * ruler, gchar *format);
    00162     void gtk_databox_ruler_set_log_label_format(GtkDataboxRuler * ruler, gchar *format);
    00163
    00164     gchar* gtk_databox_ruler_get_linear_label_format(GtkDataboxRuler * ruler);
    00165     gchar* gtk_databox_ruler_get_log_label_format(GtkDataboxRuler * ruler);
    00166
    00167     void gtk_databox_ruler_set_manual_ticks(GtkDataboxRuler * ruler, gfloat* manual_ticks);
    00168     gfloat* gtk_databox_ruler_get_manual_ticks(GtkDataboxRuler * ruler);
    00169
    00170     void gtk_databox_ruler_set_manual_tick_cnt(GtkDataboxRuler * ruler, guint manual_tick_cnt);
    00171     guint gtk_databox_ruler_get_manual_tick_cnt(GtkDataboxRuler * ruler);
    00172
    00173     void gtk_databox_ruler_set_manual_tick_labels(GtkDataboxRuler * ruler, gchar *labels[]);
    00174     gchar ** gtk_databox_ruler_get_manual_tick_labels(GtkDataboxRuler * ruler);
    00175
    00176     void gtk_databox_ruler_set_box_shadow(GtkDataboxRuler * ruler, GtkShadowType which_shadow);
    00177     GtkShadowType gtk_databox_ruler_get_box_shadow(GtkDataboxRuler * ruler);
    00178
    00179 G_END_DECLS
    00180 #endif /* __GTK_DATABOX_RULER_H__ */

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines