Trait native_windows_gui::custom::ControlT
[−]
[src]
pub trait ControlT<ID: Clone + Hash> { fn type_id(&self) -> TypeId; fn build(&self, ui: &Ui<ID>) -> Result<Box<Control>, Error>; fn events(&self) -> Vec<Event> { ... } }
Structures implementing this trait can be used by a Ui to build a Control
Required Methods
fn type_id(&self) -> TypeId
Should return the TypeId of the generated control. For example a WindowT
struct returns the TypeId of a Window
struct.
fn build(&self, ui: &Ui<ID>) -> Result<Box<Control>, Error>
Should instance the control and return it as a Boxui.commit
.
Provided Methods
Implementors
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for WindowT<S>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for MenuT<S, ID>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for MenuItemT<S, ID>
impl<ID: Hash + Clone> ControlT<ID> for SeparatorT<ID>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for ButtonT<S, ID>
impl<S1: Clone + Into<String>, S2: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for TextInputT<S1, S2, ID>
impl<S1: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for TextBoxT<S1, ID>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for CheckBoxT<S, ID>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for RadioButtonT<S, ID>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for LabelT<S, ID>
impl<D: Clone + Display + 'static, ID: Hash + Clone> ControlT<ID> for ListBoxT<D, ID>
impl<D: Clone + Display + 'static, ID: Hash + Clone, S: Clone + Into<String>> ControlT<ID> for ComboBoxT<D, ID, S>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for GroupBoxT<S, ID>
impl<ID: Hash + Clone> ControlT<ID> for ProgressBarT<ID>
impl<S: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for DatePickerT<S, ID>
impl<S1: Clone + Into<String>, ID: Hash + Clone> ControlT<ID> for FileDialogT<S1, ID>
impl<ID: Hash + Clone> ControlT<ID> for TimerT
impl<ID: Hash + Clone + 'static> ControlT<ID> for CanvasT<ID>