Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
scale_selector_window.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019, 2022, 2024 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
9
10#ifndef __GUI_WIDGETS_SCALE_SELECTOR_WINDOW_H__
11#define __GUI_WIDGETS_SCALE_SELECTOR_WINDOW_H__
12
13#include "common/dsp/scale.h"
14#include "common/utils/types.h"
15#include "gui/backend/gtk_widgets/gtk_wrapper.h"
16
17#define SCALE_SELECTOR_WINDOW_WIDGET_TYPE \
18 (scale_selector_window_widget_get_type ())
19G_DECLARE_FINAL_TYPE (
21 scale_selector_window_widget,
22 Z,
23 SCALE_SELECTOR_WINDOW_WIDGET,
24 GtkDialog)
25
26
31
32class ScaleObject;
33class MusicalScale;
34
39using ScaleSelectorWindowWidget = struct _ScaleSelectorWindowWidget
40{
41 GtkDialog parent_instance;
42
43 GtkFlowBox * creator_root_note_flowbox;
44 GtkFlowBoxChild * creator_root_note_c;
45 GtkFlowBoxChild * creator_root_note_cs;
46 GtkFlowBoxChild * creator_root_note_d;
47 GtkFlowBoxChild * creator_root_note_ds;
48 GtkFlowBoxChild * creator_root_note_e;
49 GtkFlowBoxChild * creator_root_note_f;
50 GtkFlowBoxChild * creator_root_note_fs;
51 GtkFlowBoxChild * creator_root_note_g;
52 GtkFlowBoxChild * creator_root_note_gs;
53 GtkFlowBoxChild * creator_root_note_a;
54 GtkFlowBoxChild * creator_root_note_as;
55 GtkFlowBoxChild * creator_root_note_b;
56
58 GtkFlowBoxChild * creator_root_notes[12];
59
60 GtkFlowBox * creator_type_flowbox;
61 GtkFlowBox * creator_type_other_flowbox;
62
64 GtkFlowBoxChild * creator_types[ENUM_COUNT (MusicalScale::Type)];
65
67 ScaleObject * scale;
68
71 std::unique_ptr<MusicalScale> * descr;
72};
73
79
83
84#endif
struct _ScaleSelectorWindowWidget { GtkDialog parent_instance; GtkFlowBox * creator_root_note_flowbox; GtkFlowBoxChild *creator_root_note_c; GtkFlowBoxChild *creator_root_note_cs; GtkFlowBoxChild *creator_root_note_d; GtkFlowBoxChild *creator_root_note_ds; GtkFlowBoxChild *creator_root_note_e; GtkFlowBoxChild *creator_root_note_f; GtkFlowBoxChild *creator_root_note_fs; GtkFlowBoxChild *creator_root_note_g; GtkFlowBoxChild *creator_root_note_gs; GtkFlowBoxChild *creator_root_note_a; GtkFlowBoxChild *creator_root_note_as; GtkFlowBoxChild *creator_root_note_b; GtkFlowBoxChild *creator_root_notes[12]; GtkFlowBox *creator_type_flowbox; GtkFlowBox *creator_type_other_flowbox; GtkFlowBoxChild *creator_types[ENUM_COUNT(MusicalScale::Type)]; ScaleObject *scale; std::unique_ptr< MusicalScale > *descr;} ScaleSelectorWindowWidget
A GtkPopover to create a ScaleDescriptor for use in the ScaleTrack's ScaleObject's.
ScaleSelectorWindowWidget * scale_selector_window_widget_new(ScaleObject *owner)
Creates the popover.