Top | ![]() |
![]() |
![]() |
![]() |
IdeLayoutGridIdeLayoutGrid — A grid for IdeLayoutView |
IdeLayoutGridColumn * | current-column | Read / Write |
IdeLayoutStack * | current-stack | Read |
IdeLayoutView * | current-view | Read |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── DzlMultiPaned ╰── IdeLayoutGrid
IdeLayoutGrid implements AtkImplementorIface, GtkBuildable, GtkOrientable and GListModel.
The IdeLayoutGrid provides a grid of views that the user may manipulate.
Internally, this is implemented with IdeLayoutGrid at the top containing one or more of IdeLayoutGridColumn. Those columns contain one or more IdeLayoutStack. The stack can contain many IdeLayoutView.
IdeLayoutGrid implements the GListModel interface to simplify
the process of listing (with deduplication) the views that are
contianed within the IdeLayoutGrid. If you would instead like
to see all possible views in the stack, use the
ide_layout_grid_foreach_view()
API.
GtkWidget *
ide_layout_grid_new (void
);
Creates a new IdeLayoutGrid.
Since: 3.26
IdeLayoutGridColumn * ide_layout_grid_get_nth_column (IdeLayoutGrid *self
,gint nth
);
Gets the nth
column from the grid.
If nth
is -1, then a new column at the beginning of the
grid is created.
If nth
is >= the number of columns in the grid, then a new
column at the end of the grid is created.
IdeLayoutView * ide_layout_grid_focus_neighbor (IdeLayoutGrid *self
,GtkDirectionType dir
);
Attempts to focus a neighbor IdeLayoutView in the grid based on the direction requested.
If an IdeLayoutView was focused, it will be returned to the caller.
IdeLayoutGridColumn *
ide_layout_grid_get_current_column (IdeLayoutGrid *self
);
Gets the most recently focused column of the grid.
void ide_layout_grid_set_current_column (IdeLayoutGrid *self
,IdeLayoutGridColumn *column
);
Sets the current column for the grid. Generally this is automatically updated for you when the focus changes within the workbench.
column
can be NULL
out of convenience.
IdeLayoutStack *
ide_layout_grid_get_current_stack (IdeLayoutGrid *self
);
Gets the most recently focused stack. This is useful when you want to open a document on the stack the user last focused.
Since: 3.26
IdeLayoutView *
ide_layout_grid_get_current_view (IdeLayoutGrid *self
);
Gets the most recent view used by the user as determined by tracking the window focus.
Since: 3.26
void ide_layout_grid_foreach_view (IdeLayoutGrid *self
,GtkCallback callback
,gpointer user_data
);
This function will call callback
for every view found in self
.
self |
||
callback |
A callback for each view. |
[scope call][closure user_data] |
user_data |
user data for |
Since: 3.26
struct IdeLayoutGridClass { DzlMultiPanedClass parent_class; IdeLayoutStack *(*create_stack) (IdeLayoutGrid *self); IdeLayoutView *(*create_view) (IdeLayoutGrid *self, const gchar *uri); };
“current-column”
property“current-column” IdeLayoutGridColumn *
The most recently focused grid column.
Flags: Read / Write
“current-stack”
property“current-stack” IdeLayoutStack *
The most recently focused IdeLayoutStack.
Flags: Read
“current-view”
property“current-view” IdeLayoutView *
The most recently focused IdeLayoutView.
Flags: Read
“create-stack”
signalIdeLayoutStack* user_function (IdeLayoutGrid *self, gpointer user_data)
Creates a new stack to be added to the grid.
Flags: Run Last
“create-view”
signalIdeLayoutView* user_function (IdeLayoutGrid *self, gchar *uri, gpointer user_data)
Creates a new view for uri
to be added to the grid.
Flags: Run Last
Since: 3.28