14#include "kddockwidgets/docks_export.h"
16#include "kddockwidgets/KDDockWidgets.h"
17#include "kddockwidgets/QtCompat_p.h"
26class EventFilterInterface;
27struct CreateViewOptions;
28class ClassicDropIndicatorOverlay;
29class SegmentedDropIndicatorOverlay;
50 virtual const char *
name()
const = 0;
57 virtual bool hasActivePopup()
const;
69 virtual std::shared_ptr<Core::Window>
windowAt(Point globalPos)
const = 0;
88 bool isQtWidgets()
const;
91 bool isQtQuick()
const;
100 int startDragDistance()
const;
191 virtual bool supportsAeroSnap()
const;
194 static std::vector<KDDockWidgets::FrontendType> frontendTypes();
197#if defined(DOCKS_DEVELOPER_MODE) && !defined(DARTAGNAN_BINDINGS_RUN)
203 virtual KDDW_QCORO_TASK tests_wait(
int ms)
const = 0;
207 virtual KDDW_QCORO_TASK tests_waitForResize(
View *,
int timeout = 2000)
const = 0;
208 virtual KDDW_QCORO_TASK tests_waitForResize(
Controller *,
int timeout = 2000)
const = 0;
209 virtual KDDW_QCORO_TASK tests_waitForDeleted(
View *,
int timeout = 2000)
const = 0;
210 virtual KDDW_QCORO_TASK tests_waitForDeleted(
Controller *,
int timeout = 2000)
const = 0;
215 virtual KDDW_QCORO_TASK tests_waitForWindowActive(std::shared_ptr<Core::Window>,
int timeout = 5000)
const = 0;
219 virtual KDDW_QCORO_TASK tests_waitForEvent(Core::Object *w, Event::Type type,
int timeout = 5000)
const = 0;
220 virtual KDDW_QCORO_TASK tests_waitForEvent(
View *, Event::Type type,
int timeout = 5000)
const = 0;
221 virtual KDDW_QCORO_TASK tests_waitForEvent(std::shared_ptr<Core::Window>, Event::Type type,
222 int timeout = 5000)
const = 0;
224 virtual void tests_doubleClickOn(Point globalPos,
View *receiver) = 0;
225 virtual void tests_doubleClickOn(Point globalPos, std::shared_ptr<Core::Window> receiver) = 0;
226 virtual void tests_pressOn(Point globalPos,
View *receiver) = 0;
227 virtual void tests_pressOn(Point globalPos, std::shared_ptr<Core::Window> receiver) = 0;
228 virtual KDDW_QCORO_TASK tests_releaseOn(Point globalPos,
View *receiver) = 0;
229 virtual KDDW_QCORO_TASK tests_mouseMove(Point globalPos,
View *receiver) = 0;
233 virtual std::shared_ptr<Core::Window> tests_createWindow() = 0;
241 static void tests_deinitPlatform();
243 std::string m_expectedWarning;
246#ifdef DOCKS_TESTING_METHODS
248 class WarningObserver
252 WarningObserver() =
default;
253 virtual ~WarningObserver();
254 virtual void onFatal() = 0;
258 static bool isInitialized();
263 virtual View *tests_createView(CreateViewOptions,
View *parent =
nullptr) = 0;
267 virtual View *tests_createFocusableView(CreateViewOptions,
View *parent =
nullptr) = 0;
270 virtual View *tests_createNonClosableView(
View *parent =
nullptr) = 0;
272 virtual void installMessageHandler() = 0;
273 virtual void uninstallMessageHandler() = 0;
278 createMainWindow(
const QString &uniqueName, CreateViewOptions,
279 MainWindowOptions options = MainWindowOption_HasCentralFrame,
282 virtual void pauseForDebugger();
287 virtual void tests_initPlatform_impl()
293 virtual void tests_deinitPlatform_impl()
304 virtual int startDragDistance_impl()
const;
311#if defined(DOCKS_DEVELOPER_MODE)
313#if !defined(DARTAGNAN_BINDINGS_RUN)
315struct SetExpectedWarning
317 explicit SetExpectedWarning(
const std::string &s)
320 Platform::instance()->m_expectedWarning = s;
323 ~SetExpectedWarning()
325 Platform::instance()->m_expectedWarning.clear();
335#if defined(DOCKS_TESTING_METHODS)
337struct CreateViewOptions
339 bool isVisible =
false;
341 Size minSize = { 0, 0 };
342 Size maxSize = Size(16777215, 16777215);
343 Size size = { 1000, 1000 };
344 bool createWindow =
false;
346 Size getMinSize()
const
351 Size getMaxSize()
const
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...