Skip to content

Commit

Permalink
Tidy up the docs for the Click event
Browse files Browse the repository at this point in the history
Note the reliance on directing the reader to the `MouseEvent` documentation
so they can get the full range of information on properties and methods. Try
as I might I can't convince mkdocstrings to "borrow" from the parent class
in any meaningful way.
  • Loading branch information
davep committed Mar 20, 2024
1 parent 79bd063 commit f0c4dcc
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions docs/events/click.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# Click

The `Click` event is sent to a widget when the user clicks a mouse button.

## Attributes
::: textual.events.Click
options:
heading_level: 1

| attribute | type | purpose |
|------------|------|-------------------------------------------|
| `x` | int | Mouse x coordinate, relative to Widget |
| `y` | int | Mouse y coordinate, relative to Widget |
| `delta_x` | int | Change in x since last mouse event |
| `delta_y` | int | Change in y since last mouse event |
| `button` | int | Index of mouse button |
| `shift` | bool | Shift key pressed if True |
| `meta` | bool | Meta key pressed if True |
| `ctrl` | bool | Ctrl key pressed if True |
| `screen_x` | int | Mouse x coordinate relative to the screen |
| `screen_y` | int | Mouse y coordinate relative to the screen |
See [MouseEvent][textual.events.MouseEvent] for the full list of properties and methods.

## Code
## See also

::: textual.events.Click
- [MouseDown](mouse_down.md)
- [MouseEvent][textual.events.MouseEvent]
- [MouseMove](mouse_move.md)
- [MouseScrollDown](mouse_scroll_down.md)
- [MouseScrollUp](mouse_scroll_up.md)
- [MouseUp](mouse_up.md)

0 comments on commit f0c4dcc

Please sign in to comment.