[][src]Trait gtk::FrameExt

pub trait FrameExt: 'static {
    fn get_label(&self) -> Option<GString>;
fn get_label_align(&self) -> (f32, f32);
fn get_label_widget(&self) -> Option<Widget>;
fn get_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 get_property_label_xalign(&self) -> f32;
fn set_property_label_xalign(&self, label_xalign: f32);
fn get_property_label_yalign(&self) -> f32;
fn set_property_label_yalign(&self, label_yalign: f32);
fn connect_property_label_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_label_widget_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_label_xalign_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_label_yalign_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_shadow_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all Frame methods.

Implementors

AspectFrame, Frame

Required methods

fn get_label(&self) -> Option<GString>

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.

fn get_label_align(&self) -> (f32, f32)

Retrieves the X and Y alignment of the frame’s label. See FrameExt::set_label_align.

xalign

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

yalign

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

fn get_label_widget(&self) -> Option<Widget>

Retrieves the label widget for the frame. See FrameExt::set_label_widget.

Returns

the label widget, or None if there is none.

fn get_shadow_type(&self) -> ShadowType

Retrieves the shadow type of the frame. See FrameExt::set_shadow_type.

Returns

the current shadow type of the frame.

fn set_label(&self, label: Option<&str>)

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

label

the text to use as the label of the frame

fn set_label_align(&self, xalign: f32, yalign: f32)

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.

fn set_label_widget<P: IsA<Widget>>(&self, label_widget: Option<&P>)

Sets the 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

fn set_shadow_type(&self, type_: ShadowType)

Sets the 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 Frame. The chosen type is applied by removing or adding the .flat class to the CSS node named border.

type_

the new ShadowType

fn get_property_label_xalign(&self) -> f32

fn set_property_label_xalign(&self, label_xalign: f32)

fn get_property_label_yalign(&self) -> f32

fn set_property_label_yalign(&self, label_yalign: f32)

fn connect_property_label_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_label_widget_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_label_xalign_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_label_yalign_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_shadow_type_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<Frame>> FrameExt for O[src]

Loading content...