Add GUI desktop application
- Add gui/ package: CustomTkinter app with dashboard, mods, tools, logs, and settings views; first-run SetupWizard for config.json generation - Add gui.py root entry point (calls gui.run_app()) - Add selection.json for GUI selection state persistence - Add customtkinter to requirements.txt - Fix link_mods.py minor issues surfaced during GUI integration - Add modlist_html/Test_Preset_A.html and Test_Preset_B.html as example inputs - Update README.md: add GUI prerequisites, gui.py script section, gui/ folder structure, customtkinter to prerequisites table - Update CLAUDE.md: add python gui.py to common commands, document GUI package architecture and views Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
32
gui/views/base.py
Normal file
32
gui/views/base.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import customtkinter as ctk
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from gui.app import ArmaModManagerApp
|
||||
|
||||
|
||||
class BaseView(ctk.CTkFrame):
|
||||
"""
|
||||
Common base for all view panels.
|
||||
|
||||
Each view is a CTkFrame owned by the app's content area. The app creates
|
||||
view instances once and caches them; it calls refresh() on each navigation
|
||||
so views can update their dynamic content without rebuilding the whole frame.
|
||||
|
||||
Subclasses must implement build() and may override refresh().
|
||||
"""
|
||||
|
||||
def __init__(self, parent: ctk.CTkFrame, app: ArmaModManagerApp) -> None:
|
||||
super().__init__(parent, fg_color="transparent")
|
||||
self.app = app
|
||||
self.build()
|
||||
|
||||
def build(self) -> None:
|
||||
"""Construct all child widgets. Called once from __init__."""
|
||||
raise NotImplementedError
|
||||
|
||||
def refresh(self) -> None:
|
||||
"""Re-query data and update dynamic widgets. Called on every navigation."""
|
||||
Reference in New Issue
Block a user