4 #include <editor/EditorGlobal.h> 6 #include <UnigineCallback.h> 10 namespace Editor {
class RenderWindowPrivate; }
34 RENDERING_POLICY_WINDOW_VISIBLE = 0,
46 using CallbackId = Callback *;
53 CallbackId addUpdateCallback(Unigine::CallbackBase *update_func);
60 CallbackId addRenderCallback(Unigine::CallbackBase *render_func);
67 CallbackId addSwapCallback(Unigine::CallbackBase *swap_func);
72 CallbackId addFocusChangedCallback(Unigine::CallbackBase *focus_changed_func);
79 CallbackId addFocusInChangedCallback(Unigine::CallbackBase *focus_in_func);
85 CallbackId addFocusOutChangedCallback(Unigine::CallbackBase *focus_out_func);
94 CallbackId addDragEnterCallback(Unigine::CallbackBase1<QDragEnterEvent *> *drag_enter_func);
103 CallbackId addDragMoveCallback(Unigine::CallbackBase1<QDragMoveEvent *> *drag_move_func);
112 CallbackId addDragLeaveCallback(Unigine::CallbackBase1<QDragLeaveEvent *> *drag_leave_func);
138 CallbackId addDropCallback(Unigine::CallbackBase1<QDropEvent *> *drop_func);
142 bool removeCallback(CallbackId callback_id);
144 void clearCallbacks();
151 void setRenderingPolicy(RENDERING_POLICY rendering_policy);
157 RENDERING_POLICY getRenderingPolicy()
const;
159 QPaintEngine *paintEngine() const final
override {
return nullptr; }
197 bool event(QEvent *event)
override;
198 void paintEvent(QPaintEvent *)
final override {}
207 void resizeEvent(QResizeEvent *event)
override;
221 void focusInEvent(QFocusEvent *event)
override;
235 void focusOutEvent(QFocusEvent *event)
override;
245 void dragEnterEvent(QDragEnterEvent *event)
override;
254 void dragMoveEvent(QDragMoveEvent *event)
override;
262 void dragLeaveEvent(QDragLeaveEvent *event)
override;
270 void dropEvent(QDropEvent *event)
override;
276 bool is_paused_rendering()
const;
279 friend class RenderWindowPrivate;
280 RenderWindowPrivate *
const d;
The window is rendered only when it is visible and focused.
Definition: RenderWindow.h:36
virtual void onRender()
You can inherit your class from RenderWindow and override this method to define your custom actions t...
Definition: RenderWindow.h:182
RENDERING_POLICY
Rendering policy for the window that defines when it should be rendered depending on its visibility a...
Definition: RenderWindow.h:31
virtual void onSwap()
You can inherit your class from RenderWindow and override this method to define your custom actions t...
Definition: RenderWindow.h:189
This class is used to represent a window widget to which an image can be rendered by the Engine....
Definition: RenderWindow.h:22
virtual void onUpdate()
You can inherit your class from RenderWindow and override this method to define your custom actions t...
Definition: RenderWindow.h:175
The window is always rendered regardless of its visibility and focus status.
Definition: RenderWindow.h:38