Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
editable_label.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2019, 2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
8#ifndef __GUI_WIDGETS_EDITABLE_LABEL_H__
9#define __GUI_WIDGETS_EDITABLE_LABEL_H__
10
11#include "utils/types.h"
12
13#include "gtk_wrapper.h"
14
15#define EDITABLE_LABEL_WIDGET_TYPE (editable_label_widget_get_type ())
17 EditableLabelWidget,
18 editable_label_widget,
19 Z,
20 EDITABLE_LABEL_WIDGET,
21 GtkWidget)
22
23
26typedef struct _EditableLabelWidget
27{
28 GtkWidget parent_instance;
29
31 GtkLabel * label;
32
34 GtkPopover * foreign_popover;
35
36 GtkPopover * popover;
37 GtkEntry * entry;
38
41
44
46 void * object;
47
50 int is_temp;
51
53 GtkGestureClick * mp;
54
55 guint select_region_source_id;
56} EditableLabelWidget;
57
61void
62editable_label_widget_show_popover (EditableLabelWidget * self);
63
71void
73 GtkWidget * parent,
74 GtkPopover * popover,
75 void * object,
77 GenericStringSetter setter);
78
86void
88 EditableLabelWidget * self,
89 void * object,
91 GenericStringSetter setter);
92
101EditableLabelWidget *
103 void * object,
104 GenericStringGetter getter,
105 GenericStringSetter setter,
106 int width);
107
108#endif
void editable_label_widget_setup(EditableLabelWidget *self, void *object, GenericStringGetter getter, GenericStringSetter setter)
Sets up an existing EditableLabelWidget.
G_DECLARE_FINAL_TYPE(EditableLabelWidget, editable_label_widget, Z, EDITABLE_LABEL_WIDGET, GtkWidget) typedef struct _EditableLabelWidget
A label that shows a popover when clicked.
void editable_label_widget_show_popover(EditableLabelWidget *self)
Shows the popover.
void editable_label_widget_show_popover_for_widget(GtkWidget *parent, GtkPopover *popover, void *object, GenericStringGetter getter, GenericStringSetter setter)
Shows a popover without the need of an editable label.
EditableLabelWidget * editable_label_widget_new(void *object, GenericStringGetter getter, GenericStringSetter setter, int width)
Returns a new instance of EditableLabelWidget.
void(* GenericStringSetter)(void *object, const char *val)
Setter prototype for float values.
Definition types.h:92
const char *(* GenericStringGetter)(void *object)
Getter prototype for strings.
Definition types.h:87
Custom types.