C# Class MediaPortal.GUI.Library.GUIListControl

The implementation of a GUIListControl
Inheritance: GUIControl
Exibir arquivo Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Protected Properties

Property Type Description
_brackedText string
_cursorX int
_drawFocus bool
_enableSMSsearch bool
_enableScrollLabel bool
_font MediaPortal.GUI.Library.GUIFont
_font2 MediaPortal.GUI.Library.GUIFont
_font3 MediaPortal.GUI.Library.GUIFont
_itemsPerPage int
_labelControls1 List
_labelControls2 List
_labelControls3 List
_lastCommandTime double
_lastItem int
_lastItemPageValue int
_lastSearchItem int
_listButtons List
_listItems List
_listProgresses List
_listType ListType
_loopDelay int
_offset int
_refresh bool
_scrollContinuously bool
_scrollDirection string
_scrollOffsetX double
_scrollPosition int
_scrollPosititionX int
_searchString string
_textLine2 string
_timeElapsed double
_upDownControl MediaPortal.GUI.Library.GUISpinControl
_upDownControlVisible bool
_verticalScrollbar MediaPortal.GUI.Library.GUIVerticalScrollbar

Private Properties

Property Type Description
CheckTimer void
Press void
SearchItem void
SelectItem void
SetLabel string
WordWrapText void
item_OnThumbnailRefresh void

Public Methods

Method Description
Add ( GUIListItem item ) : void
AllocResources ( ) : void

Allocates the control its DirectX resources.

Clear ( ) : void
Dispose ( ) : void

Frees the control its DirectX resources.

FinalizeConstruction ( ) : void
GUIListControl ( int dwParentID ) : System
GUIListControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, int dwSpinWidth, int dwSpinHeight, string strUp, string strDown, string strUpFocus, string strDownFocus, long dwSpinColor, int dwSpinX, int dwSpinY, string strFont, long dwTextColor, long dwSelectedColor, string strButton, string strButtonFocus, string strScrollbarBackground, string strScrollbarTop, string strScrollbarBottom, int dwShadowAngle, int dwShadowDistance, long dwShadowColor ) : System

The constructor of the GUIListControl.

GetSelectedItem ( string &strLabel, string &strLabel2, string &strThumb, string &strIndex ) : int
HitTest ( int x, int y, int &controlID, bool &focused ) : bool

Checks if the x and y coordinates correspond to the current control.

Insert ( int index, GUIListItem item ) : void
MoveItemDown ( int iItem ) : int
MoveItemUp ( int iItem ) : int
NeedRefresh ( ) : bool

NeedRefresh() can be called to see if the control needs 2 redraw itself or not.

