C# 클래스 FullInspector.Rotorz.ReorderableList.ReorderableListControl

파일 보기 프로젝트 열기: jacobdufault/fullinspector 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AnchorBackgroundColor Color
TargetBackgroundColor Color
addButtonStyle UnityEngine.GUIStyle
containerStyle UnityEngine.GUIStyle
removeButtonStyle UnityEngine.GUIStyle

보호된 프로퍼티들

프로퍼티 타입 설명
commandClearAll UnityEngine.GUIContent
commandDuplicate UnityEngine.GUIContent
commandInsertAbove UnityEngine.GUIContent
commandInsertBelow UnityEngine.GUIContent
commandMoveToBottom UnityEngine.GUIContent
commandMoveToTop UnityEngine.GUIContent
commandRemove UnityEngine.GUIContent
defaultContextHandler GenericMenu.MenuFunction2

Private Properties

프로퍼티 타입 설명
AcceptReorderDrag void
AutoFocusItem void
BeginTrackingReorderDrag void
CheckForAutoFocusControl void
DefaultContextMenuHandler void
DoAddButton void
DoRemoveButton bool
Draw void
Draw void
DrawEmptyListControl void
DrawFloatingListItem void
DrawFooterControls void
DrawLayoutEmptyList UnityEngine.Rect
DrawLayoutListField UnityEngine.Rect
DrawListContainerAndItems void
DrawListItem void
FixStyles void
IsTrackingControl bool
PrepareState void
ReorderableListControl System
ShowContextMenu void
StopTrackingReorderDrag void

공개 메소드들

메소드 설명
CalculateListHeight ( IReorderableListAdaptor adaptor ) : float

Calculate height of list control in pixels.

CalculateListHeight ( int itemCount, float itemHeight ) : float

Calculate height of list control in pixels.

DoCommand ( GUIContent command, int itemIndex, IReorderableListAdaptor adaptor ) : bool

Call to manually perform command.

Warning message is logged to console if attempted to execute unknown command.

DoCommand ( string commandName, int itemIndex, IReorderableListAdaptor adaptor ) : bool

Call to manually perform command.

Warning message is logged to console if attempted to execute unknown command.

Draw ( IReorderableListAdaptor adaptor ) : void
Draw ( IReorderableListAdaptor adaptor, DrawEmpty drawEmpty ) : void
Draw ( Rect position, IReorderableListAdaptor adaptor ) : void
Draw ( Rect position, IReorderableListAdaptor adaptor, DrawEmptyAbsolute drawEmpty ) : void

Draw list control with absolute positioning.

DrawControlFromState ( IReorderableListAdaptor adaptor, DrawEmpty drawEmpty, ReorderableListFlags flags ) : void

Generate and draw control from state object.

DrawControlFromState ( Rect position, IReorderableListAdaptor adaptor, DrawEmptyAbsolute drawEmpty, ReorderableListFlags flags ) : void

Generate and draw control from state object.

ReorderableListControl ( ReorderableListFlags flags ) : System

Initializes a new instance of ReorderableListControl.

보호된 메소드들

메소드 설명
AddItem ( IReorderableListAdaptor adaptor ) : void

Add item at end of list and raises the event .

AddItemsToMenu ( GenericMenu menu, int itemIndex, IReorderableListAdaptor adaptor ) : void

Invoked to generate context menu for list item.

ClearAll ( IReorderableListAdaptor adaptor ) : bool

Remove all items from list.

The event ItemRemoving is raised for each item prior to clearing array and allows entire operation to be cancelled.

DuplicateItem ( IReorderableListAdaptor adaptor, int itemIndex ) : void

Duplicate specified item and raises the event .

HandleCommand ( string commandName, int itemIndex, IReorderableListAdaptor adaptor ) : bool

Invoked to handle context command.

It is important to set the value of GUI.changed to true if any changes are made by command handler.

Default command handling functionality can be inherited:

InsertItem ( IReorderableListAdaptor adaptor, int itemIndex ) : void

Insert item at specified index and raises the event .

MoveItem ( IReorderableListAdaptor adaptor, int sourceIndex, int destIndex ) : void

