C# 클래스 MediaPortal.GUI.Library.GUIControl

Base class for GUIControls.
상속: GUIBaseControl, IDisposable
파일 보기 프로젝트 열기: MediaPortal/MediaPortal-1 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_calibration bool
_data object
_isAnimating bool
_isDimmed bool
_isSelected bool
_originalDiffuseColor long
_originalRectangle Rectangle
_parentControl GUIControl
_parentControlId int
_selectedItem int
_subItemList ArrayList
_windowId int

Private Properties

프로퍼티 타입 설명
CalcBearing double
CalcDistance double
FlattenHierarchy System.Collections.ArrayList
FlattenHierarchy void
FreeResources void
Navigate int
UpdateStates void

공개 메소드들

메소드 설명
AddAnimations ( List animations ) : void
AddItemLabelControl ( int iWindowId, int iControlId, string strLabel ) : void

Sends a GUI_MSG_LABEL_ADD message to a control (Add an ItemLabel to a control).

AddListItemControl ( int iWindowId, int iControlId, GUIListItem item ) : void

Sends a GUI_MSG_LABEL_ADD message to a control (Add a ListItem to a control).

AddSubItem ( object obj ) : void

Add an subitem to a control

AllocResources ( ) : void

Allocates the control its DirectX resources.

Animate ( float timePassed, MediaPortal.GUI.Library.Animator animator ) : void

Method to get animate the current control

CanFocus ( ) : bool

Checks if the control can focus.

ClearControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_LABEL_RESET message to a control (Clears a control).

DeSelectControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_DESELECTED message to a control (Deselect a control).

DisableControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_DISABLED message to a control (Disables a control).

Dispose ( ) : void

Frees the control its DirectX resources.

DoRender ( float timePassed, uint currentTime ) : void
DoUpdate ( ) : void
EnableControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_ENABLED message to a control (Enables a control).

FinalizeConstruction ( ) : void

This function is called after all of the XmlSkinnable fields have been filled with appropriate data. Use this to do any construction work other than simple data member assignments, for example, initializing new reference types, extra calculations, etc..

FocusControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_SETFOCUS message to a control (Set the focus on a control).

FocusControl ( int iWindowId, int iControlId, Direction direction ) : void
FocusItemControl ( int iWindowId, int iControlId, int iItem ) : void

Sends a GUI_MSG_ITEM_FOCUS message to a control (set item in control to selected state).

GUIControl ( ) : System

empty constructor

GUIControl ( int dwParentID ) : System

The basic constructur of the GUIControl class.

GUIControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight ) : System

The constructor of the GUIControl class.

GetAnimation ( AnimationType type, bool checkConditions ) : VisualEffect
GetAnimations ( AnimationType type, bool checkConditions ) : List
GetCenter ( float &centerX, float &centerY ) : void
GetControlById ( int ID ) : GUIControl

Property to get the control for a specific control ID

GetItemCount ( int lWindowId, int iControlId ) : int

Sends a GUI_MSG_ITEMS message to a control (Gets the number of Items in a control).

GetListItem ( int lWindowId, int iControlId, int iItem ) : GUIListItem

Sends a GUI_MSG_GET_ITEM message to a control (Gets a GUIListItem based on the lWindowId, iControlId, iItem parameters).

GetRect ( int &x, int &y, int &width, int &height ) : void

Method to get the rectangle of the current control

GetSelectedListItem ( int lWindowId, int iControlId ) : GUIListItem

Sends a GUI_MSG_GET_SELECTED_ITEM message to a control (Gets the selected GUIListItem based on the lWindowId, iControlId).

GetSubItem ( int index ) : object

Property to get a subitem

GetVisibleCondition ( ) : int
HideControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_HIDDEN message to a control (Hide a control).

HitTest ( int x, int y, int &controlID, bool &focused ) : bool

Checks if the x and y coordinates correspond to the current control.

InControl ( int x, int y, int &controlID ) : bool

Method which determines of the coordinate(x,y) is within the current control

IsEffectAnimating ( AnimationType animType ) : bool
LoadAnimationControl ( int parentID, int controlId, int posX, int posY, int width, int height, string texture ) : GUIAnimation
LoadControl ( string xmlFilename ) : List
NeedRefresh ( ) : bool

