BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bstracktable.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_RACK_TABLE_H__
3 #define __BST_RACK_TABLE_H__
4 
5 #include "bstutils.hh"
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif /* __cplusplus */
10 
11 
12 /* --- type macros --- */
13 #define BST_TYPE_RACK_TABLE (bst_rack_table_get_type ())
14 #define BST_RACK_TABLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BST_TYPE_RACK_TABLE, BstRackTable))
15 #define BST_RACK_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BST_TYPE_RACK_TABLE, BstRackTableClass))
16 #define BST_IS_RACK_TABLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BST_TYPE_RACK_TABLE))
17 #define BST_IS_RACK_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BST_TYPE_RACK_TABLE))
18 #define BST_RACK_TABLE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BST_TYPE_RACK_TABLE, BstRackTableClass))
19 
20 
21 /* --- structures & typedefs --- */
22 typedef struct _BstRackTable BstRackTable;
23 typedef struct _BstRackTableClass BstRackTableClass;
24 typedef struct _BstRackChildInfo BstRackChildInfo;
26 {
27  gint col, row;
28  gint hspan, vspan;
29 };
31 {
32  GtkTable parent_object;
33 
34  GtkWidget *drag_window;
35 
36  guint map_cols;
37  guint map_rows;
38  guint32 *child_map;
39 
40  guint cell_request_width;
41  guint cell_request_height;
42  guint cell_width;
43  guint cell_height;
44 
45  GdkWindow *iwindow;
46  guint edit_mode : 1;
47  guint in_drag : 2;
48  guint in_drag_and_grabbing : 1;
49  BstRackChildInfo drag_info;
50  guint drag_col;
51  guint drag_row;
52  gint xofs;
53  gint yofs;
54  GtkWidget *child;
55 };
57 {
58  GtkTableClass parent_class;
59 
60  void (*edit_mode_changed) (BstRackTable *rtable,
61  gboolean edit_mode);
62  void (*child_changed) (BstRackTable *rtable,
63  GtkWidget *child);
64 };
65 
66 
67 /* --- prototypes --- */
68 GtkType bst_rack_table_get_type (void);
69 void bst_rack_table_set_edit_mode (BstRackTable *rtable,
70  gboolean enable_editing);
71 gboolean bst_rack_table_check_cell (BstRackTable *rtable,
72  guint col,
73  guint row);
74 gboolean bst_rack_table_check_area (BstRackTable *rtable,
75  guint col,
76  guint row,
77  guint hspan,
78  guint vspan);
79 gboolean bst_rack_table_expand_rect (BstRackTable *rtable,
80  guint col,
81  guint row,
82  guint *hspan,
83  guint *vspan);
84 void bst_rack_child_get_info (GtkWidget *widget,
85  BstRackChildInfo *info);
86 void bst_rack_child_set_info (GtkWidget *widget,
87  gint col,
88  gint row,
89  gint hspan,
90  gint vspan);
91 
92 #ifdef __cplusplus
93 }
94 #endif /* __cplusplus */
95 
96 #endif /* __BST_RACK_TABLE_H__ */
Definition: bstracktable.hh:25
Definition: bstracktable.hh:30
Definition: bstracktable.hh:56