C# Класс MediaPortal.GUI.Library.GUIListControl

The implementation of a GUIListControl
Наследование: GUIControl
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_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

Свойство Тип Описание
CheckTimer void
Press void
SearchItem void
SelectItem void
SetLabel string
WordWrapText void
item_OnThumbnailRefresh void

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Add() публичный Метод

public Add ( GUIListItem item ) : void
item GUIListItem
Результат void

AllocButtons() защищенный Метод

protected AllocButtons ( ) : void
Результат void

AllocResources() публичный Метод

Allocates the control its DirectX resources.
public AllocResources ( ) : void
Результат void

Clear() публичный Метод

public Clear ( ) : void
Результат void

Dispose() публичный Метод

Frees the control its DirectX resources.
public Dispose ( ) : void
Результат void

FinalizeConstruction() публичный закрытый Метод

public final FinalizeConstruction ( ) : void
Результат void

FreeUnusedThumbnails() защищенный Метод

protected FreeUnusedThumbnails ( ) : void
Результат void

GUIListControl() публичный Метод

public GUIListControl ( int dwParentID ) : System
dwParentID int
Результат System

GUIListControl() публичный Метод

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.
Результат System

GetSelectedItem() публичный Метод

public GetSelectedItem ( string &strLabel, string &strLabel2, string &strThumb, string &strIndex ) : int
strLabel string
strLabel2 string
strThumb string
strIndex string
Результат int

HitTest() публичный Метод

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
Результат bool

Insert() публичный Метод

public Insert ( int index, GUIListItem item ) : void
index int
item GUIListItem
Результат void

MoveItemDown() публичный Метод

public MoveItemDown ( int iItem ) : int
iItem int
Результат int

MoveItemUp() публичный Метод

public MoveItemUp ( int iItem ) : int
iItem int
Результат int

NeedRefresh() публичный Метод

NeedRefresh() can be called to see if the control needs 2 redraw itself or not.
public NeedRefresh ( ) : bool
Результат bool

OnAction() публичный Метод

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
Результат void

OnDefaultAction() защищенный Метод

protected OnDefaultAction ( Action action ) : void
action Action
Результат void

OnDown() защищенный Метод

Implementation of the OnDown action.
protected OnDown ( ) : void
Результат void

OnLeft() защищенный Метод

Implementation of the OnLeft action.
protected OnLeft ( ) : void
Результат void

OnMessage() публичный Метод

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
Результат bool

OnMouseClick() защищенный Метод

protected OnMouseClick ( Action action ) : void
action Action
Результат void

OnPageDown() защищенный Метод

Implementation of the OnPageDown action.
protected OnPageDown ( ) : void
Результат void

OnPageUp() защищенный Метод

Implementation of the OnPageUp action.
protected OnPageUp ( ) : void
Результат void

OnRight() защищенный Метод

Implementation of the OnRight action.
protected OnRight ( ) : void
Результат void

OnSelectionChanged() защищенный Метод

protected OnSelectionChanged ( ) : void
Результат void

OnUp() защищенный Метод

Implementation of the OnUp action.
protected OnUp ( ) : void
Результат void

PreAllocResources() публичный Метод

Preallocates the control its DirectX resources.
public PreAllocResources ( ) : void
Результат void

ReleaseButtons() защищенный Метод

protected ReleaseButtons ( ) : void
Результат void

RemoveItem() публичный Метод

public RemoveItem ( int iItem ) : int
iItem int
Результат int

Render() публичный Метод

Renders the control.
public Render ( float timePassed ) : void
timePassed float
Результат void

RenderButton() защищенный Метод

protected RenderButton ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
Результат void

RenderIcon() защищенный Метод

protected RenderIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
Результат void

RenderLabel() защищенный Метод

protected RenderLabel ( float timePassed, int buttonNumber, int positionX, int positionY, bool gotFocus ) : void
timePassed float
buttonNumber int
positionX int
positionY int
gotFocus bool
Результат void

RenderPinIcon() защищенный Метод

protected RenderPinIcon ( float timePassed, int buttonNr, int x, int y, bool gotFocus ) : void
timePassed float
buttonNr int
x int
y int
gotFocus bool
Результат void

RenderProgressBar() защищенный Метод

protected RenderProgressBar ( float timePassed, int progressBarNr, int x, int y, bool gotFocus ) : void
timePassed float
progressBarNr int
x int
y int
gotFocus bool
Результат void

RenderScrollbar() защищенный Метод

protected RenderScrollbar ( float timePassed ) : void
timePassed float
Результат void

RenderText() защищенный Метод

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.
Результат void

RenderText() защищенный Метод

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.
Результат void

