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

base class for every window. It contains all methods needed for basic window management like - initialization - deitialization - render itself onscreen - processing actions like keypresses, mouse clicks/movements - processing messages Each window plugin should derive from this base class Pluginwindows should be copied in the plugins/windows folder
상속: ISupportInitialize, IDisposable
파일 보기 프로젝트 열기: MediaPortal/MediaPortal-1 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
_mainThreadContext System.Threading.SynchronizationContext

보호된 프로퍼티들

프로퍼티 타입 설명
_autoHideTopbar bool
_autoHideTopbarType AutoHideTopBar
_defaultControlId int
_disableTopBar bool
_isOverlayAllowed bool
_isOverlayAllowedCondition int
_isOverlayAllowedOriginalCondition int
_listPositions List
_loadParameter string
_loadSkinDone bool
_shouldRestore bool
_volumeOverlayOffsetX int
_volumeOverlayOffsetY int
_windowXmlFileName string

공개 메소드들

메소드 설명
Add ( GUIControl &control ) : void

add a new control to this window

AllocResources ( ) : void

Gets called by the runtime just before the window gets shown. It will ask every control of the window to allocate its (directx) resources

BeginInit ( ) : void
Clear ( ) : void

Clear() method. This method gets called when user switches skin. It removes any static vars the GUIWindow class has

ClearAll ( ) : void

remove all controls from the window

DeInit ( ) : void

Gets called by the runtime when a window will be destroyed Every window window should override this method and cleanup any resources

Dispose ( ) : void

Gets called by the runtime when the window is not longer shown. It will ask every control of the window 2 free its (directx) resources

DoRestoreSkin ( ) : void
EndInit ( ) : void
GUIWindow ( ) : System

The (empty) constructor of the GUIWindow

GUIWindow ( string skinFile ) : System

Constructor

GetControl ( int iControlId ) : GUIControl

get a control by the control ID

GetFocusControlId ( ) : int

returns the ID of the control which has the focus

GetModuleName ( ) : string
InWindow ( int x, int y ) : bool
Init ( ) : bool

Gets called by the runtime when a new window has been created Every window window should override this method and load itself by calling the Load() method

InitControls ( ) : void

This method will call the OnInit() on each control belonging to this window this gives the control a way to do some pre-initalisation stuff

IsInstance ( Object obj ) : bool
Load ( string skinFileName ) : bool

Load the XML file for this window which contains a definition of which controls the GUI has

LoadSkin ( ) : bool
LoadSkinBool ( ) : bool

Loads the xml file for the window.

LoadSkinThreaded ( int p1, int p2, object s ) : int
LooseFocus ( ) : void

This method will remove the focus from the currently focused control

NeedRefresh ( ) : bool

NeedRefresh() can be called to see if the windows 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 window can respond to any action

OnAdded ( ) : void
OnDeviceLost ( ) : void

Gets called when DirectX device has been lost. Any texture/font is now invalid

OnDeviceRestored ( ) : void

Gets called when DirectX device has been restored.

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 window can respond to the messages of its controls

PreInit ( ) : void

This function gets called once by the runtime when everything is up & running directX is now initialized, but before the first window is activated. It gives the window the oppertunity to allocate any (directx) resources it may need

Process ( ) : void
QueueAnimation ( AnimationType animType ) : void
Remove ( int dwId ) : void

remove a control by its id from this window

Render ( float timePassed ) : void

Render() method. This method draws the window by asking every control of the window to render itself

ResetAllControls ( ) : void

Resets all the controls to their original positions, width and height

Restore ( ) : void

Restores all the (x,y) positions of the XML file to their original values

RestoreControlPosition ( int iControl ) : void

Restores the position of the control to its default position.

SendToFront ( GUIControl &ctrl ) : void

Move the control with the specified id to the end of the control list (will render last; in front of other controls).

SetObject ( object obj ) : void
UpdateOverlay ( ) : void

Restores window overlay status to default value from skin condition

UpdateVisibility ( ) : void

calls UpdateVisibility for all children components (also used for allowing to switch focus to a component that can only be focused if the current component is not active)

보호된 메소드들

메소드 설명
DeInitControls ( ) : void
IsAnimating ( AnimationType animType ) : bool
LoadControl ( XmlNode node, string>.IDictionary defines ) : void

This method will load a single control from the xml node

OnClicked ( int controlId, GUIControl control, Action actionType ) : void
OnClickedDown ( int controlId, GUIControl control, Action actionType ) : void
OnClickedUp ( int controlId, GUIControl control, Action actionType ) : void
OnMouseClick ( int posX, int posY, Action action ) : void
OnMouseMove ( int cx, int cy, Action action ) : void
OnPageDestroy ( int newWindowId ) : void
OnPageLoad ( ) : void
OnPreviousWindow ( ) : void
OnShowContextMenu ( ) : void
OnWindowLoaded ( ) : void

Gets by the window manager when it has loaded the window default implementation stores the position of all controls in _listPositions

PreLoadPage ( ) : void

비공개 메소드들

