diff options
Diffstat (limited to 'adw/include/turns')
| -rw-r--r-- | adw/include/turns/adw/toast.hpp | 82 |
1 files changed, 32 insertions, 50 deletions
diff --git a/adw/include/turns/adw/toast.hpp b/adw/include/turns/adw/toast.hpp index 80d9b8b..da0ef4d 100644 --- a/adw/include/turns/adw/toast.hpp +++ b/adw/include/turns/adw/toast.hpp @@ -2,11 +2,13 @@ #define TURNS_ADW_TOAST_HPP #include "turns/adw/helpers/gobj_mixin.hpp" -#include "turns/adw/helpers/properties.hpp" +#include <sigc++/signal.h> #include <glibmm/object.h> #include <glibmm/objectbase.h> +#include <glibmm/propertyproxy.h> #include <glibmm/refptr.h> +#include <glibmm/signalproxy.h> #include <glibmm/ustring.h> #include <glibmm/variant.h> @@ -63,15 +65,35 @@ namespace turns::adw auto static get_base_type() -> GType; auto dismiss() -> void; - - auto property_action_name(this auto && self); - auto property_action_target(this auto && self); - auto property_button_label(this auto && self); - auto property_custom_title(this auto && self); - auto property_priority(this auto && self); - auto property_timeout(this auto && self); - auto property_title(this auto && self); - auto property_use_markup(this auto && self); + auto get_action_name() const -> Glib::ustring; + auto get_action_target_value() const -> Glib::VariantBase; + auto get_button_label() const -> Glib::ustring; + auto get_custom_title() const -> Gtk::Widget *; + auto get_priority() const -> Priority; + auto get_timeout() const -> unsigned; + auto get_title() const -> Glib::ustring; + auto get_use_markup() const -> bool; + auto set_action_name(Glib::ustring value) -> void; + auto set_action_target_value(Glib::VariantBase const & value) -> void; + auto set_button_label(Glib::ustring value) -> void; + auto set_custom_title(Gtk::Widget * value) -> void; + auto set_detailed_action_name(Glib::ustring value) -> void; + auto set_priority(Priority value) -> void; + auto set_timeout(unsigned value) -> void; + auto set_title(Glib::ustring value) -> void; + auto set_use_markup(bool value) -> void; + + auto property_action_name() -> Glib::PropertyProxy<Glib::ustring>; + auto property_action_target() -> Glib::PropertyProxy<Glib::VariantBase>; + auto property_button_label() -> Glib::PropertyProxy<Glib::ustring>; + auto property_custom_title() -> Glib::PropertyProxy<Gtk::Widget *>; + auto property_priority() -> Glib::PropertyProxy<Priority>; + auto property_timeout() -> Glib::PropertyProxy<unsigned>; + auto property_title() -> Glib::PropertyProxy<Glib::ustring>; + auto property_use_markup() -> Glib::PropertyProxy<bool>; + + auto signal_button_clicked() -> Glib::SignalProxy<void()>; + auto signal_dismissed() -> Glib::SignalProxy<void()>; protected: explicit Toast(Glib::ustring const & title); @@ -79,46 +101,6 @@ namespace turns::adw explicit Toast(BaseObjectType * gobj); }; - auto Toast::property_action_name(this auto && self) - { - return helpers::make_property_proxy<Glib::ustring>(self, "action-name"); - } - - auto Toast::property_action_target(this auto && self) - { - return helpers::make_property_proxy<Glib::VariantBase>(self, "action-target"); - } - - auto Toast::property_button_label(this auto && self) - { - return helpers::make_property_proxy<Glib::ustring>(self, "button-label"); - } - - auto Toast::property_custom_title(this auto && self) - { - return helpers::make_property_proxy<Gtk::Widget *>(self, "custom-title"); - } - - auto Toast::property_priority(this auto && self) - { - return helpers::make_property_proxy<Priority>(self, "priority"); - } - - auto Toast::property_timeout(this auto && self) - { - return helpers::make_property_proxy<unsigned>(self, "timeout"); - } - - auto Toast::property_title(this auto && self) - { - return helpers::make_property_proxy<Glib::ustring>(self, "title"); - } - - auto Toast::property_use_markup(this auto && self) - { - return helpers::make_property_proxy<bool>(self, "use-markup"); - } - } // namespace turns::adw namespace Glib |
