2 #ifndef __BST_PATTERN_COLUMNS_H__
3 #define __BST_PATTERN_COLUMNS_H__
14 BST_PATTERN_REMOVE_EVENTS,
16 BST_PATTERN_SET_OCTAVE,
17 BST_PATTERN_NUMERIC_CHANGE,
18 BST_PATTERN_SET_DIGIT,
19 BST_PATTERN_MASK_ACTION = 0x000000ff,
21 BST_PATTERN_SET_BASE_OCTAVE = 0x1 << 8,
22 BST_PATTERN_CHANGE_BASE_OCTAVE = 0x2 << 8,
23 BST_PATTERN_MASK_CONTROLS = 0x0000ff00,
25 BST_PATTERN_MOVE_LEFT = 0x1 << 16,
26 BST_PATTERN_MOVE_RIGHT = 0x2 << 16,
27 BST_PATTERN_MOVE_UP = 0x3 << 16,
28 BST_PATTERN_MOVE_DOWN = 0x4 << 16,
29 BST_PATTERN_PAGE_LEFT = 0x5 << 16,
30 BST_PATTERN_PAGE_RIGHT = 0x6 << 16,
31 BST_PATTERN_PAGE_UP = 0x7 << 16,
32 BST_PATTERN_PAGE_DOWN = 0x8 << 16,
33 BST_PATTERN_JUMP_LEFT = 0x9 << 16,
34 BST_PATTERN_JUMP_RIGHT = 0xa << 16,
35 BST_PATTERN_JUMP_TOP = 0xb << 16,
36 BST_PATTERN_JUMP_BOTTOM = 0xc << 16,
37 BST_PATTERN_MOVE_NEXT = 0xd << 16,
38 BST_PATTERN_SET_STEP_WIDTH = 0xe << 16,
39 BST_PATTERN_MASK_MOVEMENT = 0x00ff0000,
43 BST_PATTERN_COLUMN_GC_TEXT0,
44 BST_PATTERN_COLUMN_GC_TEXT1,
45 BST_PATTERN_COLUMN_GC_VBAR,
46 BST_PATTERN_COLUMN_GC_LAST
47 } BstPatternColumnCellGcType;
49 BST_PATTERN_LTYPE_SPACE,
50 BST_PATTERN_LTYPE_NOTE,
51 BST_PATTERN_LTYPE_OFFSET,
52 BST_PATTERN_LTYPE_LENGTH,
53 BST_PATTERN_LTYPE_VELOCITY,
54 BST_PATTERN_LTYPE_FINE_TUNE,
55 BST_PATTERN_LTYPE_CONTROL,
56 BST_PATTERN_LTYPE_BAR,
57 BST_PATTERN_LTYPE_DBAR,
60 BST_PATTERN_LFLAG_DIGIT_1 = 0 << 0,
61 BST_PATTERN_LFLAG_DIGIT_2 = 1 << 0,
62 BST_PATTERN_LFLAG_DIGIT_3 = 2 << 0,
63 BST_PATTERN_LFLAG_DIGIT_4 = 3 << 0,
64 BST_PATTERN_LFLAG_DIGIT_MASK = (3 << 0),
65 BST_PATTERN_LFLAG_DEC = 0 << 2,
66 BST_PATTERN_LFLAG_HEX = 1 << 2,
67 BST_PATTERN_LFLAG_NUM_MASK = (1 << 2),
68 BST_PATTERN_LFLAG_SIGNED = 1 << 5,
69 BST_PATTERN_LFLAG_LFOLD = 1 << 6,
70 BST_PATTERN_LFLAG_RFOLD = 1 << 7,
71 BST_PATTERN_LFLAG_COL1 = 0 << 8,
72 BST_PATTERN_LFLAG_COL2 = 1 << 8,
73 BST_PATTERN_LFLAG_COL3 = 2 << 8,
74 BST_PATTERN_LFLAG_COL4 = 3 << 8,
75 BST_PATTERN_LFLAG_COL_MASK = (3 << 8),
84 BstPatternColumnClass *klass;
86 BstPatternLType ltype;
87 BstPatternLFlags lflags;
88 int n_focus_positions;
96 int n_focus_positions;
98 void (*init) (BstPatternColumn *
self);
99 PangoFontDescription* (*create_font_desc) (BstPatternColumn *
self);
100 guint (*width_request) (BstPatternColumn *
self,
101 BstPatternView *pview,
103 PangoLayout *pango_layout,
105 void (*draw_cell) (BstPatternColumn *
self,
106 BstPatternView *pview,
108 PangoLayout *pango_layout,
111 GdkRectangle *cell_rect,
112 GdkRectangle *expose_area,
113 GdkGC *gcs[BST_PATTERN_COLUMN_GC_LAST]);
114 void (*get_focus_pos) (BstPatternColumn *
self,
115 BstPatternView *pview,
117 PangoLayout *pango_layout,
120 GdkRectangle *cell_rect,
124 guint collision_group;
125 gboolean (*key_event) (BstPatternColumn *
self,
126 BstPatternView *pview,
128 PangoLayout *pango_layout,
131 GdkRectangle *cell_rect,
134 GdkModifierType modifier,
135 BstPatternFunction action,
137 BstPatternFunction *movement);
138 void (*finalize) (BstPatternColumn *
self);
141 void bst_pattern_column_layouter_popup (BstPatternView *pview);
142 const gchar* bst_pattern_layout_parse_column (
const gchar *
string,
143 BstPatternLType *ltype,
145 BstPatternLFlags *flags);
146 BstPatternColumn* bst_pattern_column_create (BstPatternLType ltype,
148 BstPatternLFlags lflags);
149 gboolean bst_pattern_column_has_notes (BstPatternColumn *column);
155 constexpr BstPatternLFlags operator& (BstPatternLFlags s1, BstPatternLFlags s2) {
return BstPatternLFlags (s1 & (
long long unsigned) s2); }
156 inline BstPatternLFlags& operator&= (BstPatternLFlags &s1, BstPatternLFlags s2) { s1 = s1 & s2;
return s1; }
157 constexpr BstPatternLFlags operator| (BstPatternLFlags s1, BstPatternLFlags s2) {
return BstPatternLFlags (s1 | (
long long unsigned) s2); }
158 inline BstPatternLFlags& operator|= (BstPatternLFlags &s1, BstPatternLFlags s2) { s1 = s1 | s2;
return s1; }
159 constexpr BstPatternLFlags operator~ (BstPatternLFlags s1) {
return BstPatternLFlags (~(
long long unsigned) s1); }
160 constexpr BstPatternFunction operator& (BstPatternFunction s1, BstPatternFunction s2) {
return BstPatternFunction (s1 & (
long long unsigned) s2); }
161 inline BstPatternFunction& operator&= (BstPatternFunction &s1, BstPatternFunction s2) { s1 = s1 & s2;
return s1; }
162 constexpr BstPatternFunction operator| (BstPatternFunction s1, BstPatternFunction s2) {
return BstPatternFunction (s1 | (
long long unsigned) s2); }
163 inline BstPatternFunction& operator|= (BstPatternFunction &s1, BstPatternFunction s2) { s1 = s1 | s2;
return s1; }
164 constexpr BstPatternFunction operator~ (BstPatternFunction s1) {
return BstPatternFunction (~(
long long unsigned) s1); }
165 #endif // __cplusplus
Definition: bstpatterncolumns.hh:94
Definition: bstpatternview.hh:44
Definition: bstpatterncolumns.hh:82