pub trait FrameExt: 'static {
Show 17 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(&self, label_widget: Option<&impl IsA<Widget>>);
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
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.
fn label_widget(&self) -> Option<Widget>
fn label_widget(&self) -> Option<Widget>
Retrieves the label widget for the frame. See
set_label_widget()
.
Returns
the label widget, or None
if
there is none.
fn shadow_type(&self) -> ShadowType
fn shadow_type(&self) -> ShadowType
Retrieves the shadow type of the frame. See
set_shadow_type()
.
Returns
the current shadow type of the frame.
fn set_label_align(&self, xalign: f32, yalign: f32)
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(&self, label_widget: Option<&impl IsA<Widget>>)
fn set_label_widget(&self, label_widget: Option<&impl IsA<Widget>>)
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
fn set_shadow_type(&self, type_: ShadowType)
fn set_shadow_type(&self, type_: ShadowType)
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