kodi
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lib.version_check.viewer.Viewer Class Reference
Collaboration diagram for lib.version_check.viewer.Viewer:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, heading, filename)
 
def set_controls (self)
 
def get_text (self)
 

Static Public Member Functions

def read_file (filename)
 

Public Attributes

 heading
 
 filename
 
 window
 

Static Public Attributes

int WINDOW = 10147
 
int CONTROL_LABEL = 1
 
int CONTROL_TEXTBOX = 5
 

Detailed Description

Show user a text viewer (WINDOW_DIALOG_TEXT_VIEWER)
Include the text file for the viewers body in the resources/ directory

usage:
    script_path = os.path.join(_ADDON_PATH, 'resources', 'lib', 'version_check', 'viewer.py')
    xbmc.executebuiltin('RunScript(%s,%s,%s)' % (script_path, 'Heading', 'notice.txt'))

:param heading: text viewer heading
:type heading: str
:param filename: filename to use for text viewers body
:type filename: str

Member Function Documentation

◆ get_text()

def lib.version_check.viewer.Viewer.get_text (   self)
Get the text viewers body text from self.filename

:return: contents of self.filename
:rtype: str

◆ read_file()

def lib.version_check.viewer.Viewer.read_file (   filename)
static
Read the contents of the provided file, from
os.path.join(_ADDON_PATH, 'resources', filename)

:param filename: name of file to read
:type filename: str
:return: contents of the provided file
:rtype: str

◆ set_controls()

def lib.version_check.viewer.Viewer.set_controls (   self)
Set the window controls

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