Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::Layout Class Reference

A GtkLayout C++ wrapper class. More...

#include <xfc/gtk/layout.hh>

Inheritance diagram for Xfc::Gtk::Layout:

Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable List of all members.

Signal Prototypes

Public Member Functions

Accessors
Methods
Signal Proxies

Detailed Description

A GtkLayout C++ wrapper class.

Layout is similar to DrawingArea in that it's a "blank slate" and doesn't do anything but paint a blank background by default. It's different in that it supports scrolling natively (you can add it to a ScrolledWindow), and it can contain child widgets, since it's a Container. However if you're just going to draw, a DrawingArea is a better choice since it has lower overhead. When handling expose events on a Layout, you must draw to bin_window(), rather than to Gtk::Widget::get_window() as you would for a drawing area.

See also: the Layout Container HOWTO.


Constructor & Destructor Documentation

Xfc::Gtk::Layout::Layout ( GtkLayout *  layout,
bool  owns_reference = false 
) [explicit, protected]

Construct a new Layout from an existing GtkLayout.

Parameters:
layout A pointer to a GtkLayout.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The layout can be a newly created GtkLayout or an existing GtkLayout (see G::Object::Object).

Xfc::Gtk::Layout::Layout ( Adjustment hadjustment,
Adjustment vadjustment 
)

Construct a new Layout with the specified horizontal and vertical adjustments.

Parameters:
hadjustment The Adjustment for the horizontal position.
vadjustment The Adjustment for the vertical position.

Xfc::Gtk::Layout::Layout ( GtkLayout *  layout,
bool  owns_reference = false 
) [explicit, protected]

Construct a new Layout from an existing GtkLayout.

Parameters:
layout A pointer to a GtkLayout.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The layout can be a newly created GtkLayout or an existing GtkLayout (see G::Object::Object).

Xfc::Gtk::Layout::Layout ( Adjustment hadjustment,
Adjustment vadjustment 
)

Construct a new Layout with the specified horizontal and vertical adjustments.

Parameters:
hadjustment The Adjustment for the horizontal position.
vadjustment The Adjustment for the vertical position.


Member Function Documentation

Gdk::Window* Xfc::Gtk::Layout::bin_window (  )  const

Returns the Gdk::Window to draw to in response to an expose event.

Note layout widgets should not draw to Gtk::Widget::get_window().

void Xfc::Gtk::Layout::get_size ( unsigned int *  width,
unsigned int *  height 
)

Gets the size that has been set on the layout, and that determines the total extents of the layout's scrollbar area (see set_size()).

Parameters:
width The location to store the width set on layout, or null.
height The location to store the height set on layout, or null.

Adjustment* Xfc::Gtk::Layout::get_hadjustment (  )  const

Get the Adjustment for the horizontal position.

Returns:
The Adjustment used for communication between the horizontal scrollbar and layout.
This method should only be called after the layout has been placed in a ScrolledWindow or otherwise configured for scrolling (see ScrolledWindow, Scrollbar, Adjustment for details).

Adjustment* Xfc::Gtk::Layout::get_vadjustment (  )  const

Get the Adjustment for the vertical position.

Returns:
The Adjustment used for communication between the vertical scrollbar and layout.
This method should only be called after the layout has been placed in a ScrolledWindow or otherwise configured for scrolling (see ScrolledWindow, Scrollbar, Adjustment for details).

void Xfc::Gtk::Layout::put ( Widget child_widget,
int  x,
int  y 
)

Add child_widget to the Layout, at position (x,y); the Layout becomes the new parent container of child_widget.

Parameters:
child_widget The child widget to add.
x The X position of child widget.
y The Y position of child widget.

void Xfc::Gtk::Layout::move ( Widget child_widget,
int  x,
int  y 
)

Move a current child of the Layout to a new position.

Parameters:
child_widget The child of the Layout to move.
x The X position to move to.
y The Y position to move to.

void Xfc::Gtk::Layout::set_size ( unsigned int  width,
unsigned int  height 
)

Sets the size of the scrollable area of the layout.

Parameters:
width The width of entire scrollable area.
height The height of entire scrollable area.

void Xfc::Gtk::Layout::set_hadjustment ( Adjustment adjustment  ) 

Sets the horizontal scroll adjustment for the layout.

Parameters:
adjustment The new horizontal scroll adjustment.
See ScrolledWindow, Scrollbar, Adjustment for details.

void Xfc::Gtk::Layout::set_vadjustment ( Adjustment adjustment  ) 

Sets the vertical scroll adjustment for the layout.

Parameters:
adjustment The new vertical scroll adjustment.
See ScrolledWindow, Scrollbar, Adjustment for details.


Member Data Documentation

const SetScrollAdjustmentsSignalType Xfc::Gtk::Layout::set_scroll_adjustments_signal [static, protected]

Set scroll adjustments signal (see signal_set_scroll_adjustments()).

Calls a slot with the signature:

< void function(Gtk::Adjustment *hadjustment, Gtk::Adjustment *vadjustment);
< // hadjustment: The horizontal adjustment.
< // vadjustment: The vertical adjustment.
<


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3