Move item from source index to destination index.

OnItemInserted ( ItemInsertedEventArgs args ) : void

Raises event after list item is inserted or duplicated.

OnItemRemoving ( ItemRemovingEventArgs args ) : void

Raises event before list item is removed and provides oppertunity to cancel.

RemoveItem ( IReorderableListAdaptor adaptor, int itemIndex ) : bool

Remove specified item.

The event ItemRemoving is raised prior to removing item and allows removal to be cancelled.

비공개 메소드들

메소드 설명
AcceptReorderDrag ( IReorderableListAdaptor adaptor ) : void

Accept reordering.

AutoFocusItem ( int controlID, int itemIndex ) : void

Indicate that first control of list item should be automatically focused if possible.

BeginTrackingReorderDrag ( int controlID, int itemIndex ) : void

Begin tracking drag and drop within list.

CheckForAutoFocusControl ( int controlID ) : void

Checks to see if list control needs to be automatically focused.

DefaultContextMenuHandler ( object userData ) : void
DoAddButton ( Rect position, int controlID, IReorderableListAdaptor adaptor ) : void

Draw add item button.

DoRemoveButton ( Rect position, bool visible ) : bool

Draw remove button.

Draw ( Rect position, int controlID, IReorderableListAdaptor adaptor, DrawEmptyAbsolute drawEmpty ) : void

Draw list control with absolute positioning.

Draw ( int controlID, IReorderableListAdaptor adaptor, DrawEmpty drawEmpty ) : void

Draw layout version of list control.

DrawEmptyListControl ( Rect position, DrawEmptyAbsolute drawEmpty ) : void

Draw content for empty list (layout version).

DrawFloatingListItem ( EventType eventType, IReorderableListAdaptor adaptor, float targetSlotPosition ) : void
DrawFooterControls ( Rect position, int controlID, IReorderableListAdaptor adaptor ) : void

Draw additional controls below list control and highlight drop target.

DrawLayoutEmptyList ( DrawEmpty drawEmpty ) : Rect

Draw content for empty list (layout version).

DrawLayoutListField ( int controlID, IReorderableListAdaptor adaptor ) : Rect

Do layout version of list field.

DrawListContainerAndItems ( Rect position, int controlID, IReorderableListAdaptor adaptor ) : void

Draw list container and items.

DrawListItem ( EventType eventType, Rect position, IReorderableListAdaptor adaptor, int itemIndex ) : void
FixStyles ( ) : void

Correct if for some reason one or more styles are missing!

IsTrackingControl ( int controlID ) : bool

Gets a value indicating whether item in current list is currently being tracked.

PrepareState ( int controlID, IReorderableListAdaptor adaptor ) : void

Prepare initial state for list control.

ReorderableListControl ( ) : System
ShowContextMenu ( int controlID, int itemIndex, IReorderableListAdaptor adaptor ) : void
StopTrackingReorderDrag ( ) : void

Stop tracking drag and drop.

메소드 상세

AddItem() 보호된 메소드

Add item at end of list and raises the event .
protected AddItem ( IReorderableListAdaptor adaptor ) : void
adaptor IReorderableListAdaptor Reorderable list adaptor.
리턴 void

AddItemsToMenu() 보호된 메소드

Invoked to generate context menu for list item.
protected AddItemsToMenu ( GenericMenu menu, int itemIndex, IReorderableListAdaptor adaptor ) : void
menu UnityEditor.GenericMenu Menu which can be populated.
itemIndex int /// Zero-based index of item which was right-clicked. ///
adaptor IReorderableListAdaptor Reorderable list adaptor.
리턴 void

CalculateListHeight() 공개 메소드

Calculate height of list control in pixels.
public CalculateListHeight ( IReorderableListAdaptor adaptor ) : float
adaptor IReorderableListAdaptor Reorderable list adaptor.
리턴 float

CalculateListHeight() 공개 메소드

Calculate height of list control in pixels.
public CalculateListHeight ( int itemCount, float itemHeight ) : float
itemCount int Count of items in list.
itemHeight float Fixed height of list item.
리턴 float

