46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
//
|
|
// Created by selim on 10.05.2022.
|
|
//
|
|
|
|
#ifndef AUTOCAT_GNOME_WINDOW_H
|
|
#define AUTOCAT_GNOME_WINDOW_H
|
|
|
|
#include "Application.h"
|
|
#include "Widget.h"
|
|
|
|
#include <adwaita.h>
|
|
#include <memory>
|
|
|
|
namespace gtkpp {
|
|
|
|
class Window {
|
|
protected:
|
|
GtkBuilder* _builder;
|
|
GtkWindow* _window;
|
|
bool _isAppWindow;
|
|
|
|
private:
|
|
friend bool operator==(const Window& wnd1, const Window& wnd2);
|
|
|
|
public:
|
|
Window();
|
|
explicit Window(bool isAppWindow);
|
|
Window(const char* resourceName, const char* id);
|
|
virtual ~Window();
|
|
void show();
|
|
void hide();
|
|
void destroy();
|
|
void setTitle(const std::string& title);
|
|
void setDefaultSize(int width, int height);
|
|
void setTransientFor(const Window* window);
|
|
void setModal();
|
|
[[nodiscard]] GtkWindow* gobj() const;
|
|
void setContent(const Widget& widget);
|
|
void setResizable(bool resizable);
|
|
};
|
|
|
|
using WindowPtr = std::shared_ptr<Window>;
|
|
}
|
|
|
|
#endif //AUTOCAT_GNOME_WINDOW_H
|