diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-03-27 19:44:46 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-03-27 19:44:46 +0100 |
| commit | 3a4e781aa4ec052b819a33ba27e2f6a5b78696ff (patch) | |
| tree | 5f6eeefaa608f89db37a9b76df802e257f008730 /adw/include | |
| parent | 0d9e3328a2e1b017b712c30ccb144d5ea0b45f33 (diff) | |
| download | turns-3a4e781aa4ec052b819a33ba27e2f6a5b78696ff.tar.xz turns-3a4e781aa4ec052b819a33ba27e2f6a5b78696ff.zip | |
adw: add more dialog functions
Diffstat (limited to 'adw/include')
| -rw-r--r-- | adw/include/turns/adw/breakpoint.hpp | 3 | ||||
| -rw-r--r-- | adw/include/turns/adw/dialog.hpp | 12 | ||||
| -rw-r--r-- | adw/include/turns/adw/helpers/gobj_mixin.hpp | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/adw/include/turns/adw/breakpoint.hpp b/adw/include/turns/adw/breakpoint.hpp index b274bbb..e5dabe3 100644 --- a/adw/include/turns/adw/breakpoint.hpp +++ b/adw/include/turns/adw/breakpoint.hpp @@ -84,19 +84,20 @@ namespace turns::adw using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj; using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy; - explicit Breakpoint(BreakpointCondition & condition); Breakpoint(Breakpoint const & other) = delete; Breakpoint(Breakpoint && other) noexcept = default; auto operator=(Breakpoint const & other) noexcept -> Breakpoint & = delete; auto operator=(Breakpoint && other) noexcept -> Breakpoint & = default; + auto static create(BreakpointCondition & condition) -> Glib::RefPtr<Breakpoint>; auto static get_type() -> GType; auto static get_base_type() -> GType; auto property_condition() -> Glib::PropertyProxy<BreakpointCondition *>; protected: + explicit Breakpoint(BreakpointCondition & condition); explicit Breakpoint(Glib::ConstructParams const & params); explicit Breakpoint(BaseObjectType * gobj); }; diff --git a/adw/include/turns/adw/dialog.hpp b/adw/include/turns/adw/dialog.hpp index 316a218..3536dfa 100644 --- a/adw/include/turns/adw/dialog.hpp +++ b/adw/include/turns/adw/dialog.hpp @@ -55,8 +55,16 @@ namespace turns::adw auto static get_type() -> GType; auto static get_base_type() -> GType; - auto add_breakpoint(adw::Breakpoint && breakpoint) -> void; + auto add_breakpoint(Glib::RefPtr<Breakpoint> const & breakpoint) -> void; auto close() -> void; + auto force_close() -> void; + auto get_can_close() const -> bool; + auto get_child() const -> Gtk::Widget *; + auto get_content_height() const -> int; + auto get_content_width() const -> int; + auto get_current_breakpoint() const -> Glib::RefPtr<Breakpoint>; + auto get_default_widget() const -> Gtk::Widget *; + auto get_focus() const -> Gtk::Widget *; auto present(Gtk::Widget * parent) -> void; auto set_title(Glib::ustring const & str) -> void; @@ -68,7 +76,7 @@ namespace turns::adw namespace Glib { - auto wrap(AdwDialog * object, bool copy = false) -> Glib::RefPtr<turns::adw::Dialog>; + auto wrap(AdwDialog * object, bool copy = false) -> turns::adw::Dialog *; } // namespace Glib #endif
\ No newline at end of file diff --git a/adw/include/turns/adw/helpers/gobj_mixin.hpp b/adw/include/turns/adw/helpers/gobj_mixin.hpp index d9e5097..67600cf 100644 --- a/adw/include/turns/adw/helpers/gobj_mixin.hpp +++ b/adw/include/turns/adw/helpers/gobj_mixin.hpp @@ -28,7 +28,7 @@ namespace turns::adw::helpers using gobj_type = std::conditional_t<std::is_const_v<clean_type>, std::add_const_t<Glib::Object>, Glib::Object>; static_cast<gobj_type &&>(self).reference(); - return self.gobj(); + return const_cast<AdwType *>(self.gobj()); } }; |
