Module BaseDoc :: Class StyleSheetList
[frames] | no frames]

Class StyleSheetList

source code

Interface into the user's defined style sheets. Each StyleSheetList has a predefined default style specified by the report. Additional styles are loaded from a specified XML file if it exists.

Instance Methods
 
__init__(self, filename, defstyle)
Create a new StyleSheetList from the specified default style and any other styles that may be defined in the specified file.
source code
 
delete_style_sheet(self, name)
Remove a style from the list.
source code
 
get_style_sheet_map(self)
Return the map of names to styles.
source code
 
get_style_sheet(self, name)
Return the StyleSheet associated with the name
source code
 
get_style_names(self)
Return a list of all the style names in the StyleSheetList
source code
 
set_style_sheet(self, name, style)
Add or replaces a StyleSheet in the StyleSheetList.
source code
 
save(self)
Saves the current StyleSheet definitions to the associated file.
source code
 
parse(self)
Loads the StyleSheets from the associated file, if it exists.
source code
Method Details

__init__(self, filename, defstyle)
(Constructor)

source code 

Create a new StyleSheetList from the specified default style and any other styles that may be defined in the specified file.

file - XML file that contains style definitions defstyle - default style

delete_style_sheet(self, name)

source code 

Remove a style from the list. Since each style must have a unique name, the name is used to delete the stylesheet.

name - Name of the style to delete

get_style_sheet(self, name)

source code 

Return the StyleSheet associated with the name

name - name associated with the desired StyleSheet.

set_style_sheet(self, name, style)

source code 

Add or replaces a StyleSheet in the StyleSheetList. The default style may not be replaced.

name - name assocated with the StyleSheet to add or replace. style - definition of the StyleSheet