mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Link most(all?) docstring mentions of SelectionList
Putting the hype in hypertext.
This commit is contained in:
@@ -274,7 +274,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
state_change: The state change function to apply.
|
state_change: The state change function to apply.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Keep track of if anything changed.
|
# Keep track of if anything changed.
|
||||||
@@ -316,7 +316,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
selection: The selection to mark as selected.
|
selection: The selection to mark as selected.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
"""
|
"""
|
||||||
if self._select(
|
if self._select(
|
||||||
selection.value
|
selection.value
|
||||||
@@ -357,7 +357,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
selection: The selection to mark as not selected.
|
selection: The selection to mark as not selected.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
"""
|
"""
|
||||||
if self._deselect(
|
if self._deselect(
|
||||||
selection.value
|
selection.value
|
||||||
@@ -371,7 +371,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
"""Deselect all items.
|
"""Deselect all items.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
"""
|
"""
|
||||||
return self._apply_to_all(self._deselect)
|
return self._apply_to_all(self._deselect)
|
||||||
|
|
||||||
@@ -397,7 +397,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
selection: The selection to toggle.
|
selection: The selection to toggle.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
"""
|
"""
|
||||||
self._toggle(
|
self._toggle(
|
||||||
selection.value
|
selection.value
|
||||||
@@ -411,7 +411,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
"""Toggle all items.
|
"""Toggle all items.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
"""
|
"""
|
||||||
return self._apply_to_all(self._toggle)
|
return self._apply_to_all(self._toggle)
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
def _on_option_list_option_highlighted(
|
def _on_option_list_option_highlighted(
|
||||||
self, event: OptionList.OptionHighlighted
|
self, event: OptionList.OptionHighlighted
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Capture the `OptionList` highlight event and turn it into a `SelectionList` event.
|
"""Capture the `OptionList` highlight event and turn it into a [`SelectionList`][textual.widgets.SelectionList] event.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
event: The event to capture and recreate.
|
event: The event to capture and recreate.
|
||||||
@@ -606,7 +606,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
items: The new items to add.
|
items: The new items to add.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
DuplicateID: If there is an attempt to use a duplicate ID.
|
DuplicateID: If there is an attempt to use a duplicate ID.
|
||||||
@@ -650,7 +650,7 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
item: The new item to add.
|
item: The new item to add.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The `SelectionList` instance.
|
The [`SelectionList`][textual.widgets.SelectionList] instance.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
DuplicateID: If there is an attempt to use a duplicate ID.
|
DuplicateID: If there is an attempt to use a duplicate ID.
|
||||||
|
|||||||
Reference in New Issue
Block a user