Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CGUIControl Class Referenceabstract

Base class for controls. More...

#include <GUIControl.h>

Inheritance diagram for CGUIControl:
CGUIButtonControl CGUIControlLookup CGUIFadeLabelControl CGUIImage CGUILabelControl CGUIListLabel CGUIMoverControl CGUIMultiImage CGUIProgressControl CGUIRSSControl CGUIRangesControl CGUIRenderingControl CGUIResizeControl CGUISliderControl CGUISpinControl CGUITextBox CGUIVideoControl CGUIVisualisationControl GUIScrollBarControl IGUIContainer KODI::RETRO::CGUIGameControl

Public Types

enum  GUICONTROLTYPES {
  GUICONTROL_UNKNOWN , GUICONTAINER_EPGGRID , GUICONTAINER_FIXEDLIST , GUICONTAINER_LIST ,
  GUICONTAINER_PANEL , GUICONTAINER_WRAPLIST , GUICONTROL_BORDEREDIMAGE , GUICONTROL_BUTTON ,
  GUICONTROL_COLORBUTTON , GUICONTROL_EDIT , GUICONTROL_FADELABEL , GUICONTROL_GAME ,
  GUICONTROL_GAMECONTROLLER , GUICONTROL_GAMECONTROLLERLIST , GUICONTROL_GROUP , GUICONTROL_GROUPLIST ,
  GUICONTROL_IMAGE , GUICONTROL_LABEL , GUICONTROL_LISTGROUP , GUICONTROL_LISTLABEL ,
  GUICONTROL_MOVER , GUICONTROL_MULTI_IMAGE , GUICONTROL_PROGRESS , GUICONTROL_RADIO ,
  GUICONTROL_RANGES , GUICONTROL_RENDERADDON , GUICONTROL_RESIZE , GUICONTROL_RSS ,
  GUICONTROL_SCROLLBAR , GUICONTROL_SETTINGS_SLIDER , GUICONTROL_SLIDER , GUICONTROL_SPIN ,
  GUICONTROL_SPINEX , GUICONTROL_TEXTBOX , GUICONTROL_TOGGLEBUTTON , GUICONTROL_VIDEO ,
  GUICONTROL_VISUALISATION
}
 
enum  GUIVISIBLE { HIDDEN = 0 , DELAYED , VISIBLE }
 
enum  GUISCROLLVALUE { FOCUS = 0 , NEVER , ALWAYS }
 
typedef std::map< int, CGUIActionActionMap
 Set actions to perform on navigation.
 

Public Member Functions

 CGUIControl ()
 
 CGUIControl (int parentID, int controlID, float posX, float posY, float width, float height)
 
 CGUIControl (const CGUIControl &)
 
virtual ~CGUIControl (void)
 
virtual CGUIControlClone () const =0
 
virtual void DoProcess (unsigned int currentTime, CDirtyRegionList &dirtyregions)
 
virtual void Process (unsigned int currentTime, CDirtyRegionList &dirtyregions)
 
virtual void DoRender ()
 
virtual void Render ()
 
virtual void RenderEx ()
 
bool HasProcessed () const
 Returns whether or not we have processed.
 
virtual bool OnAction (const CAction &action)
 
virtual void OnUp ()
 
virtual void OnDown ()
 
virtual void OnLeft ()
 
virtual void OnRight ()
 
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 KODI::MOUSE::CMouseEvent &event)
 React to a mouse event.
 
virtual EVENT_RESULT OnMouseEvent (const CPoint &point, const KODI::MOUSE::CMouseEvent &event)
 Perform a mouse action.
 
virtual void UnfocusFromPoint (const CPoint &point)
 Unfocus the control if the given point on screen is not within it's boundary.
 
virtual bool HitTest (const CPoint &point) const
 Used to test whether the point is inside a control.
 
virtual bool OnMessage (CGUIMessage &message)
 
virtual int GetID (void) const
 
virtual void SetID (int id)
 
int GetParentID () const
 
virtual bool HasFocus () const
 
virtual void AllocResources ()
 
virtual void FreeResources (bool immediately=false)
 
virtual void DynamicResourceAlloc (bool bOnOff)
 
virtual bool IsDynamicallyAllocated ()
 
virtual bool CanFocus () const
 
virtual bool IsVisible () const
 
