GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Gtk::AspectFrame Class Reference

A GtkAspectFrame C++ wrapper class. More...

#include <gfc/gtk/aspectframe.hh>

Inheritance diagram for GFC::Gtk::AspectFrame:

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

Public Member Functions

Constructors
Accessors
Methods

Protected Member Functions

Constructors

Detailed Description

A GtkAspectFrame C++ wrapper class.

The AspectFrame is useful when you want pack a widget so that it can resize but always retains the same aspect ratio. For instance, one might be drawing a small preview of a larger image. AspectFrame derives from Frame, so it can draw a label and a frame around the child. The frame will be "shrink-wrapped" to the size of the child.


Constructor & Destructor Documentation

GFC::Gtk::AspectFrame::AspectFrame (  GtkAspectFrame *  aspect_frame,
bool  owns_reference = false
)  [explicit, protected]
 

Construct a new AspectFrame from an existing GtkAspectFrame.

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

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

GFC::Gtk::AspectFrame::AspectFrame (  float  xalign,
float  yalign
) 
 

Construct an AspectFrame with the specified xalign and yalign values.

Parameters:
xalign The horizontal alignment of the child within the allocation of the AspectFrame; this ranges from 0.0 (left aligned) to 1.0 (right aligned).
yalign The vertical alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).

This constructor takes the aspect ratio from the requistion of the child. This is the same as setting obey_child to true.

GFC::Gtk::AspectFrame::AspectFrame (  float  xalign,
float  yalign,
float  ratio
) 
 

Construct an AspectFrame with the specified xalign, yalign and ratio values.

Parameters:
xalign The horizontal alignment of the child within the allocation of the AspectFrame; this ranges from 0.0 (left aligned) to 1.0 (right aligned).
yalign The vertical alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
ratio The desired aspect ratio.

This constructor takes the aspect ratio from ratio and sets obey_child to false.

GFC::Gtk::AspectFrame::AspectFrame (  const String &  label,
float  xalign,
float  yalign,
float  ratio
) 
 

Construct a labelled AspectFrame with the specified xalign, yalign and ratio values.

Parameters:
label The label text.
xalign The horizontal alignment of the child within the allocation of the AspectFrame; this ranges from 0.0 (left aligned) to 1.0 (right aligned).
yalign The vertical alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
ratio The desired aspect ratio.

This constructor takes the aspect ratio from ratio and sets obey_child to false.


Member Function Documentation

void GFC::Gtk::AspectFrame::set (  float  xalign,
float  yalign,
float  ratio,
bool  obey_child
) 
 

Sets the parameters for an existing AspectFrame.

Parameters:
xalign The horizontal alignment of the child within the allocation of the AspectFrame; this ranges from 0.0 (left aligned) to 1.0 (right aligned).
yalign The vertical alignment of the child within the allocation of the AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
ratio The desired aspect ratio.
obey_child If true, ratio is ignored, and the aspect ratio is taken from the requistion of the child.


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:34:37 2004 for GFC-UI by doxygen 1.3.8