Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
selection_info.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: © 2019 Alexandros Theodotou <alex@zrythm.org>
3 *
4 * SPDX-License-Identifier: LicenseRef-ZrythmLicense
5 */
6
13
14#ifndef __GUI_WIDGETS_SELECTION_INFO_H__
15#define __GUI_WIDGETS_SELECTION_INFO_H__
16
17#include "common/utils/ui.h"
18#include "gui/backend/gtk_widgets/gtk_wrapper.h"
19
20#define SELECTION_INFO_WIDGET_TYPE (selection_info_widget_get_type ())
22 SelectionInfoWidget,
23 selection_info_widget,
24 Z,
25 SELECTION_INFO_WIDGET,
26 GtkGrid)
27
28#define SELECTION_INFO_WIDGET_GET_PRIVATE(self) \
29 SelectionInfoWidgetPrivate * sel_inf_prv = \
30 selection_info_widget_get_private (Z_SELECTION_INFO_WIDGET (self));
31
38typedef struct _SelectionInfoWidgetPrivate
39{
40 GtkWidget * labels[14];
41 GtkWidget * widgets[14];
42 int num_items;
43} SelectionInfoWidgetPrivate;
44
45typedef struct _SelectionInfoWidgetClass
46{
47 GtkGridClass parent_class;
49
50#define selection_info_widget_add_info_with_text(_self, _txt, _widget) \
51 GtkWidget * _lbl = gtk_label_new (_txt); \
52 gtk_widget_set_visible (_lbl, 1); \
53 selection_info_widget_add_info (_self, _lbl, GTK_WIDGET (_widget));
54
64void
66 SelectionInfoWidget * self,
67 GtkWidget * label,
68 GtkWidget * widget);
69
73void
74selection_info_widget_clear (SelectionInfoWidget * self);
75
79SelectionInfoWidgetPrivate *
80selection_info_widget_get_private (SelectionInfoWidget * self);
81
82#endif
SelectionInfoWidgetPrivate * selection_info_widget_get_private(SelectionInfoWidget *self)
Returns the private.
G_DECLARE_DERIVABLE_TYPE(SelectionInfoWidget, selection_info_widget, Z, SELECTION_INFO_WIDGET, GtkGrid) typedef struct _SelectionInfoWidgetPrivate
A widget to display info about the current arranger selection, to be used in the TimelineArrangerWidg...
void selection_info_widget_clear(SelectionInfoWidget *self)
Destroys all children.
void selection_info_widget_add_info(SelectionInfoWidget *self, GtkWidget *label, GtkWidget *widget)
Adds a piece of info to the grid.