Raxol.Terminal.Window.Manager.WindowManagerServer (Raxol v2.0.1)
View SourceGenServer implementation for terminal window management in Raxol.
This server provides a pure functional approach to window management, eliminating Process dictionary usage and implementing proper OTP patterns.
Features
- Window creation, destruction, and lifecycle management
- Hierarchical window relationships (parent/child)
- Window state tracking (active, inactive, minimized, maximized)
- Window properties management (title, size, position)
- Icon management for windows
- Supervised state management with fault tolerance
State Structure
The server maintains state with the following structure:
%{
windows: %{window_id => Window.t()},
active_window: window_id | nil,
window_order: [window_id], # Z-order for stacking
window_state: :normal | :minimized | :maximized | :fullscreen,
window_size: {width, height},
window_title: String.t(),
icon_name: String.t(),
icon_title: String.t(),
spatial_map: %{}, # For spatial navigation
navigation_paths: %{}, # Custom navigation paths
next_window_id: integer()
}
Summary
Functions
Returns a specification to start this module under a supervisor.
Creates a child window.
Creates a new window with the given configuration.
Defines a navigation path between windows.
Destroys a window by ID.
Gets the active window.
Gets child windows.
Gets parent window.
Gets the complete state (for debugging/migration).
Gets a window by ID.
Gets the window size.
Gets the window manager state.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Lists all windows.
Moves a window to the back in Z-order.
Moves a window in the Z-order.
Registers a window's spatial position for navigation.
Resets to initial state.
Sets the active window.
Sets the icon name.
Sets the icon title.
Sets window position.
Sets the window size.
Sets a specific window's size.
Sets the window state (normal, minimized, maximized, fullscreen).
Sets a specific window's state.
Sets the window title.
Sets a specific window's title.
Split a window horizontally or vertically.
Updates the window manager configuration.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Creates a child window.
Creates a new window with the given configuration.
Destroys a window by ID.
Gets the active window.
Gets child windows.
Gets parent window.
Gets the complete state (for debugging/migration).
Gets a window by ID.
Gets the window size.
Gets the window manager state.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Lists all windows.
Moves a window to the back in Z-order.
Moves a window in the Z-order.
Registers a window's spatial position for navigation.
Resets to initial state.
Sets the active window.
Sets the icon name.
Sets the icon title.
Sets window position.
Sets the window size.
Sets a specific window's size.
Sets the window state (normal, minimized, maximized, fullscreen).
Sets a specific window's state.
Sets the window title.
Sets a specific window's title.
Split a window horizontally or vertically.
Updates the window manager configuration.