Skip to content
API Documentation
BastionGuard™
MainWindow.hpp
Go to the documentation of this file.
1/*
2 * BastionGuard™
3 * Copyright (C) 2025–2026 Calogero Scarnà
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 *
17 * BastionGuard™ is a trademark of Calogero Scarnà.
18 * The BastionGuard™ name and branding are not licensed under the GPL.
19 */
20
21#pragma once
22#include <gtkmm.h>
23#include "DashboardPage.hpp"
24#include "ScanPage.hpp"
25#include "LogPage.hpp"
26#include "SettingsPage.hpp"
27#include "QuarantinePage.hpp"
28#include "UpdatePage.hpp"
29#include "AboutPage.hpp"
30#include "DonatePage.hpp"
31#ifndef BASTIONGUARD_HAS_CEF
32#define BASTIONGUARD_HAS_CEF 1
33#endif
34
35#if BASTIONGUARD_HAS_CEF
36#include "BankPage.hpp"
37#endif
38#include "PrivacyPage.hpp"
41#include "SettingsWindow.hpp"
42#include "usb/USBScanPage.hpp"
44#include "SambaPage.hpp"
46#include "vpn/VpnPage.hpp"
48#include "backup/BackupPage.hpp"
49
50
51class ClamdConfig;
52
53class MainWindow : public Gtk::Window {
54public:
55 MainWindow();
56 ~MainWindow() override = default;
57 void showDashboard();
59protected:
60
61 bool on_close_request() override;
62
63private:
64 Gtk::Box mainBox{Gtk::Orientation::HORIZONTAL};
65 Gtk::Stack stack_;
66 std::vector<Gtk::Button*> sidebar_buttons_;
67
75#if BASTIONGUARD_HAS_CEF
76 BankPage* bank_page_ = nullptr;
77#endif
80 VpnPage* vpn_page_ = nullptr;
90
91 void build_headerbar();
92 void build_sidebar(ClamdConfig& clamdConfig);
93 Gtk::Button* dashboard_button_ = nullptr;
94 void activate_sidebar_button(Gtk::Button* btn);
95
96 void minimize();
97};
PasswordManagerPage * password_manager_page_
BackupPage * backup_page_
USBScanPage * usb_page_
AboutPage about_page_
DonatePage donate_page_
Gtk::Button * dashboard_button_
DashboardPage dashboard_page_
PhishingPage * phishing_page_
bool on_close_request() override
void minimize()
LogPage log_page_
BankPage * bank_page_
IdentityLeakPage * identity_leak_page_
Gtk::Box mainBox
ClamdConfig clamdConfig_
SettingsWindow * settings_window_
PrivacyPage * privacy_page_
std::vector< Gtk::Button * > sidebar_buttons_
UpdatePage update_page_
void build_headerbar()
QuarantinePage quarantine_page_
void open_settings_window()
void showDashboard()
void activate_sidebar_button(Gtk::Button *btn)
AntiRansomwarePage * anti_ransomware_page_
RootGuardPage * rootguard_page_
Gtk::Stack stack_
void build_sidebar(ClamdConfig &clamdConfig)
VpnPage * vpn_page_
ScanPage scan_page_
SambaPage * samba_page_