| | |
- Control(__builtin__.object)
-
- ControlButton
- ControlCheckMark
- ControlFadeLabel
- ControlImage
- ControlLabel
- ControlList
- ControlTextBox
- __builtin__.object
-
- Dialog
- DialogProgress
- ListItem
- Window
-
- WindowDialog
class ControlButton(Control) |
| |
ControlButton class.
ControlButton(
x, y, width, height, label, focusTexture, noFocusTexture,
textXOffset, textYOffset, 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 string (opt)
focusTexture : filename for focus texture (opt)
noFocusTexture : filename for no focus texture (opt)
textXOffset : integer x offset of label (opt)
textYOffset : integer y offset of label (opt)
alignment : integer alignment of label - see xbfont.h (opt)
font : font used for label text e.g. 'font13' (opt)
textColor : color of button text e.g. '0xFFFFFFFF' (opt)
disabledColor : color of disabled button text e.g. '0xFFFFFFFF' (opt) |
| |
- Method resolution order:
- ControlButton
- Control
- __builtin__.object
Methods defined here:
- setDisabledColor(...)
- setDisabledColor(string hexcolor) -- .
hexcolor : hexString (example, '0xFFFF3300')
- setLabel(...)
- setLabel(label, font, textColor, disabledColor)
Method to set the text for this button.
label : string or unicode string
font : name of font for button text (opt)
textColor : color of text (opt)
disabledColor : disabled color of text (opt)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D63560>
- 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 onDown control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses down, the supplied Control
will recieve focus.
- controlLeft(...)
- controlLeft( Control ) -- Set onLeft control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses left, the supplied Control
will recieve focus.
- controlRight(...)
- controlRight( Control ) -- Set onRight control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses right, the supplied Control
will recieve focus.
- controlUp(...)
- controlUp( Control ) -- Set onUp control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses up, the supplied Control
will recieve focus.
- getId(...)
- getId() -- Get the control's current id.
- setHeight(...)
- setHeight(int height) -- Set's the height of this control.
- setNavigation(...)
- setNavigation( Control up, Control down, Control left, Control right) -- Set's 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
Same as controlUp(), controlDown(), controlLeft(), controlRight().
- setPosition(...)
- setPosition(int x, int y) -- Set's the position of this control.
- setVisible(...)
- setVisible(bool) -- Hide's or Show's this control.
- setWidth(...)
- setWidth(int width) -- Set's the width of this control.
|
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 string (opt)
focusTexture : filename for focus texture (opt)
noFocusTexture : filename for no focus texture (opt)
checkWidth : width of checkmark (opt)
checkHeight : height of checkmark (opt)
alignment : alignment of checkmark label (opt)
font : name of font e.g. 'font13' (opt)
textColor : color of text e.g. '0xffffffff' (opt)
disabledColor : disabled color of text e.g. '0xffffffff' (opt) |
| |
- Method resolution order:
- ControlCheckMark
- Control
- __builtin__.object
Methods defined here:
- getSelected(...)
- getSelected() -- Returns the selected value for the check mark.
- setDisabledColor(...)
- setDisabledColor(string hexcolor) -- .
hexcolor : hexString (example, '0xFFFF3300')
- setLabel(...)
- setLabel(label, font, textColor, disabledColor) -- Set's text for this button.
label : string or unicode string
font : name of font (opt)
textColor : label text color (opt)
disabledColor : disabled text color (opt)
- setSelected(...)
- setSelected(bool isOn) -- Sets the check mark on or off.
isOn : True if selected, False if not selected
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D637F0>
- 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 onDown control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses down, the supplied Control
will recieve focus.
- controlLeft(...)
- controlLeft( Control ) -- Set onLeft control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses left, the supplied Control
will recieve focus.
- controlRight(...)
- controlRight( Control ) -- Set onRight control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses right, the supplied Control
will recieve focus.
- controlUp(...)
- controlUp( Control ) -- Set onUp control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses up, the supplied Control
will recieve focus.
- getId(...)
- getId() -- Get the control's current id.
- setHeight(...)
- setHeight(int height) -- Set's the height of this control.
- setNavigation(...)
- setNavigation( Control up, Control down, Control left, Control right) -- Set's 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
Same as controlUp(), controlDown(), controlLeft(), controlRight().
- setPosition(...)
- setPosition(int x, int y) -- Set's the position of this control.
- setVisible(...)
- setVisible(bool) -- Hide's or Show's this control.
- setWidth(...)
- setWidth(int width) -- Set's the width of this control.
|
class ControlFadeLabel(Control) |
| |
ControlFadeLabel class.
Control that scroll's lables
ControlFadeLabel(x, y, width, height, font, textColor, alignment)
x : x coordinate of control
y : y coordinate of control
width : width of control
height : height of control
font : string fontname (example, 'font13' / 'font14') (opt)
textColor : hexString e.g. '0xFFFF3300' (opt)
alignment : alignment of text - see xbfont.h (opt) |
| |
- Method resolution order:
- ControlFadeLabel
- Control
- __builtin__.object
Methods defined here:
- addLabel(...)
- addLabel(string label) -- Add a label to this control for scrolling.
label : string or unicode string
- reset(...)
- reset() -- Reset's the fade label.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D63A80>
- 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 onDown control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses down, the supplied Control
will recieve focus.
- controlLeft(...)
- controlLeft( Control ) -- Set onLeft control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses left, the supplied Control
will recieve focus.
- controlRight(...)
- controlRight( Control ) -- Set onRight control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses right, the supplied Control
will recieve focus.
- controlUp(...)
- controlUp( Control ) -- Set onUp control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses up, the supplied Control
will recieve focus.
- getId(...)
- getId() -- Get the control's current id.
- setHeight(...)
- setHeight(int height) -- Set's the height of this control.
- setNavigation(...)
- setNavigation( Control up, Control down, Control left, Control right) -- Set's 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
Same as controlUp(), controlDown(), controlLeft(), controlRight().
- setPosition(...)
- setPosition(int x, int y) -- Set's the position of this control.
- setVisible(...)
- setVisible(bool) -- Hide's or Show's this control.
- setWidth(...)
- setWidth(int width) -- Set's the width of this control.
|
class ControlImage(Control) |
| |
ControlImage class.
ControlImage(int x, int y, int width, int height[, filename, ColorKey])
filename : image filename
ColorKey : hexString (example, '0xFFFF3300') |
| |
- Method resolution order:
- ControlImage
- Control
- __builtin__.object
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D63D10>
- 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 onDown control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses down, the supplied Control
will recieve focus.
- controlLeft(...)
- controlLeft( Control ) -- Set onLeft control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses left, the supplied Control
will recieve focus.
- controlRight(...)
- controlRight( Control ) -- Set onRight control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses right, the supplied Control
will recieve focus.
- controlUp(...)
- controlUp( Control ) -- Set onUp control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses up, the supplied Control
will recieve focus.
- getId(...)
- getId() -- Get the control's current id.
- setHeight(...)
- setHeight(int height) -- Set's the height of this control.
- setNavigation(...)
- setNavigation( Control up, Control down, Control left, Control right) -- Set's 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
Same as controlUp(), controlDown(), controlLeft(), controlRight().
- setPosition(...)
- setPosition(int x, int y) -- Set's the position of this control.
- setVisible(...)
- setVisible(bool) -- Hide's or Show's this control.
- setWidth(...)
- setWidth(int width) -- Set's the width of this control.
|
class ControlLabel(Control) |
| |
ControlLabel class.
ControlLabel(x, y, width, height, label, font, textColor,
disabledColor, alignment, hasPath )
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 string (opt)
font : string fontname (e.g., 'font13' / 'font14') (opt)
textColor : hexString (e.g., '0xFFFF3300') (opt)
disabledColor : hexString (e.g., '0xFFFF3300') (opt)
alignment : alignment of text - see xbfont.h (opt)
hasPath : flag indicating label stores a path (opt) |
| |
- Method resolution order:
- ControlLabel
- Control
- __builtin__.object
Methods defined here:
- setLabel(...)
- setLabel(string label) -- Set's text for this label.
label : string or unicode string
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D63FA0>
- 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 onDown control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses down, the supplied Control
will recieve focus.
- controlLeft(...)
- controlLeft( Control ) -- Set onLeft control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses left, the supplied Control
will recieve focus.
- controlRight(...)
- controlRight( Control ) -- Set onRight control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses right, the supplied Control
will recieve focus.
- controlUp(...)
- controlUp( Control ) -- Set onUp control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses up, the supplied Control
will recieve focus.
- getId(...)
- getId() -- Get the control's current id.
- setHeight(...)
- setHeight(int height) -- Set's the height of this control.
- setNavigation(...)
- setNavigation( Control up, Control down, Control left, Control right) -- Set's 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
Same as controlUp(), controlDown(), controlLeft(), controlRight().
- setPosition(...)
- setPosition(int x, int y) -- Set's the position of this control.
- setVisible(...)
- setVisible(bool) -- Hide's or Show's this control.
- setWidth(...)
- setWidth(int width) -- Set's the width of this control.
|
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 : font used for label text e.g. 'font13' (opt)
textColor : color of item text e.g. '0xFFFFFFFF' (opt)
buttonTexture : texture filename for item (opt)
buttonFocusTexture : texture filename for focused item (opt)
selectedColor : color of selected item text e.g. '0xFFFFFFFF' (opt)
imageWidth : integer width of item icon or thumbnail (opt)
imageHeight : integer height of item icon or thumbnail (opt)
itemTextXOffset : integer x offset of item label (opt)
itemTextYOffset : integer y offset of item label (opt)
itemHeight : integer height item (opt)
space : integer space between items (opt)
alignmentY : integer y-axis alignment - see xbfont.h (opt) |
| |
- Method resolution order:
- ControlList
- Control
- __builtin__.object
Methods defined here:
- addItem(...)
- addItem(item) -- Add a new item to this control list.
item can be a string / unicode string or a ListItem.
- getSelectedItem(...)
- getSelectedPosition() -- Returns the selected ListItem.
Same as getSelectedPosition(), but instead of an int a ListItem is returned.
Returns None for empty lists.
See windowexample.py on how to use this.
- getSelectedPosition(...)
- getSelectedPosition() -- Returns the position of the selected item.
Position will be returned as an int. Returns -1 for empty lists.
- getSpinControl(...)
- getSpinControl() -- returns the associated ControlSpin.
- Not working completely yet -
After adding this control list to a window it is not possible to change
the settings of this spin control.
- reset(...)
- reset() -- Clear all ListItems in this control list.
- selectItem(...)
- selectItem(item) -- Select an item by index
item is the index on the item to select.
- setImageDimensions(...)
- setImageDimensions(int width, int height) --
- setItemHeight(...)
- setItemHeight(int height) --
- setPageControlVisible(...)
- setPageControlVisible(bool isOn) -- Sets the spin control visible or hidden.
isOn : True if visible, False if hidden
- setSpace(...)
- setSpace(int space) -- Set's the space between ListItems
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D64230>
- 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 onDown control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses down, the supplied Control
will recieve focus.
- controlLeft(...)
- controlLeft( Control ) -- Set onLeft control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses left, the supplied Control
will recieve focus.
- controlRight(...)
- controlRight( Control ) -- Set onRight control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses right, the supplied Control
will recieve focus.
- controlUp(...)
- controlUp( Control ) -- Set onUp control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses up, the supplied Control
will recieve focus.
- getId(...)
- getId() -- Get the control's current id.
- setHeight(...)
- setHeight(int height) -- Set's the height of this control.
- setNavigation(...)
- setNavigation( Control up, Control down, Control left, Control right) -- Set's 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
Same as controlUp(), controlDown(), controlLeft(), controlRight().
- setPosition(...)
- setPosition(int x, int y) -- Set's the position of this control.
- setVisible(...)
- setVisible(bool) -- Hide's or Show's this control.
- setWidth(...)
- setWidth(int width) -- Set's the width of this control.
|
class ControlTextBox(Control) |
| |
ControlTextBox class.
ControlTextBox(int x, int y, int width, int height[, font, textColor])
font : string fontname (example, 'font13' / 'font14')
textColor : hexString (example, '0xFFFF3300') |
| |
- 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.
- reset(...)
- reset() -- Clear's the text box.
- setText(...)
- SetText(string text) -- Set's the text for this textbox.
label : string or unicode string
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D64750>
- 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 onDown control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses down, the supplied Control
will recieve focus.
- controlLeft(...)
- controlLeft( Control ) -- Set onLeft control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses left, the supplied Control
will recieve focus.
- controlRight(...)
- controlRight( Control ) -- Set onRight control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses right, the supplied Control
will recieve focus.
- controlUp(...)
- controlUp( Control ) -- Set onUp control.
Throws: TypeError, if the supplied argument is not a Control type
ReferenceError, if the control is not added to a window
When this control is active and the user presses up, the supplied Control
will recieve focus.
- getId(...)
- getId() -- Get the control's current id.
- setHeight(...)
- setHeight(int height) -- Set's the height of this control.
- setNavigation(...)
- setNavigation( Control up, Control down, Control left, Control right) -- Set's 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
Same as controlUp(), controlDown(), controlLeft(), controlRight().
- setPosition(...)
- setPosition(int x, int y) -- Set's the position of this control.
- setVisible(...)
- setVisible(bool) -- Hide's or Show's this control.
- setWidth(...)
- setWidth(int width) -- Set's the width of this control.
|
class Dialog(__builtin__.object) |
| |
Dialog class. |
| |
Methods defined here:
- ok(...)
- ok(heading, line 1[, line 2, line3]) -- Show a dialog 'OK'.
heading : string or unicode string
lines : string or unicode string
returns True when user pressed 'OK'
- select(...)
- select(heading, list) -- Show a select dialog.
heading : string or unicode string
list : python list with strings
returns the position of the selected item
- yesno(...)
- yesno(heading, line 1[, line 2, line3]) -- Show a dialog 'YES / NO'.
heading : string or unicode string
lines : string or unicode string
returns True when user pressed 'OK', else False
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D64B80>
- 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 dialog.
- create(...)
- create(heading[, line 1, line 2, line3]) -- Create and show a progress dialog.
heading : string or unicode string
lines : string or unicode string
- iscanceled(...)
- iscanceled() -- Returns True if the user pressed cancel.
- update(...)
- update(int value) -- Update's the progress dialog.
value : int from 0 - 100
If value is 0, the progress bar will be hidden.
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object at 0x00D64AB0>
- 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
-ControlImage
- 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
- 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, int 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
- 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 at 0x00D67B48>
- 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 at 0x00D649E0>
- 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
-ControlImage
- 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
- 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, int 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
- 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
| |