Package arcmap :: Module window :: Class MainWindow
[hide private]
[frames] | no frames]

Class MainWindow

source code

mapcontroller.MapListener --+
                            |
                           MainWindow

Toplevel window for the map editor

Instance Methods [hide private]
 
__init__(self, fileName=None) source code
 
__createGUI(self)
Assembles the widgets together onto the window
source code
 
setTitle(self)
Sets the window title.
source code
 
__createToolbar(self)
Creates the toolbar on the left of the screen that holds the tools defined in editortools
source code
 
createTreeView(self)
Creates the tree view and its associated buttons
source code
 
delete_event(self, widget, event, data=None) source code
 
destroy(self, widget, data=None) source code
 
file_new(self, widget, data=None) source code
 
file_open(self, window, data=None) source code
 
file_save(self, widget, data=None) source code
 
file_saveAs(self, widget, data=None) source code
 
file_properties(self, widget, data=None) source code
bool
promptSave(self)
Returns: Returns True if the user saved, False otherwise
source code
bool
closeCheck(self)
Checks to see if the user wants to quit and if he/she wants to save the changes to the map.
source code
 
file_quit(self, widget, data=None) source code
 
file_close(self, widget, data=None) source code
 
edit_resize(self, window, data=None) source code
 
edit_undo(self, window, data=None) source code
 
edit_redo(self, window, data=None) source code
 
edit_preferences(self, window, data=None) source code
 
edit_background(self, window, data=None) source code
 
view_toggleGridMap(self, widget, data=None)
We installed this function so you could turn the grid on, and off.
source code
 
view_toggleGridPalette(self, widget, data=None) source code
 
view_toggleToolbar(self, widget, data=None) source code
 
view_zoomIn(self, widget, data=None) source code
 
view_zoomOut(self, widget, data=None) source code
 
view_zoomNormal(self, widget, data=None) source code
 
help_about(self, window, data=None)
The answer to the age-old question "Who's responsible for this mess?"
source code
 
toolSelect(self, action, ignored)
Handles tool selection on the map toolbar
source code
 
addLayer(self, window, data=None)
Adds a layer to the map
source code
 
removeLayer(self, window, data=None)
Removes a layer from the map
source code
 
raiseLayer(self, window, data=None)
Raises the currently selected layer in the map
source code
 
lowerLayer(self, window, data=None)
Lowers the currently selected layer in the map
source code
 
keyPress(self, window, event) source code
 
listenModified(self, modified)
Notify the listener if the map has unsaved changes or not
source code
 
__setWidgetsInsensitive(self) source code
 
listenFileClosed(self)
Called when the map being edited is closed.
source code
 
listenFileOpened(self)
Called when a map is opened or created.
source code
 
listenUndoRedo(self)
Update due to an undo action or a redo action
source code

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

Method Details [hide private]

__init__(self, fileName=None)
(Constructor)

source code 
Parameters:
  • fileName (str) - the name of the file to try to open the program with
Overrides: mapcontroller.MapListener.__init__

promptSave(self)

source code 
Returns: bool
Returns True if the user saved, False otherwise

closeCheck(self)

source code 

Checks to see if the user wants to quit and if he/she wants to save the changes to the map.

Returns: bool
False if the user hit "Cancel", True if the file should be closed

view_toggleGridMap(self, widget, data=None)

source code 

We installed this function so you could turn the grid on, and off. NOT SO YOU COULD HOLD GRIDSWITCH RAVES!

listenModified(self, modified)

source code 

Notify the listener if the map has unsaved changes or not

Parameters:
  • modified - Whether or not the map is changed
Overrides: mapcontroller.MapListener.listenModified
(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)

listenFileOpened(self)

source code 

Called when a map is opened or created. Used to make buttons sensitive, or whatever else.

Overrides: mapcontroller.MapListener.listenFileOpened
(inherited documentation)

listenUndoRedo(self)

source code 

Update due to an undo action or a redo action

Overrides: mapcontroller.MapListener.listenUndoRedo
(inherited documentation)