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


Public Member Functions
Xfc::Gtk::Frame Class Reference

A GtkFrame C++ wrapper class. More...

#include <xfc/gtk/frame.hh>

Inheritance diagram for Xfc::Gtk::Frame:
Xfc::Gtk::Bin 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 Xfc::Gtk::AspectFrame

List of all members.

Public Member Functions

Constructors


Detailed Description

A GtkFrame C++ wrapper class.

The Frame widget is a Bin that surrounds its child with a decorative frame and an optional label. If present, the label is drawn in a gap in the top side of the frame. The position of the label can be controlled with set_label_align().

See also: the Frame Widget HOWTO and example.


Constructor & Destructor Documentation

Xfc::Gtk::Frame::Frame ( GtkFrame *  frame,
bool  owns_reference = false 
) [explicit, protected]

Construct a new Frame from an existing GtkFrame.

Parameters:
frameA pointer to a GtkFrame.
owns_referenceSet false if the initial reference count is floating, set true if it's not.

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

Xfc::Gtk::Frame::Frame ( ShadowType  type = SHADOW_ETCHED_IN) [explicit]

Construct a new Frame with the specified ShadowType and no label.

Parameters:
typeThe shadow type.
Xfc::Gtk::Frame::Frame ( const String label,
ShadowType  type = SHADOW_ETCHED_IN 
) [explicit]

Construct a new Frame with the specified label and ShadowType.

Parameters:
labelThe label text.
typeThe shadow type.

Member Function Documentation

If the frame has a label widget and it is a Label, return the text in the label widget, otherwise returns a null String.

void Xfc::Gtk::Frame::get_label_align ( float *  xalign,
float *  yalign 
) const

Retrieves the label widget for the frame (see set_label_widget()).

Retrieves the X and Y alignment of the frame's label (see set_label_align()).

Parameters:
xalignThe location to store X alignment of frame's label, or null.
yalignThe location to store Y alignment of frame's label, or null.
void Xfc::Gtk::Frame::set_label ( const String label)

Set the text of the label.

Parameters:
labelThe new label text.
void Xfc::Gtk::Frame::set_label_align ( float  xalign,
float  yalign 
)

Set the alignment of the Frame widget's label.

Parameters:
xalignThe position of the label along the top edge of the widget.
yalignThe y alignment of the label.

The default alignment value for a newly created Frame is 0.0. An xalign value of 0.0 represents left alignment; 1.0 represents right alignment. A yalign value 0.0 represents below the top edge; 1.0 represents above the top edge.

void Xfc::Gtk::Frame::set_label_widget ( Widget label_widget)

Set the label widget for the frame.

Parameters:
label_widgetThe new label widget.

This is the widget that will appear embedded in the top edge of the frame as a title.

Set the shadow type for the Frame widget.

Parameters:
typeThe new shadow type.

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