Gdl.DockLayout¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
True if the layouts have changed and need to be saved to a file |
||
r/w |
|
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
deprecated_dirty |
r |
||
deprecated_master |
r |
||
g_object |
r |
Class Details¶
- class Gdl.DockLayout(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Gdl.DockLayout
struct contains only private fields and should not be directly accessed.- classmethod new(master)¶
- Parameters:
master (
GObject.Object
) – A master or a dock object to which the layout will be attached.- Returns:
New
Gdl.DockLayout
item.- Return type:
Creates a new
Gdl.DockLayout
. Instead of setting master directly with a master object, it is possible to use aGdl.DockObject
, in this case the layout will be attached to the same master than the dock object.
- attach(master)¶
- Parameters:
master (
Gdl.DockMaster
) – The master object to which the layout will be attached
Attach the self to the master and delete the reference to the master that the layout attached previously.
Deprecated 3.6: Use
Gdl.DockLayout.set_master
() instead.
- delete_layout(name)¶
- Parameters:
name (
str
) – The name of the layout to delete.
Deletes the layout with the given name from the memory. This will set
Gdl.DockLayout
:dirty
toTrue
.
- get_layouts(include_default)¶
- Parameters:
include_default (
bool
) –True
to include the default layout.- Returns:
a
GLib.List
list holding the layout names. You must first free each element in the list withGLib.free
(), then free the list itself with g_list_free().- Return type:
[
str
]
Get the list of layout names including or not the default layout.
- get_master()¶
- Returns:
a
Gdl.DockMaster
object- Return type:
Retrieves the master of the object.
New in version 3.6.
- is_dirty()¶
-
Checks whether the XML tree in memory is different from the file where the layout was saved.
- load_from_file(filename)¶
- Parameters:
filename (
str
) – The name of the file to load.- Returns:
- Return type:
Loads the layout from file with the given filename. This will set
Gdl.DockLayout
:dirty
toFalse
.
- load_layout(name)¶
- Parameters:
name (
str
orNone
) – The name of the layout to load orNone
for a default layout name.- Returns:
- Return type:
Loads the layout with the given name from the memory. This will set
Gdl.DockLayout
:dirty
toTrue
.See also
Gdl.DockLayout.load_from_file
()
- save_layout(name)¶
-
Saves the self with the given name to the memory. This will set
Gdl.DockLayout
:dirty
toTrue
.See also
Gdl.DockLayout.save_to_file
().
- save_to_file(filename)¶
- Parameters:
filename (
str
) – Name of the file we want to save in layout- Returns:
- Return type:
This function saves the current layout in XML format to the file with the given filename.
- set_master(master)¶
- Parameters:
master (
GObject.Object
) – The master object to which the layout will be attached
Attach the self to the master and delete the reference to the master that the layout attached previously. Instead of setting master directly with the master object, it is possible to use a
Gdl.DockObject
, in this case the layout will be attached to the same master than the dock object.
Property Details¶
- Gdl.DockLayout.props.dirty¶
-
True if the layouts have changed and need to be saved to a file
- Gdl.DockLayout.props.master¶
- Name:
master
- Type:
- Default Value:
- Flags:
Gdl.DockMaster
orGdl.DockObject
object which the layout object is attached to