Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
window_manager.h
Go to the documentation of this file.
1#pragma once
2
3#include "common/darktable.h"
4
5#include <gtk/gtk.h>
6#include <stdint.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#define DT_UI_PANEL_MODULE_SPACING 0
13#define DT_UI_PANEL_SIDE_DEFAULT_SIZE 350
14#define DT_UI_PANEL_BOTTOM_DEFAULT_SIZE 120
15
16typedef enum dt_ui_panel_t
17{
18 /* the header panel */
20 /* left panel */
22 /* right panel */
24 /* bottom panel */
26
29
31{
32 /* the top container of left panel, the top container
33 disables the module expander and does not scroll with other modules
34 */
36
37 /* the center container of left panel, the center container
38 contains the scrollable area that all plugins are placed within and last
39 widget is the end marker.
40 This container will always expand|fill empty vertical space
41 */
43
44 /* the bottom container of left panel, this container works just like
45 the top container but will be attached to bottom in the panel, such as
46 plugins like background jobs module in lighttable and the plugin selection
47 module in darkroom,
48 */
50
54
55 /* menu bar and toolbar */
57
58 /* Count of containers */
60
61 // The following are special containers linked to the header bar,
62 // they will never be destroyed in loops, so put them after the container "size"
64
65typedef struct dt_ui_t
66{
67 /* container widgets */
69
70 /* panel widgets */
72
73 /* The top panel contains the global menu and is not to be deleted/recreated between each view change */
74 GtkWidget *top_panel;
75
76 /* center widget */
77 GtkWidget *center;
78 GtkWidget *center_base;
79
80 /* main widget */
81 GtkWidget *main_window;
82
83 /* thumb table */
86
87 /* log msg and toast labels */
88 GtkWidget *log_msg, *toast_msg;
89
90 /* Header/title bar */
93
94gchar *panels_get_view_path(char *suffix);
95gchar *panels_get_panel_path(dt_ui_panel_t panel, char *suffix);
96
98
99gboolean dt_ui_panel_ancestor(dt_ui_t *ui, const dt_ui_panel_t p, GtkWidget *w);
100
101// Drawing area used to paint background image.
102// Hide it in lighttable mode.
103GtkWidget *dt_ui_center(dt_ui_t *ui);
104GtkWidget *dt_ui_center_base(dt_ui_t *ui);
105GtkWidget *dt_ui_log_msg(dt_ui_t *ui);
106GtkWidget *dt_ui_toast_msg(dt_ui_t *ui);
107GtkWidget *dt_ui_main_window(dt_ui_t *ui);
108
109void dt_ui_init_main_table(GtkWidget *container, dt_ui_t *ui);
111
112GtkBox *dt_ui_get_container(dt_ui_t *ui, const dt_ui_container_t c);
113void dt_ui_container_add_widget(dt_ui_t *ui, const dt_ui_container_t c, GtkWidget *w);
114
116
120void dt_ui_set_window_buttons_visible(dt_ui_t *ui, gboolean visible);
121
122void dt_hinter_set_message(dt_ui_t *ui, const char *message);
123void dt_ui_set_image_info_label(dt_ui_t *ui, const char *label);
124
125
126#ifdef __cplusplus
127}
128#endif
uint32_t container(dt_lib_module_t *self)
Definition backgroundjobs.c:61
Definition window_manager.c:10
Definition thumbtable.h:85
Definition window_manager.h:66
GtkWidget * top_panel
Definition window_manager.h:74
dt_thumbtable_t * thumbtable_lighttable
Definition window_manager.h:84
GtkWidget * containers[DT_UI_CONTAINER_SIZE]
Definition window_manager.h:68
GtkWidget * main_window
Definition window_manager.h:81
GtkWidget * center_base
Definition window_manager.h:78
struct dt_header_t * header
Definition window_manager.h:91
GtkWidget * log_msg
Definition window_manager.h:88
dt_thumbtable_t * thumbtable_filmstrip
Definition window_manager.h:85
GtkWidget * center
Definition window_manager.h:77
GtkWidget * panels[DT_UI_PANEL_SIZE]
Definition window_manager.h:71
GtkWidget * toast_msg
Definition window_manager.h:88
GtkWidget * dt_ui_toast_msg(dt_ui_t *ui)
get the toast message widget
Definition window_manager.c:94
GtkWidget * dt_ui_center(dt_ui_t *ui)
get the center drawable widget
Definition window_manager.c:81
gchar * panels_get_view_path(char *suffix)
Definition window_manager.c:26
void dt_ui_cleanup_titlebar(dt_ui_t *ui)
Definition window_manager.c:737
dt_ui_container_t
Definition window_manager.h:31
@ DT_UI_CONTAINER_SIZE
Definition window_manager.h:59
@ DT_UI_CONTAINER_PANEL_LEFT_BOTTOM
Definition window_manager.h:49
@ DT_UI_CONTAINER_PANEL_RIGHT_BOTTOM
Definition window_manager.h:53
@ DT_UI_CONTAINER_PANEL_RIGHT_CENTER
Definition window_manager.h:52
@ DT_UI_CONTAINER_PANEL_LEFT_CENTER
Definition window_manager.h:42
@ DT_UI_CONTAINER_PANEL_LEFT_TOP
Definition window_manager.h:35
@ DT_UI_CONTAINER_PANEL_RIGHT_TOP
Definition window_manager.h:51
@ DT_UI_CONTAINER_PANEL_TOP_SECOND_ROW
Definition window_manager.h:56
gchar * panels_get_panel_path(dt_ui_panel_t panel, char *suffix)
Definition window_manager.c:42
void dt_ui_init_titlebar(dt_ui_t *ui)
Definition window_manager.c:561
int dt_ui_panel_get_size(dt_ui_t *ui, const dt_ui_panel_t p)
get width of right, left, or bottom panel
Definition window_manager.c:49
void dt_ui_set_window_buttons_visible(dt_ui_t *ui, gboolean visible)
Definition window_manager.c:721
gboolean dt_ui_panel_ancestor(dt_ui_t *ui, const dt_ui_panel_t p, GtkWidget *w)
is the panel ancestor of widget
Definition window_manager.c:75
void dt_ui_cleanup_main_table(dt_ui_t *ui)
Definition window_manager.c:554
dt_ui_panel_t
Definition window_manager.h:17
@ DT_UI_PANEL_TOP
Definition window_manager.h:19
@ DT_UI_PANEL_SIZE
Definition window_manager.h:27
@ DT_UI_PANEL_BOTTOM
Definition window_manager.h:25
@ DT_UI_PANEL_LEFT
Definition window_manager.h:21
@ DT_UI_PANEL_RIGHT
Definition window_manager.h:23
void dt_ui_init_main_table(GtkWidget *container, dt_ui_t *ui)
Definition window_manager.c:497
GtkWidget * dt_ui_log_msg(dt_ui_t *ui)
get the log message widget
Definition window_manager.c:90
void dt_ui_init_global_menu(dt_ui_t *ui)
Definition window_manager.c:626
GtkWidget * dt_ui_main_window(dt_ui_t *ui)
get the main window widget
Definition window_manager.c:99
void dt_ui_restore_panels(dt_ui_t *ui)
Definition window_manager.c:160
void dt_ui_set_image_info_label(dt_ui_t *ui, const char *label)
Definition window_manager.c:716
void dt_ui_container_add_widget(dt_ui_t *ui, const dt_ui_container_t c, GtkWidget *w)
Definition window_manager.c:109
void dt_hinter_set_message(dt_ui_t *ui, const char *message)
Definition window_manager.c:727
GtkWidget * dt_ui_center_base(dt_ui_t *ui)
Definition window_manager.c:85
GtkBox * dt_ui_get_container(dt_ui_t *ui, const dt_ui_container_t c)
Definition window_manager.c:104