diff options
author | 2020-07-23 03:27:21 +0200 | |
---|---|---|
committer | 2020-07-23 03:27:21 +0200 | |
commit | d4ef470b4f41595c15b6f69cc3387d4d1c394fc3 (patch) | |
tree | 5cb2e5f3aa130b6d1effd5b652e844c5f4a3e354 /native | |
parent | 3d91926a74ab213b2a6a61732adcc5c561748f78 (diff) | |
download | iced-d4ef470b4f41595c15b6f69cc3387d4d1c394fc3.tar.gz iced-d4ef470b4f41595c15b6f69cc3387d4d1c394fc3.tar.bz2 iced-d4ef470b4f41595c15b6f69cc3387d4d1c394fc3.zip |
Add `new` method to `menu::State`
Diffstat (limited to 'native')
-rw-r--r-- | native/src/overlay/menu.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 0d4bc63c..0018a02c 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -120,6 +120,14 @@ pub struct State { } impl State { + /// Creates a new [`State`] for a [`Menu`]. + /// + /// [`State`]: struct.State.html + /// [`Menu`]: struct.Menu.html + pub fn new() -> Self { + Self::default() + } + /// Returns whether the [`Menu`] is currently open or not. /// /// [`Menu`]: struct.Menu.html |