Harmonise GUI maximum value with libspamc's one
[claws.git] / src / gtk / gtkshruler.h
1 /* LIBGTK - The GTK Library
2  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3  *
4  * This library is free software: you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 3 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library.  If not, see
16  * <http://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __GTK_SHRULER_H__
20 #define __GTK_SHRULER_H__
21
22 #include "gtkunit.h"
23
24 G_BEGIN_DECLS
25
26 #define GTK_TYPE_SHRULER            (gtk_shruler_get_type ())
27 #define GTK_SHRULER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHRULER, GtkSHRuler))
28 #define GTK_SHRULER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHRULER, GtkSHRulerClass))
29 #define GTK_IS_SHRULER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHRULER))
30 #define GTK_IS_SHRULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHRULER))
31 #define GTK_SHRULER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHRULER, GtkSHRulerClass))
32
33 typedef struct _GtkSHRuler        GtkSHRuler;
34 typedef struct _GtkSHRulerClass   GtkSHRulerClass;
35
36 struct _GtkSHRuler
37 {
38   GtkWidget  parent_instance;
39 };
40
41 struct _GtkSHRulerClass
42 {
43   GtkWidgetClass  parent_class;
44
45   /* Padding for future expansion */
46   void (*_gtk_reserved1) (void);
47   void (*_gtk_reserved2) (void);
48   void (*_gtk_reserved3) (void);
49   void (*_gtk_reserved4) (void);
50 };
51
52
53 GType       gtk_shruler_get_type            (void) G_GNUC_CONST;
54
55 GtkWidget * gtk_shruler_new                 (GtkOrientation  orientation);
56
57 void        gtk_shruler_add_track_widget    (GtkSHRuler      *ruler,
58                                             GtkWidget      *widget);
59 void        gtk_shruler_remove_track_widget (GtkSHRuler      *ruler,
60                                             GtkWidget      *widget);
61
62 void        gtk_shruler_set_unit            (GtkSHRuler      *ruler,
63                                             GtkCMUnit        unit);
64 GtkCMUnit     gtk_shruler_get_unit            (GtkSHRuler      *ruler);
65 void        gtk_shruler_set_position        (GtkSHRuler      *ruler,
66                                             gdouble         position);
67 gdouble     gtk_shruler_get_position        (GtkSHRuler      *ruler);
68 void        gtk_shruler_set_range           (GtkSHRuler      *ruler,
69                                             gdouble         lower,
70                                             gdouble         upper,
71                                             gdouble         max_size);
72 void        gtk_shruler_get_range           (GtkSHRuler      *ruler,
73                                             gdouble        *lower,
74                                             gdouble        *upper,
75                                             gdouble        *max_size);
76
77 G_END_DECLS
78
79 #endif /* __GTK_SHRULER_H__ */