37 lines
870 B
C++
37 lines
870 B
C++
//
|
|
// Created by selim on 10.05.2022.
|
|
//
|
|
|
|
#ifndef AUTOCAT_GNOME_WINDOW_H
|
|
#define AUTOCAT_GNOME_WINDOW_H
|
|
|
|
#include "Application.h"
|
|
#include <adwaita.h>
|
|
#include <memory>
|
|
|
|
namespace gtkpp {
|
|
|
|
class Window {
|
|
protected:
|
|
GtkBuilder* _builder;
|
|
GtkWindow* _window;
|
|
std::weak_ptr<Application> _app;
|
|
|
|
private:
|
|
friend bool operator==(const Window& wnd1, const Window& wnd2);
|
|
|
|
public:
|
|
Window(std::shared_ptr<Application> app, bool isAppWindow);
|
|
Window(std::shared_ptr<Application> app, const char* resourceName);
|
|
void show();
|
|
void hide();
|
|
void setTitle(const std::string& title);
|
|
void setDefaultSize(int width, int height);
|
|
[[nodiscard]] GtkWindow* gobj() const;
|
|
[[nodiscard]] std::shared_ptr<Application> application() const;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //AUTOCAT_GNOME_WINDOW_H
|