메소드 설명
AnimationTrigger ( GUIMessage message ) : void
FreeResources ( ) : void
HasAnimation ( AnimationType animType ) : bool
LoadDefines ( XmlDocument document ) : string>.IDictionary
LoadInclude ( XmlNode node, string>.IDictionary defines ) : bool
RenderAnimation ( uint time ) : bool
SetControlVisibility ( ) : void
SetInitialOverlayAllowed ( ) : void
TemporaryAnimationTrigger ( ) : void
UpdateOverlayAllowed ( ) : void
UpdateOverlayAllowed ( bool useOriginal ) : void
UpdateStates ( AnimationType type, AnimationProcess currentProcess, AnimationState currentState ) : void

메소드 상세

Add() 공개 메소드

add a new control to this window
public Add ( GUIControl &control ) : void
control GUIControl new control to add
리턴 void

AllocResources() 공개 메소드

Gets called by the runtime just before the window gets shown. It will ask every control of the window to allocate its (directx) resources
public AllocResources ( ) : void
리턴 void

BeginInit() 공개 메소드

public BeginInit ( ) : void
리턴 void

Clear() 공개 정적인 메소드

Clear() method. This method gets called when user switches skin. It removes any static vars the GUIWindow class has
public static Clear ( ) : void
리턴 void

ClearAll() 공개 메소드

remove all controls from the window
public ClearAll ( ) : void
리턴 void

DeInit() 공개 메소드

Gets called by the runtime when a window will be destroyed Every window window should override this method and cleanup any resources
public DeInit ( ) : void
리턴 void

DeInitControls() 보호된 메소드

protected DeInitControls ( ) : void
리턴 void

Dispose() 공개 메소드

Gets called by the runtime when the window is not longer shown. It will ask every control of the window 2 free its (directx) resources
public Dispose ( ) : void
리턴 void

DoRestoreSkin() 공개 메소드

public DoRestoreSkin ( ) : void
리턴 void

EndInit() 공개 메소드

public EndInit ( ) : void
리턴 void

GUIWindow() 공개 메소드

The (empty) constructor of the GUIWindow
public GUIWindow ( ) : System
리턴 System

GUIWindow() 공개 메소드

Constructor
public GUIWindow ( string skinFile ) : System
skinFile string filename of xml skin file which belongs to this window
리턴 System

GetControl() 공개 메소드

get a control by the control ID
public GetControl ( int iControlId ) : GUIControl
iControlId int id of control
리턴 GUIControl

GetFocusControlId() 공개 메소드

returns the ID of the control which has the focus
public GetFocusControlId ( ) : int
리턴 int

GetModuleName() 공개 메소드

public GetModuleName ( ) : string
리턴 string

InWindow() 공개 메소드

public InWindow ( int x, int y ) : bool
x int
y int
리턴 bool

Init() 공개 메소드

Gets called by the runtime when a new window has been created Every window window should override this method and load itself by calling the Load() method
public Init ( ) : bool
리턴 bool

InitControls() 공개 메소드

This method will call the OnInit() on each control belonging to this window this gives the control a way to do some pre-initalisation stuff
public InitControls ( ) : void
리턴 void

IsAnimating() 보호된 메소드

protected IsAnimating ( AnimationType animType ) : bool
animType AnimationType
리턴 bool

IsInstance() 공개 메소드

public IsInstance ( Object obj ) : bool
obj Object
리턴 bool

Load() 공개 메소드

Load the XML file for this window which contains a definition of which controls the GUI has
public Load ( string skinFileName ) : bool
skinFileName string filename of the .xml file
리턴 bool

LoadControl() 보호된 메소드

This method will load a single control from the xml node
protected LoadControl ( XmlNode node, string>.IDictionary defines ) : void
node System.Xml.XmlNode XmlNode describing the control
defines string>.IDictionary on return this will contain an arraylist of all controls loaded
리턴 void

LoadSkin() 공개 메소드

public LoadSkin ( ) : bool
리턴 bool

LoadSkinBool() 공개 메소드

Loads the xml file for the window.
public LoadSkinBool ( ) : bool
리턴 bool

LoadSkinThreaded() 공개 메소드

public LoadSkinThreaded ( int p1, int p2, object s ) : int
p1 int
p2 int
s object
리턴 int

LooseFocus() 공개 메소드

This method will remove the focus from the currently focused control
public LooseFocus ( ) : void
리턴 void

NeedRefresh() 공개 메소드

NeedRefresh() can be called to see if the windows 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 window can respond to any action
public OnAction ( Action action ) : void
action Action action : contains the action
리턴 void

OnAdded() 공개 메소드

public OnAdded ( ) : void
리턴 void

OnClicked() 보호된 메소드

protected OnClicked ( int controlId, GUIControl control, Action actionType ) : void
controlId int
control GUIControl
actionType Action
리턴 void

OnClickedDown() 보호된 메소드

protected OnClickedDown ( int controlId, GUIControl control, Action actionType ) : void
controlId int
control GUIControl
actionType Action
리턴 void

OnClickedUp() 보호된 메소드

