4 #include <editor/UnigineEditorGlobal.h> 6 #include <UnigineCallback.h> 14 namespace UnigineEditor {
class RenderWindowPrivate; }
16 namespace UnigineEditor
38 RENDERING_POLICY_WINDOW_VISIBLE = 0,
50 using CallbackId = Callback *;
57 CallbackId addUpdateCallback(Unigine::CallbackBase *update_func);
64 CallbackId addRenderCallback(Unigine::CallbackBase *render_func);
71 CallbackId addSwapCallback(Unigine::CallbackBase *swap_func);
76 CallbackId addFocusChangedCallback(Unigine::CallbackBase *focus_changed_func);
83 CallbackId addFocusInChangedCallback(Unigine::CallbackBase *focus_in_func);
89 CallbackId addFocusOutChangedCallback(Unigine::CallbackBase *focus_out_func);
98 CallbackId addDragEnterCallback(Unigine::CallbackBase1<QDragEnterEvent *> *drag_enter_func);
107 CallbackId addDragMoveCallback(Unigine::CallbackBase1<QDragMoveEvent *> *drag_move_func);
116 CallbackId addDragLeaveCallback(Unigine::CallbackBase1<QDragLeaveEvent *> *drag_leave_func);
142 CallbackId addDropCallback(Unigine::CallbackBase1<QDropEvent *> *drop_func);
146 bool removeCallback(CallbackId callback_id);
148 void clearCallbacks();
155 void setRenderingPolicy(RENDERING_POLICY rendering_policy);
161 RENDERING_POLICY getRenderingPolicy()
const;
163 QPaintEngine *paintEngine() const final
override {
return nullptr; }
201 bool event(QEvent *event)
override;
202 void paintEvent(QPaintEvent *)
final override {}
211 void resizeEvent(QResizeEvent *event)
override;
225 void focusInEvent(QFocusEvent *event)
override;
239 void focusOutEvent(QFocusEvent *event)
override;
249 void dragEnterEvent(QDragEnterEvent *event)
override;
258 void dragMoveEvent(QDragMoveEvent *event)
override;
266 void dragLeaveEvent(QDragLeaveEvent *event)
override;
274 void dropEvent(QDropEvent *event)
override;
280 bool is_paused_rendering()
const;
283 friend class ::UnigineEditor::RenderWindowPrivate;
284 ::UnigineEditor::RenderWindowPrivate *
const d;
RENDERING_POLICY
Rendering policy for the window that defines when it should be rendered depending on its visibility a...
Definition: UnigineRenderWindow.h:35
virtual void onRender()
You can inherit your class from RenderWindow and override this method to define your custom actions t...
Definition: UnigineRenderWindow.h:186
The window is always rendered regardless of its visibility and focus status.
Definition: UnigineRenderWindow.h:42
virtual void onUpdate()
You can inherit your class from RenderWindow and override this method to define your custom actions t...
Definition: UnigineRenderWindow.h:179
virtual void onSwap()
You can inherit your class from RenderWindow and override this method to define your custom actions t...
Definition: UnigineRenderWindow.h:193
This class is used to represent a window widget to which an image can be rendered by the Engine....
Definition: UnigineRenderWindow.h:26
The window is rendered only when it is visible and focused.
Definition: UnigineRenderWindow.h:40