Use an enum for switching focus instead of hard coded numbers

This commit is contained in:
Veronica K. B. Olsen
2021-03-22 18:57:57 +01:00
parent 5ab32326c1
commit 74910a6b56
6 changed files with 37 additions and 25 deletions
+2 -1
View File
@@ -6,7 +6,7 @@ from nw.constants.constants import (
)
from nw.constants.enum import (
nwAlert, nwDocAction, nwItemClass, nwItemLayout, nwItemType, nwOutline,
nwDocInsert
nwDocInsert, nwWidget
)
__all__ = [
@@ -28,4 +28,5 @@ __all__ = [
"nwItemType",
"nwOutline",
"nwDocInsert",
"nwWidget",
]
+9
View File
@@ -112,6 +112,15 @@ class nwAlert(Enum):
# END Enum nwAlert
class nwWidget(Enum):
TREE = 1
EDITOR = 2
VIEWER = 3
OUTLINE = 4
# END Enum nwWidget
class nwOutline(Enum):
TITLE = 0