| |
- __builtin__.object
-
- Action
- Dialog
- DialogProgress
- ListItem
- Window
-
- WindowDialog
- WindowXML
-
- WindowXMLDialog
- Control(__builtin__.object)
-
- ControlButton
- ControlCheckMark
- ControlFadeLabel
- ControlGroup
- ControlImage
- ControlLabel
- ControlList
- ControlProgress
- ControlRadioButton
- ControlTextBox
class ControlButton(Control) |
|
ControlButton class.
ControlButton(x, y, width, height, label[, focusTexture, noFocusTexture, textXOffset, textYOffset,
alignment, font, textColor, disabledColor, angle, shadowColor, focusedColor])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
label : string or unicode - text string.
focusTexture : [opt] string - filename for focus texture.
noFocusTexture : [opt] string - filename for no focus texture.
textXOffset : [opt] integer - x offset of label.
textYOffset : [opt] integer - y offset of label.
alignment : [opt] integer - alignment of label - *Note, see xbfont.h
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of enabled button's label. (e.g. '0xFFFFFFFF')
disabledColor : [opt] hexstring - color of disabled button's label. (e.g. '0xFFFF3300')
angle : [opt] integer - angle of control. (+ rotates CCW, - rotates CW)
shadowColor : [opt] hexstring - color of button's label's shadow. (e.g. '0xFF000000')
focusedColor : [opt] hexstring - color of focused button's label. (e.g. '0xFF00FFFF')
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.button = xbmcgui.ControlButton(100, 250, 200, 50, 'Status', font='font14') |
|
- Method resolution order:
- ControlButton
- Control
- __builtin__.object
Methods defined here:
- setDisabledColor(...)
- setDisabledColor(disabledColor) -- Set's this buttons disabled color.
disabledColor : hexstring - color of disabled button's label. (e.g. '0xFFFF3300')
example:
- self.button.setDisabledColor('0xFFFF3300')
- setLabel(...)
- setLabel([label, font, textColor, disabledColor, shadowColor, focusedColor]) -- Set's this buttons text attributes.
label : [opt] string or unicode - text string.
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of enabled button's label. (e.g. '0xFFFFFFFF')
disabledColor : [opt] hexstring - color of disabled button's label. (e.g. '0xFFFF3300')
shadowColor : [opt] hexstring - color of button's label's shadow. (e.g. '0xFF000000')
focusedColor : [opt] hexstring - color of focused button's label. (e.g. '0xFFFFFF00')
label2 : [opt] string or unicode - text string.
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- self.button.setLabel('Status', 'font14', '0xFFFFFFFF', '0xFFFF3300', '0xFF000000')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlCheckMark(Control) |
|
ControlCheckMark class.
ControlCheckMark(x, y, width, height, label[, focusTexture, noFocusTexture,
checkWidth, checkHeight, alignment, font, textColor, disabledColor])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
label : string or unicode - text string.
focusTexture : [opt] string - filename for focus texture.
noFocusTexture : [opt] string - filename for no focus texture.
checkWidth : [opt] integer - width of checkmark.
checkHeight : [opt] integer - height of checkmark.
alignment : [opt] integer - alignment of label - *Note, see xbfont.h
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of enabled checkmark's label. (e.g. '0xFFFFFFFF')
disabledColor : [opt] hexstring - color of disabled checkmark's label. (e.g. '0xFFFF3300')
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.checkmark = xbmcgui.ControlCheckMark(100, 250, 200, 50, 'Status', font='font14') |
|
- Method resolution order:
- ControlCheckMark
- Control
- __builtin__.object
Methods defined here:
- getSelected(...)
- getSelected() -- Returns the selected status for this checkmark as a bool.
example:
- selected = self.checkmark.getSelected()
- setDisabledColor(...)
- setDisabledColor(disabledColor) -- Set's this controls disabled color.
disabledColor : hexstring - color of disabled checkmark's label. (e.g. '0xFFFF3300')
example:
- self.checkmark.setDisabledColor('0xFFFF3300')
- setLabel(...)
- setLabel(label[, font, textColor, disabledColor]) -- Set's this controls text attributes.
label : string or unicode - text string.
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of enabled checkmark's label. (e.g. '0xFFFFFFFF')
disabledColor : [opt] hexstring - color of disabled checkmark's label. (e.g. '0xFFFF3300')
example:
- self.checkmark.setLabel('Status', 'font14', '0xFFFFFFFF', '0xFFFF3300')
- setSelected(...)
- setSelected(isOn) -- Sets this checkmark status to on or off.
isOn : bool - True=selected (on) / False=not selected (off)
example:
- self.checkmark.setSelected(True)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlFadeLabel(Control) |
|
ControlFadeLabel class.
Control that scroll's lables
ControlFadeLabel(x, y, width, height[, font, textColor, alignment])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of fadelabel's labels. (e.g. '0xFFFFFFFF')
alignment : [opt] integer - alignment of label - *Note, see xbfont.h
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.fadelabel = xbmcgui.ControlFadeLabel(100, 250, 200, 50, textColor='0xFFFFFFFF') |
|
- Method resolution order:
- ControlFadeLabel
- Control
- __builtin__.object
Methods defined here:
- addLabel(...)
- addLabel(label) -- Add a label to this control for scrolling.
label : string or unicode - text string.
example:
- self.fadelabel.addLabel('This is a line of text that can scroll.')
- reset(...)
- reset() -- Clears this fadelabel.
example:
- self.fadelabel.reset()
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlGroup(Control) |
|
ControlGroup class.
ControlGroup(x, y, width, height
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
example:
- self.group = xbmcgui.ControlGroup(100, 250, 125, 75) |
|
- Method resolution order:
- ControlGroup
- Control
- __builtin__.object
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlImage(Control) |
|
ControlImage class.
ControlImage(x, y, width, height, filename[, colorKey, aspectRatio, colorDiffuse])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
filename : string - image filename.
colorKey : [opt] hexString - (example, '0xFFFF3300')
aspectRatio : [opt] integer - (values 0 = stretch (default), 1 = scale up (crops), 2 = scale down (black bars)colorDiffuse : hexString - (example, '0xC0FF0000' (red tint))
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.image = xbmcgui.ControlImage(100, 250, 125, 75, aspectRatio=2) |
|
- Method resolution order:
- ControlImage
- Control
- __builtin__.object
Methods defined here:
- setColorDiffuse(...)
- setColorDiffuse(colorDiffuse) -- Changes the images color.
colorDiffuse : hexString - (example, '0xC0FF0000' (red tint))
example:
- self.image.setColorDiffuse('0xC0FF0000')
- setImage(...)
- setImage(filename, colorKey) -- Changes the image.
filename : string - image filename.
colorKey : [opt] hexString - (example, '0xFFFF3300')
example:
- self.image.setImage('q:\scripts\test.png', '0xFFFF3300')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlLabel(Control) |
|
ControlLabel class.
ControlLabel(x, y, width, height, label[, font, textColor,
disabledColor, alignment, hasPath, angle])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
label : string or unicode - text string.
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of enabled label's label. (e.g. '0xFFFFFFFF')
disabledColor : [opt] hexstring - color of disabled label's label. (e.g. '0xFFFF3300')
alignment : [opt] integer - alignment of label - *Note, see xbfont.h
hasPath : [opt] bool - True=stores a path / False=no path.
angle : [opt] integer - angle of control. (+ rotates CCW, - rotates CW)
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.label = xbmcgui.ControlLabel(100, 250, 125, 75, 'Status', angle=45) |
|
- Method resolution order:
- ControlLabel
- Control
- __builtin__.object
Methods defined here:
- getLabel(...)
- getLabel() -- Returns the text value for this label.
example:
- label = self.label.getLabel()
- setLabel(...)
- setLabel(label) -- Set's text for this label.
label : string or unicode - text string.
example:
- self.label.setLabel('Status')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlList(Control) |
|
ControlList class.
ControlList(x, y, width, height[, font, textColor, buttonTexture, buttonFocusTexture,
selectedColor, imageWidth, imageHeight, itemTextXOffset, itemTextYOffset,
itemHeight, space, alignmentY])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
font : [opt] string - font used for items label. (e.g. 'font13')
textColor : [opt] hexstring - color of items label. (e.g. '0xFFFFFFFF')
buttonTexture : [opt] string - filename for focus texture.
buttonFocusTexture : [opt] string - filename for no focus texture.
selectedColor : [opt] integer - x offset of label.
imageWidth : [opt] integer - width of items icon or thumbnail.
imageHeight : [opt] integer - height of items icon or thumbnail.
itemTextXOffset : [opt] integer - x offset of items label.
itemTextYOffset : [opt] integer - y offset of items label.
itemHeight : [opt] integer - height of items.
space : [opt] integer - space between items.
alignmentY : [opt] integer - Y-axis alignment of items label - *Note, see xbfont.h
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.cList = xbmcgui.ControlList(100, 250, 200, 250, 'font14', space=5) |
|
- Method resolution order:
- ControlList
- Control
- __builtin__.object
Methods defined here:
- addItem(...)
- addItem(item) -- Add a new item to this control list.
item : string, unicode or ListItem - item to add.
example:
- cList.addItem('Reboot XBMC')
- getItemHeight(...)
- getItemHeight() -- Returns the control's current item height as an integer.
example:
- item_height = self.cList.getItemHeight()
- getListItem(...)
- getListItem(index) -- Returns a given ListItem in this List.
index : integer - index number of item to return.
*Note, throws a ValueError if index is out of range.
example:
- listitem = cList.getListItem(6)
- getSelectedItem(...)
- getSelectedItem() -- Returns the selected item as a ListItem object.
*Note, Same as getSelectedPosition(), but instead of an integer a ListItem object
is returned. Returns None for empty lists.
See windowexample.py on how to use this.
example:
- item = cList.getSelectedItem()
- getSelectedPosition(...)
- getSelectedPosition() -- Returns the position of the selected item as an integer.
*Note, Returns -1 for empty lists.
example:
- pos = cList.getSelectedPosition()
- getSpace(...)
- getSpace() -- Returns the control's space between items as an integer.
example:
- gap = self.cList.getSpace()
- getSpinControl(...)
- getSpinControl() -- returns the associated ControlSpin object.
*Note, Not working completely yet -
After adding this control list to a window it is not possible to change
the settings of this spin control.
example:
- ctl = cList.getSpinControl()
- reset(...)
- reset() -- Clear all ListItems in this control list.
example:
- cList.reset()
- selectItem(...)
- selectItem(item) -- Select an item by index number.
item : integer - index number of the item to select.
example:
- cList.selectItem(12)
- setImageDimensions(...)
- setImageDimensions(imageWidth, imageHeight) -- Sets the width/height of items icon or thumbnail.
imageWidth : [opt] integer - width of items icon or thumbnail.
imageHeight : [opt] integer - height of items icon or thumbnail.
example:
- cList.setImageDimensions(18, 18)
- setItemHeight(...)
- setItemHeight(itemHeight) -- Sets the height of items.
itemHeight : integer - height of items.
example:
- cList.setItemHeight(25)
- setPageControlVisible(...)
- setPageControlVisible(visible) -- Sets the spin control's visible/hidden state.
visible : boolean - True=visible / False=hidden.
example:
- cList.setPageControlVisible(True)
- setSpace(...)
- setSpace(space) -- Set's the space between items.
space : [opt] integer - space between items.
example:
- cList.setSpace(5)
- size(...)
- size() -- Returns the total number of items in this list control as an integer.
example:
- cnt = cList.size()
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlProgress(Control) |
|
ControlProgress class.
ControlProgress(x, y, width, height[, texturebg, textureleft, texturemid, textureright, textureoverlay])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
texturebg : [opt] string - image filename.
textureleft : [opt] string - image filename.
texturemid : [opt] string - image filename.
textureright : [opt] string - image filename.
textureoverlay : [opt] string - image filename.
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.progress = xbmcgui.ControlProgress(100, 250, 125, 75) |
|
- Method resolution order:
- ControlProgress
- Control
- __builtin__.object
Methods defined here:
- getPercent(...)
- getPercent() -- Returns a float of the percent of the progress.
example:
- print self.progress.getValue()
- setPercent(...)
- setPercent(percent) -- Sets the pecertange for the progressbar to show.
percent : float - percentage of the bar.
example:
- self.progress.setValue(60)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlRadioButton(Control) |
|
ControlRadioButton class.
ControlRadioButton(x, y, width, height, label[, focusTexture, noFocusTexture, textXOffset, textYOffset,
alignment, font, textColor, disabledColor, angle, shadowColor, focusedColor,
radioFocusTexture, noRadioFocusTexture])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
label : string or unicode - text string.
focusTexture : [opt] string - filename for focus texture.
noFocusTexture : [opt] string - filename for no focus texture.
textXOffset : [opt] integer - x offset of label.
textYOffset : [opt] integer - y offset of label.
alignment : [opt] integer - alignment of label - *Note, see xbfont.h
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of enabled radio button's label. (e.g. '0xFFFFFFFF')
disabledColor : [opt] hexstring - color of disabled radio button's label. (e.g. '0xFFFF3300')
angle : [opt] integer - angle of control. (+ rotates CCW, - rotates CW)
shadowColor : [opt] hexstring - color of radio button's label's shadow. (e.g. '0xFF000000')
focusedColor : [opt] hexstring - color of focused radio button's label. (e.g. '0xFF00FFFF')
radioFocusTexture : [opt] string - filename for radio focus texture.
noRadioFocusTexture : [opt] string - filename for radio no focus texture.
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.radiobutton = xbmcgui.ControlRadioButton(100, 250, 200, 50, 'Status', font='font14') |
|
- Method resolution order:
- ControlRadioButton
- Control
- __builtin__.object
Methods defined here:
- isSelected(...)
- isSelected() -- Returns the radio buttons's selected status.
example:
- is = self.radiobutton.isSelected()
- setLabel(...)
- setLabel(label[, font, textColor, disabledColor, shadowColor, focusedColor]) -- Set's the radio buttons text attributes.
label : string or unicode - text string.
font : [opt] string - font used for label text. (e.g. 'font13')
textColor : [opt] hexstring - color of enabled radio button's label. (e.g. '0xFFFFFFFF')
disabledColor : [opt] hexstring - color of disabled radio button's label. (e.g. '0xFFFF3300')
shadowColor : [opt] hexstring - color of radio button's label's shadow. (e.g. '0xFF000000')
focusedColor : [opt] hexstring - color of focused radio button's label. (e.g. '0xFFFFFF00')
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- self.radiobutton.setLabel('Status', 'font14', '0xFFFFFFFF', '0xFFFF3300', '0xFF000000')
- setRadioDimension(...)
- setRadioDimension(x, y, width, height) -- Sets the radio buttons's radio texture's position and size.
x : integer - x coordinate of radio texture.
y : integer - y coordinate of radio texture.
width : integer - width of radio texture.
height : integer - height of radio texture.
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- self.radiobutton.setRadioDimension(x=100, y=5, width=20, height=20)
- setSelected(...)
- setSelected(selected) -- Sets the radio buttons's selected status.
selected : bool - True=selected (on) / False=not selected (off)
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- self.radiobutton.setSelected(True)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class ControlTextBox(Control) |
|
ControlTextBox class.
ControlTextBox(x, y, width, height[, font, textColor])
x : integer - x coordinate of control.
y : integer - y coordinate of control.
width : integer - width of control.
height : integer - height of control.
font : [opt] string - font used for text. (e.g. 'font13')
textColor : [opt] hexstring - color of textbox's text. (e.g. '0xFFFFFFFF')
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().
example:
- self.textbox = xbmcgui.ControlTextBox(100, 250, 300, 300, textColor='0xFFFFFFFF') |
|
- Method resolution order:
- ControlTextBox
- Control
- __builtin__.object
Methods defined here:
- getSpinControl(...)
- getSpinControl() -- Returns the associated ControlSpin.
- Not working completely yet -
After adding this textbox to a window it is not possible to change
the settings of this spin control.
example:
- id = self.textbox.getSpinControl()
- reset(...)
- reset() -- Clear's this textbox.
example:
- self.textbox.reset()
- setText(...)
- setText(text) -- Set's the text for this textbox.
text : string or unicode - text string.
example:
- self.textbox.setText('This is a line of text that can wrap.')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Control:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- controlDown(...)
- controlDown(control) -- Set's the controls down navigation.
control : control object - control to navigate to on down.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlDown(self.button1)
- controlLeft(...)
- controlLeft(control) -- Set's the controls left navigation.
control : control object - control to navigate to on left.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlLeft(self.button1)
- controlRight(...)
- controlRight(control) -- Set's the controls right navigation.
control : control object - control to navigate to on right.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlRight(self.button1)
- controlUp(...)
- controlUp(control) -- Set's the controls up navigation.
control : control object - control to navigate to on up.
*Note, You can also use setNavigation(). Set to self to disable navigation.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.controlUp(self.button1)
- getHeight(...)
- getHeight() -- Returns the control's current height as an integer.
example:
- height = self.button.getHeight()
- getId(...)
- getId() -- Returns the control's current id as an integer.
example:
- id = self.button.getId()
- getPosition(...)
- getPosition() -- Returns the control's current position as a x,y integer tuple.
example:
- pos = self.button.getPosition()
- getWidth(...)
- getWidth() -- Returns the control's current width as an integer.
example:
- width = self.button.getWidth()
- setAnimations(...)
- setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://xbmc.org/wiki/?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])
- setEnableCondition(...)
- setEnableCondition(enable) -- Set's the control's enabled condition.
Allows XBMC to control the enabled status of the control.
enable : string - Enable condition.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setEnableCondition('System.InternetState')
- setEnabled(...)
- setEnabled(enabled) -- Set's the control's enabled/disabled state.
enabled : bool - True=enabled / False=disabled.
example:
- self.button.setEnabled(False)
- setHeight(...)
- setHeight(height) -- Set's the controls height.
height : integer - height of control.
example:
- self.image.setHeight(100)
- setNavigation(...)
- setNavigation(up, down, left, right) -- Set's the controls navigation.
up : control object - control to navigate to on up.
down : control object - control to navigate to on down.
left : control object - control to navigate to on left.
right : control object - control to navigate to on right.
*Note, Same as controlUp(), controlDown(), controlLeft(), controlRight().
Set to self to disable navigation for that direction.
Throws: TypeError, if one of the supplied arguments is not a control type.
ReferenceError, if one of the controls is not added to a window.
example:
- self.button.setNavigation(self.button1, self.button2, self.button3, self.button4)
- setPosition(...)
- setPosition(x, y) -- Set's the controls position.
x : integer - x coordinate of control.
y : integer - y coordinate of control.
*Note, You may use negative integers. (e.g sliding a control into view)
example:
- self.button.setPosition(100, 250)
- setVisible(...)
- setVisible(visible) -- Set's the control's visible/hidden state.
visible : bool - True=visible / False=hidden.
example:
- self.button.setVisible(False)
- setVisibleCondition(...)
- setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
- setWidth(...)
- setWidth(width) -- Set's the controls width.
width : integer - width of control.
example:
- self.image.setWidth(100)
|
class Dialog(__builtin__.object) |
|
Dialog class. |
|
Methods defined here:
- browse(...)
- browse(type, heading, shares[, mask, useThumbs, treatAsFolder, default]) -- Show a 'Browse' dialog.
type : integer - the type of browse dialog.
heading : string or unicode - dialog heading.
shares : string or unicode - from sources.xml. (i.e. 'myprograms')
mask : [opt] string or unicode - '|' separated file mask. (i.e. '.jpg|.png')
useThumbs : [opt] boolean - if True autoswitch to Thumb view if files exist.
treatAsFolder : [opt] boolean - if True playlists and archives act as folders.
default : [opt] string - default path or file.
Types:
0 : ShowAndGetDirectory
1 : ShowAndGetFile
2 : ShowAndGetImage
3 : ShowAndGetWriteableDirectory
*Note, Returns filename and/or path as a string to the location of the highlighted item,
if user pressed 'Ok' or a masked item was selected.
Returns the default value if dialog was canceled.
example:
- dialog = xbmcgui.Dialog()
- fn = dialog.browse(3, 'XBMC', 'files', '', False, False, 'T:\script_data\XBMC Lyrics')
- numeric(...)
- numeric(type, heading[, default]) -- Show a 'Numeric' dialog.
type : integer - the type of numeric dialog.
heading : string or unicode - dialog heading.
default : [opt] string - default value.
Types:
0 : ShowAndGetNumber (default format: #)
1 : ShowAndGetDate (default format: DD/MM/YYYY)
2 : ShowAndGetTime (default format: HH:MM)
3 : ShowAndGetIPAddress (default format: #.#.#.#)
*Note, Returns the entered data as a string.
Returns the default value if dialog was canceled.
example:
- dialog = xbmcgui.Dialog()
- d = dialog.numeric(1, 'Enter date of birth')
- ok(...)
- ok(heading, line1[, line2, line3]) -- Show a dialog 'OK'.
heading : string or unicode - dialog heading.
line1 : string or unicode - line #1 text.
line2 : [opt] string or unicode - line #2 text.
line3 : [opt] string or unicode - line #3 text.
*Note, Returns True if 'Ok' was pressed, else False.
example:
- dialog = xbmcgui.Dialog()
- ok = dialog.ok('XBMC', 'There was an error.')
- select(...)
- select(heading, list) -- Show a select dialog.
heading : string or unicode - dialog heading.
list : string list - list of items.
*Note, Returns the position of the highlighted item as an integer.
example:
- dialog = xbmcgui.Dialog()
- ret = dialog.select('Choose a playlist', ['Playlist #1', 'Playlist #2, 'Playlist #3'])
- yesno(...)
- yesno(heading, line1[, line2, line3]) -- Show a dialog 'YES/NO'.
heading : string or unicode - dialog heading.
line1 : string or unicode - line #1 text.
line2 : [opt] string or unicode - line #2 text.
line3 : [opt] string or unicode - line #3 text.
nolabel : [opt] label to put on the no button.
yeslabel : [opt] label to put on the yes button.
*Note, Returns True if 'Yes' was pressed, else False.
example:
- dialog = xbmcgui.Dialog()
- ret = dialog.yesno('XBMC', 'Do you want to exit this script?')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class DialogProgress(__builtin__.object) |
|
DialogProgress class. |
|
Methods defined here:
- close(...)
- close() -- Close the progress dialog.
example:
- pDialog.close()
- create(...)
- create(heading[, line1, line2, line3]) -- Create and show a progress dialog.
heading : string or unicode - dialog heading.
line1 : string or unicode - line #1 text.
line2 : [opt] string or unicode - line #2 text.
line3 : [opt] string or unicode - line #3 text.
*Note, Use update() to update lines and progressbar.
example:
- pDialog = xbmcgui.DialogProgress()
- ret = pDialog.create('XBMC', 'Initializing script...')
- iscanceled(...)
- iscanceled() -- Returns True if the user pressed cancel.
example:
- if (pDialog.iscanceled()): return
- update(...)
- update(percent[, line1, line2, line3]) -- Update's the progress dialog.
percent : integer - percent complete. (0:100)
line1 : [opt] string or unicode - line #1 text.
line2 : [opt] string or unicode - line #2 text.
line3 : [opt] string or unicode - line #3 text.
*Note, If percent == 0, the progressbar will be hidden.
example:
- pDialog.update(25, 'Importing modules...')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class ListItem(__builtin__.object) |
|
ListItem class.
ListItem([label, label2, iconImage, thumbnailImage]) -- Creates a new ListItem.
label : [opt] string or unicode - label1 text.
label2 : [opt] string or unicode - label2 text.
iconImage : [opt] string - icon filename.
thumbnailImage : [opt] string - thumbnail filename.
example:
- listitem = xbmcgui.ListItem('Casino Royale', '[PG-13]', 'blank-poster.tbn', 'poster.tbn') |
|
Methods defined here:
- addContextMenuItem(...)
- addContextMenuItem([(label, action,)*]) -- Adds item(s) to the context menu for media lists.
[(label, action,)*] : list - A list of tuples consisting of label and action pairs.
- label : string or unicode - item's label.
- action : string - any built-in function to perform.
List of functions - http://xbmc.org/wiki/?title=List_of_Built_In_Functions
example:
- listitem.addContextMenuItem([('Theater Showtimes', 'XBMC.RunScript(q:\\scripts\\showtimes\\default.py,Iron Man)',)])
- getLabel(...)
- getLabel() -- Returns the listitem label.
example:
- label = self.list.getSelectedItem().getLabel()
- getLabel2(...)
- getLabel2() -- Returns the listitem's second label.
example:
- label2 = self.list.getSelectedItem().getLabel2()
- getProperty(...)
- setProperty(key) -- Returns a listitem property as a string, similar to an infolabel.
key : string - property name.
*Note, Key is NOT case sensitive.
You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- AspectRatio = self.list.getSelectedItem().getProperty('AspectRatio')
- isSelected(...)
- isSelected() -- Returns the listitem's selected status.
example:
- is = self.list.getSelectedItem().isSelected()
- select(...)
- select(selected) -- Sets the listitem's selected status.
selected : bool - True=selected/False=not selected
example:
- self.list.getSelectedItem().select(True)
- setIconImage(...)
- setIconImage(icon) -- Sets the listitem's icon image.
icon : string - image filename.
example:
- self.list.getSelectedItem().setIconImage('emailread.png')
- setInfo(...)
- setInfo(type, infoLabels) -- Sets the listitem's infoLabels.
type : string - type of media(video/music/pictures).
infoLabels : dictionary - pairs of { label: value }.
*Note, To set pictures exif info, prepend 'exif:' to the label. Exif values must be passed
as strings, separate value pairs with a comma. (eg. {'exif:resolution': '720,480'}
See CPictureInfoTag::TranslateString in PictureInfoTag.cpp for valid strings.
You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- self.list.getSelectedItem().setInfo('video', { 'Genre': 'Comedy' })
- setLabel(...)
- setLabel(label) -- Sets the listitem's label.
label : string or unicode - text string.
example:
- self.list.getSelectedItem().setLabel('Casino Royale')
- setLabel2(...)
- setLabel2(label2) -- Sets the listitem's second label.
label2 : string or unicode - text string.
example:
- self.list.getSelectedItem().setLabel2('[pg-13]')
- setProperty(...)
- setProperty(key, value) -- Sets a listitem property, similar to an infolabel.
key : string - property name.
value : string or unicode - value of property.
*Note, Key is NOT case sensitive.
You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- self.list.getSelectedItem().setProperty('AspectRatio', '1.85 : 1')
- setThumbnailImage(...)
- setThumbnailImage(thumb) -- Sets the listitem's thumbnail image.
thumb : string - image filename.
example:
- self.list.getSelectedItem().setThumbnailImage('emailread.png')
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Window(__builtin__.object) |
|
Window class.
Window(self[, int windowId) -- Create a new Window to draw on.
Specify an id to use an existing window.
Throws: ValueError, if supplied window Id does not exist.
Exception, if more then 200 windows are created.
Deleting this window will activate the old window that was active
and resets (not delete) all controls that are associated with this window. |
|
Methods defined here:
- addControl(...)
- addControl(self, Control) -- Add a Control to this window.
Throws: TypeError, if supplied argument is not a Control type
ReferenceError, if control is already used in another window
RuntimeError, should not happen :-)
The next controls can be added to a window atm
-ControlLabel
-ControlFadeLabel
-ControlTextBox
-ControlButton
-ControlCheckMark
-ControlList
-ControlGroup
-ControlImage
-ControlRadioButton
-ControlProgress
- close(...)
- close(self) -- Closes this window.
Closes this window by activating the old window.
The window is not deleted with this method.
- doModal(...)
- doModal(self) -- Display this window until close() is called.
- getControl(...)
- getControl(self, int controlId) -- Get's the control from this window.
Throws: Exception, if Control doesn't exist
controlId doesn't have to be a python control, it can be a control id
from a xbmc window too (you can find id's in the xml files
Note, not python controls are not completely usable yet
You can only use the Control functions
- getFocus(...)
- getFocus(self, Control) -- returns the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getFocusId(...)
- getFocusId(self, int) -- returns the id of the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getHeight(...)
- getHeight(self) -- Returns the height of this screen.
- getResolution(...)
- getResolution(self) -- Returns the resolution of the screen. The returned value is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- getWidth(...)
- getWidth(self) -- Returns the width of this screen.
- onAction(...)
- onAction(self, Action action) -- onAction method.
This method will recieve all actions that the main program will send
to this window.
By default, only the PREVIOUS_MENU action is handled.
Overwrite this method to let your script handle all actions.
Don't forget to capture ACTION_PREVIOUS_MENU, else the user can't close this window.
- removeControl(...)
- removeControl(self, Control) -- Removes the control from this window.
Throws: TypeError, if supplied argument is not a Control type
RuntimeError, if control is not added to this window
This will not delete the control. It is only removed from the window.
- setCoordinateResolution(...)
- setCoordinateResolution(self, int resolution) -- Sets the resolution
that the coordinates of all controls are defined in. Allows XBMC
to scale control positions and width/heights to whatever resolution
XBMC is currently using.
resolution is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- setFocus(...)
- setFocus(self, Control) -- Give the supplied control focus.
Throws: TypeError, if supplied argument is not a Control type
SystemError, on Internal error
RuntimeError, if control is not added to a window
- setFocusId(...)
- setFocusId(self, int) -- Gives the control with the supplied focus.
Throws:
SystemError, on Internal error
RuntimeError, if control is not added to a window
- show(...)
- show(self) -- Show this window.
Shows this window by activating it, calling close() after it wil activate the
current window again.
Note, if your script ends this window will be closed to. To show it forever,
make a loop at the end of your script ar use doModal() instead
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class WindowDialog(Window) |
|
WindowDialog class. |
|
- Method resolution order:
- WindowDialog
- Window
- __builtin__.object
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Window:
- addControl(...)
- addControl(self, Control) -- Add a Control to this window.
Throws: TypeError, if supplied argument is not a Control type
ReferenceError, if control is already used in another window
RuntimeError, should not happen :-)
The next controls can be added to a window atm
-ControlLabel
-ControlFadeLabel
-ControlTextBox
-ControlButton
-ControlCheckMark
-ControlList
-ControlGroup
-ControlImage
-ControlRadioButton
-ControlProgress
- close(...)
- close(self) -- Closes this window.
Closes this window by activating the old window.
The window is not deleted with this method.
- doModal(...)
- doModal(self) -- Display this window until close() is called.
- getControl(...)
- getControl(self, int controlId) -- Get's the control from this window.
Throws: Exception, if Control doesn't exist
controlId doesn't have to be a python control, it can be a control id
from a xbmc window too (you can find id's in the xml files
Note, not python controls are not completely usable yet
You can only use the Control functions
- getFocus(...)
- getFocus(self, Control) -- returns the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getFocusId(...)
- getFocusId(self, int) -- returns the id of the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getHeight(...)
- getHeight(self) -- Returns the height of this screen.
- getResolution(...)
- getResolution(self) -- Returns the resolution of the screen. The returned value is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- getWidth(...)
- getWidth(self) -- Returns the width of this screen.
- onAction(...)
- onAction(self, Action action) -- onAction method.
This method will recieve all actions that the main program will send
to this window.
By default, only the PREVIOUS_MENU action is handled.
Overwrite this method to let your script handle all actions.
Don't forget to capture ACTION_PREVIOUS_MENU, else the user can't close this window.
- removeControl(...)
- removeControl(self, Control) -- Removes the control from this window.
Throws: TypeError, if supplied argument is not a Control type
RuntimeError, if control is not added to this window
This will not delete the control. It is only removed from the window.
- setCoordinateResolution(...)
- setCoordinateResolution(self, int resolution) -- Sets the resolution
that the coordinates of all controls are defined in. Allows XBMC
to scale control positions and width/heights to whatever resolution
XBMC is currently using.
resolution is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- setFocus(...)
- setFocus(self, Control) -- Give the supplied control focus.
Throws: TypeError, if supplied argument is not a Control type
SystemError, on Internal error
RuntimeError, if control is not added to a window
- setFocusId(...)
- setFocusId(self, int) -- Gives the control with the supplied focus.
Throws:
SystemError, on Internal error
RuntimeError, if control is not added to a window
- show(...)
- show(self) -- Show this window.
Shows this window by activating it, calling close() after it wil activate the
current window again.
Note, if your script ends this window will be closed to. To show it forever,
make a loop at the end of your script ar use doModal() instead
|
class WindowXML(Window) |
|
WindowXML class.
WindowXML(self, XMLname, fallbackPath[, defaultskinname, forceFallback) -- Create a new WindowXML to rendered a xml onto it.
XMLname : string - the name of the xml file to look for.
fallbackPath : string - the directory to fallback to if the xml doesn't exist in the current skin.
defaultskinname : [opt] string - name of the folder in the fallback path to look in for the xml. 'Default' is used if this is not set.
forceFallback : [opt] boolean - if true then it will look only in the defaultskinname folder. |
|
- Method resolution order:
- WindowXML
- Window
- __builtin__.object
Methods defined here:
- addItem(...)
- addItem(item[, position]) -- Add a new item to this Window List.
item : string, unicode or ListItem - item to add.
position : [opt] integer - position of item to add. (NO Int = Adds to bottom,0 adds to top, 1 adds to one below from top,-1 adds to one above from bottom etc etc )
- If integer positions are greater than list size, negative positions will add to top of list, positive positions will add to bottom of list
example:
- addItem('Reboot XBMC', 0)
- clearList(...)
- clearList() -- Clear the Window List.
example:
- clearList()
- getCurrentListPosition(...)
- getCurrentListPosition() -- Gets the current position in the Window List.
example:
- pos = getCurrentListPosition()
- getListItem(...)
- getListItem(position) -- Returns a given ListItem in this Window List.
position : integer - position of item to return.
example:
- listitem = getListItem(6)
- getListSize(...)
- getListSize() -- Returns the number of items in this Window List.
example:
- listSize = getListSize()
- removeItem(...)
- removeItem(position) -- Removes a specified item based on position, from the Window List.
position : integer - position of item to remove.
example:
- removeItem(5)
- setCurrentListPosition(...)
- setCurrentListPosition(position) -- Set the current position in the Window List.
position : integer - position of item to set.
example:
- setCurrentListPosition(5)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from Window:
- addControl(...)
- addControl(self, Control) -- Add a Control to this window.
Throws: TypeError, if supplied argument is not a Control type
ReferenceError, if control is already used in another window
RuntimeError, should not happen :-)
The next controls can be added to a window atm
-ControlLabel
-ControlFadeLabel
-ControlTextBox
-ControlButton
-ControlCheckMark
-ControlList
-ControlGroup
-ControlImage
-ControlRadioButton
-ControlProgress
- close(...)
- close(self) -- Closes this window.
Closes this window by activating the old window.
The window is not deleted with this method.
- doModal(...)
- doModal(self) -- Display this window until close() is called.
- getControl(...)
- getControl(self, int controlId) -- Get's the control from this window.
Throws: Exception, if Control doesn't exist
controlId doesn't have to be a python control, it can be a control id
from a xbmc window too (you can find id's in the xml files
Note, not python controls are not completely usable yet
You can only use the Control functions
- getFocus(...)
- getFocus(self, Control) -- returns the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getFocusId(...)
- getFocusId(self, int) -- returns the id of the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getHeight(...)
- getHeight(self) -- Returns the height of this screen.
- getResolution(...)
- getResolution(self) -- Returns the resolution of the screen. The returned value is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- getWidth(...)
- getWidth(self) -- Returns the width of this screen.
- onAction(...)
- onAction(self, Action action) -- onAction method.
This method will recieve all actions that the main program will send
to this window.
By default, only the PREVIOUS_MENU action is handled.
Overwrite this method to let your script handle all actions.
Don't forget to capture ACTION_PREVIOUS_MENU, else the user can't close this window.
- removeControl(...)
- removeControl(self, Control) -- Removes the control from this window.
Throws: TypeError, if supplied argument is not a Control type
RuntimeError, if control is not added to this window
This will not delete the control. It is only removed from the window.
- setCoordinateResolution(...)
- setCoordinateResolution(self, int resolution) -- Sets the resolution
that the coordinates of all controls are defined in. Allows XBMC
to scale control positions and width/heights to whatever resolution
XBMC is currently using.
resolution is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- setFocus(...)
- setFocus(self, Control) -- Give the supplied control focus.
Throws: TypeError, if supplied argument is not a Control type
SystemError, on Internal error
RuntimeError, if control is not added to a window
- setFocusId(...)
- setFocusId(self, int) -- Gives the control with the supplied focus.
Throws:
SystemError, on Internal error
RuntimeError, if control is not added to a window
- show(...)
- show(self) -- Show this window.
Shows this window by activating it, calling close() after it wil activate the
current window again.
Note, if your script ends this window will be closed to. To show it forever,
make a loop at the end of your script ar use doModal() instead
|
class WindowXMLDialog(WindowXML) |
|
WindowXMLDialog class.
WindowXMLDialog(self, XMLname, fallbackPath[, defaultskinname, forceFallback) -- Create a new WindowXMLDialog to rendered a xml onto it.
XMLname : string - the name of the xml file to look for.
fallbackPath : string - the directory to fallback to if the xml doesn't exist in the current skin.
defaultskinname: [opt] string - name of the folder in the fallback path to look in for the xml. 'Default' is used if this is not set.
forceFallback : [opt] boolean - if true then it will look only in the defaultskinname folder. |
|
- Method resolution order:
- WindowXMLDialog
- WindowXML
- Window
- __builtin__.object
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from WindowXML:
- addItem(...)
- addItem(item[, position]) -- Add a new item to this Window List.
item : string, unicode or ListItem - item to add.
position : [opt] integer - position of item to add. (NO Int = Adds to bottom,0 adds to top, 1 adds to one below from top,-1 adds to one above from bottom etc etc )
- If integer positions are greater than list size, negative positions will add to top of list, positive positions will add to bottom of list
example:
- addItem('Reboot XBMC', 0)
- clearList(...)
- clearList() -- Clear the Window List.
example:
- clearList()
- getCurrentListPosition(...)
- getCurrentListPosition() -- Gets the current position in the Window List.
example:
- pos = getCurrentListPosition()
- getListItem(...)
- getListItem(position) -- Returns a given ListItem in this Window List.
position : integer - position of item to return.
example:
- listitem = getListItem(6)
- getListSize(...)
- getListSize() -- Returns the number of items in this Window List.
example:
- listSize = getListSize()
- removeItem(...)
- removeItem(position) -- Removes a specified item based on position, from the Window List.
position : integer - position of item to remove.
example:
- removeItem(5)
- setCurrentListPosition(...)
- setCurrentListPosition(position) -- Set the current position in the Window List.
position : integer - position of item to set.
example:
- setCurrentListPosition(5)
Methods inherited from Window:
- addControl(...)
- addControl(self, Control) -- Add a Control to this window.
Throws: TypeError, if supplied argument is not a Control type
ReferenceError, if control is already used in another window
RuntimeError, should not happen :-)
The next controls can be added to a window atm
-ControlLabel
-ControlFadeLabel
-ControlTextBox
-ControlButton
-ControlCheckMark
-ControlList
-ControlGroup
-ControlImage
-ControlRadioButton
-ControlProgress
- close(...)
- close(self) -- Closes this window.
Closes this window by activating the old window.
The window is not deleted with this method.
- doModal(...)
- doModal(self) -- Display this window until close() is called.
- getControl(...)
- getControl(self, int controlId) -- Get's the control from this window.
Throws: Exception, if Control doesn't exist
controlId doesn't have to be a python control, it can be a control id
from a xbmc window too (you can find id's in the xml files
Note, not python controls are not completely usable yet
You can only use the Control functions
- getFocus(...)
- getFocus(self, Control) -- returns the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getFocusId(...)
- getFocusId(self, int) -- returns the id of the control which is focused.
Throws: SystemError, on Internal error
RuntimeError, if no control has focus
- getHeight(...)
- getHeight(self) -- Returns the height of this screen.
- getResolution(...)
- getResolution(self) -- Returns the resolution of the screen. The returned value is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- getWidth(...)
- getWidth(self) -- Returns the width of this screen.
- onAction(...)
- onAction(self, Action action) -- onAction method.
This method will recieve all actions that the main program will send
to this window.
By default, only the PREVIOUS_MENU action is handled.
Overwrite this method to let your script handle all actions.
Don't forget to capture ACTION_PREVIOUS_MENU, else the user can't close this window.
- removeControl(...)
- removeControl(self, Control) -- Removes the control from this window.
Throws: TypeError, if supplied argument is not a Control type
RuntimeError, if control is not added to this window
This will not delete the control. It is only removed from the window.
- setCoordinateResolution(...)
- setCoordinateResolution(self, int resolution) -- Sets the resolution
that the coordinates of all controls are defined in. Allows XBMC
to scale control positions and width/heights to whatever resolution
XBMC is currently using.
resolution is one of the following:
0 - 1080i (1920x1080)
1 - 720p (1280x720)
2 - 480p 4:3 (720x480)
3 - 480p 16:9 (720x480)
4 - NTSC 4:3 (720x480)
5 - NTSC 16:9 (720x480)
6 - PAL 4:3 (720x576)
7 - PAL 16:9 (720x576)
8 - PAL60 4:3 (720x480)
9 - PAL60 16:9 (720x480)
- setFocus(...)
- setFocus(self, Control) -- Give the supplied control focus.
Throws: TypeError, if supplied argument is not a Control type
SystemError, on Internal error
RuntimeError, if control is not added to a window
- setFocusId(...)
- setFocusId(self, int) -- Gives the control with the supplied focus.
Throws:
SystemError, on Internal error
RuntimeError, if control is not added to a window
- show(...)
- show(self) -- Show this window.
Shows this window by activating it, calling close() after it wil activate the
current window again.
Note, if your script ends this window will be closed to. To show it forever,
make a loop at the end of your script ar use doModal() instead
| |