45 return gtk_layout_new(NULL, NULL);
52 int *per_row,
int *thumb_width,
int *thumb_height)
55 gtk_widget_style_get(table->
scroll_window,
"scrollbar-spacing", &sb_spacing, NULL);
66 h_scroll_h = gtk_widget_get_allocated_height(h_scroll);
67 if(h_scroll_h > 0) h_scroll_h += sb_spacing;
71 int req_w = -1, req_h = -1;
72 gtk_widget_get_size_request(table->
parent_overlay, &req_w, &req_h);
83 *thumb_height =
height - deco;
84 *thumb_width = *thumb_height;
100 float page_size = gtk_adjustment_get_page_size(table->
h_scrollbar);
113 int page_size = gtk_adjustment_get_page_size(table->
h_scrollbar);
115 int page_right = page_size +
position;
119 return img_left >=
position && img_right <= page_right;
127 guint current_w = 0, current_h = 0;
128 gtk_layout_get_size(GTK_LAYOUT(table->
grid), ¤t_w, ¤t_h);
144 const int32_t rowid = thumb->
rowid;
163 gtk_layout_put(GTK_LAYOUT(table->
grid), thumb->
widget, thumb->
x, thumb->
y);
168 gtk_layout_move(GTK_LAYOUT(table->
grid), thumb->
widget, thumb->
x, thumb->
y);
190 if(widget != h_scroll)
return FALSE;
239 gtk_widget_set_name(table->
grid,
"thumbtable-filmstrip");
241 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(table->
scroll_window), GTK_POLICY_ALWAYS, GTK_POLICY_EXTERNAL);
242 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(table->
scroll_window), 1);
243 gtk_scrolled_window_set_propagate_natural_height(GTK_SCROLLED_WINDOW(table->
scroll_window),
FALSE);
271 .pre_activate = NULL,
void dt_print(dt_debug_thread_t thread, const char *msg,...)
static void _filmstrip_group_borders(dt_thumbtable_t *table, dt_thumbnail_t *thumb, dt_thumbnail_border_t *borders)
static GtkWidget * _filmstrip_create_content_widget(void)
static void _filmstrip_move_child(dt_thumbtable_t *table, dt_thumbnail_t *thumb)
const dt_thumbtable_layout_ops_t * dt_thumbtable_filmstrip_ops(void)
static void _filmstrip_setup_parent(dt_thumbtable_t *table)
static gboolean _filmstrip_wants_scroll_value(dt_thumbtable_t *table, GtkAdjustment *adjustment)
static void _filmstrip_configure_dims(dt_thumbtable_t *table, int *new_width, int *new_height, int *per_row, int *thumb_width, int *thumb_height)
static int _filmstrip_position_to_rowid(dt_thumbtable_t *table, const double x, const double y)
static void _filmstrip_update_content_size(dt_thumbtable_t *table)
static gboolean _filmstrip_relevant_scrollbar_changed(dt_thumbtable_t *table, GtkWidget *widget, GtkAllocation *allocation)
static gboolean _filmstrip_wants_page_size_notify(dt_thumbtable_t *table, GObject *object)
static void _filmstrip_get_row_ids(dt_thumbtable_t *table, int *rowid_min, int *rowid_max)
static void _filmstrip_on_thumbnail_added(dt_thumbtable_t *table, dt_thumbnail_t *thumb)
static void _filmstrip_place_child(dt_thumbtable_t *table, dt_thumbnail_t *thumb)
static gboolean _filmstrip_is_thumb_highlighted(dt_thumbtable_t *table, int32_t imgid)
static void _filmstrip_on_drag_begin(dt_thumbtable_t *table, int32_t imgid)
static void _filmstrip_rowid_to_position(dt_thumbtable_t *table, int rowid, int *x, int *y)
static gboolean _filmstrip_is_rowid_visible(dt_thumbtable_t *table, int rowid)
void dt_gui_add_help_link(GtkWidget *widget, char *link)
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
@ DT_SIGNAL_VIEWMANAGER_FILMSTRIP_DRAG_BEGIN
This signal is raised when a drag starts from the filmstrip. Views that need filmstrip drags to commi...
struct _GtkWidget GtkWidget
struct dt_control_signal_t * signals
Per-mode layout strategy. One instance per frontend, shared (const) by all tables of that mode and st...
GtkWidget *(* create_content_widget)(void)
int last_h_scrollbar_height
GtkWidget * scroll_window
dt_thumbtable_cache_t * lut
GtkAdjustment * h_scrollbar
GtkWidget * parent_overlay
void dt_thumbnail_update_selection(dt_thumbnail_t *thumb, gboolean selected)
@ DT_THUMBNAIL_BORDER_BOTTOM
@ DT_THUMBNAIL_BORDER_TOP
@ DT_THUMBNAIL_BORDER_RIGHT
@ DT_THUMBNAIL_BORDER_LEFT
int dt_thumbtable_thumb_cell_decoration(void)
#define IS_COLLECTION_EDGE(rowid)
A widget to manage and display image thumbnails in Ansel's lighttable and filmstrip views.
Private interface shared between the thumbtable engine (thumbtable.c) and its two frontends (filemana...
char * dt_get_help_url(char *name)
gboolean dt_view_active_images_has_imgid(int32_t imgid)