Reference Manual

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:

List of all members.

## Public Member Functions

Accessors

- GtkPaned * gtk_paned () const
    Get a pointer to the GtkPaned structure.
- GtkPanedClass * gtk_paned_class () const
    Get a pointer to the GtkPanedClass structure.
- operator GtkPaned * () const
    Conversion operator; safely converts a Paned to a GtkPaned pointer.
- Widget * child1 () const
    Gets the child widget in the top or left pane.
- Widget * child2 () const
    Gets the child widget in the bottom or right pane.
- Gdk::Window * handle () const
    Returns the handle window in the divider between the two panes.
- int get_position () const
    Obtains the position of the divider between the two panes.

Methods

- void add1 (Widget &child)
    Adds a child to the top or left pane with default parameters.
- void add2 (Widget &child)
    Adds a child to the bottom or right pane with default parameters.
- void pack1 (Widget &child, bool resize=false, bool shrink=true)
    Adds a child to the top or left pane.
- void pack2 (Widget &child, bool resize=true, bool shrink=true)
    Adds a child to the bottom or right pane.
- void set_position (int position)
    Sets the position of the divider between the two panes.

Property Proxies

- const PositionPropertyProxy prop_position ()
    Position of the paned separator in pixels (0 means all the way to the left/top) (int : Read / Write).
- const PositionSetPropertyProxy prop_position_set ()
    Set true if the position property should be used (bool : Read / Write).

## Protected Member Functions

Constructors

- Paned ()
    Construct a new Paned.
- Paned (GtkPaned *paned, bool reference=false)
    Construct a new Paned from an existing GtkPaned.
- virtual ~Paned ()=0
    Destructor.

## 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:

- paned.h

Main Page - Footer