Package horizons :: Package gui :: Package widgets :: Module resourceoverviewbar :: Class ResBarMouseTool
[hide private]
[frames] | no frames]

Class ResBarMouseTool

source code

        fife.fife.IMouseListener --+        
    mousetools.cursortool.CursorTool --+    
mousetools.navigationtool.NavigationTool --+

Temporary mousetool for resource selection. Terminates self on mousePressed and restores old tool

Instance Methods [hide private]
__init__(self, session, old_tool, on_click) source code
mousePressed(self, evt) source code
Enable old tool again
source code
    Inherited from mousetools.navigationtool.NavigationTool
Hover instances have potentially changed, do an update in a timely fashion (but not right away)
source code
Broadcast update with new instances below mouse (hovered).
source code
end(self) source code
get_hover_instances(self, where, layers=None)
Utility method, returns the instances under the cursor
source code
mouseDragged(self, evt) source code
mouseMoved(self, evt) source code
mouseReleased(self, evt) source code
mouseWheelMovedDown(self, evt) source code
mouseWheelMovedUp(self, evt) source code
onCommand(self, command)
Called when some kind of command-event happens.
source code
remove(self) source code
    Inherited from mousetools.cursortool.CursorTool
_get_screenpoint(self, arg)
Python lacks polymorphism.
source code
_round_map_coords(self, map_x, map_y)
Returns the coordinates of an event at the map.
source code
Call this to not get events.
source code
Call this to get events.
source code
get_exact_world_location(self, evt)
Returns the coordinates of an event at the map.
source code
get_world_location(self, evt) source code
mouseClicked(self, evt) source code
mouseEntered(self, evt) source code
mouseExited(self, evt) source code
Class Variables [hide private]
    Inherited from mousetools.navigationtool.NavigationTool
  last_event_pos = fife.ScreenPoint(0, 0)
  last_hover_instances = WeakList()
  send_hover_instances_update = True
    Inherited from mousetools.cursortool.CursorTool
  log = logging.getLogger("gui.mousetools")
Method Details [hide private]

__init__(self, session, old_tool, on_click)

source code 
Overrides: mousetools.cursortool.CursorTool.__init__

mousePressed(self, evt)

source code 
Overrides: mousetools.cursortool.CursorTool.mousePressed