Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
kodi::gui::CWindow Class Reference

#include <Window.h>

Inheritance diagram for kodi::gui::CWindow:
kodi::gui::CAddonGUIControlBase

Public Member Functions

 CWindow (const std::string &xmlFilename, const std::string &defaultSkin, bool asDialog, bool isMedia=false)
 Class constructor with needed values for window / dialog. More...
 
 ~CWindow () override
 Class destructor. More...
 
bool Show ()
 Show this window. More...
 
void Close ()
 Closes this window. More...
 
void DoModal ()
 Display this window until close() is called. More...
 
bool SetFocusId (int iControlId)
 Gives the control with the supplied focus. More...
 
int GetFocusId ()
 Returns the id of the control which is focused. More...
 
void SetControlLabel (int controlId, const std::string &label)
 To set the used label on given control id. More...
 
void SetProperty (const std::string &key, const std::string &value)
 Sets a window property, similar to an infolabel. More...
 
std::string GetProperty (const std::string &key) const
 Returns a window property as a string, similar to an infolabel. More...
 
void SetPropertyInt (const std::string &key, int value)
 Sets a window property with integer value. More...
 
int GetPropertyInt (const std::string &key) const
 Returns a window property with integer value. More...
 
void SetPropertyBool (const std::string &key, bool value)
 Sets a window property with boolean value. More...
 
bool GetPropertyBool (const std::string &key) const
 Returns a window property with boolean value. More...
 
void SetPropertyDouble (const std::string &key, double value)
 Sets a window property with double value. More...
 
double GetPropertyDouble (const std::string &key) const
 Returns a window property with double value. More...
 
void ClearProperties ()
 Remove all present properties from window. More...
 
void ClearProperty (const std::string &key)
 Clears the specific window property. More...
 
void ClearList ()
 Function delete all entries in integrated list. More...
 
void AddListItem (ListItemPtr item, int itemPosition=-1)
 To add a list item in the on window integrated list. More...
 
void AddListItem (const std::string item, int itemPosition=-1)
 To add a list item based upon string in the on window integrated list. More...
 
void RemoveListItem (int itemPosition)
 Remove list item on position. More...
 
void RemoveListItem (ListItemPtr item)
 Remove item with given control class from list. More...
 
ListItemPtr GetListItem (int listPos)
 To get list item control class on wanted position. More...
 
void SetCurrentListPosition (int listPos)
 To set position of selected part in list. More...
 
int GetCurrentListPosition ()
 To get current selected position in list. More...
 
int GetListSize ()
 To get the amount of entries in the list. More...
 
void SetContainerProperty (const std::string &key, const std::string &value)
 Sets a container property, similar to an infolabel. More...
 
void SetContainerContent (const std::string &value)
 Sets the content type of the container. More...
 
int GetCurrentContainerId ()
 Get the id of the currently visible container. More...
 
void MarkDirtyRegion ()
 To inform Kodi that it need to render region new. More...
 
virtual bool OnInit ()
 GUI window callback functions. More...
 
virtual bool OnFocus (int controlId)
 OnFocus method. More...
 
virtual bool OnClick (int controlId)
 OnClick method. More...
 
virtual bool OnAction (int actionId)
 OnAction method. More...
 
virtual void GetContextButtons (int itemNumber, std::vector< std::pair< unsigned int, std::string > > &buttons)
 Get context menu buttons for list entry. More...
 
virtual bool OnContextButton (int itemNumber, unsigned int button)
 Called after selection in context menu. More...
 
void SetIndependentCallbacks (GUIHANDLE cbhdl, bool(*CBOnInit)(GUIHANDLE cbhdl), bool(*CBOnFocus)(GUIHANDLE cbhdl, int controlId), bool(*CBOnClick)(GUIHANDLE cbhdl, int controlId), bool(*CBOnAction)(GUIHANDLE cbhdl, int actionId), void(*CBGetContextButtons)(GUIHANDLE cbhdl, int itemNumber, gui_context_menu_pair *buttons, unsigned int *size)=nullptr, bool(*CBOnContextButton)(GUIHANDLE cbhdl, int itemNumber, unsigned int button)=nullptr)
 Set independent callbacks More...
 
- Public Member Functions inherited from kodi::gui::CAddonGUIControlBase
GUIHANDLE GetControlHandle () const
 

Additional Inherited Members

- Protected Member Functions inherited from kodi::gui::CAddonGUIControlBase
 CAddonGUIControlBase (CAddonGUIControlBase *window)
 
virtual ~CAddonGUIControlBase ()=default
 
- Protected Attributes inherited from kodi::gui::CAddonGUIControlBase
GUIHANDLE m_controlHandle
 
AddonToKodiFuncTable_Addonm_interface
 
CAddonGUIControlBasem_Window
 

Constructor & Destructor Documentation

◆ ~CWindow()

kodi::gui::CWindow::~CWindow ( )
inlineoverride

Class destructor.


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