Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
main_window.h
1// SPDX-FileCopyrightText: © 2018-2022, 2024 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-FileCopyrightText: © 2024 Miró Allard <miro.allard@pm.me>
3// SPDX-License-Identifier: LicenseRef-ZrythmLicense
4
5#ifndef __GUI_WIDGETS_MAIN_WINDOW_H__
6#define __GUI_WIDGETS_MAIN_WINDOW_H__
7
8#include "gui/backend/backend/zrythm.h"
9#include "gui/backend/gtk_widgets/gtk_wrapper.h"
10#include "gui/backend/gtk_widgets/libadwaita_wrapper.h"
11#include "gui/backend/gtk_widgets/libpanel_wrapper.h"
12
13#define MAIN_WINDOW_WIDGET_TYPE (main_window_widget_get_type ())
14G_DECLARE_FINAL_TYPE (
16 main_window_widget,
17 Z,
18 MAIN_WINDOW_WIDGET,
19 AdwApplicationWindow)
20
21TYPEDEF_STRUCT_UNDERSCORED (ToolboxWidget);
22TYPEDEF_STRUCT_UNDERSCORED (CenterDockWidget);
23TYPEDEF_STRUCT_UNDERSCORED (BotBarWidget);
24TYPEDEF_STRUCT_UNDERSCORED (TopBarWidget);
25class ZrythmApp;
26class ArrangerSelections;
27
33
34#define MAIN_WINDOW zrythm_app->main_window_
35#define MW MAIN_WINDOW
36
44using MainWindowWidget = struct _MainWindowWidget
45{
46 AdwApplicationWindow parent_instance;
47
48 PanelToggleButton * start_dock_switcher;
49 AdwWindowTitle * window_title;
50 PanelToggleButton * end_dock_switcher;
51
52 ToolboxWidget * toolbox;
53
54 AdwSplitButton * undo_btn;
55 AdwSplitButton * redo_btn;
56
57 GtkBox * header_start_box;
58 GtkBox * header_end_box;
59 GtkButton * z_icon;
60
61 GtkBox * center_box;
62 CenterDockWidget * center_dock;
63 BotBarWidget * bot_bar;
64 int is_fullscreen;
65 int height;
66 int width;
67 AdwToastOverlay * toast_overlay;
68
70 bool preferences_opened;
71
75 bool log_has_pending_warnings;
76
78 bool setup;
79};
80
87
88void
89main_window_widget_refresh_undo_redo_buttons (MainWindowWidget * self);
90
94void
96
100void
102
106void
108
109void
110main_window_widget_quit (MainWindowWidget * self);
111
115
116#endif
Contains all of the info that will be serialized into a project file.
Definition project.h:99
The Zrythm GTK application.
Definition zrythm_app.h:50
MainWindowWidget * main_window_widget_new(ZrythmApp *app)
Creates a main_window widget using the given app data.
void main_window_widget_tear_down(MainWindowWidget *self)
Prepare for finalization.
void main_window_widget_set_project_title(MainWindowWidget *self, Project *prj)
Updates the project name at the top of the window.
void main_window_widget_setup(MainWindowWidget *self)
Refreshes the state of the main window.
struct _MainWindowWidget { AdwApplicationWindow parent_instance; PanelToggleButton *start_dock_switcher; AdwWindowTitle * window_title; PanelToggleButton *end_dock_switcher; ToolboxWidget *toolbox; AdwSplitButton *undo_btn; AdwSplitButton *redo_btn; GtkBox * header_start_box; GtkBox * header_end_box; GtkButton *z_icon; GtkBox * center_box; CenterDockWidget *center_dock; BotBarWidget * bot_bar; int is_fullscreen; int height; int width; AdwToastOverlay * toast_overlay; bool preferences_opened; bool log_has_pending_warnings; bool setup;} MainWindowWidget
The main window of Zrythm.
Definition main_window.h:44
struct _BotBarWidget { GtkWidget parent_instance; GtkCenterBox *center_box; GtkLabel * engine_status_label; GtkBox * digital_meters; DigitalMeterWidget *digital_bpm; GtkOverlay *playhead_overlay; ButtonWithMenuWidget *metronome; GtkToggleButton * metronome_btn; DigitalMeterWidget *digital_transport; GtkWidget *master_img; GtkWidget *client_img; GtkBox *playhead_box; LiveWaveformWidget * live_waveform; SpectrumAnalyzerWidget *spectrum_analyzer; MidiActivityBarWidget * midi_activity; GtkLabel * midi_in_lbl; GtkBox * meter_box; DigitalMeterWidget * digital_timesig; TransportControlsWidget *transport_controls; CpuWidget * cpu_load; PanelToggleButton *bot_dock_switcher; std::string hex_color; std::string green_hex; std::string red_hex;} BotBarWidget
Bottom bar showing the engine status, etc.
Definition bot_bar.h:43
Center dock.
Definition center_dock.h:41