Top | ![]() |
![]() |
![]() |
![]() |
TeplStack * | tepl_stack_new () |
void | tepl_stack_add_item () |
void | tepl_stack_remove_item () |
GList * | tepl_stack_get_items () |
void | tepl_stack_changed () |
gboolean | tepl_stack_has_several_items () |
guint | tepl_stack_get_n_visible_items () |
TeplStackItem * | tepl_stack_get_visible_item () |
void | tepl_stack_set_visible_item () |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── TeplStack
TeplStack is an alternative to GtkStack.
It is normally easier to implement a custom switcher widget with TeplStack. That is, a GtkWidget that controls which item is currently visible in a TeplStack.
A TeplStack contains TeplStackItem's. If the GtkWidget of a TeplStackItem is visible (according to the “visible” property), then it will be shown in the TeplStack. TeplStack doesn't enforce that a single item is visible at a time.
void tepl_stack_add_item (TeplStack *stack
,TeplStackItem *item
);
To add an item to a stack.
Since: 6.6
void tepl_stack_remove_item (TeplStack *stack
,TeplStackItem *item
);
Removes item
from stack
.
Since: 6.6
void
tepl_stack_changed (TeplStack *stack
);
Emits the “changed” signal.
Since: 6.6
gboolean
tepl_stack_has_several_items (TeplStack *stack
);
Convenience function.
Useful to implement a switcher widget.
Since: 6.6
guint
tepl_stack_get_n_visible_items (TeplStack *stack
);
This function can serve as a sanity check. Usually what is desired is that only one item at a time is visible.
Since: 6.6
TeplStackItem *
tepl_stack_get_visible_item (TeplStack *stack
);
the first TeplStackItem found in stack
which has its GtkWidget visible.
[transfer none][nullable]
Since: 6.6
void tepl_stack_set_visible_item (TeplStack *stack
,TeplStackItem *item
);
Make the GtkWidget of item
the only visible one in stack
.
Since: 6.6
“changed”
signalvoid user_function (TeplStack *stack, gpointer user_data)
The ::changed signal is emitted when:
A TeplStackItem is added or removed from stack
.
The visible GtkWidget item of stack
has changed.
stack |
the TeplStack emitting the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 6.6