OnAction ( 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.

RemoveItem ( int iItem ) : int
Render ( float timePassed ) : void

Renders the control.

Replace ( int index, GUIListItem item ) : void
ScaleToScreenResolution ( ) : void
ScrollToEnd ( ) : void
SetColors2 ( long dwTextColor, long dwSelectedColor ) : void

Set the colors of the second label.

SetColors3 ( long dwTextColor, long dwSelectedColor ) : void

Set the colors of the second label.

SetImageDimensions ( int iWidth, int iHeight ) : void

Sets the dimension of the images of the items.

SetNeedRefresh ( ) : void
SetPageControlVisible ( bool bVisible ) : void

Set the visibility of the page control.

SetTextOffsets ( int iXoffset, int iYOffset, int iXoffset2, int iYOffset2, int iXoffset3, int iYOffset3 ) : void

Sets the offsets of the text.

Sort ( IComparer comparer ) : void

Sorts the list of items in this control.

this ( int index ) : GUIListItem

Protected Methods

Method Description
AllocButtons ( ) : void
FreeUnusedThumbnails ( ) : void
OnDefaultAction ( Action action ) : void
OnDown ( ) : void

Implementation of the OnDown action.

OnLeft ( ) : void

Implementation of the OnLeft action.

OnMouseClick ( Action action ) : void
OnPageDown ( ) : void

Implementation of the OnPageDown action.

OnPageUp ( ) : void

Implementation of the OnPageUp action.

OnRight ( ) : void

Implementation of the OnRight action.

OnSelectionChanged ( ) : void
OnUp ( ) : void

Implementation of the OnUp action.

ReleaseButtons ( ) : void
RenderButton ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
RenderIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
RenderLabel ( float timePassed, int buttonNumber, int positionX, int positionY, bool gotFocus ) : void

RenderPinIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
RenderProgressBar ( float timePassed, int progressBarNr, int x, int y, bool gotFocus ) : void
RenderScrollbar ( float timePassed ) : void
RenderText ( float timePassed, int item, GUILabelControl label, bool bScroll ) : void

Renders the text.

RenderText ( float timePassed, int item, float fPosX, float fPosY, float fMaxWidth, long dwTextColor, string strTextToRender, bool bScroll ) : void

Renders the text.

Private Methods

Method Description
CheckTimer ( ) : void
Press ( char key ) : void

Handle keypress events for SMS style search (key '1'..'9')

SearchItem ( string searchKey, SearchType searchMethode ) : void

Search for first item starting with searchkey

SelectItem ( int item ) : void

Select the item and set the Page accordingly

SetLabel ( string textContent, GUIListItem item ) : string
WordWrapText ( string strText, int iMaxWidth, ArrayList &wrappedLines ) : void
item_OnThumbnailRefresh ( int buttonNr, bool gotFocus ) : void

Method Details

Add() public method

public Add ( GUIListItem item ) : void
item GUIListItem
return void

AllocButtons() protected method

protected AllocButtons ( ) : void
return void

AllocResources() public method

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

Clear() public method

public Clear ( ) : void
return void

Dispose() public method

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

FinalizeConstruction() public final method

public final FinalizeConstruction ( ) : void
return void

FreeUnusedThumbnails() protected method

protected FreeUnusedThumbnails ( ) : void
return void

GUIListControl() public method

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

GUIListControl() public method

The constructor of the GUIListControl.
public GUIListControl ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, int dwSpinWidth, int dwSpinHeight, string strUp, string strDown, string strUpFocus, string strDownFocus, long dwSpinColor, int dwSpinX, int dwSpinY, string strFont, long dwTextColor, long dwSelectedColor, string strButton, string strButtonFocus, string strScrollbarBackground, string strScrollbarTop, string strScrollbarBottom, 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.
dwSpinWidth int TODO
dwSpinHeight int TODO
strUp string The name of the scroll up unfocused texture.
strDown string The name of the scroll down unfocused texture.
strUpFocus string The name of the scroll up focused texture.
strDownFocus string The name of the scroll down unfocused texture.
dwSpinColor long TODO
dwSpinX int TODO
dwSpinY int TODO
strFont string The font used in the spin control.
dwTextColor long The color of the text.
dwSelectedColor long The color of the text when it is selected.
strButton string The name of the unfocused button texture.
strButtonFocus string The name of the focused button texture.
strScrollbarBackground string The name of the background of the scrollbar texture.
strScrollbarTop string The name of the top of the scrollbar texture.
strScrollbarBottom string The name of the bottom of the scrollbar texture.
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

GetSelectedItem() public method

public GetSelectedItem ( string &strLabel, string &strLabel2, string &strThumb, string &strIndex ) : int
strLabel string
strLabel2 string
strThumb string
strIndex string
return int

HitTest() public method

Checks if the x and y coordinates correspond to the current control.
public HitTest ( int x, int y, int &controlID, bool &focused ) : bool
x int The x coordinate.
y int The y coordinate.
controlID int
focused bool
return bool

Insert() public method

public Insert ( int index, GUIListItem item ) : void
index int
item GUIListItem
return void

MoveItemDown() public method

public MoveItemDown ( int iItem ) : int
iItem int
return int

MoveItemUp() public method

public MoveItemUp ( int iItem ) : int
iItem int
return int

NeedRefresh() public method

NeedRefresh() can be called to see if the control needs 2 redraw itself or not.
public NeedRefresh ( ) : bool
return bool

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 ( Action action ) : void
action Action action : contains the action
return void

OnDefaultAction() protected method

protected OnDefaultAction ( Action action ) : void
action Action
return void

OnDown() protected method

Implementation of the OnDown action.
protected OnDown ( ) : void
return void

OnLeft() protected method

Implementation of the OnLeft action.
protected OnLeft ( ) : void
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

OnMouseClick() protected method

protected OnMouseClick ( Action action ) : void
action Action
return void

OnPageDown() protected method

Implementation of the OnPageDown action.
protected OnPageDown ( ) : void
return void

OnPageUp() protected method

Implementation of the OnPageUp action.
protected OnPageUp ( ) : void
return void

OnRight() protected method

Implementation of the OnRight action.
protected OnRight ( ) : void
return void

OnSelectionChanged() protected method

protected OnSelectionChanged ( ) : void
return void

OnUp() protected method

Implementation of the OnUp action.
protected OnUp ( ) : void
return void

PreAllocResources() public method

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

ReleaseButtons() protected method

protected ReleaseButtons ( ) : void
return void

RemoveItem() public method

public RemoveItem ( int iItem ) : int
iItem int
return int

Render() public method

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

RenderButton() protected method

protected RenderButton ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
return void

RenderIcon() protected method

protected RenderIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
return void

RenderLabel() protected method

protected RenderLabel ( float timePassed, int buttonNumber, int positionX, int positionY, bool gotFocus ) : void
timePassed float
buttonNumber int
positionX int
positionY int
gotFocus bool
return void

RenderPinIcon() protected method

protected RenderPinIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
return void

RenderProgressBar() protected method

protected RenderProgressBar ( float timePassed, int progressBarNr, int x, int y, bool gotFocus ) : void
timePassed float
progressBarNr int
x int
y int
gotFocus bool
return void

RenderScrollbar() protected method

protected RenderScrollbar ( float timePassed ) : void
timePassed float
return void

RenderText() protected method

Renders the text.
protected RenderText ( float timePassed, int item, GUILabelControl label, bool bScroll ) : void
timePassed float
item int
label GUILabelControl The label to render
bScroll bool A bool indication if there is scrolling or not.
return void

RenderText() protected method

Renders the text.
protected RenderText ( float timePassed, int item, float fPosX, float fPosY, float fMaxWidth, long dwTextColor, string strTextToRender, bool bScroll ) : void
timePassed float
item int
fPosX float The X position of the text.
fPosY float The Y position of the text.
fMaxWidth float The maximum render width.
dwTextColor long The color of the text.
strTextToRender string The actual text.
bScroll bool A bool indication if there is scrolling or not.
return void

Replace() public method

public Replace ( int index, GUIListItem item ) : void
index int
item GUIListItem
return void

ScaleToScreenResolution() public method

public ScaleToScreenResolution ( ) : void
return void

ScrollToEnd() public method

public ScrollToEnd ( ) : void
return void

SetColors2() public method

Set the colors of the second label.
public SetColors2 ( long dwTextColor, long dwSelectedColor ) : void
dwTextColor long
dwSelectedColor long
return void

SetColors3() public method

Set the colors of the second label.
public SetColors3 ( long dwTextColor, long dwSelectedColor ) : void
dwTextColor long
dwSelectedColor long
return void

SetImageDimensions() public method

Sets the dimension of the images of the items.
public SetImageDimensions ( int iWidth, int iHeight ) : void
iWidth int The width.
iHeight int The height.
return void

SetNeedRefresh() public method

public SetNeedRefresh ( ) : void
return void

SetPageControlVisible() public method

Set the visibility of the page control.
public SetPageControlVisible ( bool bVisible ) : void
bVisible bool true if visible false otherwise
return void

SetTextOffsets() public method

Sets the offsets of the text.
public SetTextOffsets ( int iXoffset, int iYOffset, int iXoffset2, int iYOffset2, int iXoffset3, int iYOffset3 ) : void
iXoffset int The X offset of the first label.
iYOffset int The Y offset of the first label.
iXoffset2 int The X offset of the second label.
iYOffset2 int The Y offset of the second label.
iXoffset3 int The X offset of the third label.
iYOffset3 int The Y offset of the third label.
return void

Sort() public method

Sorts the list of items in this control.
public Sort ( IComparer comparer ) : void
comparer IComparer The comparer on which the sort is based.
return void

this() public method

public this ( int index ) : GUIListItem
index int
return GUIListItem

Property Details

_brackedText protected_oe property

protected string _brackedText
return string

_cursorX protected_oe property

protected int _cursorX
return int

_drawFocus protected_oe property

protected bool _drawFocus
return bool

_enableSMSsearch protected_oe property

protected bool _enableSMSsearch
return bool

_enableScrollLabel protected_oe property

protected bool _enableScrollLabel
return bool

_font protected_oe property

protected GUIFont,MediaPortal.GUI.Library _font
return MediaPortal.GUI.Library.GUIFont

_font2 protected_oe property

protected GUIFont,MediaPortal.GUI.Library _font2
return MediaPortal.GUI.Library.GUIFont

_font3 protected_oe property

protected GUIFont,MediaPortal.GUI.Library _font3
return MediaPortal.GUI.Library.GUIFont

_itemsPerPage protected_oe property

protected int _itemsPerPage
return int

_labelControls1 protected_oe property

protected List _labelControls1
return List

_labelControls2 protected_oe property

protected List _labelControls2
return List

_labelControls3 protected_oe property

protected List _labelControls3
return List

_lastCommandTime protected_oe property

protected double _lastCommandTime
return double

_lastItem protected_oe property

protected int _lastItem
return int

_lastItemPageValue protected_oe property

protected int _lastItemPageValue
return int

_lastSearchItem protected_oe property

protected int _lastSearchItem
return int

_listButtons protected_oe property

protected List _listButtons
return List

_listItems protected_oe property

protected List _listItems
return List

_listProgresses protected_oe property

protected List _listProgresses
return List

_listType protected_oe property

protected ListType _listType
return ListType

_loopDelay protected_oe property

protected int _loopDelay
return int

_offset protected_oe property

protected int _offset
return int

_refresh protected_oe property

protected bool _refresh
return bool

_scrollContinuously protected_oe property

protected bool _scrollContinuously
return bool

_scrollDirection protected_oe property

protected string _scrollDirection
return string

_scrollOffsetX protected_oe property

protected double _scrollOffsetX
return double

_scrollPosition protected_oe property

protected int _scrollPosition
return int

_scrollPosititionX protected_oe property

protected int _scrollPosititionX
return int

_searchString protected_oe property

protected string _searchString
return string

_textLine2 protected_oe property

protected string _textLine2
return string

_timeElapsed protected_oe property

protected double _timeElapsed
return double

_upDownControl protected_oe property

protected GUISpinControl,MediaPortal.GUI.Library _upDownControl
return MediaPortal.GUI.Library.GUISpinControl

_upDownControlVisible protected_oe property

protected bool _upDownControlVisible
return bool

_verticalScrollbar protected_oe property

protected GUIVerticalScrollbar,MediaPortal.GUI.Library _verticalScrollbar
return MediaPortal.GUI.Library.GUIVerticalScrollbar