Re: obtaining current viewport/scrolled window dimensions
- From: James Morris <jwm art net gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: obtaining current viewport/scrolled window dimensions
- Date: Wed, 22 Sep 2010 23:56:26 +0100
On 22 September 2010 23:49, James Morris <jwm art net gmail com> wrote:
Hi,
I have a GtkDrawingArea within a GtkViewport within a
GtkScrolledWindow. I need the viewport dimensions so I can center the
contents of the drawing area when the drawn contents are smaller than
the viewport/window. There is a vague mention of "page_size" in the
documentation for scrolled window but no other clues.
How do I get these dimensions please?
Sorry for the noise, I figured it out once I wrote the email and clicked send:
width = gtk_adjustment_get_page_size(gtk_scrolled_window_get_hadjustment(my_scrolled_window));
height = gtk_adjustment_get_page_size(gtk_scrolled_window_get_vadjustment(my_scrolled_window));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]