Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
label.h
Go to the documentation of this file.
1/*
2 * This file is part of Ansel,
3 * Copyright (C) 2026 Aurélien PIERRE.
4 *
5 * Ansel is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * Ansel is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Ansel. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef DT_WIDGETS_LABEL_H
20#define DT_WIDGETS_LABEL_H
21
22/* Text presentation: the two standard label shapes, and the small fixes GTK needs to render
23 * text the way ansel.css asks for.
24 *
25 * Section labels and plain labels differ only in alignment and capitalisation, but they were
26 * hand-rolled at ~55 call sites before this pair existed, which is why some panels centred
27 * their headings and others did not. */
28
29/* Only what the declarations below need: GtkWidget, gchar. A header that includes anything
30 * else becomes a supply line its consumers do not know they are using, and the breakage
31 * surfaces somewhere else entirely the day someone tidies it up. */
32#include <gtk/gtk.h>
33
35
38gchar *delete_underscore(const char *s);
39
47gchar *strip_markup(const char *s);
48
51
55
57GtkWidget *dt_ui_label_new(const gchar *str);
58
59/* activate ellipsization of the combox entries */
61
72void dt_gui_set_symbolic_icon(GtkWidget *image, const char *icon_name, GtkIconSize size, const GdkRGBA *color);
73
84
86
87#endif // DT_WIDGETS_LABEL_H
88
89// clang-format off
90// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
91// vim: shiftwidth=2 expandtab tabstop=2 cindent
92// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
93// clang-format on
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
Definition colorspaces.h:98
GdkRGBA color[]
Definition geotagging.c:539
GtkWidget * dt_ui_section_label_new(const gchar *str)
Definition label.c:101
GtkWidget * dt_ui_label_new(const gchar *str)
Definition label.c:112
void dt_gui_textview_set_padding(GtkTextView *textview)
Apply the standard recessed-input text padding to a GtkTextView.
Definition label.c:136
void dt_ellipsize_combo(GtkComboBox *cbox)
Definition label.c:124
void dt_gui_set_symbolic_icon(GtkWidget *image, const char *icon_name, GtkIconSize size, const GdkRGBA *color)
Set a symbolic icon on an image widget, optionally forcing a specific color.
Definition label.c:29
G_BEGIN_DECLS gchar * delete_underscore(const char *s)
Definition label.c:62
void dt_ui_section_label_set(GtkWidget *label)
Definition label.c:91
gchar * strip_markup(const char *s)
Remove Pango/Gtk markup and accel mnemonics from a text label. If markup parsing fails,...
Definition label.c:74
size_t size
Definition mipmap_cache.c:3