bool IsVisibleFromSkin () const
 
virtual bool IsDisabled () const
 
virtual void SetPosition (float posX, float posY)
 
virtual void SetHitRect (const CRect &rect, const UTILS::COLOR::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 GetWidth () const
 
virtual float GetHeight () const
 
virtual void AssignDepth ()
 
void MarkDirtyRegion (const unsigned int dirtyState=DIRTY_STATE_CONTROL)
 
bool IsControlDirty () const
 
const CRectGetRenderRegion () const
 return the render region in screen coordinates of this control
 
virtual CRect CalcRenderRegion () const
 calculate the render region in parentcontrol coordinates of this control Called during process to update m_renderRegion
 
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.
 
CGUIAction GetAction (int actionID) const
 Get an action the control can be perform.
 
bool Navigate (int direction) const
 Start navigating in given direction.
 
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 SetInvalid ()
 
virtual void SetPulseOnSelect (bool pulse)
 
virtual std::string GetDescription () const
 
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)
 
CAnimationGetAnimation (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)
 
CGUIControlGetParentControl (void) const
 
virtual void SaveStates (std::vector< CControlState > &states)
 
virtual CGUIControlGetControl (int id, std::vector< CGUIControl * > *idCollector=nullptr)
 
void SetControlStats (GUICONTROLSTATS *controlStats)
 
virtual void UpdateControlStats ()
 
GUICONTROLTYPES GetControlType () const
 
bool IsControlRenderable ()
 Test whether the control is "drawable" (not a group or similar)
 

Protected Member Functions

virtual CPoint GetPosition () const
 Return the coordinates of the top left of the control, in the control's parent coordinates.
 
virtual bool OnMouseOver (const CPoint &point)
 Called when the mouse is over the control. Default implementation selects the control.
 
virtual bool CanFocusFromPoint (const CPoint &point) const
 Test whether we can focus a control from a point on screen.
 
virtual bool UpdateColors (const CGUIListItem *item)
 
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
 

Protected Attributes

ActionMap m_actions
 
float m_posX
 
float m_posY
 
float m_height
 
float m_width
 
CRect m_hitRect
 
UTILS::COLOR::Color m_hitColor = 0xffffffff
 
KODI::GUILIB::GUIINFO::CGUIInfoColor m_diffuseColor
 
int m_controlID
 
int m_parentID
 
bool m_bHasFocus
 
bool m_bInvalidated
 
bool m_bAllocated
 
bool m_pulseOnSelect
 
GUICONTROLTYPES ControlType
 
GUICONTROLSTATSm_controlStats
 
CGUIControlm_parentControl
 
INFO::InfoPtr m_visibleCondition
 
GUIVISIBLE m_visible
 
bool m_visibleFromSkinCondition
 
bool m_forceHidden
 
KODI::GUILIB::GUIINFO::CGUIInfoBool m_allowHiddenFocus
 
bool m_hasProcessed
 
INFO::InfoPtr m_enableCondition
 
bool m_enabled
 
bool m_pushedUpdates
 
std::vector< CAnimationm_animations
 
CPoint m_camera
 
bool m_hasCamera
 
float m_stereo
 
TransformMatrix m_transform
 
TransformMatrix m_cachedTransform
 
bool m_isCulled {true}
 
unsigned int m_controlDirtyState
 
CRect m_renderRegion
 

Static Protected Attributes

static const unsigned int DIRTY_STATE_CONTROL = 1
 
static const unsigned int DIRTY_STATE_CHILD = 2
 

Detailed Description

Base class for controls.

Member Typedef Documentation

◆ ActionMap

Set actions to perform on navigation.

Parameters
actionsActionMap of actions
See also
SetNavigationAction

Member Enumeration Documentation

◆ GUICONTROLTYPES