NeedRefresh() can be called to see if the control needs 2 redraw itself or not some controls (for example the fadelabel) contain scrolling texts and need 2 ne re-rendered constantly

OnAction ( Action action ) : void

OnAction() method. This method gets called when there's a new action like a keypress or mousemove or... By overriding this method, the control can respond to any action

OnDeInit ( ) : void

Virtual method. This method gets called when the control is de-initialized and allows it to do any de-initalization

OnInit ( ) : void

Virtual method. This method gets called when the control is initialized and allows it to do any initalization

OnMessage ( GUIMessage message ) : bool

OnMessage() This method gets called when there's a new message. Controls send messages to notify their parents about their state (changes) By overriding this method a control can respond to the messages of its controls

PreAllocResources ( ) : void

Preallocates the control its DirectX resources.

QueueAnimation ( AnimationType animType ) : void
ReStorePosition ( ) : void

Method to restore the saved-current control rectangle

RefreshControl ( int iWindowId, int iControlId ) : void
RemoveSubItem ( int index ) : void

Remove an subitem from an control

RemoveSubItem ( object obj ) : void

Remove an subitem from an control

Render ( float timePassed ) : void

The default render method. This needs to be overwritten when inherited to give every control its specific look and feel.

ResetAnimations ( ) : void
ScaleToScreenResolution ( ) : void

Does any scaling on the inital size\position values to fit them to screen resolution.

SelectControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_SELECTED message to a control (Select a control).

SelectItemControl ( int iWindowId, int iControlId, int iItem ) : void

Sends a GUI_MSG_ITEM_SELECT message to a control (Select an item in a control).

SetAlpha ( int dwAlpha ) : void

Changes the alpha transparency component of the colordiffuse.

SetAnimations ( List animations ) : void
SetControlLabel ( int iWindowId, int iControlId, string strText ) : void

Sends a GUI_MSG_LABEL_SET message to a control (Set the label of a control).

SetInitialVisibility ( ) : void
SetNavigation ( int dwUp, int dwDown, int dwLeft, int dwRight ) : void

Set the up/down/left/right control

SetPosition ( int dwPosX, int dwPosY ) : void

Sets the position of the control.

SetSubItem ( int index, object o ) : void

Property to set an subitem

SetThumbAnimations ( List animations ) : void
SetVisibleCondition ( int visible, bool allowHiddenFocus ) : void
ShowControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_VISIBLE message to a control (Make a control visible).

StorePosition ( ) : void

Method to store(save) the current control rectangle

UnfocusControl ( int iWindowId, int iControlId ) : void

Sends a GUI_MSG_LOSTFOCUS message to a control (Set the focus on a control).

UpdateVisibility ( ) : void
getTransformMatrix ( uint currentTime ) : TransformMatrix

보호된 메소드들

메소드 설명
OnFocus ( ) : void
Update ( ) : void

Perform an update after a change has occured. E.g. change to a new position.

비공개 메소드들

메소드 설명
CalcBearing ( Drawing p1, Drawing p2 ) : double
CalcDistance ( Drawing p2, Drawing p1 ) : double
FlattenHierarchy ( ICollection elements ) : ArrayList
FlattenHierarchy ( ICollection collection, ArrayList targetList ) : void
FreeResources ( ) : void
Navigate ( Direction direction ) : int
UpdateStates ( AnimationType type, AnimationProcess currentProcess, AnimationState currentState ) : void

메소드 상세

AddAnimations() 공개 메소드

public AddAnimations ( List animations ) : void
animations List
리턴 void

AddItemLabelControl() 공개 정적인 메소드

Sends a GUI_MSG_LABEL_ADD message to a control (Add an ItemLabel to a control).
public static AddItemLabelControl ( int iWindowId, int iControlId, string strLabel ) : void
iWindowId int The SenderId.
iControlId int The target control.
strLabel string The text of the label that needs to be added.
리턴 void

AddListItemControl() 공개 정적인 메소드

Sends a GUI_MSG_LABEL_ADD message to a control (Add a ListItem to a control).
public static AddListItemControl ( int iWindowId, int iControlId, GUIListItem item ) : void
iWindowId int The SenderId.
iControlId int The target control.
item GUIListItem The item that needs to be added to the ListControl
리턴 void

AddSubItem() 공개 메소드

Add an subitem to a control
public AddSubItem ( object obj ) : void
obj object subitem
리턴 void

