main.md 706 B

Application Entry Point (main.cpp)

main.cpp bootstraps GTK, initialises the data model, and launches the main window. This module is intentionally thin—most logic lives in dedicated classes.

Workflow

  1. Initialise GTK via Gtk::Application::create().
  2. Construct DatabaseManager, call ensure_schema().
  3. Instantiate BookList with the database manager and load the existing books.
  4. Create BibliothecaWindow (passing the BookList reference) and add it to the application.
  5. Enter the GTK main loop via app->run(window).

The entry point is also the place to install global actions/startup handlers if you expand the app (e.g., register keyboard shortcuts or file-open hooks).