![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
\cpp_class{ kodi::gui::CWindow } Main window control class More...
Modules | |
Definitions, structures and enumerators | |
Library definition values | |
Callback functions from Kodi to add-on | |
Functions | |
kodi::gui::CWindow::CWindow (const std::string &xmlFilename, const std::string &defaultSkin, bool asDialog, bool isMedia=false) | |
Class constructor with needed values for window / dialog. More... | |
bool | kodi::gui::CWindow::Show () |
Show this window. More... | |
void | kodi::gui::CWindow::Close () |
Closes this window. More... | |
void | kodi::gui::CWindow::DoModal () |
Display this window until close() is called. More... | |
bool | kodi::gui::CWindow::SetFocusId (int iControlId) |
Gives the control with the supplied focus. More... | |
int | kodi::gui::CWindow::GetFocusId () |
Returns the id of the control which is focused. More... | |
void | kodi::gui::CWindow::SetControlLabel (int controlId, const std::string &label) |
To set the used label on given control id. More... | |
void | kodi::gui::CWindow::SetProperty (const std::string &key, const std::string &value) |
Sets a window property, similar to an infolabel. More... | |
std::string | kodi::gui::CWindow::GetProperty (const std::string &key) const |
Returns a window property as a string, similar to an infolabel. More... | |
void | kodi::gui::CWindow::SetPropertyInt (const std::string &key, int value) |
Sets a window property with integer value. More... | |
int | kodi::gui::CWindow::GetPropertyInt (const std::string &key) const |
Returns a window property with integer value. More... | |
void | kodi::gui::CWindow::SetPropertyBool (const std::string &key, bool value) |
Sets a window property with boolean value. More... | |
bool | kodi::gui::CWindow::GetPropertyBool (const std::string &key) const |
Returns a window property with boolean value. More... | |
void | kodi::gui::CWindow::SetPropertyDouble (const std::string &key, double value) |
Sets a window property with double value. More... | |
double | kodi::gui::CWindow::GetPropertyDouble (const std::string &key) const |
Returns a window property with double value. More... | |
void | kodi::gui::CWindow::ClearProperties () |
Remove all present properties from window. More... | |
void | kodi::gui::CWindow::ClearProperty (const std::string &key) |
Clears the specific window property. More... | |
void | kodi::gui::CWindow::ClearList () |
Function delete all entries in integrated list. More... | |
void | kodi::gui::CWindow::AddListItem (ListItemPtr item, int itemPosition=-1) |
To add a list item in the on window integrated list. More... | |
void | kodi::gui::CWindow::AddListItem (const std::string item, int itemPosition=-1) |
To add a list item based upon string in the on window integrated list. More... | |
void | kodi::gui::CWindow::RemoveListItem (int itemPosition) |
Remove list item on position. More... | |
void | kodi::gui::CWindow::RemoveListItem (ListItemPtr item) |
Remove item with given control class from list. More... | |
ListItemPtr | kodi::gui::CWindow::GetListItem (int listPos) |
To get list item control class on wanted position. More... | |
void | kodi::gui::CWindow::SetCurrentListPosition (int listPos) |
To set position of selected part in list. More... | |
int | kodi::gui::CWindow::GetCurrentListPosition () |
To get current selected position in list. More... | |
int | kodi::gui::CWindow::GetListSize () |
To get the amount of entries in the list. More... | |
void | kodi::gui::CWindow::SetContainerProperty (const std::string &key, const std::string &value) |
Sets a container property, similar to an infolabel. More... | |
void | kodi::gui::CWindow::SetContainerContent (const std::string &value) |
Sets the content type of the container. More... | |
int | kodi::gui::CWindow::GetCurrentContainerId () |
Get the id of the currently visible container. More... | |
void | kodi::gui::CWindow::MarkDirtyRegion () |
To inform Kodi that it need to render region new. More... | |
\cpp_class{ kodi::gui::CWindow } Main window control class
The with #include <kodi/gui/Window.h> included file brings support to create a window or dialog on Kodi.
On functions defined input variable controlId
(GUI control identifier) is the on window.xml defined value behind type added with id="..."
and used to identify for changes there and on callbacks.
|
inline |
To add a list item based upon string in the on window integrated list.
[in] | item | List item to add |
[in] | itemPosition | [opt] The position for item, default is on end |
|
inline |
To add a list item in the on window integrated list.
[in] | item | List item to add |
[in] | itemPosition | [opt] The position for item, default is on end |
|
inline |
Function delete all entries in integrated list.
|
inline |
Remove all present properties from window.
|
inline |
Clears the specific window property.
[in] | key | string - property name. |
Example:
|
inline |
Closes this window.
Closes this window by activating the old window.
|
inline |
Class constructor with needed values for window / dialog.
Creates a new Window class.
[in] | xmlFilename | XML file for the skin |
[in] | defaultSkin | default skin to use if needed not available |
[in] | asDialog | Use window as dialog if set |
[in] | isMedia | [opt] bool - if False, create a regular window. if True, create a mediawindow. (default=false) |
|
inline |
Display this window until close() is called.
|
inline |
Get the id of the currently visible container.
|
inline |
To get current selected position in list.
|
inline |
Returns the id of the control which is focused.
|
inline |
To get list item control class on wanted position.
[in] | listPos | Position from where control is needed |
|
inline |
To get the amount of entries in the list.
|
inline |
Returns a window property as a string, similar to an infolabel.
[in] | key | string - property name. |
|
inline |
Returns a window property with boolean value.
[in] | key | string - property name. |
|
inline |
Returns a window property with double value.
[in] | key | string - property name. |
|
inline |
Returns a window property with integer value.
[in] | key | string - property name. |
|
inline |
To inform Kodi that it need to render region new.
|
inline |
Remove list item on position.
[in] | itemPosition | List position to remove |
|
inline |
Remove item with given control class from list.
[in] | item | List item control class to remove |
|
inline |
Sets the content type of the container.
[in] | value | string or unicode - content value. |
Available content types
Name | Media |
---|---|
actors | Videos |
addons | Addons, Music, Pictures, Programs, Videos |
albums | Music, Videos |
artists | Music, Videos |
countries | Music, Videos |
directors | Videos |
files | Music, Videos |
games | Games |
genres | Music, Videos |
images | Pictures |
mixed | Music, Videos |
movies | Videos |
Musicvideos | Music, Videos |
playlists | Music, Videos |
seasons | Videos |
sets | Videos |
songs | Music |
studios | Music, Videos |
tags | Music, Videos |
tvshows | Videos |
videos | Videos |
years | Music, Videos |
|
inline |
Sets a container property, similar to an infolabel.
[in] | key | string - property name. |
[in] | value | string or unicode - value of property. |
|
inline |
To set the used label on given control id.
[in] | controlId | Control id where label need to set |
[in] | label | Label to use |
|
inline |
To set position of selected part in list.
[in] | listPos | Position to use |
|
inline |
Gives the control with the supplied focus.
[in] | iControlId | On skin defined id of control |
|
inline |
Sets a window property, similar to an infolabel.
[in] | key | string - property name. |
[in] | value | string or unicode - value of property. |
|
inline |
Sets a window property with boolean value.
[in] | key | string - property name. |
[in] | value | boolean value to set |
|
inline |
Sets a window property with double value.
[in] | key | string - property name. |
[in] | value | double value to set |
|
inline |
Sets a window property with integer value.
[in] | key | string - property name. |
[in] | value | integer value to set |
|
inline |
Show this window.
Shows this window by activating it, calling close() after it wil activate the current window again.