Enumerator
GUICONTROL_UNKNOWN 
GUICONTAINER_EPGGRID 
GUICONTAINER_FIXEDLIST 
GUICONTAINER_LIST 
GUICONTAINER_PANEL 
GUICONTAINER_WRAPLIST 
GUICONTROL_BORDEREDIMAGE 
GUICONTROL_BUTTON 
GUICONTROL_COLORBUTTON 
GUICONTROL_EDIT 
GUICONTROL_FADELABEL 
GUICONTROL_GAME 
GUICONTROL_GAMECONTROLLER 
GUICONTROL_GAMECONTROLLERLIST 
GUICONTROL_GROUP 
GUICONTROL_GROUPLIST 
GUICONTROL_IMAGE 
GUICONTROL_LABEL 
GUICONTROL_LISTGROUP 
GUICONTROL_LISTLABEL 
GUICONTROL_MOVER 
GUICONTROL_MULTI_IMAGE 
GUICONTROL_PROGRESS 
GUICONTROL_RADIO 
GUICONTROL_RANGES 
GUICONTROL_RENDERADDON 
GUICONTROL_RESIZE 
GUICONTROL_RSS 
GUICONTROL_SCROLLBAR 
GUICONTROL_SETTINGS_SLIDER 
GUICONTROL_SLIDER 
GUICONTROL_SPIN 
GUICONTROL_SPINEX 
GUICONTROL_TEXTBOX 
GUICONTROL_TOGGLEBUTTON 
GUICONTROL_VIDEO 
GUICONTROL_VISUALISATION 

◆ GUISCROLLVALUE

Enumerator
FOCUS 
NEVER 
ALWAYS 

◆ GUIVISIBLE

Enumerator
HIDDEN 
DELAYED 
VISIBLE 

Constructor & Destructor Documentation

◆ CGUIControl() [1/3]

CGUIControl::CGUIControl ( )

◆ CGUIControl() [2/3]

CGUIControl::CGUIControl ( int parentID,
int controlID,
float posX,
float posY,
float width,
float height )

◆ CGUIControl() [3/3]

CGUIControl::CGUIControl ( const CGUIControl & )
default

◆ ~CGUIControl()

CGUIControl::~CGUIControl ( void )
virtualdefault

Member Function Documentation

◆ AllocResources()

◆ Animate()

bool CGUIControl::Animate ( unsigned int currentTime)
protectedvirtual

Reimplemented in CGUIWindow.

◆ AssignDepth()

void CGUIControl::AssignDepth ( )
virtual

◆ CalcRenderRegion()

CRect CGUIControl::CalcRenderRegion ( ) const
virtual

calculate the render region in parentcontrol coordinates of this control Called during process to update m_renderRegion

Reimplemented in CGUIBorderedImage, CGUIButtonControl, CGUIImage, CGUILabelControl, CGUIListLabel, and CGUIRSSControl.

◆ CanFocus()

◆ CanFocusFromPoint()

bool CGUIControl::CanFocusFromPoint ( const CPoint & point) const
protectedvirtual

Test whether we can focus a control from a point on screen.

Parameters
pointthe location in vanilla skin coordinates from the upper left corner of the parent control.
Returns
true if the control can be focused from this location
See also
UnfocusFromPoint, HitRect

Reimplemented in CGUIRenderingControl, CGUIVideoControl, and CGUIVisualisationControl.

◆ CheckAnimation()

bool CGUIControl::CheckAnimation ( ANIMATION_TYPE animType)
protectedvirtual

Reimplemented in CGUIWindow.

◆ Clone()

◆ DoProcess()

◆ DoRender()

void CGUIControl::DoRender ( )
virtual

◆ DynamicResourceAlloc()

◆ FreeResources()

◆ GetAction()

CGUIAction CGUIControl::GetAction ( int actionID) const

Get an action the control can be perform.

Parameters
actionIDThe actionID to retrieve.

◆ GetAnimation()

CAnimation * CGUIControl::GetAnimation ( ANIMATION_TYPE type,
bool checkConditions = true )

◆ GetAnimations()

const std::vector< CAnimation > & CGUIControl::GetAnimations ( ) const
inline

◆ GetCondition()

virtual bool CGUIControl::GetCondition ( int condition,
int data ) const
inlinevirtual

◆ GetControl()

CGUIControl * CGUIControl::GetControl ( int id,
std::vector< CGUIControl * > * idCollector = nullptr )
virtual

Reimplemented in CGUIControlLookup.

◆ GetControlType()

GUICONTROLTYPES CGUIControl::GetControlType ( ) const
inline

◆ GetDescription()

◆ GetDescriptionByIndex()

virtual std::string CGUIControl::GetDescriptionByIndex ( int index) const
inlinevirtual

