Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bstdial.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BST_DIAL_H__
3 #define __BST_DIAL_H__
4 
5 #include "bstutils.hh"
6 
7 
8 
9 #define BST_TYPE_DIAL (bst_dial_get_type ())
10 #define BST_DIAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BST_TYPE_DIAL, BstDial))
11 #define BST_DIAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BST_TYPE_DIAL, BstDialClass))
12 #define BST_IS_DIAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BST_TYPE_DIAL))
13 #define BST_IS_DIAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BST_TYPE_DIAL))
14 #define BST_DIAL_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((obj), BST_TYPE_DIAL, BstDialClass))
15 
16 
17 typedef struct _BstDial BstDial;
18 typedef struct _BstDialClass BstDialClass;
19 struct _BstDial
20 {
21  GtkWidget parent_object;
22 
23  /* The update policy: GTK_UPDATE_CONTINUOUS,
24  * GTK_UPDATE_DISCONTINUOUS or GTK_UPDATE_DELAYED
25  */
26  GtkUpdateType update_policy;
27 
28  GtkWidget *align_widget;
29  guint align_width : 1;
30 
31  /* The button currently pressed or 0 if none */
32  guint8 button;
33 
34  /* Dimensions of dial components */
35  gint radius;
36  gint pointer_width;
37 
38  /* ID of update timer for delayed updates, or 0 if none */
39  guint timer;
40 
41  /* Current angle of the pointer */
42  gdouble angle;
43 
44  /* Old values from GtkAdjustment, stored so we know when something changed */
45  gdouble old_value;
46  gdouble old_lower;
47  gdouble old_upper;
48  gdouble old_page_size;
49 
50  /* The adjustment object that stores the data for this dial */
51  GtkObject *adjustment;
52 };
54 {
55  GtkWidgetClass parent_class;
56 };
57 
58 
59 GtkType bst_dial_get_type (void);
60 GtkWidget* bst_dial_new (GtkAdjustment *adjustment);
61 void bst_dial_set_adjustment (BstDial *dial,
62  GtkAdjustment *adjustment);
63 GtkAdjustment* bst_dial_get_adjustment (BstDial *dial);
64 void bst_dial_set_update_policy (BstDial *dial,
65  GtkUpdateType policy);
66 void bst_dial_set_align_widget (BstDial *dial,
67  GtkWidget *widget,
68  gboolean width_align,
69  gboolean height_align);
70 
71 #endif /* __BST_DIAL_H__ */
72 
Definition: bstdial.hh:19
Definition: bstdial.hh:53