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

static class which takes care of window management Things done are: - loading and initializing all windows - routing messages, key presses, mouse clicks etc to the currently active window - rendering the currently active window - methods for switching to the previous window - methods to switch to another window
파일 보기 프로젝트 열기: MediaPortal/MediaPortal-1

공개 메소드들

메소드 설명
ActivateWindow ( int windowId ) : void

ActivateWindow() This function will show/present/activate the window specified

ActivateWindow ( int windowId, String loadParameter ) : void

This function will show/present/activate the window specified and pass a parameter to the window.

ActivateWindow ( int windowId, String loadParameter, bool replaceWindow ) : void

This function will show/present/activate the window specified and pass a parameter to the window.

ActivateWindow ( int windowId, bool replaceWindow ) : void

ActivateWindow() This function will show/present/activate and replace current window with the window specified

ActivateWindow ( int windowId, bool replaceWindow, bool skipAnimation, int focusControlId ) : void

ActivateWindow() This function will show/present/activate and replace current window with the window specified.

Add ( GUIWindow &Window ) : void

Add new window to the window manager

Clear ( ) : void

Removes all windows

CloseCurrentWindow ( ) : void

Close current window. When MediaPortal closes we need to close current window

DispatchThreadMessages ( ) : void

process the thread messages and actions This method gets called by the main thread only and ensures that all messages & actions are handled by 1 thread only

Dispose ( ) : void

Asks all windows to cleanup their resources

GetPreviousActiveWindow ( ) : int
GetWindow ( int dwID ) : GUIWindow

GetWindow() returns the window with the specified ID

HasPreviousWindow ( ) : bool

Checks if ShowPreviousWindow could activate a previous window. If no, then there is no previous window.

Initialize ( ) : void

Initialize the window manager

MadVrProcess ( ) : void

MyInterfaceFilter ( Type typeObj, Object criteriaObj ) : bool
NeedRefresh ( ) : bool

returns true if current window wants to refresh/redraw itself other wise false

OnAction ( Action action ) : void

This method will handle a given action. Its called by the process() function The window manager will give the action to the current active window 2 handle

OnDeviceRestored ( ) : void

called by the runtime when DirectX device has been restored Just let current active window know about this so they can re-allocate their directx resources

OnResize ( ) : void

OnResize() will restore all the positions of all controls of all windows to their original values as specified in the skin files

PreInit ( ) : void

Call preinit for every window 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

ProcessWindows ( ) : void

This method will call the process() method on the currently active window This method gets calle on a regular basis and allows the window todo some stuff without any user action necessary

Render ( float timePassed ) : void

Render() ask the current active window to render itself

Replace ( int windowId, GUIWindow window ) : void
ReplaceWindow ( int windowId ) : void

ReplaceWindow() This function will replace current window with specified window

ResetAllControls ( ) : void

call ResetallControls() for every window This will cause each control to use the default position, width and size as mentioned in the skin files

ResetWindowsHistory ( ) : void
RouteToWindow ( int dialogId ) : void
SendMessage ( GUIMessage message ) : void

Send message to a window/control

SendThreadCallback ( Callback callback, int param1, int param2, object data ) : void
SendThreadCallbackAndWait ( Callback callback, int param1, int param2, object data ) : int

This function can be used to call a callback within the context of the message processing thread. The function waits until the message thread has picked up and executed the callback. This function is also safe if the current thread is the message processing thread.

SendThreadCallbackSkin ( Callback callback, int param1, int param2, object data ) : int
SendThreadMessage ( GUIMessage message ) : void

send thread message. Same as sendmessage() however message is placed on a queue which is processed later.

ShowPreviousWindow ( ) : void

Show previous window. When user goes back (ESC) this function will show the previous active window

ShowWarning ( int iHeading, int iLine1, int iLine2 ) : void

This method will show a warning dialog onscreen and returns when the user has clicked the dialog away

UnRoute ( ) : void

tell the window manager to unroute the current routing

비공개 메소드들

