Package arcmap :: Module editortools :: Class EditorTool
[hide private]
[frames] | no frames]

Class EditorTool

source code

mapcontroller.MapListener --+
                            |
                           EditorTool
Known Subclasses:

Base class for tools used in the map editor. Derive from this class to add more functionality to the program

Instance Methods [hide private]
 
__init__(self, controller) source code
bool
getPointer(self)
Returns: True if the mouse is over the TileGrid
source code
 
setInstructions(self, text) source code
string
getInstructions(self)
Returns: the instructions for using this tool.
source code
int
getID(self)
Returns: the ID of this tool
source code
int
x(self)
Returns: the x-coordinate of the mouse
source code
int
y(self)
Returns: the y-coordinate of the mouse
source code
bool
mouseMotion(self, x, y)
Returns: True if this event causes a redraw to be necessary.
source code
bool
mouseButtonPress(self, button, time)
Returns: True if this event causes a redraw to be necessary.
source code
bool
mouseButtonRelease(self, button, time)
Returns: True if this event causes a redraw to be necessary.
source code
bool
mouseEnter(self)
Called when the mouse enters the area over the TileGrid
source code
bool
mouseLeave(self)
Called when the mouse leaves the area over the TileGrid
source code
bool
keyPress(self, key)
TODO: figure out and document the type of key
source code
 
draw(self, context) source code
 
undo(self) source code

Inherited from mapcontroller.MapListener: getController, listenAddLayer, listenAddShape, listenAddTile, listenAddTileSet, listenFileClosed, listenFileOpened, listenModified, listenRemoveLayer, listenRemoveShape, listenRemoveTile, listenResize, listenSelectLayer, listenSetSelection, listenSetVisibilty, listenSwapLayers, listenUndoRedo

Method Details [hide private]

__init__(self, controller)
(Constructor)

source code 
Parameters:
  • controller - The controller that this will listen to
Overrides: mapcontroller.MapListener.__init__
(inherited documentation)

getPointer(self)

source code 
Returns: bool
True if the mouse is over the TileGrid

setInstructions(self, text)

source code 
Parameters:
  • text (string) - the instructions for using this tool

getInstructions(self)

source code 
Returns: string
the instructions for using this tool.

getID(self)

source code 
Returns: int
the ID of this tool

x(self)

source code 
Returns: int
the x-coordinate of the mouse

y(self)

source code 
Returns: int
the y-coordinate of the mouse

mouseMotion(self, x, y)

source code 
Returns: bool
True if this event causes a redraw to be necessary.

mouseButtonPress(self, button, time)

source code 
Parameters:
  • button (int) - button that was pressed
  • time (int) - the time that the button press happened. Necessary for popping up menus
Returns: bool
True if this event causes a redraw to be necessary.

mouseButtonRelease(self, button, time)

source code 
Parameters:
  • button (int) - button that was pressed
  • time - the time that the button press happened. Necessary for popping up menus
Returns: bool
True if this event causes a redraw to be necessary.

mouseEnter(self)

source code 

Called when the mouse enters the area over the TileGrid

Returns: bool
True if the TileGrid should be redrawn

mouseLeave(self)

source code 

Called when the mouse leaves the area over the TileGrid

Returns: bool
True if the TileGrid should be redrawn

keyPress(self, key)

source code 

TODO: figure out and document the type of key

Returns: bool
True if this event causes a redraw to be necessary.