1 /*
2  * Copyright (C) 2019-2020 Alexandros Theodotou <alex at zrythm dot org>
3  *
4  * This file is part of Zrythm
5  *
6  * Zrythm is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Affero General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Zrythm is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Affero General Public License for more details.
15  *
16  * You should have received a copy of the GNU Affero General Public License
17  * along with Zrythm.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 /**
21  * \file
22  *
23  * Chord pad in the bottom panel.
24  */
25 
26 #ifndef __GUI_WIDGETS_CHORD_PAD_H__
27 #define __GUI_WIDGETS_CHORD_PAD_H__
28 
29 #include <gtk/gtk.h>
30 
31 typedef struct _ChordWidget ChordWidget;
32 
33 /**
34  * @addtogroup widgets
35  *
36  * @{
37  */
38 
39 #define CHORD_PAD_WIDGET_TYPE \
40   (chord_pad_widget_get_type ())
41 G_DECLARE_FINAL_TYPE (
42   ChordPadWidget,
43   chord_pad_widget,
44   Z, CHORD_PAD_WIDGET,
45   GtkGrid)
46 
47 #define MW_CHORD_PAD \
48   MW_BOT_DOCK_EDGE->chord_pad
49 
50 /**
51  * Brings up the ChordPadWidget in the notebook.
52  */
53 #define SHOW_CHORD_PAD \
54   gtk_notebook_set_current_page ( \
55     MW_CHORD_PAD->bot_notebook, 3)
56 
57 /**
58  * Tab for chord pads.
59  */
60 typedef struct _ChordPadWidget
61 {
62   GtkGrid          parent_instance;
63 
64   GtkGrid *        chords_grid;
65 
66   /** Chords inside the grid. */
67   ChordWidget *    chords[12];
68 } ChordPadWidget;
69 
70 void
71 chord_pad_widget_setup (
72   ChordPadWidget * self);
73 
74 void
75 chord_pad_widget_refresh (
76   ChordPadWidget * self);
77 
78 /**
79  * @}
80  */
81 
82 #endif
83