![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
#include <GUISpinControl.h>
Public Member Functions | |
CGUISpinControl (int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo &textureUp, const CTextureInfo &textureDown, const CTextureInfo &textureUpFocus, const CTextureInfo &textureDownFocus, const CTextureInfo &textureUpDisabled, const CTextureInfo &textureDownDisabled, const CLabelInfo &labelInfo, int iType) | |
~CGUISpinControl (void) override | |
CGUISpinControl * | Clone () const override |
void | Process (unsigned int currentTime, CDirtyRegionList &dirtyregions) override |
void | Render () override |
bool | OnAction (const CAction &action) override |
void | OnLeft () override |
void | OnRight () override |
bool | HitTest (const CPoint &point) const override |
Used to test whether the point is inside a control. More... | |
bool | OnMouseOver (const CPoint &point) override |
Called when the mouse is over the control. Default implementation selects the control. More... | |
bool | OnMessage (CGUIMessage &message) override |
void | AllocResources () override |
void | FreeResources (bool immediately=false) override |
void | DynamicResourceAlloc (bool bOnOff) override |
void | SetInvalid () override |
void | SetPosition (float posX, float posY) override |
float | GetWidth () const override |
void | SetRange (int iStart, int iEnd) |
void | SetFloatRange (float fStart, float fEnd) |
void | SetValue (int iValue) |
void | SetValueFromLabel (const std::string &label) |
void | SetFloatValue (float fValue) |
void | SetStringValue (const std::string &strValue) |
int | GetValue () const |
float | GetFloatValue () const |
std::string | GetStringValue () const |
void | AddLabel (const std::string &strLabel, int iValue) |
void | AddLabel (const std::string &strLabel, const std::string &strValue) |
const std::string | GetLabel () const |
void | SetReverse (bool bOnOff) |
int | GetMaximum () const |
int | GetMinimum () const |
void | SetSpinAlign (uint32_t align, float offsetX) |
void | SetType (int iType) |
float | GetSpinWidth () const |
float | GetSpinHeight () const |
void | SetFloatInterval (float fInterval) |
void | SetShowRange (bool bOnoff) |
void | SetShowOnePage (bool showOnePage) |
void | Clear () |
std::string | GetDescription () const override |
bool | IsFocusedOnUp () const |
bool | IsVisible () const override |
![]() | |
CGUIControl () | |
CGUIControl (int parentID, int controlID, float posX, float posY, float width, float height) | |
CGUIControl (const CGUIControl &) | |
virtual | ~CGUIControl (void) |
virtual void | DoProcess (unsigned int currentTime, CDirtyRegionList &dirtyregions) |
virtual void | DoRender () |
virtual void | RenderEx () |
bool | HasProcessed () const |
Returns whether or not we have processed. More... | |
virtual void | OnUp () |
virtual void | OnDown () |
virtual bool | OnBack () |
virtual bool | OnInfo () |
virtual void | OnNextControl () |
virtual void | OnPrevControl () |
virtual void | OnFocus () |
virtual void | OnUnFocus () |
virtual EVENT_RESULT | SendMouseEvent (const CPoint &point, const CMouseEvent &event) |
React to a mouse event. More... | |
virtual void | UnfocusFromPoint (const CPoint &point) |
Unfocus the control if the given point on screen is not within it's boundary. More... | |
virtual int | GetID (void) const |
virtual void | SetID (int id) |
int | GetParentID () const |
virtual bool | HasFocus () const |
virtual bool | IsDynamicallyAllocated () |
virtual bool | CanFocus () const |
bool | IsVisibleFromSkin () const |
virtual bool | IsDisabled () const |
virtual void | SetHitRect (const CRect &rect, const UTILS::Color &color) |
virtual void | SetCamera (const CPoint &camera) |
virtual void | SetStereoFactor (const float &factor) |
bool | SetColorDiffuse (const KODI::GUILIB::GUIINFO::CGUIInfoColor &color) |
CPoint | GetRenderPosition () const |
virtual float | GetXPosition () const |
virtual float | GetYPosition () const |
virtual float | GetHeight () const |
void | MarkDirtyRegion (const unsigned int dirtyState=DIRTY_STATE_CONTROL) |
bool | IsControlDirty () const |
const CRect & | GetRenderRegion () const |
return the render region in screen coordinates of this control More... | |
virtual CRect | CalcRenderRegion () const |
calculate the render region in parentcontrol coordinates of this control Called during process to update m_renderRegion More... | |
void | SetActions (const ActionMap &actions) |
void | SetAction (int actionID, const CGUIAction &action, bool replace=true) |
Set actions to perform on navigation Navigations are set if replace is true or if there is no previously set action. More... | |
CGUIAction | GetAction (int actionID) const |
Get an action the control can be perform. More... | |
bool | Navigate (int direction) const |
Start navigating in given direction. More... | |
virtual void | SetFocus (bool focus) |
virtual void | SetWidth (float width) |
virtual void | SetHeight (float height) |
virtual void | SetVisible (bool bVisible, bool setVisState=false) |
void | SetVisibleCondition (const std::string &expression, const std::string &allowHiddenFocus="") |
bool | HasVisibleCondition () const |
void | SetEnableCondition (const std::string &expression) |
virtual void | UpdateVisibility (const CGUIListItem *item) |
virtual void | SetInitialVisibility () |
virtual void | SetEnabled (bool bEnable) |
virtual void | SetPulseOnSelect (bool pulse) |
virtual std::string | GetDescriptionByIndex (int index) const |
void | SetAnimations (const std::vector< CAnimation > &animations) |
const std::vector< CAnimation > & | GetAnimations () const |
virtual void | QueueAnimation (ANIMATION_TYPE anim) |
virtual bool | IsAnimating (ANIMATION_TYPE anim) |
virtual bool | HasAnimation (ANIMATION_TYPE anim) |
CAnimation * | GetAnimation (ANIMATION_TYPE type, bool checkConditions=true) |
virtual void | ResetAnimation (ANIMATION_TYPE type) |
virtual void | ResetAnimations () |
virtual void | UpdateInfo (const CGUIListItem *item=NULL) |
virtual void | SetPushUpdates (bool pushUpdates) |
virtual bool | IsGroup () const |
virtual bool | IsContainer () const |
virtual bool | GetCondition (int condition, int data) const |
void | SetParentControl (CGUIControl *control) |
CGUIControl * | GetParentControl (void) const |
virtual void | SaveStates (std::vector< CControlState > &states) |
virtual CGUIControl * | GetControl (int id, std::vector< CGUIControl * > *idCollector=nullptr) |
void | SetControlStats (GUICONTROLSTATS *controlStats) |
virtual void | UpdateControlStats () |
GUICONTROLTYPES | GetControlType () const |
Protected Member Functions | |
EVENT_RESULT | OnMouseEvent (const CPoint &point, const CMouseEvent &event) override |
Perform a mouse action. More... | |
bool | UpdateColors () override |
virtual void | RenderText (float posX, float posY, float width, float height) |
Render the spinner text. More... | |
CGUILabel::COLOR | GetTextColor () const |
void | PageUp () |
void | PageDown () |
bool | CanMoveDown (bool bTestReverse=true) |
bool | CanMoveUp (bool bTestReverse=true) |
void | MoveUp (bool bTestReverse=true) |
void | MoveDown (bool bTestReverse=true) |
void | ChangePage (int amount) |
![]() | |
virtual CPoint | GetPosition () const |
Return the coordinates of the top left of the control, in the control's parent coordinates. More... | |
virtual bool | CanFocusFromPoint (const CPoint &point) const |
Test whether we can focus a control from a point on screen. More... | |
virtual bool | Animate (unsigned int currentTime) |
virtual bool | CheckAnimation (ANIMATION_TYPE animType) |
void | UpdateStates (ANIMATION_TYPE type, ANIMATION_PROCESS currentProcess, ANIMATION_STATE currentState) |
bool | SendWindowMessage (CGUIMessage &message) const |
CGUISpinControl::CGUISpinControl | ( | int | parentID, |
int | controlID, | ||
float | posX, | ||
float | posY, | ||
float | width, | ||
float | height, | ||
const CTextureInfo & | textureUp, | ||
const CTextureInfo & | textureDown, | ||
const CTextureInfo & | textureUpFocus, | ||
const CTextureInfo & | textureDownFocus, | ||
const CTextureInfo & | textureUpDisabled, | ||
const CTextureInfo & | textureDownDisabled, | ||
const CLabelInfo & | labelInfo, | ||
int | iType | ||
) |
|
overridedefault |
void CGUISpinControl::AddLabel | ( | const std::string & | strLabel, |
const std::string & | strValue | ||
) |
void CGUISpinControl::AddLabel | ( | const std::string & | strLabel, |
int | iValue | ||
) |
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
|
protected |
|
protected |
|
protected |
void CGUISpinControl::Clear | ( | ) |
|
inlineoverridevirtual |
Implements CGUIControl.
Reimplemented in CGUISpinControlEx.
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
float CGUISpinControl::GetFloatValue | ( | ) | const |
const std::string CGUISpinControl::GetLabel | ( | ) | const |
int CGUISpinControl::GetMaximum | ( | ) | const |
int CGUISpinControl::GetMinimum | ( | ) | const |
|
inline |
|
inline |
std::string CGUISpinControl::GetStringValue | ( | ) | const |
|
protected |
int CGUISpinControl::GetValue | ( | ) | const |
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
|
overridevirtual |
Used to test whether the point is inside a control.
point | location to test |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
bool CGUISpinControl::IsFocusedOnUp | ( | ) | const |
|
overridevirtual |
Reimplemented from CGUIControl.
|
protected |
|
protected |
|
overridevirtual |
Reimplemented from CGUIControl.
|
overridevirtual |
Reimplemented from CGUIControl.
|
overridevirtual |
Reimplemented from CGUIControl.
|
overrideprotectedvirtual |
Perform a mouse action.
Mouse actions are sent from the window to all controls, and each control can react based on the event and location of the actions.
point | the location in transformed skin coordinates from the upper left corner of the parent control. |
event | the mouse event to perform |
Reimplemented from CGUIControl.
|
overridevirtual |
Called when the mouse is over the control. Default implementation selects the control.
point | location of the mouse in transformed skin coordinates |
Reimplemented from CGUIControl.
|
overridevirtual |
Reimplemented from CGUIControl.
|
protected |
|
protected |
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
|
protectedvirtual |
Render the spinner text.
posX | position of the left edge of the text |
posY | positing of the top edge of the text |
width | width of the text |
height | height of the text |
Reimplemented in CGUISpinControlEx.
void CGUISpinControl::SetFloatInterval | ( | float | fInterval | ) |
void CGUISpinControl::SetFloatRange | ( | float | fStart, |
float | fEnd | ||
) |
void CGUISpinControl::SetFloatValue | ( | float | fValue | ) |
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
|
overridevirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
void CGUISpinControl::SetRange | ( | int | iStart, |
int | iEnd | ||
) |
void CGUISpinControl::SetReverse | ( | bool | bOnOff | ) |
|
inline |
void CGUISpinControl::SetShowRange | ( | bool | bOnoff | ) |
|
inline |
void CGUISpinControl::SetStringValue | ( | const std::string & | strValue | ) |
|
inline |
void CGUISpinControl::SetValue | ( | int | iValue | ) |
void CGUISpinControl::SetValueFromLabel | ( | const std::string & | label | ) |
|
overrideprotectedvirtual |
Reimplemented from CGUIControl.
Reimplemented in CGUISpinControlEx.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |