Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::Paned Class Reference

A GtkPaned C++ wrapper class. More...

#include <inti/gtk/paned.h>

Inheritance diagram for Inti::Gtk::Paned:

Inti::Gtk::Container Inti::Gtk::Widget Inti::Gtk::Object Inti::Atk::Implementor Inti::G::Object Inti::G::TypeInterface Inti::G::TypeInstance Inti::MemoryHandler Inti::G::TypeInstance Inti::ReferencedBase Inti::ReferencedBase Inti::Gtk::HPaned Inti::Gtk::VPaned List of all members.

Public Member Functions

Accessors
Methods
Property Proxies

Protected Member Functions

Constructors

Detailed Description

A GtkPaned C++ wrapper class.

Paned is the base class for widgets with two panes, arranged either horizontally (HPaned) or vertically (VPaned). Child widgets are added to the panes of the widget with pack1() and pack2(). The division beween the two children is set by default from the size requests of the children, but it can be adjusted by the user. A paned widget draws a separator between the two child widgets and a small handle that the user can drag to adjust the division. It does not draw any relief around the children or around the separator. (The space in which the separator is drawn is called the gutter.) Often, it is useful to put each child inside a Frame with the shadow type set to Gtk::SHADOW_IN so that the gutter appears as a ridge. The application can set the position of the separator as if it were set by the user, by calling set_position().

Each child has two options that can be set, resize and shrink. If resize is true, then when the Paned is resized, that child will expand or shrink along with the paned widget. If shrink is true, then when that child can be made smaller than it's requisition by the user. Setting shrink to false allows the application to set a minimum size. If resize is false for both children, then this is treated as if resize is true for both children.

Example: Creating a paned widget with minimum sizes.

    Gtk::HPaned *hpaned = new Gtk::HPaned;
    hpaned->set_size_request(200, -1);
   
    Gtk::Frame *frame1 = new Gtk::Frame;
    frame1->set_shadow_type(Gtk::SHADOW_IN);
    frame1->set_size_request(50, -1);
   
    Gtk::Frame *frame2 = new Gtk::Frame;
    frame2->set_shadow_type(Gtk::SHADOW_IN);
    frame2->set_size_request(50, -1);
   
    hpaned->pack1(*frame1, true, false);
    hpaned->pack2(*frame2, false, false);


Constructor & Destructor Documentation

Inti::Gtk::Paned::Paned GtkPaned *  paned,
bool  reference = false
[explicit, protected]
 

Construct a new Paned from an existing GtkPaned.

Parameters:
paned A pointer to a GtkPaned.
reference Set false if the initial reference count is floating, set true if it's not.

The paned can be a newly created GtkPaned or an existing GtkPaned (see G::Object::Object).


Member Function Documentation

void Inti::Gtk::Paned::add1 Widget child  ) 
 

Adds a child to the top or left pane with default parameters.

Parameters:
child The child to add.

This is equivalent to pack1(child, false, true).

void Inti::Gtk::Paned::add2 Widget child  ) 
 

Adds a child to the bottom or right pane with default parameters.

Parameters:
child The child to add.

This is equivalent to pack2(child, true, true).

void Inti::Gtk::Paned::pack1 Widget child,
bool  resize = false,
bool  shrink = true
 

Adds a child to the top or left pane.

Parameters:
child The child to add.
resize Should this child expand when the paned widget is resized.
shrink Can this child be made smaller than its requsition.

void Inti::Gtk::Paned::pack2 Widget child,
bool  resize = true,
bool  shrink = true
 

Adds a child to the bottom or right pane.

Parameters:
child The child to add.
resize Should this child expand when the paned widget is resized.
shrink Can this child be made smaller than its requsition.

void Inti::Gtk::Paned::set_position int  position  ) 
 

Sets the position of the divider between the two panes.

Parameters:
position The pixel position of divider, a negative value means that the position is unset.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:17 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002