8 #ifndef Guit_Window_hpp
9 #define Guit_Window_hpp
57 GWindow(GString
const& css_and_title =
"");
61 GWindow* toWindow()
override {
return this;}
69 virtual bool isModal()
const {
return wmodes_.modal;}
99 float x()
const override {
return screenpos_.x;}
100 float y()
const override {
return screenpos_.y;}
102 virtual void raise();
103 virtual void minimize();
104 virtual void maximize();
105 virtual void restore();
107 GWindow& setResizable(
bool);
108 GWindow& setMinSize(
float w,
float h);
109 GWindow& setMaxSize(
float w,
float h);
111 GWindow& stayOnTop();
112 GWindow& stayOnTopOf(GWindow&);
113 GWindow& joinAllSpaces();
114 GWindow& setBordered(
bool);
116 void setScale(
float scale);
117 float scale()
const {
return scale_;}
120 void add(
Gadget* child,
int index = -1)
override;
122 void add(GWindow*)
override;
128 class GNatWindow* nativeWindow() {
return natwin_;}
130 using GType = GadgetType_<GWindow,GBox>;
131 static GType& Type();
132 GType& type()
const override {
return Type();}
136 uint32_t windowID()
const;
137 void topInit()
override;
138 void addProp(GProp&
prop,
bool add_to_list)
override;
139 void moveImpl(
float winx,
float winy,
bool callcb)
override;
140 void addHotkey(
Gadget&,
class GHotkey&);
141 bool triggerHotkey(GEventState keystate, GKeyCode key);
142 void setIconImpl(GString
const& filename);
144 struct WinModes {uint8_t
145 modal:1, mustupdate:1, mustdraw:1, mustlayout:1, dieonclose:1,
146 autoclose:1, softwin:1, quitcalled:1;
150 class GNatWindow* natwin_{};
151 class GHotkeys* hotkeys_{};
156 GWindow& Window(GString
const& css_and_title =
"");