AllocResources() 공개 메소드

Allocates the control its DirectX resources.
public AllocResources ( ) : void
리턴 void

Animate() 공개 메소드

Method to get animate the current control
public Animate ( float timePassed, MediaPortal.GUI.Library.Animator animator ) : void
timePassed float
animator MediaPortal.GUI.Library.Animator
리턴 void

CanFocus() 공개 메소드

Checks if the control can focus.
public CanFocus ( ) : bool
리턴 bool

ClearControl() 공개 정적인 메소드

Sends a GUI_MSG_LABEL_RESET message to a control (Clears a control).
public static ClearControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

DeSelectControl() 공개 정적인 메소드

Sends a GUI_MSG_DESELECTED message to a control (Deselect a control).
public static DeSelectControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

DisableControl() 공개 정적인 메소드

Sends a GUI_MSG_DISABLED message to a control (Disables a control).
public static DisableControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

Dispose() 공개 메소드

Frees the control its DirectX resources.
public Dispose ( ) : void
리턴 void

DoRender() 공개 메소드

public DoRender ( float timePassed, uint currentTime ) : void
timePassed float
currentTime uint
리턴 void

DoUpdate() 공개 메소드

public DoUpdate ( ) : void
리턴 void

EnableControl() 공개 정적인 메소드

Sends a GUI_MSG_ENABLED message to a control (Enables a control).
public static EnableControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

FinalizeConstruction() 공개 메소드

This function is called after all of the XmlSkinnable fields have been filled with appropriate data. Use this to do any construction work other than simple data member assignments, for example, initializing new reference types, extra calculations, etc..
public FinalizeConstruction ( ) : void
리턴 void

FocusControl() 공개 정적인 메소드

Sends a GUI_MSG_SETFOCUS message to a control (Set the focus on a control).
public static FocusControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

FocusControl() 공개 정적인 메소드

public static FocusControl ( int iWindowId, int iControlId, Direction direction ) : void
iWindowId int
iControlId int
direction Direction
리턴 void

FocusItemControl() 공개 정적인 메소드

Sends a GUI_MSG_ITEM_FOCUS message to a control (set item in control to selected state).
public static FocusItemControl ( int iWindowId, int iControlId, int iItem ) : void
iWindowId int The SenderId.
iControlId int The target control.
iItem int The id of the item that should have the selected state.
리턴 void

GUIControl() 공개 메소드

empty constructor
public GUIControl ( ) : System
리턴 System

GUIControl() 공개 메소드

The basic constructur of the GUIControl class.
public GUIControl ( int dwParentID ) : System
dwParentID int
리턴 System

GUIControl() 공개 메소드

The constructor of the GUIControl class.
public GUIControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight ) : System
dwParentID int The id of the parent control.
dwControlId int The id of this control.
dwPosX int The X position on the screen of this control.
dwPosY int The Y position on the screen of this control.
dwWidth int The width of this control.
dwHeight int The height of this control.
리턴 System

GetAnimation() 공개 메소드

public GetAnimation ( AnimationType type, bool checkConditions ) : VisualEffect
type AnimationType
checkConditions bool
리턴 VisualEffect

GetAnimations() 공개 메소드

public GetAnimations ( AnimationType type, bool checkConditions ) : List
type AnimationType
checkConditions bool
리턴 List

GetCenter() 공개 메소드

public GetCenter ( float &centerX, float &centerY ) : void
centerX float
centerY float
리턴 void

GetControlById() 공개 메소드

Property to get the control for a specific control ID
public GetControlById ( int ID ) : GUIControl
ID int Id of wanted control
리턴 GUIControl

GetItemCount() 공개 정적인 메소드

Sends a GUI_MSG_ITEMS message to a control (Gets the number of Items in a control).
public static GetItemCount ( int lWindowId, int iControlId ) : int
lWindowId int
iControlId int The target control.
리턴 int

GetListItem() 공개 정적인 메소드

Sends a GUI_MSG_GET_ITEM message to a control (Gets a GUIListItem based on the lWindowId, iControlId, iItem parameters).
public static GetListItem ( int lWindowId, int iControlId, int iItem ) : GUIListItem
lWindowId int
iControlId int The target control.
iItem int The item id of the item that needs to be returned.
리턴 GUIListItem

GetRect() 공개 메소드

