Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::Frame Class Reference

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

`#include <inti/gtk/frame.h>`

Inheritance diagram for Inti::Gtk::Frame:

List of all members.

## Public Member Functions

Constructors

- Frame (ShadowType type=SHADOW_ETCHED_IN)
    Construct a new Frame with the specified ShadowType and no label.
- Frame (const String &label, ShadowType type=SHADOW_ETCHED_IN)
    Construct a new Frame with the specified label and ShadowType.
- virtual ~Frame ()
    Destructor.

Accessors

- GtkFrame * gtk_frame () const
    Get a pointer to the GtkFrame structure.
- GtkFrameClass * gtk_frame_class () const
    Get a pointer to the GtkFixedClass structure.
- operator GtkFrame * () const
    Conversion operator; safely converts a Frame to a GtkFrame pointer.
- String get_label () const
    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 get_label_align (float *xalign, float *yalign) const
    Retrieves the X and Y alignment of the frame's label (see set_label_align()).
- ShadowType get_shadow_type () const
    Retrieves the shadow type of the frame (see set_shadow_type()).

Methods

- void remove_label ()
    Removes the current label, if any.
- void set_label (const String &label)
    Set the text of the label.
- void set_label_widget (Widget &label_widget)
    Set the label widget for the frame.
- void set_label_align (float xalign, float yalign)
    Set the alignment of the Frame widget's label.
- void set_shadow_type (ShadowType type)
    Set the shadow type for the Frame widget.

Property Proxies

- const LabelPropertyProxy prop_label ()
    Text of the frame's label (String : Read / Write).
- const LabelXalignPropertyProxy prop_label_xalign ()
    The horizontal alignment of the label (float : Read / Write).
- const LabelYalignPropertyProxy prop_label_yalign ()
    The vertical alignment of the label (float : Read / Write).
- const ShadowTypePropertyProxy prop_shadow_type ()
    Apearance of the frame border (ShadowType : Read / Write).
- const LabelWidgetPropertyProxy prop_label_widget ()
    A widget to display in place of the usual frame label (Widget* : Read / Write).

## Protected Member Functions

Constructors

- Frame (GtkFrame *frame, bool reference=false)
    Construct a new Frame from an existing GtkFrame.

## 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().

## Constructor & Destructor Documentation

Inti::Gtk::Frame::Frame | ( | GtkFrame * | frame,
|  | bool | reference = false
| ) | `[explicit, protected]`

Construct a new Frame from an existing GtkFrame.

Parameters:

  frame | A pointer to a GtkFrame.
  reference | Set 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).

Inti::Gtk::Frame::Frame | ( | ShadowType | type = SHADOW_ETCHED_IN | ) | `[explicit]`

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

Parameters:

  type | The shadow type.

Inti::Gtk::Frame::Frame | ( | const String & | label,
|  | ShadowType | type = SHADOW_ETCHED_IN
| ) | `[explicit]`

Construct a new Frame with the specified label and ShadowType.

Parameters:

  label | The label text.
  type | The shadow type.

## Member Function Documentation

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

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

Parameters:

  xalign | The location to store X alignment of frame's label, or null.
  yalign | The location to store Y alignment of frame's label, or null.

void Inti::Gtk::Frame::set_label | ( | const String & | label | ) |

Set the text of the label.

Parameters:

  label | The new label text.

void Inti::Gtk::Frame::set_label_align | ( | float | xalign,
|  | float | yalign
| ) |

Set the alignment of the Frame widget's label.

Parameters:

  xalign | The position of the label along the top edge of the widget.
  yalign | The 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 Inti::Gtk::Frame::set_label_widget | ( | Widget & | label_widget | ) |

Set the label widget for the frame.

Parameters:

  label_widget | The new label widget.

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

void Inti::Gtk::Frame::set_shadow_type | ( | ShadowType | type | ) |

Set the shadow type for the Frame widget.

Parameters:

  type | The new shadow type.

The documentation for this class was generated from the following file:

- frame.h

Main Page - Footer