Added new constants for document insert feature
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from nw.constants.iso import isoLanguage, isoCountry
|
||||
from nw.constants.constants import (
|
||||
nwConst, nwRegEx, nwFiles, nwKeyWords, nwLabels, nwQuotes, nwUnicode
|
||||
nwConst, nwRegEx, nwFiles, nwKeyWords, nwLabels, nwQuotes, nwUnicode,
|
||||
nwInsertSymbols
|
||||
)
|
||||
from nw.constants.enum import (
|
||||
nwAlert, nwDocAction, nwItemClass, nwItemLayout, nwItemType, nwOutline
|
||||
nwAlert, nwDocAction, nwItemClass, nwItemLayout, nwItemType, nwOutline,
|
||||
nwDocInsert
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
@@ -17,10 +19,12 @@ __all__ = [
|
||||
"nwLabels",
|
||||
"nwQuotes",
|
||||
"nwUnicode",
|
||||
"nwInsertSymbols",
|
||||
"nwAlert",
|
||||
"nwDocAction",
|
||||
"nwItemClass",
|
||||
"nwItemLayout",
|
||||
"nwItemType",
|
||||
"nwOutline",
|
||||
"nwDocInsert",
|
||||
]
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from nw.constants.enum import nwItemClass, nwItemLayout, nwOutline
|
||||
from nw.constants.enum import nwItemClass, nwItemLayout, nwOutline, nwDocInsert
|
||||
|
||||
class nwConst():
|
||||
|
||||
@@ -197,7 +197,7 @@ class nwQuotes():
|
||||
# END Class nwQuotes
|
||||
|
||||
class nwUnicode:
|
||||
"""Suppoted unicode character constants and translation maps for HTML.
|
||||
"""Supported unicode character constants and translation maps for HTML.
|
||||
"""
|
||||
|
||||
# Unicode Constants
|
||||
@@ -229,10 +229,12 @@ class nwUnicode:
|
||||
U_EMDASH = "\u2014" # Long dash
|
||||
U_HELLIP = "\u2026" # Ellipsis
|
||||
|
||||
## Other
|
||||
## Spaces
|
||||
U_NBSP = "\u00a0" # Non-breaking space
|
||||
U_THNSP = "\u2009" # Thin space
|
||||
U_THNBSP = "\u202f" # Thin non-breaking space
|
||||
|
||||
## Symbols
|
||||
U_CHECK = "\u2714" # Heavy check mark
|
||||
U_MULT = "\u2715" # Multiplication x
|
||||
|
||||
@@ -275,10 +277,12 @@ class nwUnicode:
|
||||
H_EMDASH = "—"
|
||||
H_HELLIP = "…"
|
||||
|
||||
## Other
|
||||
## Spaces
|
||||
H_NBSP = " "
|
||||
H_THNSP = " "
|
||||
H_THNBSP = " "
|
||||
|
||||
## Symbols
|
||||
H_CHECK = "✔"
|
||||
H_MULT = "✕"
|
||||
|
||||
@@ -293,3 +297,18 @@ class nwUnicode:
|
||||
H_LTRIS = "◂"
|
||||
|
||||
# END Class nwUnicode
|
||||
|
||||
class nwInsertSymbols():
|
||||
|
||||
SYMBOLS = {
|
||||
nwDocInsert.NO_INSERT : "",
|
||||
nwDocInsert.HARD_BREAK : " \n",
|
||||
nwDocInsert.NB_SPACE : nwUnicode.U_NBSP,
|
||||
nwDocInsert.THIN_SPACE : nwUnicode.U_THNSP,
|
||||
nwDocInsert.THIN_NB_SPACE : nwUnicode.U_THNBSP,
|
||||
nwDocInsert.SHORT_DASH : nwUnicode.U_ENDASH,
|
||||
nwDocInsert.LONG_DASH : nwUnicode.U_EMDASH,
|
||||
nwDocInsert.ELLIPSIS : nwUnicode.U_HELLIP,
|
||||
}
|
||||
|
||||
# END Enum nwDocInsert
|
||||
|
||||
@@ -96,6 +96,19 @@ class nwDocAction(Enum):
|
||||
|
||||
# END Enum nwDocAction
|
||||
|
||||
class nwDocInsert(Enum):
|
||||
|
||||
NO_INSERT = 0
|
||||
HARD_BREAK = 1
|
||||
NB_SPACE = 2
|
||||
THIN_SPACE = 3
|
||||
THIN_NB_SPACE = 4
|
||||
SHORT_DASH = 5
|
||||
LONG_DASH = 6
|
||||
ELLIPSIS = 7
|
||||
|
||||
# END Enum nwDocInsert
|
||||
|
||||
class nwAlert(Enum):
|
||||
|
||||
INFO = 0
|
||||
|
||||
Reference in New Issue
Block a user