File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
9
9
### Added
10
10
11
11
- ` ProgressBar ` control for tracking the completion of a task
12
+ - ` enable() ` and ` disable() ` methods on all controls
12
13
- ` RadioButtons ` control for groups of radio buttons
13
14
- ` Combobox::selected() ` method to retrieve the currently selected index of the combobox
14
15
Original file line number Diff line number Diff line change @@ -55,6 +55,18 @@ macro_rules! define_control {
55
55
unsafe { ui_sys:: uiControlHide( control. ui_control) }
56
56
}
57
57
58
+ // Enable this control.
59
+ pub fn enable( & mut self , _ctx: & UI ) {
60
+ let control: Control = self . clone( ) . into( ) ;
61
+ unsafe { ui_sys:: uiControlEnable( control. ui_control) }
62
+ }
63
+
64
+ // Disable this control.
65
+ pub fn disable( & mut self , _ctx: & UI ) {
66
+ let control: Control = self . clone( ) . into( ) ;
67
+ unsafe { ui_sys:: uiControlDisable( control. ui_control) }
68
+ }
69
+
58
70
/// Create an `iui` struct for this control from the raw pointer for it.
59
71
///
60
72
/// # Unsafety
You can’t perform that action at this time.
0 commit comments