-
-
Notifications
You must be signed in to change notification settings - Fork 4k
[Merged by Bors] - Add documentation comments to bevy_window
#4333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f25ddb3
Add documentation comments to `bevy_window`
arnavc52 1f0b6f7
Cargo fmt for `bevy_window` documentation comments
arnavc52 c15fd98
Fix explanation for `CursorIcon::Arrow`
arnavc52 faa5318
Link to `winit` in `bevy_window::CursorIcon`
arnavc52 6589334
Improve documentation for `bevy_window::WindowDescriptor`
arnavc52 2d7a807
Change a comment in crates/bevy_window/src/raw_window_handle.rs
arnavc52 6fe9f48
Add a link in crates/bevy_window/src/lib.rs
arnavc52 81f178c
Fix a typo in `bevy_window::WindowDescriptor`
arnavc52 8edd7a4
Clarify `WindowCommand`
arnavc52 2ac5ab6
Fix `cargo fmt` error
arnavc52 465107c
Add newlines to crates/bevy_window/src/window.rs
arnavc52 84f8e6a
Change a doc comment in crates/bevy_window/src/window.rs
arnavc52 afa3506
Fix yet another typo
arnavc52 dd6f268
Improve formatting for `bevy_window` doc comments
arnavc52 da68d78
Merge branch 'main' into main
arnavc52 0b85374
Reformat `window.rs`
arnavc52 1bb7b10
More documentation improvements for `window.rs`
arnavc52 d712fea
Improve formatting for `cursor.rs`
arnavc52 5290b87
Improve formatting for `event.rs` documentation
arnavc52 027d94c
Improve formatting for `lib.rs` documentation
arnavc52 e01ca5c
Improve formatting of `windows.rs` documentation
arnavc52 6dce308
Improve formatting for `bevy_window` docs
arnavc52 a441277
Add backticks to `window.rs` docs
arnavc52 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,79 @@ | ||
/// The icon to display for a window's cursor | ||
/// Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.asp?filename=playcss_cursor) | ||
arnavc52 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/// This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html). | ||
/// `winit`, in turn, mostly copied cursor types avilable in the browser. | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)] | ||
pub enum CursorIcon { | ||
/// The platform-dependent default cursor. | ||
Default, | ||
/// A simple crosshair. | ||
Crosshair, | ||
/// A hand (often used to indicate links in web browsers). | ||
Hand, | ||
/// An arrow. This is the default cursor on most systems. | ||
Arrow, | ||
/// Indicates something is to be moved. | ||
Move, | ||
/// Indicates text that may be selected or edited. | ||
Text, | ||
/// Program busy indicator. | ||
Wait, | ||
/// Help indicator (often rendered as a "?") | ||
Help, | ||
/// Progress indicator. Shows that processing is being done. But in contrast | ||
/// with "Wait" the user may still interact with the program. Often rendered | ||
/// as a spinning beach ball, or an arrow with a watch or hourglass. | ||
Progress, | ||
/// Cursor showing that something cannot be done. | ||
NotAllowed, | ||
/// Indicates that a context menu is available | ||
ContextMenu, | ||
/// Indicates that a cell (or set of cells) may be selected | ||
Cell, | ||
/// Indicates vertical text that may be selected or edited | ||
VerticalText, | ||
/// Indicates that an alias of something is to be created | ||
Alias, | ||
/// Indicates something is to be copied | ||
Copy, | ||
/// Indicates that the dragged item cannot be dropped here | ||
NoDrop, | ||
/// Indicates that something can be grabbed | ||
Grab, | ||
/// Indicates that something is grabbed. | ||
Grabbing, | ||
/// Indicates that the user can scroll by dragging the mouse. | ||
AllScroll, | ||
/// Indicates that the user can zoom in | ||
ZoomIn, | ||
/// Indicates that the user can zoom out | ||
ZoomOut, | ||
/// Indicates that an edge of a box is to be moved right (east) | ||
EResize, | ||
/// Indicates that an edge of a box is to be moved up (north) | ||
NResize, | ||
/// Indicates that an edge of a box is to be moved up and right (north/east) | ||
NeResize, | ||
/// indicates that an edge of a box is to be moved up and left (north/west) | ||
NwResize, | ||
/// Indicates that an edge of a box is to be moved down (south) | ||
SResize, | ||
/// The cursor indicates that an edge of a box is to be moved down and right (south/east) | ||
SeResize, | ||
/// The cursor indicates that an edge of a box is to be moved down and left (south/west) | ||
SwResize, | ||
/// Indicates that an edge of a box is to be moved left (west) | ||
WResize, | ||
/// Indicates a bidirectional resize cursor | ||
EwResize, | ||
/// Indicates a bidirectional resize cursor | ||
NsResize, | ||
/// Indicates a bidirectional resize cursor | ||
NeswResize, | ||
/// Indicates a bidirectional resize cursor | ||
NwseResize, | ||
/// Indicates that a column can be resized horizontally | ||
ColResize, | ||
/// Indicates that the row can be resized vertically | ||
RowResize, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.