메소드 설명
ActivateWindow ( int newWindowId, bool replaceWindow, bool skipHistory, String loadParameter ) : void
ActivateWindow ( int newWindowId, bool replaceWindow, bool skipHistory, String loadParameter, bool skipAnimation, int focusControlId ) : void
AddNewWindowToHistory ( int WindowId ) : void
CallbackMsg ( GUIMessage msg ) : void
GUIWindowManager ( ) : System
GetWindow ( int dwID, bool tryRestoreSkin ) : GUIWindow
LockAndDoOnAllRegisteredWindows ( Action toDo ) : void
OnActionReceived ( Action action ) : void

event handler which is called by GUIGraphicsContext when a new action has occurred The method will add the action to a list which is processed later on in the process () function The reason for this is that multiple threads can add new action and they should only be processed by the main thread

RemoveDoubleHistory ( int newWindow ) : void
StartFrameClock ( ) : void
StartMadVrFrameClock ( ) : void
WaitForFrameClock ( ) : void
WaitForMadVrFrameClock ( ) : void

메소드 상세

ActivateWindow() 공개 정적인 메소드

ActivateWindow() This function will show/present/activate the window specified
public static ActivateWindow ( int windowId ) : void
windowId int
리턴 void

ActivateWindow() 공개 정적인 메소드

This function will show/present/activate the window specified and pass a parameter to the window.
public static ActivateWindow ( int windowId, String loadParameter ) : void
windowId int window id of the window to activate
loadParameter String a parameter string to pass to the new window
리턴 void

ActivateWindow() 공개 정적인 메소드

This function will show/present/activate the window specified and pass a parameter to the window.
public static ActivateWindow ( int windowId, String loadParameter, bool replaceWindow ) : void
windowId int window id of the window to activate
loadParameter String a parameter string to pass to the new window
replaceWindow bool
리턴 void

ActivateWindow() 공개 정적인 메소드

ActivateWindow() This function will show/present/activate and replace current window with the window specified
public static ActivateWindow ( int windowId, bool replaceWindow ) : void
windowId int
replaceWindow bool
리턴 void

ActivateWindow() 공개 정적인 메소드

ActivateWindow() This function will show/present/activate and replace current window with the window specified.
public static ActivateWindow ( int windowId, bool replaceWindow, bool skipAnimation, int focusControlId ) : void
windowId int window id of the window to activate
replaceWindow bool replace current window
skipAnimation bool do not perform open and close animation during this activation
focusControlId int focus on this control rather than the window default
리턴 void

Add() 공개 정적인 메소드

Add new window to the window manager
public static Add ( GUIWindow &Window ) : void
Window GUIWindow new window to add
리턴 void

Clear() 공개 정적인 메소드

Removes all windows
public static Clear ( ) : void
리턴 void

CloseCurrentWindow() 공개 정적인 메소드

Close current window. When MediaPortal closes we need to close current window
public static CloseCurrentWindow ( ) : void
리턴 void

DispatchThreadMessages() 공개 정적인 메소드

process the thread messages and actions This method gets called by the main thread only and ensures that all messages & actions are handled by 1 thread only
public static DispatchThreadMessages ( ) : void
리턴 void

Dispose() 공개 정적인 메소드

Asks all windows to cleanup their resources
public static Dispose ( ) : void
리턴 void

GetPreviousActiveWindow() 공개 정적인 메소드

public static GetPreviousActiveWindow ( ) : int
리턴 int

GetWindow() 공개 정적인 메소드

GetWindow() returns the window with the specified ID
public static GetWindow ( int dwID ) : GUIWindow
dwID int id of window
리턴 GUIWindow

HasPreviousWindow() 공개 정적인 메소드

Checks if ShowPreviousWindow could activate a previous window. If no, then there is no previous window.
public static HasPreviousWindow ( ) : bool
리턴 bool

Initialize() 공개 정적인 메소드

Initialize the window manager
public static Initialize ( ) : void
리턴 void

MadVrProcess() 공개 정적인 메소드

public static MadVrProcess ( ) : void
리턴 void

MyInterfaceFilter() 공개 정적인 메소드

public static MyInterfaceFilter ( Type typeObj, Object criteriaObj ) : bool
typeObj System.Type
criteriaObj Object
리턴 bool

