30 lines
682 B
C++
30 lines
682 B
C++
//
|
|
// Created by selim on 10.05.2022.
|
|
//
|
|
|
|
#include "Window.h"
|
|
|
|
gtkpp::Window::Window() {
|
|
_window = ADW_WINDOW(adw_window_new());
|
|
}
|
|
|
|
gtkpp::Window::Window(std::shared_ptr<gtkpp::Application> app) {
|
|
_window = ADW_WINDOW(adw_application_window_new(GTK_APPLICATION(app->gobj())));
|
|
}
|
|
|
|
void gtkpp::Window::show() {
|
|
gtk_window_present(GTK_WINDOW(_window));
|
|
}
|
|
|
|
void gtkpp::Window::setTitle(const std::string &title) {
|
|
gtk_window_set_title(GTK_WINDOW(_window), title.c_str());
|
|
}
|
|
|
|
AdwWindow *gtkpp::Window::gobj() const {
|
|
return _window;
|
|
}
|
|
|
|
void gtkpp::Window::setDefaultSize(int width, int height) {
|
|
gtk_window_set_default_size(GTK_WINDOW(_window), width, height);
|
|
}
|