Skip to main content

BuildableExt

Trait BuildableExt 

Source
pub trait BuildableExt:
    IsA<Buildable>
    + Sealed
    + 'static {
    // Provided methods
    fn add_child(
        &self,
        builder: &impl IsA<Builder>,
        child: &impl IsA<Object>,
        type_: Option<&str>,
    ) { ... }
    fn construct_child(
        &self,
        builder: &impl IsA<Builder>,
        name: &str,
    ) -> Option<Object> { ... }
    fn internal_child(
        &self,
        builder: &impl IsA<Builder>,
        childname: &str,
    ) -> Option<Object> { ... }
    fn parser_finished(&self, builder: &impl IsA<Builder>) { ... }
    fn set_buildable_property(
        &self,
        builder: &impl IsA<Builder>,
        name: &str,
        value: &Value,
    ) { ... }
}
Expand description

Trait containing all Buildable methods.

§Implementors

AboutDialog, AccelLabel, ActionBar, AppChooserButton, AppChooserDialog, AppChooserWidget, ApplicationWindow, AspectFrame, Assistant, Bin, Box, Buildable, ButtonBox, Button, Calendar, CellAreaBox, CellArea, CellView, CheckButton, CheckMenuItem, ColorButton, ColorChooserDialog, ColorChooserWidget, ComboBoxText, ComboBox, Container, Dialog, DrawingArea, EntryCompletion, Entry, EventBox, Expander, FileChooserButton, FileChooserDialog, FileChooserWidget, FileFilter, Fixed, FlowBoxChild, FlowBox, FontButton, FontChooserDialog, FontChooserWidget, Frame, GLArea, Grid, HeaderBar, IconView, Image, InfoBar, Invisible, Label, Layout, LevelBar, LinkButton, ListBoxRow, ListBox, ListStore, LockButton, MenuBar, MenuButton, MenuItem, MenuShell, MenuToolButton, Menu, MessageDialog, Misc, ModelButton, Notebook, OffscreenWindow, Overlay, Paned, PlacesSidebar, Plug, PopoverMenu, Popover, ProgressBar, RadioButton, RadioMenuItem, RadioToolButton, Range, RecentChooserDialog, RecentChooserMenu, RecentChooserWidget, RecentFilter, Revealer, ScaleButton, Scale, Scrollbar, ScrolledWindow, SearchBar, SearchEntry, SeparatorMenuItem, SeparatorToolItem, Separator, ShortcutLabel, ShortcutsGroup, ShortcutsSection, ShortcutsShortcut, ShortcutsWindow, SizeGroup, Socket, SpinButton, Spinner, StackSidebar, StackSwitcher, Stack, Statusbar, Switch, TextTagTable, TextView, ToggleButton, ToggleToolButton, ToolButton, ToolItemGroup, ToolItem, ToolPalette, Toolbar, TreeStore, TreeViewColumn, TreeView, Viewport, VolumeButton, Widget, Window

Provided Methods§

Source

fn add_child( &self, builder: &impl IsA<Builder>, child: &impl IsA<Object>, type_: Option<&str>, )

Adds a child to self. type_ is an optional string describing how the child should be added.

§builder

a Builder

§child

child to add

§type_

kind of child or None

Source

fn construct_child( &self, builder: &impl IsA<Builder>, name: &str, ) -> Option<Object>

Constructs a child of self with the name name.

Builder calls this function if a “constructor” has been specified in the UI definition.

§builder

Builder used to construct this object

§name

name of child to construct

§Returns

the constructed child

Source

fn internal_child( &self, builder: &impl IsA<Builder>, childname: &str, ) -> Option<Object>

Get the internal child called childname of the self object.

§builder

a Builder

§childname

name of child

§Returns

the internal child of the buildable object

Source

fn parser_finished(&self, builder: &impl IsA<Builder>)

Called when the builder finishes the parsing of a [GtkBuilder UI definition][BUILDER-UI]. Note that this will be called once for each time gtk_builder_add_from_file() or BuilderExtManual::add_from_string() is called on a builder.

§builder

a Builder

Source

fn set_buildable_property( &self, builder: &impl IsA<Builder>, name: &str, value: &Value, )

Sets the property name name to value on the self object.

§builder

a Builder

§name

name of property

§value

value of property

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§