/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/command.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/command.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 354 by bh, Thu Jul 18 13:01:55 2002 UTC revision 355 by bh, Mon Dec 9 10:31:58 2002 UTC
# Line 104  class Command: Line 104  class Command:
104                  or self.checked is not None                  or self.checked is not None
105                  or self.dyntext is not None)                  or self.dyntext is not None)
106    
107        def IsTool(self):
108            """Return whether the command represents a tool.
109    
110            This default implementation always returns 0.
111            """
112            return 0
113    
114      def Execute(self, context, args = ()):      def Execute(self, context, args = ()):
115          kw = self.kwargs          kw = self.kwargs
116          if kw is None:          if kw is None:
# Line 113  class Command: Line 120  class Command:
120          #print self.name, self.args, args          #print self.name, self.args, args
121          apply(self.function, (context,) + self.args + args, kw)          apply(self.function, (context,) + self.args + args, kw)
122    
123    class ToolCommand(Command):
124    
125        """A command tool activating a tool"""
126    
127        def IsTool(self):
128            """Return whether the command represents a tool, i.e. always 1"""
129            return 1
130    
131    
132  class CommandRegistry:  class CommandRegistry:
133    

Legend:
Removed from v.354  
changed lines
  Added in v.355

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26