Trait gtk::prelude::FrameExt[][src]

pub trait FrameExt: 'static {
Show methods fn label(&self) -> Option<GString>;
fn label_align(&self) -> (f32, f32);
fn label_widget(&self) -> Option<Widget>;
fn shadow_type(&self) -> ShadowType;
fn set_label(&self, label: Option<&str>);
fn set_label_align(&self, xalign: f32, yalign: f32);
fn set_label_widget<P: IsA<Widget>>(&self, label_widget: Option<&P>);
fn set_shadow_type(&self, type_: ShadowType);
fn label_xalign(&self) -> f32;
fn set_label_xalign(&self, label_xalign: f32);
fn label_yalign(&self) -> f32;
fn set_label_yalign(&self, label_yalign: f32);
fn connect_label_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_label_widget_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_label_xalign_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_label_yalign_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_shadow_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all Frame methods.

Implementors

AspectFrame, Frame

Required methods

If the frame’s label widget is a Label, returns the text in the label widget. (The frame will have a Label for the label widget if a non-None argument was passed to Frame::new().)

Returns

the text in the label, or None if there was no label widget or the lable widget was not a Label. This string is owned by GTK+ and must not be modified or freed.

Retrieves the X and Y alignment of the frame’s label. See set_label_align().

Returns

xalign

location to store X alignment of frame’s label, or None

yalign

location to store X alignment of frame’s label, or None

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

Returns

the label widget, or None if there is none.

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

Returns

the current shadow type of the frame.

Removes the current property::Frame::label-widget. If label is not None, creates a new Label with that text and adds it as the property::Frame::label-widget.

label

the text to use as the label of the frame

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

xalign

The position of the label along the top edge of the widget. A value of 0.0 represents left alignment; 1.0 represents right alignment.

yalign

The y alignment of the label. A value of 0.0 aligns under the frame; 1.0 aligns above the frame. If the values are exactly 0.0 or 1.0 the gap in the frame won’t be painted because the label will be completely above or below the frame.

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

label_widget

the new label widget

Sets the property::Frame::shadow-type for self, i.e. whether it is drawn without (ShadowType::None) or with (other values) a visible border. Values other than ShadowType::None are treated identically by GtkFrame. The chosen type is applied by removing or adding the .flat class to the CSS node named border.

type_

the new ShadowType

Implementors