Reimplemented in CGUIEditControl.

◆ GetHeight()

float CGUIControl::GetHeight ( ) const
virtual

◆ GetID()

int CGUIControl::GetID ( void ) const
virtual

Reimplemented in CGUIWindowSettingsCategory.

◆ GetParentControl()

CGUIControl * CGUIControl::GetParentControl ( void ) const
inline

◆ GetParentID()

int CGUIControl::GetParentID ( void ) const

◆ GetPosition()

virtual CPoint CGUIControl::GetPosition ( ) const
inlineprotectedvirtual

Return the coordinates of the top left of the control, in the control's parent coordinates.

Returns
The top left coordinates of the control

Reimplemented in CGUIWindow.

◆ GetRenderPosition()

CPoint CGUIControl::GetRenderPosition ( ) const

◆ GetRenderRegion()

const CRect & CGUIControl::GetRenderRegion ( ) const
inline

return the render region in screen coordinates of this control

◆ GetWidth()

◆ GetXPosition()

float CGUIControl::GetXPosition ( ) const
virtual

◆ GetYPosition()

float CGUIControl::GetYPosition ( ) const
virtual

◆ HasAnimation()

bool CGUIControl::HasAnimation ( ANIMATION_TYPE anim)
virtual

Reimplemented in CGUIControlGroup.

◆ HasFocus()

bool CGUIControl::HasFocus ( void ) const
virtual

Reimplemented in CGUIControlGroup.

◆ HasProcessed()

bool CGUIControl::HasProcessed ( ) const
inline

Returns whether or not we have processed.

◆ HasVisibleCondition()

bool CGUIControl::HasVisibleCondition ( ) const
inline

◆ HitTest()

bool CGUIControl::HitTest ( const CPoint & point) const
virtual

Used to test whether the point is inside a control.

Parameters
pointlocation to test
Returns
true if the point is inside the bounds of this control.
See also
SetHitRect

Reimplemented in CGUISettingsSliderControl, CGUISliderControl, CGUISpinControl, and CGUISpinControlEx.

◆ IsAnimating()

bool CGUIControl::IsAnimating ( ANIMATION_TYPE anim)
virtual

Reimplemented in CGUIControlGroup, and CGUIWindow.

◆ IsContainer()

virtual bool CGUIControl::IsContainer ( ) const
inlinevirtual

Reimplemented in IGUIContainer.

◆ IsControlDirty()

bool CGUIControl::IsControlDirty ( ) const
inline

◆ IsControlRenderable()

bool CGUIControl::IsControlRenderable ( )

Test whether the control is "drawable" (not a group or similar)

Returns
true if the control has textures/labels it wants to render

◆ IsDisabled()

bool CGUIControl::IsDisabled ( ) const
virtual

◆ IsDynamicallyAllocated()

virtual bool CGUIControl::IsDynamicallyAllocated ( )
inlinevirtual

Reimplemented in CGUIImage, and CGUIMultiImage.

◆ IsGroup()

virtual bool CGUIControl::IsGroup ( ) const
inlinevirtual

Reimplemented in CGUIControlGroup.

◆ IsVisible()

bool CGUIControl::IsVisible ( ) const
virtual

◆ IsVisibleFromSkin()

bool CGUIControl::IsVisibleFromSkin ( ) const
inline

◆ MarkDirtyRegion()

void CGUIControl::MarkDirtyRegion ( const unsigned int dirtyState = DIRTY_STATE_CONTROL)

◆ Navigate()

bool CGUIControl::Navigate ( int direction) const

Start navigating in given direction.

◆ OnAction()

bool CGUIControl::OnAction ( const CAction & action)
virtual

