BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
bstracktable.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __BST_RACK_TABLE_H__
00003 #define __BST_RACK_TABLE_H__
00004 
00005 #include "bstutils.hh"
00006 
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif /* __cplusplus */
00010 
00011 
00012 /* --- type macros --- */
00013 #define BST_TYPE_RACK_TABLE              (bst_rack_table_get_type ())
00014 #define BST_RACK_TABLE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), BST_TYPE_RACK_TABLE, BstRackTable))
00015 #define BST_RACK_TABLE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), BST_TYPE_RACK_TABLE, BstRackTableClass))
00016 #define BST_IS_RACK_TABLE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), BST_TYPE_RACK_TABLE))
00017 #define BST_IS_RACK_TABLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), BST_TYPE_RACK_TABLE))
00018 #define BST_RACK_TABLE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BST_TYPE_RACK_TABLE, BstRackTableClass))
00019 
00020 
00021 /* --- structures & typedefs --- */
00022 typedef struct _BstRackTable      BstRackTable;
00023 typedef struct _BstRackTableClass BstRackTableClass;
00024 typedef struct _BstRackChildInfo  BstRackChildInfo;
00025 struct _BstRackChildInfo
00026 {
00027   gint col, row;
00028   gint hspan, vspan;
00029 };
00030 struct _BstRackTable
00031 {
00032   GtkTable       parent_object;
00033 
00034   GtkWidget     *drag_window;
00035 
00036   guint          map_cols;
00037   guint          map_rows;
00038   guint32       *child_map;
00039 
00040   guint             cell_request_width;
00041   guint             cell_request_height;
00042   guint             cell_width;
00043   guint             cell_height;
00044 
00045   GdkWindow        *iwindow;
00046   guint             edit_mode : 1;
00047   guint             in_drag : 2;
00048   guint             in_drag_and_grabbing : 1;
00049   BstRackChildInfo  drag_info;
00050   guint             drag_col;
00051   guint             drag_row;
00052   gint              xofs;
00053   gint              yofs;
00054   GtkWidget        *child;
00055 };
00056 struct _BstRackTableClass
00057 {
00058   GtkTableClass parent_class;
00059 
00060   void  (*edit_mode_changed)    (BstRackTable   *rtable,
00061                                  gboolean        edit_mode);
00062   void  (*child_changed)        (BstRackTable   *rtable,
00063                                  GtkWidget      *child);
00064 };
00065 
00066 
00067 /* --- prototypes --- */
00068 GtkType         bst_rack_table_get_type         (void);
00069 void            bst_rack_table_set_edit_mode    (BstRackTable   *rtable,
00070                                                  gboolean        enable_editing);
00071 gboolean        bst_rack_table_check_cell       (BstRackTable   *rtable,
00072                                                  guint           col,
00073                                                  guint           row);
00074 gboolean        bst_rack_table_check_area       (BstRackTable   *rtable,
00075                                                  guint           col,
00076                                                  guint           row,
00077                                                  guint           hspan,
00078                                                  guint           vspan);
00079 gboolean        bst_rack_table_expand_rect      (BstRackTable   *rtable,
00080                                                  guint           col,
00081                                                  guint           row,
00082                                                  guint          *hspan,
00083                                                  guint          *vspan);
00084 void            bst_rack_child_get_info         (GtkWidget      *widget,
00085                                                  BstRackChildInfo *info);
00086 void            bst_rack_child_set_info         (GtkWidget      *widget,
00087                                                  gint            col,
00088                                                  gint            row,
00089                                                  gint            hspan,
00090                                                  gint            vspan);
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif /* __cplusplus */
00095 
00096 #endif /* __BST_RACK_TABLE_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines