wolfhece._dike_manager
Dike companion object for WolfMapViewer.
All dike-simulation management logic lives here (DikeWolf objects, menu,
event dispatch, creation). Injectors are not part of this companion —
they register themselves via WolfMapViewer.add_object(which='injector')
when DikeWolf.set_injector() is called.
WolfMapViewer holds a single instance as self._dike = DikeManager(self)
and exposes one-line delegators so that external callers remain unaffected.
Module Contents
- class wolfhece._dike_manager.DikeManager(viewer: wolfhece.PyDraw.WolfMapViewer)[source]
Companion object that owns dike-simulation state.
Instantiated unconditionally as
viewer._dike = DikeManager(viewer)insideWolfMapViewer.__init__. If the wolfpydike package is not installed,availableisFalseand all operations are no-ops or log an error.- mydikes: list[wolfhece.dike.DikeWolf] = [][source]
- register(newobj: wolfhece.dike.DikeWolf) None[source]
Add newobj to the registry and make it the active dike.
Create and append the ‘Dike’ menu to the viewer menubar.
Safe to call multiple times — only the first call has any effect. Silently returns if wolfpydike is not available.