C# Class MediaPortal.GUI.Library.GUIListControl

The implementation of a GUIListControl
Inheritance: GUIControl
Afficher le fichier Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Protected Properties

Свойство 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

Свойство Type Description
CheckTimer void
Press void
SearchItem void
SelectItem void
SetLabel string
WordWrapText void
item_OnThumbnailRefresh void

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

Méthode 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 méthode

public Add ( GUIListItem item ) : void
item GUIListItem
Résultat void

AllocButtons() protected méthode

protected AllocButtons ( ) : void
Résultat void

AllocResources() public méthode

Allocates the control its DirectX resources.
public AllocResources ( ) : void
Résultat void

Clear() public méthode

public Clear ( ) : void
Résultat void

Dispose() public méthode

Frees the control its DirectX resources.
public Dispose ( ) : void
Résultat void

FinalizeConstruction() public final méthode

public final FinalizeConstruction ( ) : void
Résultat void

FreeUnusedThumbnails() protected méthode

protected FreeUnusedThumbnails ( ) : void
Résultat void

GUIListControl() public méthode

public GUIListControl ( int dwParentID ) : System
dwParentID int
Résultat System

GUIListControl() public méthode

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.
Résultat System

GetSelectedItem() public méthode

public GetSelectedItem ( string &strLabel, string &strLabel2, string &strThumb, string &strIndex ) : int
strLabel string
strLabel2 string
strThumb string
strIndex string
Résultat int

HitTest() public méthode

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
Résultat bool

Insert() public méthode

public Insert ( int index, GUIListItem item ) : void
index int
item GUIListItem
Résultat void

MoveItemDown() public méthode

public MoveItemDown ( int iItem ) : int
iItem int
Résultat int

MoveItemUp() public méthode

public MoveItemUp ( int iItem ) : int
iItem int
Résultat int

NeedRefresh() public méthode

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

OnAction() public méthode

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
Résultat void

OnDefaultAction() protected méthode

protected OnDefaultAction ( Action action ) : void
action Action
Résultat void

OnDown() protected méthode

Implementation of the OnDown action.
protected OnDown ( ) : void
Résultat void

OnLeft() protected méthode

Implementation of the OnLeft action.
protected OnLeft ( ) : void
Résultat void

OnMessage() public méthode

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
Résultat bool

OnMouseClick() protected méthode

protected OnMouseClick ( Action action ) : void
action Action
Résultat void

OnPageDown() protected méthode

Implementation of the OnPageDown action.
protected OnPageDown ( ) : void
Résultat void

OnPageUp() protected méthode

Implementation of the OnPageUp action.
protected OnPageUp ( ) : void
Résultat void

OnRight() protected méthode

Implementation of the OnRight action.
protected OnRight ( ) : void
Résultat void

OnSelectionChanged() protected méthode

protected OnSelectionChanged ( ) : void
Résultat void

OnUp() protected méthode

Implementation of the OnUp action.
protected OnUp ( ) : void
Résultat void

PreAllocResources() public méthode

Preallocates the control its DirectX resources.
public PreAllocResources ( ) : void
Résultat void

ReleaseButtons() protected méthode

protected ReleaseButtons ( ) : void
Résultat void

RemoveItem() public méthode

public RemoveItem ( int iItem ) : int
iItem int
Résultat int

Render() public méthode

Renders the control.
public Render ( float timePassed ) : void
timePassed float
Résultat void

RenderButton() protected méthode

protected RenderButton ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
Résultat void

RenderIcon() protected méthode

protected RenderIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
Résultat void

RenderLabel() protected méthode

protected RenderLabel ( float timePassed, int buttonNumber, int positionX, int positionY, bool gotFocus ) : void
timePassed float
buttonNumber int
positionX int
positionY int
gotFocus bool
Résultat void

RenderPinIcon() protected méthode

protected RenderPinIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
Résultat void

RenderProgressBar() protected méthode

protected RenderProgressBar ( float timePassed, int progressBarNr, int x, int y, bool gotFocus ) : void
timePassed float
progressBarNr int
x int
y int
gotFocus bool
Résultat void

