Sun, 01 Jan 2017 18:09:48 +0100
Started implementing a format button bar and provider classes for various markup languages.
# -*- coding: utf-8 -*- # Copyright (c) 2017 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the base class for the markup providers. """ from __future__ import unicode_literals class MarkupBase(object): """ Class implementing the base class for the markup providers. Note: Derived classes need only implement those method they provide functionality for. This base class implements do nothing variants for all methods. """ def __init__(self): """ Constructor """ pass def hasBold(self): """ Public method to indicate the availability of bold markup. @return flag indicating the availability of bold markup @rtype bool """ return False def hasItalic(self): """ Public method to indicate the availability of italic markup. @return flag indicating the availability of italic markup @rtype bool """ return False def hasStrikethrough(self): """ Public method to indicate the availability of strikethrough markup. @return flag indicating the availability of strikethrough markup @rtype bool """ return False def bold(self, editor): """ Public method to generate bold text. @param editor reference to the editor to work on @type Editor """ pass def italic(self, editor): """ Public method to generate italic text. @param editor reference to the editor to work on @type Editor """ pass def strikethrough(self, editor): """ Public method to generate strikethrough text. @param editor reference to the editor to work on @type Editor """ pass