mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
reference
This commit is contained in:
@@ -14,7 +14,7 @@ Event classes (as used in event handlers) extend the [Event][textual.events.Even
|
||||
|
||||
Every Textual app and widget contains a *message queue*. You can think of a message queue as orders at a restaurant. The chef takes an order and makes the dish. Orders that arrive while the chef is cooking are placed in a line. When the chef has finished a dish they pick up the first order that was added.
|
||||
|
||||
Textual processes messages in the same way. Messages are picked off the message queue and processed by a handler method. This guarantees messages and events are processed even if your code can not handle them right way.
|
||||
Textual processes messages in the same way. Messages are picked off the message queue and processed (cooked) by a handler method. This guarantees messages and events are processed even if your code can not handle them right way.
|
||||
|
||||
This processing of messages is done within an asyncio Task which is started when you mount the widget. The task monitors an asyncio queue for new messages. When a message arrives, the task dispatches it to the appropriate handler method. Once all messages have been processed the task goes back to waiting for messages.
|
||||
|
||||
|
||||
@@ -88,16 +88,19 @@ nav:
|
||||
- "widgets/text_input.md"
|
||||
- "widgets/tree_control.md"
|
||||
- Reference:
|
||||
- "reference/index.md"
|
||||
- "reference/app.md"
|
||||
- "reference/button.md"
|
||||
- "reference/color.md"
|
||||
- "reference/dom_node.md"
|
||||
- "reference/events.md"
|
||||
- "reference/geometry.md"
|
||||
- "reference/index.md"
|
||||
- "reference/message_pump.md"
|
||||
- "reference/timer.md"
|
||||
- "reference/message.md"
|
||||
- "reference/query.md"
|
||||
- "reference/reactive.md"
|
||||
- "reference/screen.md"
|
||||
- "reference/timer.md"
|
||||
- "reference/widget.md"
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ if TYPE_CHECKING:
|
||||
|
||||
@rich.repr.auto
|
||||
class Event(Message):
|
||||
"""The base class for all events."""
|
||||
|
||||
def __rich_repr__(self) -> rich.repr.Result:
|
||||
return
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user