NeedRefresh() 공개 정적인 메소드

returns true if current window wants to refresh/redraw itself other wise false
public static NeedRefresh ( ) : bool
리턴 bool

OnAction() 공개 정적인 메소드

This method will handle a given action. Its called by the process() function The window manager will give the action to the current active window 2 handle
public static OnAction ( Action action ) : void
action Action new action for current active window
리턴 void

OnDeviceRestored() 공개 정적인 메소드

called by the runtime when DirectX device has been restored Just let current active window know about this so they can re-allocate their directx resources
public static OnDeviceRestored ( ) : void
리턴 void

OnResize() 공개 정적인 메소드

OnResize() will restore all the positions of all controls of all windows to their original values as specified in the skin files
public static OnResize ( ) : void
리턴 void

PreInit() 공개 정적인 메소드

Call preinit for every window 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 static PreInit ( ) : void
리턴 void

Process() 공개 정적인 메소드

public static Process ( ) : void
리턴 void

ProcessWindows() 공개 정적인 메소드

This method will call the process() method on the currently active window This method gets calle on a regular basis and allows the window todo some stuff without any user action necessary
public static ProcessWindows ( ) : void
리턴 void

Render() 공개 정적인 메소드

Render() ask the current active window to render itself
public static Render ( float timePassed ) : void
timePassed float
리턴 void

Replace() 공개 정적인 메소드

public static Replace ( int windowId, GUIWindow window ) : void
windowId int
window GUIWindow
리턴 void

ReplaceWindow() 공개 정적인 메소드

ReplaceWindow() This function will replace current window with specified window
public static ReplaceWindow ( int windowId ) : void
windowId int
리턴 void

ResetAllControls() 공개 정적인 메소드

call ResetallControls() for every window This will cause each control to use the default position, width and size as mentioned in the skin files
public static ResetAllControls ( ) : void
리턴 void

ResetWindowsHistory() 공개 정적인 메소드

public static ResetWindowsHistory ( ) : void
리턴 void

RouteToWindow() 공개 정적인 메소드

public static RouteToWindow ( int dialogId ) : void
dialogId int
리턴 void

SendMessage() 공개 정적인 메소드

Send message to a window/control
public static SendMessage ( GUIMessage message ) : void
message GUIMessage message to send
리턴 void

SendThreadCallback() 공개 정적인 메소드

public static SendThreadCallback ( Callback callback, int param1, int param2, object data ) : void
callback Callback
param1 int
param2 int
data object
리턴 void

SendThreadCallbackAndWait() 공개 정적인 메소드

This function can be used to call a callback within the context of the message processing thread. The function waits until the message thread has picked up and executed the callback. This function is also safe if the current thread is the message processing thread.
public static SendThreadCallbackAndWait ( Callback callback, int param1, int param2, object data ) : int
callback Callback Callback to be executed
param1 int Param to callback
param2 int Param to callback
data object Param to callback
리턴 int

SendThreadCallbackSkin() 공개 정적인 메소드

public static SendThreadCallbackSkin ( Callback callback, int param1, int param2, object data ) : int
callback Callback
param1 int
param2 int
data object
리턴 int

SendThreadMessage() 공개 정적인 메소드

send thread message. Same as sendmessage() however message is placed on a queue which is processed later.
public static SendThreadMessage ( GUIMessage message ) : void
message GUIMessage new message to send
리턴 void

ShowPreviousWindow() 공개 정적인 메소드

Show previous window. When user goes back (ESC) this function will show the previous active window
public static ShowPreviousWindow ( ) : void
리턴 void

ShowWarning() 공개 정적인 메소드

This method will show a warning dialog onscreen and returns when the user has clicked the dialog away
public static ShowWarning ( int iHeading, int iLine1, int iLine2 ) : void
iHeading int label id for the dialog header
iLine1 int label id for the 1st line in the dialog
iLine2 int label id for the 2nd line in the dialog
리턴 void

UnRoute() 공개 정적인 메소드

tell the window manager to unroute the current routing
public static UnRoute ( ) : void
리턴 void