C# Class MediaPortal.GUI.Library.GUILabelControl

A GUIControl for displaying text.
Inheritance: GUIControl
显示文件 Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Private Properties

Property Type Description
CachedLabel void
ClearFontCache void
GUIPropertyManager_OnPropertyChanged void

Public Methods

Method Description
AllocResources ( ) : void

Allocate any direct3d sources

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

Checks if the control can focus.

Dispose ( ) : void

Free any direct3d resources

DrawText ( float xpos, float ypos, string label, int width ) : void
DrawTextWidth ( float xpos, float ypos, string label, float fMaxWidth ) : void
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..

GUILabelControl ( int dwParentID ) : System
GUILabelControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strFont, string strLabel, long dwTextColor, Alignment dwTextAlign, VAlignment dwTextVAlign, bool bHasPath, int dwShadowAngle, int dwShadowDistance, long dwShadowColor ) : System

The constructor of the GUILabelControl class.

OnMessage ( GUIMessage message ) : bool

This method is called when a message was recieved by this control.

Render ( float timePassed ) : void

Renders the text onscreen.

SetPosition ( int dwPosX, int dwPosY ) : void
SetShadow ( int angle, int distance, long color ) : void

Set the shadow properties

Protected Methods

Method Description
Update ( ) : void

updates the current label by deleting the fontcache

Private Methods

Method Description
CachedLabel ( ) : void
ClearFontCache ( ) : void
GUIPropertyManager_OnPropertyChanged ( string tag, string tagValue ) : void

Method Details

AllocResources() public method

Allocate any direct3d sources
public AllocResources ( ) : void
return void

Animate() public method

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

CanFocus() public method

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

Dispose() public method

Free any direct3d resources
public Dispose ( ) : void
return void

DrawText() public method

public DrawText ( float xpos, float ypos, string label, int width ) : void
xpos float
ypos float
label string
width int
return void

DrawTextWidth() public method

public DrawTextWidth ( float xpos, float ypos, string label, float fMaxWidth ) : void
xpos float
ypos float
label string
fMaxWidth float
return void

FinalizeConstruction() public final method

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 final FinalizeConstruction ( ) : void
return void

GUILabelControl() public method

public GUILabelControl ( int dwParentID ) : System
dwParentID int
return System

GUILabelControl() public method

The constructor of the GUILabelControl class.
public GUILabelControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strFont, string strLabel, long dwTextColor, Alignment dwTextAlign, VAlignment dwTextVAlign, bool bHasPath, int dwShadowAngle, int dwShadowDistance, long dwShadowColor ) : System
dwParentID int The parent of this control.
dwControlId int The ID of this control.
dwPosX int The X position of this control.
dwPosY int The Y position of this control.
dwWidth int The width of this control.
dwHeight int The height of this control.
strFont string The indication of the font of this control.
strLabel string The text of this control.
dwTextColor long The color of this control.
dwTextAlign Alignment The alignment of this control.
dwTextVAlign VAlignment The vertical alignment of this control.
bHasPath bool Indicates if the label is containing a path.
dwShadowAngle int The angle of the shadow; zero degress along x-axis.
dwShadowDistance int The distance of the shadow.
dwShadowColor long The color of the shadow.
return System

OnMessage() public method

This method is called when a message was recieved by this control.
public OnMessage ( GUIMessage message ) : bool
message GUIMessage The message.
return bool

Render() public method

Renders the text onscreen.
public Render ( float timePassed ) : void
timePassed float
return void

SetPosition() public method

public SetPosition ( int dwPosX, int dwPosY ) : void
dwPosX int
dwPosY int
return void

SetShadow() public method

Set the shadow properties
public SetShadow ( int angle, int distance, long color ) : void
angle int
distance int
color long
return void

Update() protected method

updates the current label by deleting the fontcache
protected Update ( ) : void
return void