Replace() публичный Метод

public Replace ( int index, GUIListItem item ) : void
index int
item GUIListItem
Результат void

ScaleToScreenResolution() публичный Метод

public ScaleToScreenResolution ( ) : void
Результат void

ScrollToEnd() публичный Метод

public ScrollToEnd ( ) : void
Результат void

SetColors2() публичный Метод

Set the colors of the second label.
public SetColors2 ( long dwTextColor, long dwSelectedColor ) : void
dwTextColor long
dwSelectedColor long
Результат void

SetColors3() публичный Метод

Set the colors of the second label.
public SetColors3 ( long dwTextColor, long dwSelectedColor ) : void
dwTextColor long
dwSelectedColor long
Результат void

SetImageDimensions() публичный Метод

Sets the dimension of the images of the items.
public SetImageDimensions ( int iWidth, int iHeight ) : void
iWidth int The width.
iHeight int The height.
Результат void

SetNeedRefresh() публичный Метод

public SetNeedRefresh ( ) : void
Результат void

SetPageControlVisible() публичный Метод

Set the visibility of the page control.
public SetPageControlVisible ( bool bVisible ) : void
bVisible bool true if visible false otherwise
Результат void

SetTextOffsets() публичный Метод

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.
Результат void

Sort() публичный Метод

Sorts the list of items in this control.
public Sort ( IComparer comparer ) : void
comparer IComparer The comparer on which the sort is based.
Результат void

this() публичный Метод

public this ( int index ) : GUIListItem
index int
Результат GUIListItem

Описание свойств

_brackedText защищенное свойство

protected string _brackedText
Результат string

_cursorX защищенное свойство

protected int _cursorX
Результат int

_drawFocus защищенное свойство

protected bool _drawFocus
Результат bool

_enableSMSsearch защищенное свойство

protected bool _enableSMSsearch
Результат bool

_enableScrollLabel защищенное свойство

protected bool _enableScrollLabel
Результат bool

_font защищенное свойство

protected GUIFont,MediaPortal.GUI.Library _font
Результат MediaPortal.GUI.Library.GUIFont

_font2 защищенное свойство

protected GUIFont,MediaPortal.GUI.Library _font2
Результат MediaPortal.GUI.Library.GUIFont

_font3 защищенное свойство

protected GUIFont,MediaPortal.GUI.Library _font3
Результат MediaPortal.GUI.Library.GUIFont

_itemsPerPage защищенное свойство

protected int _itemsPerPage
Результат int

_labelControls1 защищенное свойство

protected List _labelControls1
Результат List

_labelControls2 защищенное свойство

protected List _labelControls2
Результат List

_labelControls3 защищенное свойство

protected List _labelControls3
Результат List

_lastCommandTime защищенное свойство

protected double _lastCommandTime
Результат double

_lastItem защищенное свойство

protected int _lastItem
Результат int

_lastItemPageValue защищенное свойство

protected int _lastItemPageValue
Результат int

_lastSearchItem защищенное свойство

protected int _lastSearchItem
Результат int

_listButtons защищенное свойство

protected List _listButtons
Результат List

_listItems защищенное свойство

protected List _listItems
Результат List

_listProgresses защищенное свойство

protected List _listProgresses
Результат List

_listType защищенное свойство

protected ListType _listType
Результат ListType

_loopDelay защищенное свойство

protected int _loopDelay
Результат int

_offset защищенное свойство

protected int _offset
Результат int

_refresh защищенное свойство

protected bool _refresh
Результат bool

_scrollContinuously защищенное свойство

protected bool _scrollContinuously
Результат bool

_scrollDirection защищенное свойство

protected string _scrollDirection
Результат string

_scrollOffsetX защищенное свойство

protected double _scrollOffsetX
Результат double

_scrollPosition защищенное свойство

protected int _scrollPosition
Результат int

_scrollPosititionX защищенное свойство

protected int _scrollPosititionX
Результат int

_searchString защищенное свойство

protected string _searchString
Результат string

_textLine2 защищенное свойство

protected string _textLine2
Результат string

_timeElapsed защищенное свойство

protected double _timeElapsed
Результат double

_upDownControl защищенное свойство

protected GUISpinControl,MediaPortal.GUI.Library _upDownControl
Результат MediaPortal.GUI.Library.GUISpinControl

_upDownControlVisible защищенное свойство

protected bool _upDownControlVisible
Результат bool

_verticalScrollbar защищенное свойство

protected GUIVerticalScrollbar,MediaPortal.GUI.Library _verticalScrollbar
Результат MediaPortal.GUI.Library.GUIVerticalScrollbar