Reimplemented in ADDON::CGUIAddonWindow, CGUIBaseContainer, CGUIButtonControl, CGUIColorButtonControl, CGUIControlGroup, CGUIControlGroupList, CGUIDialog, CGUIDialogAddonInfo, CGUIDialogAddonSettings, CGUIDialogContextMenu, CGUIDialogFileBrowser, CGUIDialogFullScreenInfo, CGUIDialogGamepad, CGUIDialogKeyboardGeneric, CGUIDialogMusicInfo, CGUIDialogMusicOSD, CGUIDialogNumeric, CGUIDialogPictureInfo, CGUIDialogPlayerProcessInfo, CGUIDialogSettingsBase, CGUIDialogSlider, CGUIDialogSongInfo, CGUIDialogTeletext, CGUIDialogTextViewer, CGUIDialogVideoBookmarks, CGUIDialogVideoInfo, CGUIDialogVideoManager, CGUIDialogVideoOSD, CGUIDialogVolumeBar, CGUIEditControl, CGUIFixedListContainer, CGUIImage, CGUIListContainer, CGUIMediaWindow, CGUIMoverControl, CGUIMultiImage, CGUIPanelContainer, CGUIRadioButtonControl, CGUIResizeControl, CGUISettingsSliderControl, CGUISliderControl, CGUISpinControl, CGUIToggleButtonControl, CGUIVisualisationControl, CGUIWindow, CGUIWindowFavourites, CGUIWindowFileManager, CGUIWindowFullScreen, CGUIWindowHome, CGUIWindowLoginScreen, CGUIWindowMusicBase, CGUIWindowMusicNav, CGUIWindowMusicPlayList, CGUIWindowMusicPlaylistEditor, CGUIWindowScreensaver, CGUIWindowSettingsCategory, CGUIWindowSettingsScreenCalibration, CGUIWindowSlideShow, CGUIWindowSplash, CGUIWindowStartup, CGUIWindowVideoBase, CGUIWindowVideoNav, CGUIWindowVideoPlaylist, CGUIWindowVisualisation, CGUIWrappingListContainer, GUIScrollBarControl, KODI::GAME::CDialogGameOSD, KODI::RETRO::CGameWindowFullScreen, PVR::CGUIDialogPVRChannelManager, PVR::CGUIDialogPVRChannelsOSD, PVR::CGUIDialogPVRGroupManager, PVR::CGUIDialogPVRItemsViewBase, PVR::CGUIEPGGridContainer, PVR::CGUIWindowPVRBase, PVR::CGUIWindowPVRChannelsBase, PVR::CGUIWindowPVRGuideBase, PVR::CGUIWindowPVRRecordingsBase, PVR::CGUIWindowPVRSearchBase, PVR::CGUIWindowPVRTimersBase, XBMCAddon::xbmcgui::Interceptor< CGUIMediaWindow >, and XBMCAddon::xbmcgui::WindowXMLInterceptor.

◆ OnBack()

bool CGUIControl::OnBack ( )
virtual

◆ OnDown()

void CGUIControl::OnDown ( )
virtual

◆ OnFocus()

virtual void CGUIControl::OnFocus ( )
inlinevirtual

◆ OnInfo()

bool CGUIControl::OnInfo ( )
virtual

◆ OnLeft()

◆ OnMessage()

bool CGUIControl::OnMessage ( CGUIMessage & message)
virtual

