Detailed Description

Used by CSS media queries to define what 'features' the current media has. The main UI uses either the 'screen', 'handheld' or 'tv' media types when possible (default is 'screen'). WorldUI's and FlatWorldUI's use the 'gameworld' media type by default (it derives from 'screen'). change that by setting the worldUI.Media property.

Inheritance diagram for Css.MediaType:
Css.ScreenMediaType

Public Member Functions

void Changed ()
 Prompts the re-evaluation of media queries. More...
 
virtual bool Is (string name)
 True if this media type is suitable for the given name. For example a mobile media type returns true for at least 'handheld'. Note that 'all' is handled separately. More...
 
bool HasFeature (string name)
 True if this media type has the given named feature (e.g. "color"). More...
 

Public Attributes

ReflowDocument Document
 The document that this is for (if any). More...
 
Dictionary< string, Css.ValueFeatures =new Dictionary<string,Css.Value>()
 This media types features. More...
 

Protected Member Functions

void Ready (ReflowDocument document)
 

Properties

Css.Value this[string property] [get, set]
 
virtual int Width [get, set]
 Screen width. More...
 
virtual int Height [get, set]
 Screen height. More...
 
virtual bool Landscape [get, set]
 Is the screen landscape? More...
 
virtual int Resolution [get, set]
 The resolution of the device. More...
 
virtual int Color [get, set]
 The color depth. More...
 
virtual int ColorIndex [get, set]
 The colour index (applies to lookup based devices only). More...
 
virtual int Monochrome [get, set]
 Monochrome device bit depth. More...
 
virtual string Scan [get, set]
 The scanline format of a screen (usually a TV). progressive or interlace. More...
 
virtual int Grid [get, set]
 Is this device grid based? More...
 

Member Function Documentation

void Css.MediaType.Changed ( )
inline

Prompts the re-evaluation of media queries.

bool Css.MediaType.HasFeature ( string  name)
inline

True if this media type has the given named feature (e.g. "color").

virtual bool Css.MediaType.Is ( string  name)
inlinevirtual

True if this media type is suitable for the given name. For example a mobile media type returns true for at least 'handheld'. Note that 'all' is handled separately.

Reimplemented in Css.ScreenMediaType.

void Css.MediaType.Ready ( ReflowDocument  document)
inlineprotected

Member Data Documentation

ReflowDocument Css.MediaType.Document

The document that this is for (if any).

Dictionary<string,Css.Value> Css.MediaType.Features =new Dictionary<string,Css.Value>()

This media types features.

Property Documentation

virtual int Css.MediaType.Color
getset

The color depth.

virtual int Css.MediaType.ColorIndex
getset

The colour index (applies to lookup based devices only).

virtual int Css.MediaType.Grid
getset

Is this device grid based?

virtual int Css.MediaType.Height
getset

Screen height.

virtual bool Css.MediaType.Landscape
getset

Is the screen landscape?

virtual int Css.MediaType.Monochrome
getset

Monochrome device bit depth.

virtual int Css.MediaType.Resolution
getset

The resolution of the device.

virtual string Css.MediaType.Scan
getset

The scanline format of a screen (usually a TV). progressive or interlace.

Css.Value Css.MediaType.this[string property]
getset
virtual int Css.MediaType.Width
getset

Screen width.