AspectFrame

Description The GtkAspectFrame 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. GtkAspectFrame derives from GtkFrame, so it can draw a label and a frame around the child. The frame will be "shrink-wrapped" to the size of the child.

Constructors

this
this(GtkAspectFrame* gtkAspectFrame)

Sets our main struct and passes it to the parent class

this
this(string label, float xalign, float yalign, float ratio, int obeyChild)

Create a new GtkAspectFrame.

Members

Functions

getAspectFrameStruct
GtkAspectFrame* getAspectFrameStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

set
void set(float xalign, float yalign, float ratio, int obeyChild)

Set parameters for an existing GtkAspectFrame.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

gtkAspectFrame
GtkAspectFrame* gtkAspectFrame;

the main Gtk struct

Inherited Members

From Frame

gtkFrame
GtkFrame* gtkFrame;

the main Gtk struct

getFrameStruct
GtkFrame* getFrameStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setLabel
void setLabel(string label)

Sets the text of the label. If label is NULL, the current label is removed.

setLabelWidget
void setLabelWidget(Widget labelWidget)

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

setLabelAlign
void setLabelAlign(float xalign, float yalign)

Sets the alignment of the frame widget's label. The default values for a newly created frame are 0.0 and 0.5.

setShadowType
void setShadowType(GtkShadowType type)

Sets the shadow type for frame.

getLabel
string getLabel()

If the frame's label widget is a GtkLabel, returns the text in the label widget. (The frame will have a GtkLabel for the label widget if a non-NULL argument was passed to gtk_frame_new().)

getLabelAlign
void getLabelAlign(float xalign, float yalign)

Retrieves the X and Y alignment of the frame's label. See gtk_frame_set_label_align().

getLabelWidget
Widget getLabelWidget()

Retrieves the label widget for the frame. See gtk_frame_set_label_widget().

getShadowType
GtkShadowType getShadowType()

Retrieves the shadow type of the frame. See gtk_frame_set_shadow_type().

Meta