Reimplemented in ADDON::CGUIAddonWindow, CGUIBaseContainer, CGUIButtonControl, CGUIColorButtonControl, CGUIControlGroup, CGUIControlGroupList, CGUIDialog, CGUIDialogAddonInfo, CGUIDialogAddonSettings, CGUIDialogBoxBase, CGUIDialogButtonMenu, CGUIDialogColorPicker, CGUIDialogContextMenu, CGUIDialogExtendedProgressBar, CGUIDialogFileBrowser, CGUIDialogGamepad, CGUIDialogKaiToast, CGUIDialogKeyboardGeneric, CGUIDialogLibExportSettings, CGUIDialogMediaFilter, CGUIDialogMediaSource, CGUIDialogMusicInfo, CGUIDialogMusicOSD, CGUIDialogNetworkSetup, CGUIDialogNumeric, CGUIDialogOK, CGUIDialogPlayEject, CGUIDialogProgress, CGUIDialogSeekBar, CGUIDialogSelect, CGUIDialogSettingsBase, CGUIDialogSlider, CGUIDialogSmartPlaylistEditor, CGUIDialogSmartPlaylistRule, CGUIDialogSongInfo, CGUIDialogSubMenu, CGUIDialogSubtitles, CGUIDialogSubtitleSettings, CGUIDialogTeletext, CGUIDialogTextViewer, CGUIDialogVideoBookmarks, CGUIDialogVideoInfo, CGUIDialogVideoManager, CGUIDialogVideoManagerExtras, CGUIDialogVideoManagerVersions, CGUIDialogVideoOSD, CGUIDialogVisualisationPresetList, CGUIDialogVolumeBar, CGUIDialogYesNo, CGUIEditControl, CGUIFadeLabelControl, CGUIImage, CGUILabelControl, CGUIListContainer, CGUIMediaWindow, CGUIMultiImage, CGUIPanelContainer, CGUIProgressControl, CGUIRadioButtonControl, CGUISliderControl, CGUISpinControl, CGUITextBox, CGUIVisualisationControl, CGUIWindow, CGUIWindowAddonBrowser, CGUIWindowDebugInfo, CGUIWindowEventLog, CGUIWindowFavourites, CGUIWindowFileManager, CGUIWindowFullScreen, CGUIWindowHome, CGUIWindowLoginScreen, CGUIWindowMusicBase, CGUIWindowMusicNav, CGUIWindowMusicPlayList, CGUIWindowMusicPlaylistEditor, CGUIWindowPictures, CGUIWindowPrograms, CGUIWindowScreensaver, CGUIWindowSettingsCategory, CGUIWindowSettingsProfile, CGUIWindowSettingsScreenCalibration, CGUIWindowSlideShow, CGUIWindowSystemInfo, CGUIWindowVideoBase, CGUIWindowVideoNav, CGUIWindowVideoPlaylist, CGUIWindowVisualisation, CGUIWindowWeather, CGUIWrappingListContainer, GUIScrollBarControl, KODI::GAME::CDialogGameAdvancedSettings, KODI::GAME::CDialogGameSaves, KODI::GAME::CDialogGameVideoSelect, KODI::GAME::CDialogGameVolume, KODI::GAME::CDialogInGameSaves, KODI::GAME::CGUIAgentWindow, KODI::GAME::CGUIControllerWindow, KODI::GAME::CGUIPortWindow, KODI::GAME::CGUIWindowGames, KODI::RETRO::CGameWindowFullScreen, PERIPHERALS::CGUIDialogPeripherals, PERIPHERALS::CGUIDialogPeripheralSettings, PVR::CGUIDialogPVRChannelManager, PVR::CGUIDialogPVRChannelsOSD, PVR::CGUIDialogPVRGroupManager, PVR::CGUIDialogPVRGuideInfo, PVR::CGUIDialogPVRGuideSearch, PVR::CGUIDialogPVRRadioRDSInfo, PVR::CGUIDialogPVRRecordingInfo, PVR::CGUIEPGGridContainer, PVR::CGUIWindowPVRBase, PVR::CGUIWindowPVRChannelsBase, PVR::CGUIWindowPVRGuideBase, PVR::CGUIWindowPVRRecordingsBase, PVR::CGUIWindowPVRSearchBase, PVR::CGUIWindowPVRTimersBase, and XBMCAddon::xbmcgui::Interceptor< CGUIMediaWindow >.

◆ OnMouseEvent()

virtual EVENT_RESULT CGUIControl::OnMouseEvent ( const CPoint & point,
const KODI::MOUSE::CMouseEvent & event )
inlinevirtual

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.

Parameters
pointthe location in transformed skin coordinates from the upper left corner of the parent control.
eventthe mouse event to perform
Returns
EVENT_RESULT corresponding to whether the control handles this event
See also
SendMouseEvent, HitTest, CanFocusFromPoint, CMouseEvent

Reimplemented in CGUIBaseContainer, CGUIButtonControl, CGUIControlGroupList, CGUIDialogVideoOSD, CGUIMoverControl, CGUIResizeControl, CGUISettingsSliderControl, CGUISliderControl, CGUISpinControl, CGUIVideoControl, CGUIWindow, CGUIWindowFullScreen, CGUIWindowSlideShow, CGUIWindowVisualisation, GUIScrollBarControl, and PVR::CGUIEPGGridContainer.

◆ OnMouseOver()

bool CGUIControl::OnMouseOver ( const CPoint & point)
protectedvirtual

Called when the mouse is over the control. Default implementation selects the control.

Parameters
pointlocation of the mouse in transformed skin coordinates
Returns
true if handled, false otherwise.

Reimplemented in CGUIBaseContainer, CGUISpinControl, and PVR::CGUIEPGGridContainer.

◆ OnNextControl()

