Adding a Builder as a field (app_builder)

This commit is contained in:
Pcornat 2024-12-18 22:53:32 +01:00
parent 14144c9ce4
commit 031445743c
Signed by: Pcornat
GPG Key ID: E0326CC678A00BDD

View File

@ -9,11 +9,11 @@ namespace learn_gtkmm4 {
} }
namespace Gtk { namespace Gtk {
class Builder;
class Switch; class Switch;
} }
namespace gui_to_app { namespace gui_to_app {
class AppWin2Back final : public Gtk::Application { class AppWin2Back final : public Gtk::Application {
public: public:
~AppWin2Back() noexcept final = default; ~AppWin2Back() noexcept final = default;
@ -30,6 +30,7 @@ namespace gui_to_app {
private: private:
void on_quit() noexcept; void on_quit() noexcept;
Glib::RefPtr<Gtk::Builder> app_builder;
learn_gtkmm4::HelloWorld *main_window{ nullptr }; learn_gtkmm4::HelloWorld *main_window{ nullptr };
Gtk::Switch *sword_switch{ nullptr }; Gtk::Switch *sword_switch{ nullptr };
Gtk::Switch *lance_switch{ nullptr }; Gtk::Switch *lance_switch{ nullptr };
@ -46,7 +47,6 @@ namespace gui_to_app {
Gtk::Switch *rock_kit_switch{ nullptr }; Gtk::Switch *rock_kit_switch{ nullptr };
Gtk::Switch *sack_switch{ nullptr }; Gtk::Switch *sack_switch{ nullptr };
}; };
} // gui_to_app } // gui_to_app
#endif //LEARNGTK4_APP_WIN_2_BACK_HPP #endif //LEARNGTK4_APP_WIN_2_BACK_HPP