|
|
| SelectionModel (detail::SelectionModelInternal *) |
| | construct from internal, for interal use only. Use get_selection_model to acquire a selection model from a selectable widget
|
| |
|
| SelectionModel (SelectionMode mode, GListModel *model) |
| | construct from selection mode,
|
| |
|
| ~SelectionModel () |
| | destruct
|
| |
| NativeObject | get_internal () const override |
| | expose internal
|
| |
|
| operator GtkSelectionModel * () const |
| | expose as GtkSelectionModel \for_internal_use_only
|
| |
| | operator NativeObject () const override |
| | expose as GObject \for_internal_use_only
|
| |
| SelectionMode | get_selection_mode () const |
| | get mode of selection
|
| |
| std::vector< uint64_t > | get_selection () |
| | get indices of selected items
|
| |
|
void | select_all () |
| | select all items or, if selection mode is single, select the first item
|
| |
|
void | unselect_all () |
| | unselect all itmes
|
| |
| void | select (uint64_t i, bool unselect_others=true) |
| | select item at specific index
|
| |
| void | unselect (uint64_t i) |
| | unselect item at specific item
|
| |
| void | set_allow_no_selection_if_single (bool b) |
| | if the selection mode is SelectionMode::SINGLE, determines whether no items can be selected
|
| |
| uint64_t | get_n_items () const |
| | get number of items
|
| |
| void | set_signal_blocked (const std::string &signal_id, bool b) |
| | block a signal by id \for_internal_use_only
|
| |
| bool | get_signal_blocked (const std::string &signal_id) const |
| | get whether a signal is currently blocked
|
| |
| std::vector< std::string > | get_all_signal_names () |
| | get list of possible signal ids \for_internal_use_only
|
| |
| template<typename Function_t > |
| void | connect_signal (const std::string &signal_id, Function_t *function, void *data=nullptr) |
| | connect static function to signal, does not work with lambdas \for_internal_use_only
|
| |
| void | disconnect_signal (const std::string &signal_id) |
| | disconnect signal, it may not be invoked until reconnected, if signal is not registered, does nothing. For internal use only
|
| |
| virtual | operator NativeObject () const =0 |
| | expose as NativeObject, this is the GLib instance that signals are emitted on \for_internal_use_only
|
| |
| virtual NativeObject | get_internal () const |
| | expose internally managed object, \for_internal_use_only
|
| |
| void | connect_signal_selection_changed (Function_t f, Data_t data) |
| | connect handler, will be invoked when signal is emitted. Data is passed to the signal handler function
|
| |
| void | connect_signal_selection_changed (Function_t f) |
| | connect handler, will be invoked when signal is emitted
|
| |
|
void | set_signal_selection_changed_blocked (bool b) |
| |
|
bool | get_signal_selection_changed_blocked () const |
| |
| void | emit_signal_selection_changed (int32_t position, int32_t n_items) |
| | invoke signal handler manually
|
| |
|
void | disconnect_signal_selection_changed () |
| |
selection model, provides interface and signals for selectable widgets
| signal id | signature | emitted when... |
selection_changed | (SelectionModel&, int32_t position, int32_t n_items, (Data_t)) -> void | Selection state changes, usually because the user selected a different item or the internal list of items was otherwise modified |