dymokomi/luced-photo
Source of release 0.1.1
## luced-photo's application: the window and its panels, whose background work
## wakes the window's loop when it has results (Panels.connect): nothing polls.
from luce_ui.ui import Application, Font
from panels import Panels
import theme
import modes
from luce_std import crash
## The version crash reports carry; keep it equal to package.prisma's.
pub let version: str = "0.1.0"
pub class LucedPhoto:
pub let app: Application
pub let panels: Panels
pub func init(self, root: str) -> unit!:
crash.enable("luced-photo", version)
let font = Font()
self.panels = Panels(font, root)
self.app = Application(self.panels.body, title = "Luced Photo", width = 1500, height = 920, theme = theme.editor_theme(modes.color(modes.library)))
self.panels.app = self.app
self.panels.show_library_title()
self.app.set_commands(self.panels.actions.all)
self.app.set_error_handler(self.panels.tell)
self.panels.connect(self.app)
pub func run(self, arguments: list[str]) -> unit!:
self.app.run(frame_limit = 3 if "--smoke" in arguments else 0)
pub func close(self):
self.panels.close()
self.app.close()