pub struct PropertyEditorTranslationContext<'b, 'c> {
pub environment: Option<Arc<dyn InspectorEnvironment>>,
pub name: &'b str,
pub owner_type_id: TypeId,
pub message: &'c UiMessage,
pub definition_container: Arc<PropertyEditorDefinitionContainer>,
}Expand description
The details relevant to translating a message from an editor widget into a PropertyChanged message that an Inspector widget can use to update the inspected property based on the messages from the editor.
Fields§
§environment: Option<Arc<dyn InspectorEnvironment>>Optional untyped information about the broader application in which this proprety is being translated. This allows the translation to adapt to the situation if we can successfully cast the given InspectorEnvironment into a specific type.
When the environment is not None, it is often an fyroxed_base::inspector::EditorEnvironment which may be accessed using EditorEnvironment::try_get_from. For example, the EditorEnvironment can be used by fyroxed_base::inspector::editors::script::ScriptPropertyEditor to translate the UUID of a script into an actual fyrox::script::Script when it receives a ScriptPropertyEditorMessage::Value.
name: &'b strThe name of the property being edited. This comes from ContextEntry::property_name.
owner_type_id: TypeIdThe type of the object whose property is being edited. This comes from ContextEntry::property_owner_type_id.
message: &'c UiMessageThe original message that may be translated, if it represents a change in the property.
definition_container: Arc<PropertyEditorDefinitionContainer>The list of the Inspectors property editors. This allows one property editor to make use of other property editors.
Auto Trait Implementations§
impl<'b, 'c> Freeze for PropertyEditorTranslationContext<'b, 'c>
impl<'b, 'c> !RefUnwindSafe for PropertyEditorTranslationContext<'b, 'c>
impl<'b, 'c> !Send for PropertyEditorTranslationContext<'b, 'c>
impl<'b, 'c> !Sync for PropertyEditorTranslationContext<'b, 'c>
impl<'b, 'c> Unpin for PropertyEditorTranslationContext<'b, 'c>
impl<'b, 'c> !UnwindSafe for PropertyEditorTranslationContext<'b, 'c>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Any. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.