Document ui crate traits
This commit is contained in:
parent
46065c2621
commit
e020d7ca11
7 changed files with 21 additions and 5 deletions
|
@ -4,10 +4,12 @@ use smallvec::SmallVec;
|
|||
|
||||
use crate::prelude::*;
|
||||
|
||||
/// A trait for buttons that can be Selected. Enables setting the [ButtonStyle] of a button when it is selected.
|
||||
pub trait SelectableButton: Selectable {
|
||||
fn selected_style(self, style: ButtonStyle) -> Self;
|
||||
}
|
||||
|
||||
/// A common set of traits all buttons must implement.
|
||||
pub trait ButtonCommon: Clickable + Disableable {
|
||||
/// A unique element ID to identify the button.
|
||||
fn id(&self) -> &ElementId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue