Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bstcanvaslink.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_CANVAS_LINK_H__
3 #define __BST_CANVAS_LINK_H__
4 
5 #include "bstutils.hh"
6 #include "bstcanvassource.hh"
7 
8 
9 
10 /* --- Gtk+ type macros --- */
11 #define BST_TYPE_CANVAS_LINK (bst_canvas_link_get_type ())
12 #define BST_CANVAS_LINK(object) (GTK_CHECK_CAST ((object), BST_TYPE_CANVAS_LINK, BstCanvasLink))
13 #define BST_CANVAS_LINK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), BST_TYPE_CANVAS_LINK, BstCanvasLinkClass))
14 #define BST_IS_CANVAS_LINK(object) (GTK_CHECK_TYPE ((object), BST_TYPE_CANVAS_LINK))
15 #define BST_IS_CANVAS_LINK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), BST_TYPE_CANVAS_LINK))
16 #define BST_CANVAS_LINK_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), BST_TYPE_CANVAS_LINK, BstCanvasLinkClass))
17 
18 
19 /* --- structures & typedefs --- */
20 typedef struct _BstCanvasLink BstCanvasLink;
21 typedef struct _BstCanvasLinkClass BstCanvasLinkClass;
23 {
24  GnomeCanvasGroup parent_object;
25 
26  GnomeCanvasItem *line;
27  GnomeCanvasItem *arrow;
28  GnomeCanvasItem *tag_start, *tag_end;
29 
30  BstCanvasSource *ocsource;
31  guint ochannel;
32  gulong oc_handler;
33  BstCanvasSource *icsource;
34  guint ichannel;
35  gulong ic_handler;
36 
37  guint in_move : 1;
38  gdouble start_move_dx, start_move_dy;
39  gdouble end_move_dx, end_move_dy;
40 
41  GtkWidget *link_view;
42 };
44 {
45  GnomeCanvasGroupClass parent_class;
46 };
47 
48 
49 /* --- prototypes --- */
50 GtkType bst_canvas_link_get_type (void);
51 GnomeCanvasItem* bst_canvas_link_new (GnomeCanvasGroup *group);
52 void bst_canvas_link_set_ocsource (BstCanvasLink *clink,
53  BstCanvasSource *ocsource,
54  guint ochannel);
55 void bst_canvas_link_set_icsource (BstCanvasLink *clink,
56  BstCanvasSource *icsource,
57  guint ichannel);
58 void bst_canvas_link_popup_view (BstCanvasLink *clink);
59 void bst_canvas_link_toggle_view (BstCanvasLink *clink);
60 BstCanvasLink* bst_canvas_link_at (GnomeCanvas *canvas,
61  gdouble world_x,
62  gdouble world_y);
63 BstCanvasSource* bst_canvas_link_csource_at (BstCanvasLink *clink,
64  gdouble world_x,
65  gdouble world_y);
66 
67 
68 
69 
70 #endif /* __BST_CANVAS_LINK_H__ */
Definition: bstcanvaslink.hh:43