8#include <mousetrap/widget.hpp>
11 #include "../../docs/doxygen.inl"
22 struct _WindowInternal
24 GObject parent_instance;
26 AdwApplicationWindow* native;
27 AdwHeaderBar* header_bar;
29 AdwBin* header_bar_area;
32 using WindowInternal = _WindowInternal;
33 DEFINE_INTERNAL_MAPPING(Window);
43 class Window :
public detail::notify_if_gtk_uninitialized,
45 HAS_SIGNAL(Window, close_request),
46 HAS_SIGNAL(Window, activate_default_widget),
47 HAS_SIGNAL(Window, activate_focused_widget),
48 HAS_SIGNAL(Window, realize),
49 HAS_SIGNAL(Window, unrealize),
50 HAS_SIGNAL(Window, destroy),
51 HAS_SIGNAL(Window, hide),
52 HAS_SIGNAL(Window, show),
53 HAS_SIGNAL(Window, map),
54 HAS_SIGNAL(Window, unmap)
62 Window(detail::WindowInternal*);
71 operator NativeObject()
const override;
120 void set_title(
const std::string& title);
178 detail::WindowInternal* _internal =
nullptr;
object representing an entire application, supplies the main render loop, mapping of actions
Definition: application.hpp:54
window, registered to an application
Definition: window.hpp:55
void present()
present the window to the user
Definition: window.cpp:112
~Window()
destructor
Definition: window.cpp:92
std::string get_title() const
get the title of the window
Definition: window.cpp:175
void set_child(const Widget &)
set the child of the window
Definition: window.cpp:146
void set_startup_notification_identifier(const std::string &id)
set the window startup notification identifier, usually results in the users OS sending a notificatio...
Definition: window.cpp:231
void set_minimized(bool)
attempt to minimize the window
Definition: window.cpp:138
void remove_child()
remove child
Definition: window.cpp:155
void set_fullscreen(bool)
set whether the window should attempt to enter fullscreen mode
Definition: window.cpp:130
void set_is_decorated(bool)
set whether the window has a titlebar
Definition: window.cpp:211
bool get_is_decorated() const
get whether the window has a titlebar
Definition: window.cpp:216
bool get_destroy_with_parent() const
get whether the window should be destroyed if its parent window is destroyed
Definition: window.cpp:186
void set_transient_for(Window &partner)
set whether this window should always be shown on top of the partner window
Definition: window.cpp:206
bool get_focus_visible() const
get whether the focused widget should be highlighted with a rectangle
Definition: window.cpp:241
void set_maximized(bool)
attempt to maximize the window
Definition: window.cpp:122
void set_hide_on_close(bool)
set whether mousetrap::Window::close should hide or destroy the window, true by default
Definition: window.cpp:160
HeaderBar get_header_bar() const
access the windows header bar widget
Definition: window.cpp:191
bool get_is_modal() const
get whether the window is modal. A modal window prevents users from interacting with any other open a...
Definition: window.cpp:201
void set_has_close_button(bool)
set whether the window should have a close button
Definition: window.cpp:221
void destroy()
free all internal references
Definition: window.cpp:251
bool get_has_close_button() const
get whether the window has a close button
Definition: window.cpp:226
bool get_hide_on_close() const
get whether mousetrap::Window::close should hide or destroy the window, true by default
Definition: window.cpp:165
void close()
hide the window, it will be inaccesible until mousetrap::Window::present is called again
Definition: window.cpp:117
void set_application(Application &application)
link with application
Definition: window.cpp:107
void set_default_widget(const Widget &widget)
set default widget
Definition: window.cpp:246
void set_destroy_with_parent(bool)
set whether the window should be destroyed if its parent window is destroyed, true by default
Definition: window.cpp:181
void set_is_modal(bool)
set whether the window should be modal. A modal window prevents users from interacting with any other...
Definition: window.cpp:196
void set_focus_visible(bool)
set whether the focused widget should be highlighted with a rectangle
Definition: window.cpp:236
void set_title(const std::string &title)
set the title of the titlebar
Definition: window.cpp:170
NativeObject get_internal() const override
expose internal
Definition: window.cpp:97