Table Of Contents

Previous topic

StyleEditorBox

Next topic

updater

This Page

phoenix_title StyleEditorPanel

Main panel for the editor portion of the StyleEditor


class_hierarchy Inheritance Diagram

Inheritance diagram for class StyleEditorPanel

Inheritance diagram of StyleEditorPanel


super_classes Known Superclasses

Panel


method_summary Methods Summary

__init__  
ChangeStyleSheet Change the style sheet that is being edited
DiffStyles Checks if the current style set is different from the
EnableSettings Enables/Disables all settings controls
GenerateStyleSheet Generates a style sheet from the dialogs style data
OnCheck Update Model for changes to styling settings
OnChoice Update Model for changes to styling settings
OnColor Handles color selection events
OnListBox Catches the selection of a style tag in the listbox
OnTextRegion Processes clicks in the preview control and sets the style
ResetTransientStyleData Reset the transient style data to mark the changes as not dirty
SetBlankStyle Clear all the transient style data to a blank style set
UpdateSettingsPane Updates all the settings controls to hold the
UpdateStyleSet Updates the value of the style tag to reflect any changes

property_summary Properties Summary

SettingsPanel  
StyleTags  

api Class API



class StyleEditorPanel(Panel)

Main panel for the editor portion of the StyleEditor


Methods



__init__(self, parent)


ChangeStyleSheet(self, sheet_name)

Change the style sheet that is being edited

Parameters:sheet_name – style sheet name (without extension)


DiffStyles(self)

Checks if the current style set is different from the original set. Used internally to check if a save prompt needs to be brought up. Returns True if the style sets are different.

Returns:whether style set has been modified or not
Returns:bool


EnableSettings(self, enable=True)

Enables/Disables all settings controls

Parameters:enable – whether to enable/disable settings controls


GenerateStyleSheet(self)

Generates a style sheet from the dialogs style data

Returns:The dictionary of StyleItem in self.styles_new transformed into a string that is in Editra Style Sheet format.


OnCheck(self, evt)

Update Model for changes to styling settings



OnChoice(self, evt)

Update Model for changes to styling settings



OnColor(self, evt)

Handles color selection events

Parameters:evt – event that called this handler


OnListBox(self, evt)

Catches the selection of a style tag in the listbox and updates the style window appropriately.

Parameters:evt – event that called this handler


OnTextRegion(self, evt=None)

Processes clicks in the preview control and sets the style selection in the style tags list to the style tag of the area the cursor has moved into.

Parameters:evt – event that called this handler


ResetTransientStyleData(self)

Reset the transient style data to mark the changes as not dirty



SetBlankStyle(self)

Clear all the transient style data to a blank style set



UpdateSettingsPane(self, syntax_data)

Updates all the settings controls to hold the values of the selected tag.

Parameters:syntax_data – syntax data set to configure panel from


UpdateStyleSet(self, id_)

Updates the value of the style tag to reflect any changes made in the settings controls.

Parameters:id – identifier of the style tag in the list