ClearAll() 보호된 메소드

Remove all items from list.

The event ItemRemoving is raised for each item prior to clearing array and allows entire operation to be cancelled.

protected ClearAll ( IReorderableListAdaptor adaptor ) : bool
adaptor IReorderableListAdaptor Reorderable list adaptor.
리턴 bool

DoCommand() 공개 메소드

Call to manually perform command.

Warning message is logged to console if attempted to execute unknown command.

public DoCommand ( GUIContent command, int itemIndex, IReorderableListAdaptor adaptor ) : bool
command UnityEngine.GUIContent Content representing command.
itemIndex int /// Zero-based index of item which was right-clicked. ///
adaptor IReorderableListAdaptor Reorderable list adaptor.
리턴 bool

DoCommand() 공개 메소드

Call to manually perform command.

Warning message is logged to console if attempted to execute unknown command.

public DoCommand ( string commandName, int itemIndex, IReorderableListAdaptor adaptor ) : bool
commandName string /// Name of command. This is the text shown in the context menu. ///
itemIndex int /// Zero-based index of item which was right-clicked. ///
adaptor IReorderableListAdaptor Reorderable list adaptor.
리턴 bool

Draw() 공개 메소드

public Draw ( IReorderableListAdaptor adaptor ) : void
adaptor IReorderableListAdaptor
리턴 void

Draw() 공개 메소드

public Draw ( IReorderableListAdaptor adaptor, DrawEmpty drawEmpty ) : void
adaptor IReorderableListAdaptor
drawEmpty DrawEmpty
리턴 void

Draw() 공개 메소드

public Draw ( Rect position, IReorderableListAdaptor adaptor ) : void
position UnityEngine.Rect
adaptor IReorderableListAdaptor
리턴 void

Draw() 공개 메소드

Draw list control with absolute positioning.
public Draw ( Rect position, IReorderableListAdaptor adaptor, DrawEmptyAbsolute drawEmpty ) : void
position UnityEngine.Rect Position of list control in GUI.
adaptor IReorderableListAdaptor Reorderable list adaptor.
drawEmpty DrawEmptyAbsolute Delegate for drawing empty list.
리턴 void

DrawControlFromState() 공개 정적인 메소드

Generate and draw control from state object.
public static DrawControlFromState ( IReorderableListAdaptor adaptor, DrawEmpty drawEmpty, ReorderableListFlags flags ) : void
adaptor IReorderableListAdaptor Reorderable list adaptor.
drawEmpty DrawEmpty Delegate for drawing empty list.
flags ReorderableListFlags Optional flags to pass into list field.
리턴 void

DrawControlFromState() 공개 정적인 메소드

Generate and draw control from state object.
public static DrawControlFromState ( Rect position, IReorderableListAdaptor adaptor, DrawEmptyAbsolute drawEmpty, ReorderableListFlags flags ) : void
position UnityEngine.Rect Position of control.
adaptor IReorderableListAdaptor Reorderable list adaptor.
drawEmpty DrawEmptyAbsolute Delegate for drawing empty list.
flags ReorderableListFlags Optional flags to pass into list field.
리턴 void

DuplicateItem() 보호된 메소드

Duplicate specified item and raises the event .
protected DuplicateItem ( IReorderableListAdaptor adaptor, int itemIndex ) : void
adaptor IReorderableListAdaptor Reorderable list adaptor.
itemIndex int Zero-based index of item.
리턴 void

HandleCommand() 보호된 메소드

Invoked to handle context command.

It is important to set the value of GUI.changed to true if any changes are made by command handler.

Default command handling functionality can be inherited:

protected HandleCommand ( string commandName, int itemIndex, IReorderableListAdaptor adaptor ) : bool
commandName string /// Name of command. This is the text shown in the context menu. ///
itemIndex int /// Zero-based index of item which was right-clicked. ///
adaptor IReorderableListAdaptor Reorderable list adaptor.
리턴 bool

InsertItem() 보호된 메소드

