summaryrefslogtreecommitdiff
path: root/cad/src/command_support
diff options
context:
space:
mode:
authorBruce Smith <bruce@nanorex.com>2009-03-11 00:47:28 +0000
committerBruce Smith <bruce@nanorex.com>2009-03-11 00:47:28 +0000
commit842e49189c67871be0c0d27eaa695be4bd63f1da (patch)
tree8e4c758775b87af2435922f3faa124322254c5f2 /cad/src/command_support
parent98fa8bfeb870b90d906fc1ddd6f490affe0dcab5 (diff)
downloadnanoengineer-theirix-842e49189c67871be0c0d27eaa695be4bd63f1da.tar.gz
nanoengineer-theirix-842e49189c67871be0c0d27eaa695be4bd63f1da.zip
split many Draw methods into their 4 new parts; not fully tested
Diffstat (limited to 'cad/src/command_support')
-rwxr-xr-xcad/src/command_support/GraphicsMode.py10
-rw-r--r--cad/src/command_support/GraphicsMode_API.py3
2 files changed, 10 insertions, 3 deletions
diff --git a/cad/src/command_support/GraphicsMode.py b/cad/src/command_support/GraphicsMode.py
index 07ab8e3fb..43d3bff9e 100755
--- a/cad/src/command_support/GraphicsMode.py
+++ b/cad/src/command_support/GraphicsMode.py
@@ -317,12 +317,14 @@ class basicGraphicsMode(GraphicsMode_API):
# ==
- def Draw(self): #bruce 090310 deprecated this; will remove it from the GM API
+ def Draw(self): #bruce 090310 refactoring this; will remove it from the GM API very soon
"""
[temporary method for compatibility as we refactor Draw;
- should not be overridden or extended]
+ should not be overridden or extended -- instead, override
+ or extend one of the following methods which it calls]
"""
- # when done, enable this: ## print_compact_stack( "bug: old code is calling %r.Draw(): " % self)
+ ##### when done, enable this debug print:
+ ## print_compact_stack( "bug: old code is calling %r.Draw(): " % self)
self.Draw_preparation() #bruce 090310 do this first, not last or in middle as before
self.Draw_axes()
self.Draw_model()
@@ -517,6 +519,8 @@ class basicGraphicsMode(GraphicsMode_API):
"""
pass
+ # ==
+
def Draw_after_highlighting(self, pickCheckOnly = False): #bruce 050610
"""
Do more drawing, after the main drawing code has completed its
diff --git a/cad/src/command_support/GraphicsMode_API.py b/cad/src/command_support/GraphicsMode_API.py
index 9262d65e4..d9c36de8f 100644
--- a/cad/src/command_support/GraphicsMode_API.py
+++ b/cad/src/command_support/GraphicsMode_API.py
@@ -43,6 +43,9 @@ class Delegating_GraphicsMode(GraphicsMode_interface): #bruce 090307
"""
Abstract class for GraphicsModes which delegate almost everything
to their parentGraphicsMode.
+
+ @see: related class Overdrawing_GraphicsMode_preMixin,
+ used in TemporaryCommand_Overdrawing
"""
# implem note: We can't use idlelib.Delegator to help implement this class,
# since the delegate needs to be dynamic.