Add option to shrink panel (fixes issue #333)

This commit is contained in:
o9000
2016-10-08 14:45:00 +02:00
parent 8c7f4cc825
commit 61a80b996f
17 changed files with 636 additions and 267 deletions

View File

@@ -221,6 +221,10 @@ typedef struct Area {
// Returns 1 if the new size is different than the previous size.
gboolean (*_resize)(void *obj);
// Called before resize, obj = pointer to the Area
// Returns the desired size of the Area
int (*_compute_desired_size)(void *obj);
// Implemented only to override the default layout algorithm for this widget.
// For example, if this widget is a cell in a table, its position and size should be computed here.
void (*_on_change_layout)(void *obj);
@@ -255,6 +259,8 @@ void relayout(Area *a);
// If maximum_size > 0, it is an upper limit for the child size.
int relayout_with_constraint(Area *a, int maximum_size);
int compute_desired_size(Area *a);
int left_border_width(Area *a);
int right_border_width(Area *a);
int left_right_border_width(Area *a);