[][src]Trait gtk::FontButtonExt

pub trait FontButtonExt: 'static {
    fn get_font_name(&self) -> Option<GString>;
fn get_show_size(&self) -> bool;
fn get_show_style(&self) -> bool;
fn get_title(&self) -> Option<GString>;
fn get_use_font(&self) -> bool;
fn get_use_size(&self) -> bool;
fn set_font_name(&self, fontname: &str) -> bool;
fn set_show_size(&self, show_size: bool);
fn set_show_style(&self, show_style: bool);
fn set_title(&self, title: &str);
fn set_use_font(&self, use_font: bool);
fn set_use_size(&self, use_size: bool);
fn connect_font_set<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_font_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_show_size_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_show_style_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_title_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_use_font_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_use_size_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all FontButton methods.

Implementors

FontButton

Required methods

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

Retrieves the name of the currently selected font. This name includes style and size information as well. If you want to render something with the font, use this string with pango::FontDescription::from_string . If you’re interested in peeking certain values (family name, style, size, weight) just query these properties from the pango::FontDescription object.

Deprecated since 3.22

Use FontChooser::get_font instead

Returns

an internal copy of the font name which must not be freed.

fn get_show_size(&self) -> bool

Returns whether the font size will be shown in the label.

Returns

whether the font size will be shown in the label.

fn get_show_style(&self) -> bool

Returns whether the name of the font style will be shown in the label.

Returns

whether the font style will be shown in the label.

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

Retrieves the title of the font chooser dialog.

Returns

an internal copy of the title string which must not be freed.

fn get_use_font(&self) -> bool

Returns whether the selected font is used in the label.

Returns

whether the selected font is used in the label.

fn get_use_size(&self) -> bool

Returns whether the selected size is used in the label.

Returns

whether the selected size is used in the label.

fn set_font_name(&self, fontname: &str) -> bool

Sets or updates the currently-displayed font in font picker dialog.

Deprecated since 3.22

Use FontChooser::set_font instead

fontname

Name of font to display in font chooser dialog

Returns

true

fn set_show_size(&self, show_size: bool)

If show_size is true, the font size will be displayed along with the name of the selected font.

show_size

true if font size should be displayed in dialog.

fn set_show_style(&self, show_style: bool)

If show_style is true, the font style will be displayed along with name of the selected font.

show_style

true if font style should be displayed in label.

fn set_title(&self, title: &str)

Sets the title for the font chooser dialog.

title

a string containing the font chooser dialog title

fn set_use_font(&self, use_font: bool)

If use_font is true, the font name will be written using the selected font.

use_font

If true, font name will be written using font chosen.

fn set_use_size(&self, use_size: bool)

If use_size is true, the font name will be written using the selected size.

use_size

If true, font name will be written using the selected size.

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

The ::font-set signal is emitted when the user selects a font. When handling this signal, use FontChooser::get_font to find out which font was just selected.

Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the notify::font signal.

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

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

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

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

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

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

Loading content...

Implementors

impl<O: IsA<FontButton>> FontButtonExt for O[src]

Loading content...