1. Overview
The AboutPage.hpp header defines the AboutPage class, which implements the About page of the BastionGuard application.
This page is responsible for presenting both static and dynamically loaded information about the application, including version/build metadata, license text, and security database details. The implementation is based on Gtkmm (GTK4) and uses a tabbed layout through Gtk::Notebook.
2. Dependencies and Includes
#include <gtkmm.h>
#include <string>
- gtkmm.h – provides GTK C++ widgets such as
Gtk::BoxandGtk::Notebook - <string> – used for text handling and file-loaded content
3. Class Declaration
class AboutPage : public Gtk::Box
The AboutPage class derives from Gtk::Box, allowing it to be embedded directly inside higher-level GTK containers or application layouts.
4. Public Interface
4.1 Constructor
AboutPage();
Initializes the About page UI and populates its internal tabs. The constructor is responsible for:
- Creating and configuring the internal
Gtk::Notebook - Loading version and build metadata
- Loading license text for display
- Loading database status and information
All UI widgets are expected to be fully initialized once construction completes.
5. Private Members
5.1 Internal Notebook
Gtk::Notebook notebook_;
The Gtk::Notebook widget acts as the main layout container, organizing About page content into separate tabs (e.g. application info, license, databases).
6. Private Helper Methods
6.1 load_version_build()
std::pair<std::string, std::string> load_version_build();
Loads application version and build information.
- Returns a
std::paircontaining version and build strings - Typically sourced from build metadata or embedded resources
- Used to populate the main About information panel
6.2 load_license_text()
std::string load_license_text();
Loads the full license text associated with BastionGuard.
- Reads the license from a bundled resource or file
- Returns the complete license text as a string
- Displayed inside a scrollable text view in the UI
6.3 load_database_info()
std::string load_database_info();
Retrieves information about security databases used by the application.
- May include signature versions, update timestamps, or source paths
- Used to provide transparency about active protection components
- Displayed in a dedicated About tab
7. Runtime and Design Considerations
- Encapsulation: all file I/O and content loading logic is kept private and hidden from external callers
- UI separation: the About page is self-contained and does not depend on application state changes
- Read-only behavior: no settings or persistent data are modified by this component
- GTK lifecycle safety: all widgets are owned by the
AboutPageinstance and destroyed automatically