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).
99### Added
1010
1111- ` ProgressBar ` control for tracking the completion of a task
12+ - ` enable() ` and ` disable() ` methods on all controls
1213- ` RadioButtons ` control for groups of radio buttons
1314- ` Combobox::selected() ` method to retrieve the currently selected index of the combobox
1415
Original file line number Diff line number Diff line change @@ -55,6 +55,18 @@ macro_rules! define_control {
5555 unsafe { ui_sys:: uiControlHide( control. ui_control) }
5656 }
5757
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+
5870 /// Create an `iui` struct for this control from the raw pointer for it.
5971 ///
6072 /// # Unsafety
You can’t perform that action at this time.
0 commit comments