protected OnClickedUp ( int controlId, GUIControl control, Action actionType ) : void
controlId int
control GUIControl
actionType Action
리턴 void

OnDeviceLost() 공개 메소드

Gets called when DirectX device has been lost. Any texture/font is now invalid
public OnDeviceLost ( ) : void
리턴 void

OnDeviceRestored() 공개 메소드

Gets called when DirectX device has been restored.
public OnDeviceRestored ( ) : 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 window can respond to the messages of its controls
public OnMessage ( GUIMessage message ) : bool
message GUIMessage
리턴 bool

OnMouseClick() 보호된 메소드

protected OnMouseClick ( int posX, int posY, Action action ) : void
posX int
posY int
action Action
리턴 void

OnMouseMove() 보호된 메소드

protected OnMouseMove ( int cx, int cy, Action action ) : void
cx int
cy int
action Action
리턴 void

OnPageDestroy() 보호된 메소드

protected OnPageDestroy ( int newWindowId ) : void
newWindowId int
리턴 void

OnPageLoad() 보호된 메소드

protected OnPageLoad ( ) : void
리턴 void

OnPreviousWindow() 보호된 메소드

protected OnPreviousWindow ( ) : void
리턴 void

OnShowContextMenu() 보호된 메소드

protected OnShowContextMenu ( ) : void
리턴 void

OnWindowLoaded() 보호된 메소드

Gets by the window manager when it has loaded the window default implementation stores the position of all controls in _listPositions
protected OnWindowLoaded ( ) : void
리턴 void

PreInit() 공개 메소드

This function gets called once by the runtime when everything is up & running directX is now initialized, but before the first window is activated. It gives the window the oppertunity to allocate any (directx) resources it may need
public PreInit ( ) : void
리턴 void

PreLoadPage() 보호된 메소드

protected PreLoadPage ( ) : void
리턴 void

Process() 공개 메소드

public Process ( ) : void
리턴 void

QueueAnimation() 공개 메소드

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

Remove() 공개 메소드

remove a control by its id from this window
public Remove ( int dwId ) : void
dwId int ID of the control
리턴 void

Render() 공개 메소드

Render() method. This method draws the window by asking every control of the window to render itself
public Render ( float timePassed ) : void
timePassed float
리턴 void

ResetAllControls() 공개 메소드

Resets all the controls to their original positions, width and height
public ResetAllControls ( ) : void
리턴 void

Restore() 공개 메소드

Restores all the (x,y) positions of the XML file to their original values
public Restore ( ) : void
리턴 void

RestoreControlPosition() 공개 메소드

Restores the position of the control to its default position.
public RestoreControlPosition ( int iControl ) : void
iControl int The identifier of the control that needs to be restored.
리턴 void

SendToFront() 공개 메소드

Move the control with the specified id to the end of the control list (will render last; in front of other controls).
public SendToFront ( GUIControl &ctrl ) : void
ctrl GUIControl ID of the control
리턴 void

SetObject() 공개 메소드

public SetObject ( object obj ) : void
obj object
리턴 void

UpdateOverlay() 공개 메소드

Restores window overlay status to default value from skin condition
public UpdateOverlay ( ) : void
리턴 void

UpdateVisibility() 공개 메소드

calls UpdateVisibility for all children components (also used for allowing to switch focus to a component that can only be focused if the current component is not active)
public UpdateVisibility ( ) : void
리턴 void

프로퍼티 상세

_autoHideTopbar 보호되어 있는 프로퍼티

protected bool _autoHideTopbar
리턴 bool

_autoHideTopbarType 보호되어 있는 프로퍼티

protected AutoHideTopBar _autoHideTopbarType
리턴 AutoHideTopBar

_defaultControlId 보호되어 있는 프로퍼티

protected int _defaultControlId
리턴 int

_disableTopBar 보호되어 있는 프로퍼티

protected bool _disableTopBar
리턴 bool

_isOverlayAllowed 보호되어 있는 프로퍼티

protected bool _isOverlayAllowed
리턴 bool

_isOverlayAllowedCondition 보호되어 있는 프로퍼티

protected int _isOverlayAllowedCondition
리턴 int

_isOverlayAllowedOriginalCondition 보호되어 있는 프로퍼티

protected int _isOverlayAllowedOriginalCondition
리턴 int

_listPositions 보호되어 있는 프로퍼티

protected List _listPositions
리턴 List

_loadParameter 보호되어 있는 프로퍼티

protected string _loadParameter
리턴 string

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

protected static bool _loadSkinDone
리턴 bool

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

public static SynchronizationContext,System.Threading _mainThreadContext
리턴 System.Threading.SynchronizationContext

_shouldRestore 보호되어 있는 프로퍼티

protected bool _shouldRestore
리턴 bool

_volumeOverlayOffsetX 보호되어 있는 프로퍼티

protected int _volumeOverlayOffsetX
리턴 int

_volumeOverlayOffsetY 보호되어 있는 프로퍼티

protected int _volumeOverlayOffsetY
리턴 int

_windowXmlFileName 보호되어 있는 프로퍼티

protected string _windowXmlFileName
리턴 string