1. Overview
Compact GTK statistics page that displays allowed, denied, and total connection counters for the current application session.
File role: Header Interface. The file contains 27 lines and belongs to the pages/StatsPage.hpp path.
The companion file is pages/StatsPage.cpp.
2. Component Responsibilities
- Declare the component API, owned state, callbacks, and data structures.
- Build the three-value statistics grid
- Receive updated counters from the main window
- Format and display the allowed, denied, and total values
3. Dependencies and Integration
Project-level dependencies:
gtkmm.h
4. Declared Types
StatsPage
Declares a class derived from or associated with public Gtk::Box.
5. Owned State and UI Members
User-interface members
Gtk::Grid m_grid;Gtk::Label m_allowedLabel;Gtk::Label m_deniedLabel;Gtk::Label m_totalLabel;Gtk::Label m_allowedVal { "0" };Gtk::Label m_deniedVal { "0" };Gtk::Label m_totalVal { "0" };
6. Functions and Methods
The file exposes or implements 3 detected function or method signatures.
1. StatsPage
StatsPage()
Implements the stats page operation declared by this component.
2. updateStats
void updateStats(uint64_t allowed, uint64_t denied, uint64_t total)
Updates stats using the latest runtime data.
3. buildGrid
void buildGrid()
Builds and configures the grid user-interface or internal structure.
7. Runtime Flow
- Build the three-value statistics grid
- Receive updated counters from the main window
- Format and display the allowed, denied, and total values
8. Runtime and Security Considerations
- Displays aggregate counters only and does not store sensitive connection details.
9. Error Handling and Operational Notes
- Errors are propagated through the return type, callbacks, or the owning controller.
10. Source Integrity
Relative source path: pages/StatsPage.hpp
SHA-256:
8536b57b039aa4d6591680d3b82209e57a41898d8ce618da492857d7757bf377
11. Licensing
No standalone license block is present in this file. Licensing follows the surrounding BastionGuard Secure Connection project and its accompanying source notices.
