QScintilla/MarkupProviders/MarkupBase.py

changeset 5394
b2c6179184f6
child 5398
1f4509cf8f35
equal deleted inserted replaced
5393:9db3fd0b1c72 5394:b2c6179184f6
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2017 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the base class for the markup providers.
8 """
9
10 from __future__ import unicode_literals
11
12
13 class MarkupBase(object):
14 """
15 Class implementing the base class for the markup providers.
16
17 Note: Derived classes need only implement those method they provide
18 functionality for. This base class implements do nothing variants for
19 all methods.
20 """
21 def __init__(self):
22 """
23 Constructor
24 """
25 pass
26
27 def hasBold(self):
28 """
29 Public method to indicate the availability of bold markup.
30
31 @return flag indicating the availability of bold markup
32 @rtype bool
33 """
34 return False
35
36 def hasItalic(self):
37 """
38 Public method to indicate the availability of italic markup.
39
40 @return flag indicating the availability of italic markup
41 @rtype bool
42 """
43 return False
44
45 def hasStrikethrough(self):
46 """
47 Public method to indicate the availability of strikethrough markup.
48
49 @return flag indicating the availability of strikethrough markup
50 @rtype bool
51 """
52 return False
53
54 def bold(self, editor):
55 """
56 Public method to generate bold text.
57
58 @param editor reference to the editor to work on
59 @type Editor
60 """
61 pass
62
63 def italic(self, editor):
64 """
65 Public method to generate italic text.
66
67 @param editor reference to the editor to work on
68 @type Editor
69 """
70 pass
71
72 def strikethrough(self, editor):
73 """
74 Public method to generate strikethrough text.
75
76 @param editor reference to the editor to work on
77 @type Editor
78 """
79 pass

eric ide

mercurial