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

Class TileDrawTool

source code

mapcontroller.MapListener --+        
                            |        
                   EditorTool --+    
                                |    
                         TileTool --+
                                    |
                                   TileDrawTool

Instance Methods [hide private]
 
__init__(self, controller) source code
bool
mouseMotion(self, x, y)
See TileGrid.mouseMotion
source code
bool
mouseButtonPress(self, button, time)
See TileGrid.buttonPress
source code
bool
mouseButtonRelease(self, button, time)
See TileGrid.buttonRelease
source code
 
__setTiles(self, startX, endX, startY, endY)
Sets tiles on the map in the range defined by startX, endX, startY and endY
source code
 
draw(self, context) source code
 
listenSetSelection(self, index, brush, x1, y1, x2, y2) source code
 
listenFileClosed(self)
Called when the map being edited is closed.
source code

Inherited from EditorTool: getID, getInstructions, getPointer, keyPress, mouseEnter, mouseLeave, setInstructions, undo, x, y

Inherited from mapcontroller.MapListener: getController, listenAddLayer, listenAddShape, listenAddTile, listenAddTileSet, listenFileOpened, listenModified, listenRemoveLayer, listenRemoveShape, listenRemoveTile, listenResize, listenSelectLayer, 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)

mouseMotion(self, x, y)

source code 

See TileGrid.mouseMotion

Returns: bool
True if this event causes a redraw to be necessary.
Overrides: EditorTool.mouseMotion
(inherited documentation)

mouseButtonPress(self, button, time)

source code 

See TileGrid.buttonPress

Parameters:
  • button - 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.
Overrides: EditorTool.mouseButtonPress

mouseButtonRelease(self, button, time)

source code 

See TileGrid.buttonRelease

Parameters:
  • button - 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.
Overrides: EditorTool.mouseButtonRelease

draw(self, context)

source code 
Overrides: EditorTool.draw

listenSetSelection(self, index, brush, x1, y1, x2, y2)

source code 
Parameters:
  • index - index of the image
  • brush - pixel data to use
  • x1 - left coordinate of selection in tiles
  • y1 - top coordinate of selection in tiles
  • x2 - right coordinate of selection in tiles
  • y2 - bottom coordinate of selection in tiles
Overrides: mapcontroller.MapListener.listenSetSelection
(inherited documentation)

listenFileClosed(self)

source code 

Called when the map being edited is closed. Used to make buttons insensitive, free resources, etc.

Overrides: mapcontroller.MapListener.listenFileClosed
(inherited documentation)