forked from AuroraMiddleware/gtk
notebook: Implement height_for_width and width_for_height getters
This commit is contained in:
parent
4d78e9c8af
commit
352569298a
@ -332,6 +332,16 @@ static void gtk_notebook_get_preferred_width (GtkWidget *widget,
|
||||
static void gtk_notebook_get_preferred_height(GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_notebook_get_preferred_width_for_height
|
||||
(GtkWidget *widget,
|
||||
gint height,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_notebook_get_preferred_height_for_width
|
||||
(GtkWidget *widget,
|
||||
gint width,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_notebook_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gint gtk_notebook_draw (GtkWidget *widget,
|
||||
@ -635,6 +645,8 @@ gtk_notebook_class_init (GtkNotebookClass *class)
|
||||
widget_class->unrealize = gtk_notebook_unrealize;
|
||||
widget_class->get_preferred_width = gtk_notebook_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_notebook_get_preferred_height;
|
||||
widget_class->get_preferred_width_for_height = gtk_notebook_get_preferred_width_for_height;
|
||||
widget_class->get_preferred_height_for_width = gtk_notebook_get_preferred_height_for_width;
|
||||
widget_class->size_allocate = gtk_notebook_size_allocate;
|
||||
widget_class->draw = gtk_notebook_draw;
|
||||
widget_class->button_press_event = gtk_notebook_button_press;
|
||||
@ -2336,6 +2348,23 @@ gtk_notebook_size_request (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_get_preferred_width_for_height (GtkWidget *widget,
|
||||
gint height,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
gtk_notebook_size_request (widget, GTK_ORIENTATION_HORIZONTAL, height, minimum, natural);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_get_preferred_height_for_width (GtkWidget *widget,
|
||||
gint width,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
gtk_notebook_size_request (widget, GTK_ORIENTATION_VERTICAL, width, minimum, natural);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_get_preferred_width (GtkWidget *widget,
|
||||
|
Loading…
Reference in New Issue
Block a user