void CGUIControl::OnNextControl ( )
virtual

◆ OnPrevControl()

void CGUIControl::OnPrevControl ( )
virtual

◆ OnRight()

◆ OnUnFocus()

virtual void CGUIControl::OnUnFocus ( void )
inlinevirtual

◆ OnUp()

◆ Process()

◆ QueueAnimation()

void CGUIControl::QueueAnimation ( ANIMATION_TYPE anim)
virtual

Reimplemented in CGUIControlGroup.

◆ Render()

◆ RenderEx()

◆ ResetAnimation()

void CGUIControl::ResetAnimation ( ANIMATION_TYPE type)
virtual

Reimplemented in CGUIControlGroup, and CGUIListGroup.

◆ ResetAnimations()

void CGUIControl::ResetAnimations ( )
virtual

Reimplemented in CGUIControlGroup.

◆ SaveStates()

void CGUIControl::SaveStates ( std::vector< CControlState > & states)
virtual

Reimplemented in CGUIBaseContainer, and CGUIControlGroup.

◆ SendMouseEvent()

EVENT_RESULT CGUIControl::SendMouseEvent ( const CPoint & point,
const KODI::MOUSE::CMouseEvent & event )
virtual

React to a mouse event.

Mouse events are sent from the window to all controls, and each control can react based on the event and location of the event.

Parameters
pointthe location in transformed skin coordinates from the upper left corner of the parent control.
eventthe mouse event to perform
Returns
EVENT_RESULT corresponding to whether the control handles this event
See also
HitTest, CanFocusFromPoint, CMouseEvent, EVENT_RESULT

Reimplemented in CGUIControlGroup, and CGUIControlGroupList.

◆ SendWindowMessage()

bool CGUIControl::SendWindowMessage ( CGUIMessage & message) const
protected

◆ SetAction()

void CGUIControl::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.

Parameters
actionIDid of the navigation action
actionCGUIAction to set
replaceActions are set only if replace is true or there is no previously set action. Defaults to true
See also
SetNavigationActions

◆ SetActions()

void CGUIControl::SetActions ( const ActionMap & actions)

◆ SetAnimations()

void CGUIControl::SetAnimations ( const std::vector< CAnimation > & animations)

◆ SetCamera()

void CGUIControl::SetCamera ( const CPoint & camera)
virtual

◆ SetColorDiffuse()

bool CGUIControl::SetColorDiffuse ( const KODI::GUILIB::GUIINFO::CGUIInfoColor & color)

◆ SetControlStats()

void CGUIControl::SetControlStats ( GUICONTROLSTATS * controlStats)
inline

◆ SetEnableCondition()

void CGUIControl::SetEnableCondition ( const std::string & expression)

◆ SetEnabled()

void CGUIControl::SetEnabled ( bool bEnable)
virtual

◆ SetFocus()

void CGUIControl::SetFocus ( bool focus)
virtual

◆ SetHeight()

◆ SetHitRect()

void CGUIControl::SetHitRect ( const CRect & rect,
const UTILS::COLOR::Color & color )
virtual

◆ SetID()

virtual void CGUIControl::SetID ( int id)
inlinevirtual

Reimplemented in CGUIWindow.

◆ SetInitialVisibility()

void CGUIControl::SetInitialVisibility ( )
virtual

Reimplemented in CGUIControlGroup, and CGUIWindow.

◆ SetInvalid()

◆ SetParentControl()

void CGUIControl::SetParentControl ( CGUIControl * control)
inline

◆ SetPosition()

◆ SetPulseOnSelect()

virtual void CGUIControl::SetPulseOnSelect ( bool pulse)
inlinevirtual

◆ SetPushUpdates()

virtual void CGUIControl::SetPushUpdates ( bool pushUpdates)
inlinevirtual

◆ SetStereoFactor()

void CGUIControl::SetStereoFactor ( const float & factor)
virtual

◆ SetVisible()

void CGUIControl::SetVisible ( bool bVisible,
bool setVisState = false )
virtual
Todo
currently we only update m_visible from GUI_MSG_VISIBLE (SET_CONTROL_VISIBLE) otherwise we just set m_forceHidden

◆ SetVisibleCondition()

void CGUIControl::SetVisibleCondition ( const std::string & expression,
const std::string & allowHiddenFocus = "" )

