Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
text_expander.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2020-2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __GUI_WIDGETS_TEXT_EXPANDER_H__
11#define __GUI_WIDGETS_TEXT_EXPANDER_H__
12
14#include "utils/types.h"
15
16#include "gtk_wrapper.h"
17
18#pragma GCC diagnostic push
19#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
20#include <gtksourceview/gtksource.h>
21#pragma GCC diagnostic pop
22
23#define TEXT_EXPANDER_WIDGET_TYPE (text_expander_widget_get_type ())
24G_DECLARE_FINAL_TYPE (
26 text_expander_widget,
27 Z,
28 TEXT_EXPANDER_WIDGET,
29 ExpanderBoxWidget);
30
41typedef struct _TextExpanderWidget
42{
43 ExpanderBoxWidget parent_instance;
44
47
50
52 void * obj;
53
55 GtkScrolledWindow * scroll;
56 GtkViewport * viewport;
57
59 GtkSourceView * editor;
60
62 GtkSourceBuffer * buffer;
63
64 GtkLabel * label;
65
66 GtkMenuButton * edit_btn;
67
68 GtkPopover * popover;
69
70 bool has_focus;
72
76void
78
82void
84 TextExpanderWidget * self,
85 bool wrap_text,
88 void * obj);
89
94#endif
Expander box.
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
void text_expander_widget_refresh(TextExpanderWidget *self)
Refreshes the text.
void text_expander_widget_setup(TextExpanderWidget *self, bool wrap_text, GenericStringGetter getter, GenericStringSetter setter, void *obj)
Sets up the TextExpanderWidget.
A TwoColExpanderBoxWidget for showing the ports in the InspectorWidget.
GenericStringSetter setter
Setter for the string.
GtkSourceBuffer * buffer
Editor buffer.
GenericStringGetter getter
Getter for the string.
void * obj
Object to call get/set on.
GtkScrolledWindow * scroll
Scrolled window for the editor inside.
GtkSourceView * editor
Editor.
Custom types.