Public Member Functions | Protected Member Functions | Properties | Events

Romulus.Nes.ScreenViewManager Class Reference

Manages the automatic creation and destruction of screen editors for a ScreenViewport. More...

List of all members.

Public Member Functions

 ScreenViewManager (ScreenViewport host)
 Creates a new ScreenViewManager.
void ForAllLoadedViews (Action< ScreenView > action)
 Performs an action on all loaded ScreenViews, empty views excluded.
ScreenView GetViewAt (CellIndex gridLocation)
 Returns the ScreenView at the specified location, or null if no screen editor exists at that location.
ScreenView GetViewAt (int worldX, int worldY)
 Returns the ScreenView at the specified location, or null if no screen editor exists at that location.

Protected Member Functions

internal void Paint (Rectangle invalidControlRect, Graphics g)
 Draws a portion of the host ScreenView by asking any affected ScreenView objects to paint itself.
void OnScreenRendered (CellIndex p)
 Raises the ScreenRendered event.

Properties

IEnumerable< ScreenViewAllVisibleViews [get]
 Gets a list of all ScreenViews in the control, comprised of all loaded views and any empty views to fill empty cells.
IEnumerable< ScreenViewAllLoadedViews [get]
 Gets a list of all ScreenViews in the control except empty cells.

Events

EventHandler< EventArgs
< ScreenView > > 
AddedScreen
 Called after a ScreenView is added to the ScreenViewport.
EventHandler< EventArgs
< ScreenView > > 
RemovingScreen
 Called before removing a ScreenView from the ScreenViewport.
EventHandler< EventArgs
< CellIndex > > 
ScreenRendered
 Raised when a screen is rendered.

Detailed Description

Manages the automatic creation and destruction of screen editors for a ScreenViewport.


Constructor & Destructor Documentation

Romulus.Nes.ScreenViewManager.ScreenViewManager ( ScreenViewport  host  ) 

Creates a new ScreenViewManager.


Member Function Documentation

void Romulus.Nes.ScreenViewManager.ForAllLoadedViews ( Action< ScreenView action  ) 

Performs an action on all loaded ScreenViews, empty views excluded.

Parameters:
action The action to perform.
ScreenView Romulus.Nes.ScreenViewManager.GetViewAt ( int  worldX,
int  worldY 
)

Returns the ScreenView at the specified location, or null if no screen editor exists at that location.

Parameters:
worldX Location to check for a view at.
worldY Location to check for a view at.
Returns:
A ScreenView object, or null of no ScreenView was found.
ScreenView Romulus.Nes.ScreenViewManager.GetViewAt ( CellIndex  gridLocation  ) 

Returns the ScreenView at the specified location, or null if no screen editor exists at that location.

Parameters:
gridLocation The location to get the editor for.
Returns:
A ScreenView object, or null of no ScreenView was found.
void Romulus.Nes.ScreenViewManager.OnScreenRendered ( CellIndex  p  )  [protected]

Raises the ScreenRendered event.

internal void Romulus.Nes.ScreenViewManager.Paint ( Rectangle  invalidControlRect,
Graphics  g 
) [protected]

Draws a portion of the host ScreenView by asking any affected ScreenView objects to paint itself.


Property Documentation

IEnumerable<ScreenView> Romulus.Nes.ScreenViewManager.AllLoadedViews [get]

Gets a list of all ScreenViews in the control except empty cells.

IEnumerable<ScreenView> Romulus.Nes.ScreenViewManager.AllVisibleViews [get]

Gets a list of all ScreenViews in the control, comprised of all loaded views and any empty views to fill empty cells.


Event Documentation

EventHandler<EventArgs<ScreenView> > Romulus.Nes.ScreenViewManager.AddedScreen

Called after a ScreenView is added to the ScreenViewport.

EventHandler<EventArgs<ScreenView> > Romulus.Nes.ScreenViewManager.RemovingScreen

Called before removing a ScreenView from the ScreenViewport.

EventHandler<EventArgs<CellIndex> > Romulus.Nes.ScreenViewManager.ScreenRendered

Raised when a screen is rendered.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events