RenderScrollbar() protected méthode

protected RenderScrollbar ( float timePassed ) : void
timePassed float
Résultat void

RenderText() protected méthode

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.
Résultat void

RenderText() protected méthode

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.
Résultat void

Replace() public méthode

public Replace ( int index, GUIListItem item ) : void
index int
item GUIListItem
Résultat void

ScaleToScreenResolution() public méthode

public ScaleToScreenResolution ( ) : void
Résultat void

ScrollToEnd() public méthode

public ScrollToEnd ( ) : void
Résultat void

SetColors2() public méthode

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

SetColors3() public méthode

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

SetImageDimensions() public méthode

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

SetNeedRefresh() public méthode

public SetNeedRefresh ( ) : void
Résultat void

SetPageControlVisible() public méthode

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

SetTextOffsets() public méthode

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.
Résultat void

Sort() public méthode

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

this() public méthode

public this ( int index ) : GUIListItem
index int
Résultat GUIListItem

Property Details

_brackedText protected_oe property

protected string _brackedText
Résultat string

_cursorX protected_oe property

protected int _cursorX
Résultat int

_drawFocus protected_oe property

protected bool _drawFocus
Résultat bool

_enableSMSsearch protected_oe property

protected bool _enableSMSsearch
Résultat bool

_enableScrollLabel protected_oe property

protected bool _enableScrollLabel
Résultat bool

_font protected_oe property

protected GUIFont,MediaPortal.GUI.Library _font
Résultat MediaPortal.GUI.Library.GUIFont

_font2 protected_oe property

protected GUIFont,MediaPortal.GUI.Library _font2
Résultat MediaPortal.GUI.Library.GUIFont

_font3 protected_oe property

protected GUIFont,MediaPortal.GUI.Library _font3
Résultat MediaPortal.GUI.Library.GUIFont

_itemsPerPage protected_oe property

protected int _itemsPerPage
Résultat int

_labelControls1 protected_oe property

protected List _labelControls1
Résultat List

_labelControls2 protected_oe property

protected List _labelControls2
Résultat List

_labelControls3 protected_oe property

protected List _labelControls3
Résultat List

_lastCommandTime protected_oe property

protected double _lastCommandTime
Résultat double

_lastItem protected_oe property

protected int _lastItem
Résultat int

_lastItemPageValue protected_oe property

protected int _lastItemPageValue
Résultat int

_lastSearchItem protected_oe property

protected int _lastSearchItem
Résultat int

_listButtons protected_oe property

protected List _listButtons
Résultat List

_listItems protected_oe property

protected List _listItems
Résultat List

_listProgresses protected_oe property

protected List _listProgresses
Résultat List

_listType protected_oe property

protected ListType _listType
Résultat ListType

_loopDelay protected_oe property

protected int _loopDelay
Résultat int

_offset protected_oe property

protected int _offset
Résultat int

_refresh protected_oe property

protected bool _refresh
Résultat bool

_scrollContinuously protected_oe property

protected bool _scrollContinuously
Résultat bool

_scrollDirection protected_oe property

protected string _scrollDirection
Résultat string

_scrollOffsetX protected_oe property

protected double _scrollOffsetX
Résultat double

_scrollPosition protected_oe property

protected int _scrollPosition
Résultat int

_scrollPosititionX protected_oe property

protected int _scrollPosititionX
Résultat int

_searchString protected_oe property

protected string _searchString
Résultat string

_textLine2 protected_oe property

protected string _textLine2
Résultat string

_timeElapsed protected_oe property

protected double _timeElapsed
Résultat double

_upDownControl protected_oe property

protected GUISpinControl,MediaPortal.GUI.Library _upDownControl
Résultat MediaPortal.GUI.Library.GUISpinControl

_upDownControlVisible protected_oe property

protected bool _upDownControlVisible
Résultat bool

_verticalScrollbar protected_oe property

protected GUIVerticalScrollbar,MediaPortal.GUI.Library _verticalScrollbar
Résultat MediaPortal.GUI.Library.GUIVerticalScrollbar