Insert item at specified index and raises the event .
protected InsertItem ( IReorderableListAdaptor adaptor, int itemIndex ) : void
adaptor IReorderableListAdaptor Reorderable list adaptor.
itemIndex int Zero-based index of item.
리턴 void

MoveItem() 보호된 메소드

Move item from source index to destination index.
protected MoveItem ( IReorderableListAdaptor adaptor, int sourceIndex, int destIndex ) : void
adaptor IReorderableListAdaptor Reorderable list adaptor.
sourceIndex int Zero-based index of source item.
destIndex int /// Zero-based index of destination index. ///
리턴 void

OnItemInserted() 보호된 메소드

Raises event after list item is inserted or duplicated.
protected OnItemInserted ( ItemInsertedEventArgs args ) : void
args ItemInsertedEventArgs Event arguments.
리턴 void

OnItemRemoving() 보호된 메소드

Raises event before list item is removed and provides oppertunity to cancel.
protected OnItemRemoving ( ItemRemovingEventArgs args ) : void
args ItemRemovingEventArgs Event arguments.
리턴 void

RemoveItem() 보호된 메소드

Remove specified item.

The event ItemRemoving is raised prior to removing item and allows removal to be cancelled.

protected RemoveItem ( IReorderableListAdaptor adaptor, int itemIndex ) : bool
adaptor IReorderableListAdaptor Reorderable list adaptor.
itemIndex int Zero-based index of item.
리턴 bool

ReorderableListControl() 공개 메소드

Initializes a new instance of ReorderableListControl.
public ReorderableListControl ( ReorderableListFlags flags ) : System
flags ReorderableListFlags /// Optional flags which affect behavior of control. ///
리턴 System

프로퍼티 상세

AnchorBackgroundColor 공개적으로 정적으로 프로퍼티

Background color of anchor list item.
public static Color AnchorBackgroundColor
리턴 Color

TargetBackgroundColor 공개적으로 정적으로 프로퍼티

Background color of target slot when dragging list item.
public static Color TargetBackgroundColor
리턴 Color

addButtonStyle 공개적으로 프로퍼티

public GUIStyle,UnityEngine addButtonStyle
리턴 UnityEngine.GUIStyle

commandClearAll 보호되어 있는 정적으로 프로퍼티

Content for "Clear All" command.
protected static GUIContent,UnityEngine commandClearAll
리턴 UnityEngine.GUIContent

commandDuplicate 보호되어 있는 정적으로 프로퍼티

Content for "Duplicate" command.
protected static GUIContent,UnityEngine commandDuplicate
리턴 UnityEngine.GUIContent

commandInsertAbove 보호되어 있는 정적으로 프로퍼티

Content for "Insert Above" command.
protected static GUIContent,UnityEngine commandInsertAbove
리턴 UnityEngine.GUIContent

commandInsertBelow 보호되어 있는 정적으로 프로퍼티

Content for "Insert Below" command.
protected static GUIContent,UnityEngine commandInsertBelow
리턴 UnityEngine.GUIContent

commandMoveToBottom 보호되어 있는 정적으로 프로퍼티

Content for "Move to Bottom" command.
protected static GUIContent,UnityEngine commandMoveToBottom
리턴 UnityEngine.GUIContent

commandMoveToTop 보호되어 있는 정적으로 프로퍼티

Content for "Move to Top" command.
protected static GUIContent,UnityEngine commandMoveToTop
리턴 UnityEngine.GUIContent

commandRemove 보호되어 있는 정적으로 프로퍼티

Content for "Remove" command.
protected static GUIContent,UnityEngine commandRemove
리턴 UnityEngine.GUIContent

containerStyle 공개적으로 프로퍼티

public GUIStyle,UnityEngine containerStyle
리턴 UnityEngine.GUIStyle

defaultContextHandler 보호되어 있는 정적으로 프로퍼티

Default functionality to handle context command.
protected static GenericMenu.MenuFunction2 defaultContextHandler
리턴 GenericMenu.MenuFunction2

removeButtonStyle 공개적으로 프로퍼티

public GUIStyle,UnityEngine removeButtonStyle
리턴 UnityEngine.GUIStyle