| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsEditorPrerequisites.h"
- #include "EditorWindow/BsEditorWindowBase.h"
- namespace bs
- {
- /** @addtogroup EditorWindow
- * @{
- */
- /** A draggable and resizeable window that has a single widget container you may use for docking editor widgets in. */
- class BS_ED_EXPORT EditorWindow : public EditorWindowBase
- {
- public:
- virtual ~EditorWindow();
- /** Returns the widget container for this window. */
- EditorWidgetContainer& widgets() const { return *mWidgets; }
- /** @copydoc EditorWindowBase::update */
- void update() override;
- /** Creates a new empty editor window. */
- static EditorWindow* create();
- protected:
- friend class EditorWindowManager;
- EditorWindow();
- /** @copydoc EditorWindowBase::resized */
- void resized() override;
- private:
- EditorWidgetContainer* mWidgets;
- /**
- * Updates the sizes of the child widget container and OS non-client areas (like drag and resize). Call when window
- * size changes.
- */
- void updateSize();
- /** Called when a widget is added to the widget container. */
- void widgetAdded();
- /** Called when a widget is removed from the widget container. */
- void widgetRemoved();
- /** Triggered when the maximize button on the title bar is clicked. */
- void maximizeClicked();
- /**
- * A callback that triggers when a drag and drop operation originated from this window ends.
- *
- * @note
- * This is a workaround to get around the problem that closing the window when the drag operation starts (for
- * example if the last widget is dragged from the window) will cause the application to lose mouse capture and will
- * not receive mouse events. Therefore we delay the window closing until the drag ends.
- */
- void closeWindowDelayed();
- };
- /** @} */
- }
|