wolfhece._lidaxe_manager ======================== .. py:module:: wolfhece._lidaxe_manager .. autoapi-nested-parse:: Lidaxe (flow-accumulation / catchment delineation) companion for WolfMapViewer. All Lidaxe-related state and logic lives here. ``WolfMapViewer`` holds a single instance as ``self._lidaxe`` and exposes one-line delegators so external callers remain unaffected. Design notes ------------ * ``LidaxeManager`` owns the ``active`` reference (the ``Lidaxe`` instance) and all menu state (``_menu`` hierarchy + item references). * The wx parent for dialogs is always ``self._viewer``. * ``menu_build()`` is idempotent — the first call creates and appends the 'Lidaxe' menu to the menubar; subsequent calls are no-ops. * ``on_menu()`` is bound to the wx menu and dispatches all Lidaxe commands. * ``activate()`` creates the ``Lidaxe`` instance and calls ``menu_build()``. Module Contents --------------- .. py:class:: LidaxeManager(viewer: wolfhece.PyDraw.WolfMapViewer) Companion object that owns Lidaxe state for WolfMapViewer. Instantiated once as ``viewer._lidaxe = LidaxeManager(viewer)`` inside ``WolfMapViewer.__init__``. .. py:attribute:: _viewer .. py:attribute:: active :type: wolfhece.hydrology.flowaccdir.Lidaxe | None :value: None .. py:attribute:: _menu :type: wx.Menu | None :value: None .. py:attribute:: _item_pick :type: wx.MenuItem | None :value: None .. py:attribute:: _item_picks :type: wx.MenuItem | None :value: None .. py:attribute:: _item_picks_border :type: wx.MenuItem | None :value: None .. py:attribute:: _item_path :type: wx.MenuItem | None :value: None .. py:attribute:: _item_acc_onzoom :type: wx.MenuItem | None :value: None .. py:attribute:: _item_dir_onzoom :type: wx.MenuItem | None :value: None .. py:method:: activate() -> None Create a Lidaxe instance and build the menu (idempotent). .. py:method:: menu_build() -> None Create and append the 'Lidaxe' menu to the viewer menubar. Safe to call multiple times — only the first call has any effect. .. py:method:: _on_find_catchment(event: wx.MenuEvent) -> None .. py:method:: _on_find_catchments(event: wx.MenuEvent) -> None .. py:method:: _on_find_catchments_border(event: wx.MenuEvent) -> None .. py:method:: _on_find_path(event: wx.MenuEvent) -> None .. py:method:: _on_load_acc_onzoom(event: wx.MenuEvent) -> None .. py:method:: _on_load_dir_onzoom(event: wx.MenuEvent) -> None