#ifndef _THEME_TOGGLE_BUTTON_H_ #define _THEME_TOGGLE_BUTTON_H_ #include #include #include #include #include #include #include namespace Bootstrap5 { namespace Theme { const std::string Auto = "auto"; const std::string Light = "light"; const std::string Dark = "dark"; }; class ThemeToggleButton : public Wt::WPushButton { public: ThemeToggleButton(); ~ThemeToggleButton() = default; // for now this only notifies with manual Selection Wt::Signal& themeChanged() { return s_themeChanged; } private: void prepareContent(); void setupConnections(); private: Wt::WPopupMenu *popMenu; Wt::JSlot themeSelect; Wt::JSignal selected; Wt::Signal s_themeChanged; }; } // end namespace Bootstrap5 #endif // _THEME_TOGGLE_BUTTON_H_