C# Class FullInspector.Internal.ReflectedPropertyEditor

The general property editor that takes over when there is no specific override. This uses reflection to discover what values to edit.
Inheritance: IPropertyEditor, IPropertyEditorEditAPI
Mostra file Open project: jacobdufault/fullinspector

Public Methods

Method Description
CanEdit ( Type dataType ) : bool
Edit ( Rect region, GUIContent label, object element, fiGraphMetadata metadata ) : object
GetElementHeight ( GUIContent label, object element, fiGraphMetadata metadata ) : float
GetFoldoutHeader ( GUIContent label, object element ) : GUIContent
OnSceneGUI ( object element ) : object
ReflectedPropertyEditor ( InspectedType metadata ) : System
TryCreate ( Type dataType, ICustomAttributeProvider attributes ) : IPropertyEditor

Private Methods

Method Description
DrawLabel ( Rect region, GUIContent label ) : Rect

Draws a label at the given region. Returns an indented rectangle that can be used for drawing properties directly under the label.

EditButton ( Rect &region, object element, InspectedMethod method ) : void

A helper method that draws a button at the given region.

EditInspectedMember ( Rect &region, object element, InspectedMember member, fiGraphMetadata metadata ) : void
EditPropertiesButtons ( GUIContent label, Rect region, object element, fiGraphMetadata metadata ) : object

Draws the actual property editors.

EditProperty ( Rect &region, object element, InspectedProperty property, fiGraphMetadata metadata ) : void

A helper method that draws the inspector for a field/property at the given location.

HasLabel ( GUIContent label ) : bool

Returns true if the given GUIContent element contains any content.

ShouldAutoInstantiate ( ) : bool

This returns true if automatic instantiation should be enabled. Automatic instantiation gets disabled after the reflected editor has gone a x calls deep into itself in an attempt to prevent infinite recursion.

ShouldShowMemberDynamic ( object element, MemberInfo member ) : bool
UseCategories ( Dictionary categories ) : bool

Method Details

CanEdit() public method

public CanEdit ( Type dataType ) : bool
dataType System.Type
return bool

Edit() public method

public Edit ( Rect region, GUIContent label, object element, fiGraphMetadata metadata ) : object
region Rect
label GUIContent
element object
metadata fiGraphMetadata
return object

GetElementHeight() public method

public GetElementHeight ( GUIContent label, object element, fiGraphMetadata metadata ) : float
label GUIContent
element object
metadata fiGraphMetadata
return float

GetFoldoutHeader() public method

public GetFoldoutHeader ( GUIContent label, object element ) : GUIContent
label GUIContent
element object
return GUIContent

OnSceneGUI() public method

public OnSceneGUI ( object element ) : object
element object
return object

ReflectedPropertyEditor() public method

public ReflectedPropertyEditor ( InspectedType metadata ) : System
metadata InspectedType
return System

TryCreate() public static method

public static TryCreate ( Type dataType, ICustomAttributeProvider attributes ) : IPropertyEditor
dataType Type
attributes ICustomAttributeProvider
return IPropertyEditor