Method to get the rectangle of the current control
public GetRect ( int &x, int &y, int &width, int &height ) : void
x int
y int
width int
height int
리턴 void

GetSelectedListItem() 공개 정적인 메소드

Sends a GUI_MSG_GET_SELECTED_ITEM message to a control (Gets the selected GUIListItem based on the lWindowId, iControlId).
public static GetSelectedListItem ( int lWindowId, int iControlId ) : GUIListItem
lWindowId int
iControlId int The target control.
리턴 GUIListItem

GetSubItem() 공개 메소드

Property to get a subitem
public GetSubItem ( int index ) : object
index int index
리턴 object

GetVisibleCondition() 공개 메소드

public GetVisibleCondition ( ) : int
리턴 int

HideControl() 공개 정적인 메소드

Sends a GUI_MSG_HIDDEN message to a control (Hide a control).
public static HideControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

HitTest() 공개 메소드

Checks if the x and y coordinates correspond to the current control.
public HitTest ( int x, int y, int &controlID, bool &focused ) : bool
x int The x coordinate.
y int The y coordinate.
controlID int
focused bool
리턴 bool

InControl() 공개 메소드

Method which determines of the coordinate(x,y) is within the current control
public InControl ( int x, int y, int &controlID ) : bool
x int x coordinate
y int y coordiate
controlID int return id of control if coordinate is within control
리턴 bool

IsEffectAnimating() 공개 메소드

public IsEffectAnimating ( AnimationType animType ) : bool
animType AnimationType
리턴 bool

LoadAnimationControl() 공개 메소드

public LoadAnimationControl ( int parentID, int controlId, int posX, int posY, int width, int height, string texture ) : GUIAnimation
parentID int
controlId int
posX int
posY int
width int
height int
texture string
리턴 GUIAnimation

LoadControl() 공개 메소드

public LoadControl ( string xmlFilename ) : List
xmlFilename string
리턴 List

NeedRefresh() 공개 메소드

NeedRefresh() can be called to see if the control needs 2 redraw itself or not some controls (for example the fadelabel) contain scrolling texts and need 2 ne re-rendered constantly
public NeedRefresh ( ) : bool
리턴 bool

OnAction() 공개 메소드

OnAction() method. This method gets called when there's a new action like a keypress or mousemove or... By overriding this method, the control can respond to any action
public OnAction ( Action action ) : void
action Action action : contains the action
리턴 void

OnDeInit() 공개 메소드

Virtual method. This method gets called when the control is de-initialized and allows it to do any de-initalization
public OnDeInit ( ) : void
리턴 void

OnFocus() 보호된 메소드

protected OnFocus ( ) : void
리턴 void

OnInit() 공개 메소드

Virtual method. This method gets called when the control is initialized and allows it to do any initalization
public OnInit ( ) : void
리턴 void

OnMessage() 공개 메소드

OnMessage() This method gets called when there's a new message. Controls send messages to notify their parents about their state (changes) By overriding this method a control can respond to the messages of its controls
public OnMessage ( GUIMessage message ) : bool
message GUIMessage message : contains the message
리턴 bool

PreAllocResources() 공개 메소드

Preallocates the control its DirectX resources.
public PreAllocResources ( ) : void
리턴 void

QueueAnimation() 공개 메소드

public QueueAnimation ( AnimationType animType ) : void
animType AnimationType
리턴 void

ReStorePosition() 공개 메소드

Method to restore the saved-current control rectangle
public ReStorePosition ( ) : void
리턴 void

RefreshControl() 공개 정적인 메소드

public static RefreshControl ( int iWindowId, int iControlId ) : void
iWindowId int
iControlId int
리턴 void

RemoveSubItem() 공개 메소드

Remove an subitem from an control
public RemoveSubItem ( int index ) : void
index int
리턴 void

RemoveSubItem() 공개 메소드

Remove an subitem from an control
public RemoveSubItem ( object obj ) : void
obj object subitem
리턴 void

Render() 공개 메소드

The default render method. This needs to be overwritten when inherited to give every control its specific look and feel.
public Render ( float timePassed ) : void
timePassed float
리턴 void

ResetAnimations() 공개 메소드

public ResetAnimations ( ) : void
리턴 void

ScaleToScreenResolution() 공개 메소드

Does any scaling on the inital size\position values to fit them to screen resolution.
public ScaleToScreenResolution ( ) : void
리턴 void