◆ SetWidth()

◆ UnfocusFromPoint()

void CGUIControl::UnfocusFromPoint ( const CPoint & point)
virtual

Unfocus the control if the given point on screen is not within it's boundary.

Parameters
pointthe location in transformed skin coordinates from the upper left corner of the parent control.
See also
CanFocusFromPoint

Reimplemented in CGUIControlGroup, and CGUIControlGroupList.

◆ UpdateColors()

◆ UpdateControlStats()

void CGUIControl::UpdateControlStats ( )
virtual

Reimplemented in CGUIWindow.

◆ UpdateInfo()

◆ UpdateStates()

void CGUIControl::UpdateStates ( ANIMATION_TYPE type,
ANIMATION_PROCESS currentProcess,
ANIMATION_STATE currentState )
protected

◆ UpdateVisibility()

void CGUIControl::UpdateVisibility ( const CGUIListItem * item)
virtual

Member Data Documentation

◆ ControlType

GUICONTROLTYPES CGUIControl::ControlType
protected

◆ DIRTY_STATE_CHILD

const unsigned int CGUIControl::DIRTY_STATE_CHILD = 2
staticprotected

◆ DIRTY_STATE_CONTROL

const unsigned int CGUIControl::DIRTY_STATE_CONTROL = 1
staticprotected

◆ m_actions

ActionMap CGUIControl::m_actions
protected

◆ m_allowHiddenFocus

KODI::GUILIB::GUIINFO::CGUIInfoBool CGUIControl::m_allowHiddenFocus
protected

◆ m_animations

std::vector<CAnimation> CGUIControl::m_animations
protected

◆ m_bAllocated

bool CGUIControl::m_bAllocated
protected

◆ m_bHasFocus

bool CGUIControl::m_bHasFocus
protected

◆ m_bInvalidated

bool CGUIControl::m_bInvalidated
protected

◆ m_cachedTransform

TransformMatrix CGUIControl::m_cachedTransform
protected

◆ m_camera

CPoint CGUIControl::m_camera
protected

◆ m_controlDirtyState

unsigned int CGUIControl::m_controlDirtyState
protected

◆ m_controlID

int CGUIControl::m_controlID
protected

◆ m_controlStats

GUICONTROLSTATS* CGUIControl::m_controlStats
protected

◆ m_diffuseColor

KODI::GUILIB::GUIINFO::CGUIInfoColor CGUIControl::m_diffuseColor
protected

◆ m_enableCondition

INFO::InfoPtr CGUIControl::m_enableCondition
protected

◆ m_enabled

bool CGUIControl::m_enabled
protected

◆ m_forceHidden

bool CGUIControl::m_forceHidden
protected

◆ m_hasCamera

bool CGUIControl::m_hasCamera
protected

◆ m_hasProcessed

bool CGUIControl::m_hasProcessed
protected

◆ m_height

float CGUIControl::m_height
protected

◆ m_hitColor

UTILS::COLOR::Color CGUIControl::m_hitColor = 0xffffffff
protected

◆ m_hitRect

CRect CGUIControl::m_hitRect
protected

◆ m_isCulled

bool CGUIControl::m_isCulled {true}
protected

◆ m_parentControl

CGUIControl* CGUIControl::m_parentControl
protected

◆ m_parentID

int CGUIControl::m_parentID
protected

◆ m_posX

float CGUIControl::m_posX
protected

◆ m_posY

float CGUIControl::m_posY
protected

◆ m_pulseOnSelect

bool CGUIControl::m_pulseOnSelect
protected

◆ m_pushedUpdates

bool CGUIControl::m_pushedUpdates
protected

◆ m_renderRegion

CRect CGUIControl::m_renderRegion
protected

◆ m_stereo

float CGUIControl::m_stereo
protected

◆ m_transform

TransformMatrix CGUIControl::m_transform
protected

◆ m_visible

GUIVISIBLE CGUIControl::m_visible
protected

◆ m_visibleCondition

INFO::InfoPtr CGUIControl::m_visibleCondition
protected

◆ m_visibleFromSkinCondition

bool CGUIControl::m_visibleFromSkinCondition
protected

◆ m_width

float CGUIControl::m_width
protected

The documentation for this class was generated from the following files: