gtk.Buildable — Interface for objects that can be built by GtkBuilder.
class gtk.Buildable( |
gtk.Buildable
is implementated by
gtk.Bin
,
gtk.TreeView
,
gtk.ButtonBox
,
gtk.Paned
,
gtk.ColorSelectionDialog
,
gtk.VButtonBox
,
gtk.TearoffMenuItem
,
gtk.Entry
,
gtk.OptionMenu
,
gtk.Image
,
gtk.Calendar
,
gtk.Fixed
,
gtk.LinkButton
,
gtk.HButtonBox
,
gtk.InputDialog
,
gtk.RadioButton
,
gtk.VRuler
,
gtk.VSeparator
,
gtk.VBox
,
gtk.Curve
,
gtk.RadioToolButton
,
gtk.HRuler
,
gtk.ToggleButton
,
gtk.SeparatorMenuItem
,
gtk.HScale
,
gtk.Table
,
gtk.TreeViewColumn
,
gtk.ImageMenuItem
,
gtk.FileChooserButton
,
gtk.CheckButton
,
gtk.RadioMenuItem
,
gtk.MenuShell
,
gtk.StatusBar
,
gtk.DrawingArea
,
gtk.Button
,
gtk.IconView
,
gtk.Notebook
,
gtk.UIManager
,
gtk.Socket
,
gtk.VScale
,
gtk.GammaCurve
,
gtk.Alignment
,
gtk.MenuToolButton
,
gtk.MenuItem
,
gtk.PageSetupUnixDialog
,
gtk.RecentChooserMenu
,
gtk.ToolItem
,
gtk.HSeparator
,
gtk.ProgressBar
,
gtk.ActionGroup
,
gtk.Range
,
gtk.Assistant
,
gtk.FileSelection
,
gtk.ToolBar
,
gtk.AccellLabel
,
gtk.RecentChooserDialog
,
gtk.Expander
,
gtk.Scale
,
gtk.TreeStore
,
gtk.MessageDialog
,
gtk.Separator
,
gtk.Layout
,
gtk.FontSelection
,
gtk.CellView
,
gtk.Invisible
,
gtk.Window
,
gtk.SeparatorToolItem
,
gtk.FileChooserWidget
,
gtk.CheckMenuItem
,
gtk.ToolButton
,
gtk.Misc
,
gtk.EventBox
,
gtkFontButton.
,
gtk.EntryCompletion
,
gtk.Dialog
,
gtk.HBox
,
gtk.Combo
,
gtk.AspectFrame
,
gtk.AboutDialog
,
gtk.HScrollBar
,
gtk.Liststore
,
gtk.ScaleButton
,
gtk.RecentChooserWidget
,
gtk.ToggleToolButton
,
gtk.ComboBox
,
gtk.VScrollBar
,
gtk.Frame
,
gtk.SpinButton
,
gtk.Label
,
gtk.FontSelectionDialog
,
gtk.ColorSelection
,
gtk.Item
,
gtk.Widget
,
gtk.RecentAction
,
gtk.VolumeButton
,
gtk.MenuBar
,
gtk.TextView
,
gtk.Arrow
,
gtk.ToggleAction
,
gtk.RadioAction
,
gtk.Plug
,
gtk.HPaned
,
gtk.Box
,
gtk.Menu
,
gtk.Action
,
gtk.PrintUnixDialog
,
gtk.ComboBoxEntry
,
gtk.ColorButton
,
gtk.FileChooserDialog
,
gtk.Ruler
,
gtk.VPaned
,
gtk.HandleBox
,
gtk.Srollbar
,
gtk.Container
,
gtk.SizeGroup
,
gtk.ViewPort
,
gtk.ScrolledWindow
,
In order to allow construction from a GtkBuilder UI description, an object class must implement the GtkBuildable interface. The interface includes methods for setting names and properties of objects, parsing custom tags, constructing child objects.
The GtkBuildable interface is implemented by all widgets and many of the non-widget objects that are provided by GTK+. The main user of this interface is GtkBuilder, there should be very little need for applications to call any gtk.Buildable methods.
def add_child(builder
, child
, type
)
|
A gtk.Builder
|
| The child to add. |
|
The kind of child or None .
|
This method is available in PyGTK 2.12 and above.
The add_child
() method adds a child to buildable. type is an
optional string describing how the child should be added.
def construct_child(builder
, name
)
|
A gtk.Builder
|
| The name of child to construct. |
Returns : | The constructed child. |
This method is available in PyGTK 2.12 and above.
The construct_child
() method constructs a child of buildable
with the name name
.
GtkBuilder calls this function if a "constructor" has been specified in the UI definition.
def get_internal_child(builder
, childname
)
|
A gtk.Builder
|
| The name of child. |
Returns : | The internal child of the buildable object. |
This method is available in PyGTK 2.12 and above.
The get_internal_child
() method gets the internal child
called childname of the buildable object.
def get_name()
Returns : |
The name set with
set_name
|
This method is available in PyGTK 2.12 and above.
The get_name
() method gets the name of the buildable object.
GtkBuilder sets the name based on the the GtkBuilder UI description used to construct the buildable.
def parser_finished(builder
)
|
A gtk.Builder
|
This method is available in PyGTK 2.12 and above.
The parser_finished
() method is called when the builder finishes
the parsing of a GtkBuilder UI definition. Note that this will be called once for each
time add_from_file
or add_from_string
is called on a builder.