SelectControl() 공개 정적인 메소드

Sends a GUI_MSG_SELECTED message to a control (Select a control).
public static SelectControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

SelectItemControl() 공개 정적인 메소드

Sends a GUI_MSG_ITEM_SELECT message to a control (Select an item in a control).
public static SelectItemControl ( int iWindowId, int iControlId, int iItem ) : void
iWindowId int The SenderId.
iControlId int The target control.
iItem int The id of the item that is selected on the control.
리턴 void

SetAlpha() 공개 메소드

Changes the alpha transparency component of the colordiffuse.
public SetAlpha ( int dwAlpha ) : void
dwAlpha int
리턴 void

SetAnimations() 공개 메소드

public SetAnimations ( List animations ) : void
animations List
리턴 void

SetControlLabel() 공개 정적인 메소드

Sends a GUI_MSG_LABEL_SET message to a control (Set the label of a control).
public static SetControlLabel ( int iWindowId, int iControlId, string strText ) : void
iWindowId int The SenderId.
iControlId int The target control.
strText string The text that needs to be set on the target label.
리턴 void

SetInitialVisibility() 공개 메소드

public SetInitialVisibility ( ) : void
리턴 void

SetNavigation() 공개 메소드

Set the up/down/left/right control
public SetNavigation ( int dwUp, int dwDown, int dwLeft, int dwRight ) : void
dwUp int The control above this control.
dwDown int The control under this control.
dwLeft int The control left to this control.
dwRight int The control right to this control.
리턴 void

SetPosition() 공개 메소드

Sets the position of the control.
public SetPosition ( int dwPosX, int dwPosY ) : void
dwPosX int The X position.
dwPosY int The Y position.
리턴 void

SetSubItem() 공개 메소드

Property to set an subitem
public SetSubItem ( int index, object o ) : void
index int index
o object subitem
리턴 void

SetThumbAnimations() 공개 메소드

public SetThumbAnimations ( List animations ) : void
animations List
리턴 void

SetVisibleCondition() 공개 메소드

public SetVisibleCondition ( int visible, bool allowHiddenFocus ) : void
visible int
allowHiddenFocus bool
리턴 void

ShowControl() 공개 정적인 메소드

Sends a GUI_MSG_VISIBLE message to a control (Make a control visible).
public static ShowControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

StorePosition() 공개 메소드

Method to store(save) the current control rectangle
public StorePosition ( ) : void
리턴 void

UnfocusControl() 공개 정적인 메소드

Sends a GUI_MSG_LOSTFOCUS message to a control (Set the focus on a control).
public static UnfocusControl ( int iWindowId, int iControlId ) : void
iWindowId int The SenderId.
iControlId int The target control.
리턴 void

Update() 보호된 메소드

Perform an update after a change has occured. E.g. change to a new position.
protected Update ( ) : void
리턴 void

UpdateVisibility() 공개 메소드

public UpdateVisibility ( ) : void
리턴 void

getTransformMatrix() 공개 메소드

public getTransformMatrix ( uint currentTime ) : TransformMatrix
currentTime uint
리턴 TransformMatrix

프로퍼티 상세

_calibration 보호되어 있는 프로퍼티

protected bool _calibration
리턴 bool

_data 보호되어 있는 프로퍼티

protected object _data
리턴 object

_isAnimating 보호되어 있는 프로퍼티

protected bool _isAnimating
리턴 bool

_isDimmed 보호되어 있는 프로퍼티

protected bool _isDimmed
리턴 bool

_isSelected 보호되어 있는 프로퍼티

protected bool _isSelected
리턴 bool

_originalDiffuseColor 보호되어 있는 프로퍼티

protected long _originalDiffuseColor
리턴 long

_originalRectangle 보호되어 있는 프로퍼티

protected Rectangle _originalRectangle
리턴 Rectangle

_parentControl 보호되어 있는 프로퍼티

protected GUIControl _parentControl
리턴 GUIControl

_parentControlId 보호되어 있는 프로퍼티

protected int _parentControlId
리턴 int

_selectedItem 보호되어 있는 프로퍼티

protected int _selectedItem
리턴 int

_subItemList 보호되어 있는 프로퍼티

protected ArrayList _subItemList
리턴 ArrayList

_windowId 보호되어 있는 프로퍼티

protected int _windowId
리턴 int