C# Class MediaPortal.GUI.Library.GUIButton3PartControl

The class implementing a button which consists of 3 parts a left part, a middle part and a right part These are presented as [ Left Middle Right ] Each part has 2 images, 1 for the normal state and 1 for the focused state Further the button can have an image (icon) which can be positioned
Inheritance: GUIControl
显示文件 Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Protected Properties

Property Type Description
_actionId int
_application string
_arguments string
_cachedTextLabel1 string
_cachedTextLabel2 string
_hyperLinkWindowId int
_imageFocusedLeft GUIImage
_imageFocusedMid GUIImage
_imageFocusedRight GUIImage
_imageIcon GUIImage
_imageIcon2 GUIImage
_imageNonFocusedLeft GUIImage
_imageNonFocusedMid GUIImage
_imageNonFocusedRight GUIImage
_scriptAction string

Public Methods

Method Description
AllocResources ( ) : void

Allocates the control its DirectX resources.

Dispose ( ) : void

Frees the control its DirectX resources.

FinalizeConstruction ( ) : void

This method gets called when the control is created and all properties has been set It allows the control todo any initialization

GUIButton3PartControl ( ) : System.Diagnostics

empty constructor

GUIButton3PartControl ( int dwParentID ) : System.Diagnostics

The basic constructor of the GUIControl class.

GUIButton3PartControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTextureFocusLeft, string strTextureFocusMid, string strTextureFocusRight, string strTextureNoFocusLeft, string strTextureNoFocusMid, string strTextureNoFocusRight, string strTextureIcon ) : System.Diagnostics

The constructor of the GUIButton3PartControl class.

OnAction ( MediaPortal.GUI.Library.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 control can respond to any action

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

PreAllocResources ( ) : void

Preallocates the control its DirectX resources.

Refresh ( ) : void
Render ( float timePassed ) : void

Renders the GUIButton3PartControl.

SetBorderTFL ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetBorderTFM ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetBorderTFR ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetBorderTI ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetBorderTI2 ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetBorderTNFL ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetBorderTNFM ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetBorderTNFR ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
SetLabel1 ( string fontName, string label, long color ) : void

Set the text of the GUIButton3PartControl.

SetLabel2 ( string fontName, string label, long color ) : void
SetPosition ( int dwPosX, int dwPosY ) : void
SetShadow1 ( int angle, int distance, long color ) : void
SetShadow2 ( int angle, int distance, long color ) : void

Protected Methods

Method Description
Calculate ( ) : void

Perform an update after a change has occured. E.g. change to a new position.

Private Methods

Method Description
ContainsProperty ( string text ) : bool
GUIPropertyManager_OnPropertyChanged ( string tag, string tagValue ) : void

Method Details

AllocResources() public method

Allocates the control its DirectX resources.
public AllocResources ( ) : void
return void

Calculate() protected method

Perform an update after a change has occured. E.g. change to a new position.
protected Calculate ( ) : void
return void

Dispose() public method

Frees the control its DirectX resources.
public Dispose ( ) : void
return void

FinalizeConstruction() public method

This method gets called when the control is created and all properties has been set It allows the control todo any initialization
public FinalizeConstruction ( ) : void
return void

GUIButton3PartControl() public method

empty constructor
public GUIButton3PartControl ( ) : System.Diagnostics
return System.Diagnostics

GUIButton3PartControl() public method

The basic constructor of the GUIControl class.
public GUIButton3PartControl ( int dwParentID ) : System.Diagnostics
dwParentID int
return System.Diagnostics

GUIButton3PartControl() public method

The constructor of the GUIButton3PartControl class.
public GUIButton3PartControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTextureFocusLeft, string strTextureFocusMid, string strTextureFocusRight, string strTextureNoFocusLeft, string strTextureNoFocusMid, string strTextureNoFocusRight, string strTextureIcon ) : System.Diagnostics
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.
strTextureFocusLeft string
strTextureFocusMid string
strTextureFocusRight string
strTextureNoFocusLeft string
strTextureNoFocusMid string
strTextureNoFocusRight string
strTextureIcon string
return System.Diagnostics

OnAction() public method

OnAction() method. This method gets called when there's a new action like a keypress or mousemove or... By overriding this method, the control can respond to any action
public OnAction ( MediaPortal.GUI.Library.Action action ) : void
action MediaPortal.GUI.Library.Action action : contains the action
return void

OnMessage() public method

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 control can respond to the messages of its controls
public OnMessage ( GUIMessage message ) : bool
message GUIMessage message : contains the message
return bool

PreAllocResources() public method

Preallocates the control its DirectX resources.
public PreAllocResources ( ) : void
return void

Refresh() public method

public Refresh ( ) : void
return void

Render() public method

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

SetBorderTFL() public method

public SetBorderTFL ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetBorderTFM() public method

public SetBorderTFM ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetBorderTFR() public method

public SetBorderTFR ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetBorderTI() public method

public SetBorderTI ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetBorderTI2() public method

public SetBorderTI2 ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetBorderTNFL() public method

public SetBorderTNFL ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetBorderTNFM() public method

public SetBorderTNFM ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetBorderTNFR() public method

public SetBorderTNFR ( string border, GUIImage position, bool repeat, bool rotate, string texture, long colorKey, bool hasCorners, bool cornerRotate ) : void
border string
position GUIImage
repeat bool
rotate bool
texture string
colorKey long
hasCorners bool
cornerRotate bool
return void

SetLabel1() public method

Set the text of the GUIButton3PartControl.
public SetLabel1 ( string fontName, string label, long color ) : void
fontName string The font name.
label string The text.
color long The font color.
return void

SetLabel2() public method

public SetLabel2 ( string fontName, string label, long color ) : void
fontName string
label string
color long
return void

SetPosition() public method

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

SetShadow1() public method

public SetShadow1 ( int angle, int distance, long color ) : void
angle int
distance int
color long
return void

SetShadow2() public method

public SetShadow2 ( int angle, int distance, long color ) : void
angle int
distance int
color long
return void

Property Details

_actionId protected_oe property

protected int _actionId
return int

_application protected_oe property

protected string _application
return string

_arguments protected_oe property

protected string _arguments
return string

_cachedTextLabel1 protected_oe property

protected string _cachedTextLabel1
return string

_cachedTextLabel2 protected_oe property

protected string _cachedTextLabel2
return string

_hyperLinkWindowId protected_oe property

protected int _hyperLinkWindowId
return int

_imageFocusedLeft protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageFocusedLeft
return GUIImage

_imageFocusedMid protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageFocusedMid
return GUIImage

_imageFocusedRight protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageFocusedRight
return GUIImage

_imageIcon protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageIcon
return GUIImage

_imageIcon2 protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageIcon2
return GUIImage

_imageNonFocusedLeft protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageNonFocusedLeft
return GUIImage

_imageNonFocusedMid protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageNonFocusedMid
return GUIImage

_imageNonFocusedRight protected_oe property

protected GUIImage,MediaPortal.GUI.Library _imageNonFocusedRight
return GUIImage

_scriptAction protected_oe property

protected string _scriptAction
return string