KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
DropIndicatorOverlay_c.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
12
13
14#include <iostream>
15
16#include <cassert>
17
18
19namespace Dartagnan {
20
21typedef int (*CleanupCallback)(void *thisPtr);
23
24template<typename T>
25struct ValueWrapper
26{
27 T value;
28};
29
30}
41{
42 return ::KDDockWidgets::Core::DropIndicatorOverlay::currentDropLocation();
43}
45{
47 const void *thisPtr = this;
48 return m_dropIndicatorVisibleCallback(const_cast<void *>(thisPtr), arg__1);
49 } else {
50 return ::KDDockWidgets::Core::DropIndicatorOverlay::dropIndicatorVisible(arg__1);
51 }
52}
54{
55 return ::KDDockWidgets::Core::DropIndicatorOverlay::dropIndicatorVisible(arg__1);
56}
58{
59 return ::KDDockWidgets::Core::DropIndicatorOverlay::hover(globalPos);
60}
62{
64 const void *thisPtr = this;
65 return m_hover_implCallback(const_cast<void *>(thisPtr), &globalPos);
66 } else {
67 std::cerr << "hover_impl: Warning: Calling pure-virtual\n";
68 return {};
69 }
70}
72{
73 std::cerr << "hover_impl: Warning: Calling pure-virtual\n";
74 return {};
75}
77{
78 return ::KDDockWidgets::Core::DropIndicatorOverlay::hoveredGroup();
79}
81{
82 return ::KDDockWidgets::Core::DropIndicatorOverlay::hoveredGroupRect();
83}
85{
86 return ::KDDockWidgets::Core::DropIndicatorOverlay::isHovered();
87}
89{
90 return ::KDDockWidgets::Core::DropIndicatorOverlay::multisplitterLocationFor(arg__1);
91}
93{
95 const void *thisPtr = this;
96 m_onHoveredGroupChangedCallback(const_cast<void *>(thisPtr), arg__1);
97 } else {
99 }
100}
106{
108 const void *thisPtr = this;
109 return *m_posForIndicatorCallback(const_cast<void *>(thisPtr), arg__1);
110 } else {
111 std::cerr << "posForIndicator: Warning: Calling pure-virtual\n";
112 return {};
113 }
114}
116{
117 std::cerr << "posForIndicator: Warning: Calling pure-virtual\n";
118 return {};
119}
125{
127 const void *thisPtr = this;
128 m_setCurrentDropLocationCallback(const_cast<void *>(thisPtr), arg__1);
129 } else {
131 }
132}
142{
144 const void *thisPtr = this;
145 m_setParentView_implCallback(const_cast<void *>(thisPtr), parent);
146 } else {
148 }
149}
159{
161 const void *thisPtr = this;
162 m_updateVisibilityCallback(const_cast<void *>(thisPtr));
163 } else {
165 }
166}
174
175}
177{
178 return reinterpret_cast<KDDockWidgets::Core::DropIndicatorOverlay *>(ptr);
179}
184extern "C" {
190{
191 auto dropArea = reinterpret_cast<KDDockWidgets::Core::DropArea *>(dropArea_);
193 return reinterpret_cast<void *>(ptr);
194}
196{
197 auto dropArea = reinterpret_cast<KDDockWidgets::Core::DropArea *>(dropArea_);
198 auto view = reinterpret_cast<KDDockWidgets::Core::View *>(view_);
200 return reinterpret_cast<void *>(ptr);
201}
202// currentDropLocation() const
204{
205 const auto &result = int(fromPtr(thisObj)->currentDropLocation());
206 return result;
207}
208// dropIndicatorVisible(KDDockWidgets::DropLocation arg__1) const
210{
211 const auto &result = [&] {auto targetPtr = fromPtr(thisObj);auto wrapperPtr = dynamic_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper*>(targetPtr);if (wrapperPtr) { return wrapperPtr->dropIndicatorVisible_nocallback(static_cast<KDDockWidgets::DropLocation>(arg__1));} else { return targetPtr->dropIndicatorVisible(static_cast<KDDockWidgets::DropLocation>(arg__1));} }();
212 return result;
213}
214// hover(KDDockWidgets::Point globalPos)
216{
217 assert(globalPos_);
218 auto &globalPos = *reinterpret_cast<KDDockWidgets::Point *>(globalPos_);
219 const auto &result = int(fromPtr(thisObj)->hover(globalPos));
220 return result;
221}
222// hover_impl(KDDockWidgets::Point globalPos)
224{
225 assert(globalPos_);
226 auto &globalPos = *reinterpret_cast<KDDockWidgets::Point *>(globalPos_);
227 const auto &result = fromWrapperPtr(thisObj)->hover_impl_nocallback(globalPos);
228 return result;
229}
230// hoveredGroup() const
232{
233 const auto &result = fromPtr(thisObj)->hoveredGroup();
234 return result;
235}
236// hoveredGroupRect() const
238{
239 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->hoveredGroupRect() };
240 return result;
241}
242// isHovered() const
244{
245 const auto &result = fromPtr(thisObj)->isHovered();
246 return result;
247}
248// multisplitterLocationFor(KDDockWidgets::DropLocation arg__1)
254// onHoveredGroupChanged(KDDockWidgets::Core::Group * arg__1)
256{
257 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Group *>(arg__1_);
259}
260// posForIndicator(KDDockWidgets::DropLocation arg__1) const
262{
263 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { [&] {auto targetPtr = fromPtr(thisObj);auto wrapperPtr = dynamic_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper*>(targetPtr);if (wrapperPtr) { return wrapperPtr->posForIndicator_nocallback(static_cast<KDDockWidgets::DropLocation>(arg__1));} else { return targetPtr->posForIndicator(static_cast<KDDockWidgets::DropLocation>(arg__1));} }() };
264 return result;
265}
266// removeHover()
271// setCurrentDropLocation(KDDockWidgets::DropLocation arg__1)
273{
274 [&] {auto targetPtr = fromPtr(thisObj);auto wrapperPtr = dynamic_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper*>(targetPtr);if (wrapperPtr) { return wrapperPtr->setCurrentDropLocation_nocallback(static_cast<KDDockWidgets::DropLocation>(arg__1));} else { return targetPtr->setCurrentDropLocation(static_cast<KDDockWidgets::DropLocation>(arg__1));} }();
275}
276// setHoveredGroup(KDDockWidgets::Core::Group * arg__1)
278{
279 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::Group *>(arg__1_);
280 fromPtr(thisObj)->setHoveredGroup(arg__1);
281}
282// setParentView_impl(KDDockWidgets::Core::View * parent)
284{
285 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
287}
288// setWindowBeingDragged(bool arg__1)
290{
291 fromPtr(thisObj)->setWindowBeingDragged(arg__1);
292}
293// updateVisibility()
299{
300 delete fromPtr(thisObj);
301}
303{
304 auto wrapper = fromWrapperPtr(ptr);
305 switch (methodId) {
306 case 1042:
307 wrapper->m_dropIndicatorVisibleCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::Callback_dropIndicatorVisible>(callback);
308 break;
309 case 1046:
310 wrapper->m_hover_implCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::Callback_hover_impl>(callback);
311 break;
312 case 1058:
313 wrapper->m_onHoveredGroupChangedCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::Callback_onHoveredGroupChanged>(callback);
314 break;
315 case 1060:
316 wrapper->m_posForIndicatorCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::Callback_posForIndicator>(callback);
317 break;
318 case 1063:
319 wrapper->m_setCurrentDropLocationCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::Callback_setCurrentDropLocation>(callback);
320 break;
321 case 331:
322 wrapper->m_setParentView_implCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::Callback_setParentView_impl>(callback);
323 break;
324 case 1072:
325 wrapper->m_updateVisibilityCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::Callback_updateVisibility>(callback);
326 break;
327 }
328}
329}
void c_KDDockWidgets__Core__DropIndicatorOverlay__removeHover(void *thisObj)
void c_KDDockWidgets__Core__DropIndicatorOverlay__onHoveredGroupChanged_Group(void *thisObj, void *arg__1_)
void * c_KDDockWidgets__Core__DropIndicatorOverlay__hoveredGroupRect(void *thisObj)
void * c_KDDockWidgets__Core__DropIndicatorOverlay__constructor_DropArea(void *dropArea_)
void c_KDDockWidgets__Core__DropIndicatorOverlay__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
void * c_KDDockWidgets__Core__DropIndicatorOverlay__posForIndicator_DropLocation(void *thisObj, int arg__1)
int c_static_KDDockWidgets__Core__DropIndicatorOverlay__multisplitterLocationFor_DropLocation(int arg__1)
bool c_KDDockWidgets__Core__DropIndicatorOverlay__dropIndicatorVisible_DropLocation(void *thisObj, int arg__1)
void * c_KDDockWidgets__Core__DropIndicatorOverlay__constructor_DropArea_View(void *dropArea_, void *view_)
void c_KDDockWidgets__Core__DropIndicatorOverlay__setHoveredGroup_Group(void *thisObj, void *arg__1_)
void c_KDDockWidgets__Core__DropIndicatorOverlay_Finalizer(void *cppObj)
void c_KDDockWidgets__Core__DropIndicatorOverlay__setParentView_impl_View(void *thisObj, void *parent_)
void c_KDDockWidgets__Core__DropIndicatorOverlay__updateVisibility(void *thisObj)
void c_KDDockWidgets__Core__DropIndicatorOverlay__destructor(void *thisObj)
static KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper * fromWrapperPtr(void *ptr)
void * c_KDDockWidgets__Core__DropIndicatorOverlay__hoveredGroup(void *thisObj)
void c_KDDockWidgets__Core__DropIndicatorOverlay__setWindowBeingDragged_bool(void *thisObj, bool arg__1)
static KDDockWidgets::Core::DropIndicatorOverlay * fromPtr(void *ptr)
bool c_KDDockWidgets__Core__DropIndicatorOverlay__isHovered(void *thisObj)
int c_KDDockWidgets__Core__DropIndicatorOverlay__hover_Point(void *thisObj, void *globalPos_)
int c_KDDockWidgets__Core__DropIndicatorOverlay__hover_impl_Point(void *thisObj, void *globalPos_)
int c_KDDockWidgets__Core__DropIndicatorOverlay__currentDropLocation(void *thisObj)
void c_KDDockWidgets__Core__DropIndicatorOverlay__setCurrentDropLocation_DropLocation(void *thisObj, int arg__1)
static KDDockWidgets::Location multisplitterLocationFor(KDDockWidgets::DropLocation arg__1)
virtual void setParentView_impl(KDDockWidgets::Core::View *parent)
virtual void setParentView_impl_nocallback(KDDockWidgets::Core::View *parent)
KDDockWidgets::DropLocation(* Callback_hover_impl)(void *, KDDockWidgets::Point *globalPos)
virtual void setCurrentDropLocation(KDDockWidgets::DropLocation arg__1)
virtual KDDockWidgets::Point posForIndicator_nocallback(KDDockWidgets::DropLocation arg__1) const
KDDockWidgets::Point *(* Callback_posForIndicator)(void *, KDDockWidgets::DropLocation arg__1)
virtual bool dropIndicatorVisible_nocallback(KDDockWidgets::DropLocation arg__1) const
void(* Callback_setParentView_impl)(void *, KDDockWidgets::Core::View *parent)
virtual KDDockWidgets::Point posForIndicator(KDDockWidgets::DropLocation arg__1) const
returns the position of the specified drop location The return is in global coordinates
virtual void onHoveredGroupChanged(KDDockWidgets::Core::Group *arg__1)
void(* Callback_setCurrentDropLocation)(void *, KDDockWidgets::DropLocation arg__1)
virtual bool dropIndicatorVisible(KDDockWidgets::DropLocation arg__1) const
Returns whether the specified drop indicator should be visible.
KDDockWidgets::DropLocation hover(KDDockWidgets::Point globalPos)
virtual KDDockWidgets::DropLocation hover_impl_nocallback(KDDockWidgets::Point globalPos)
virtual void onHoveredGroupChanged_nocallback(KDDockWidgets::Core::Group *arg__1)
bool(* Callback_dropIndicatorVisible)(void *, KDDockWidgets::DropLocation arg__1)
virtual KDDockWidgets::DropLocation hover_impl(KDDockWidgets::Point globalPos)
virtual void setCurrentDropLocation_nocallback(KDDockWidgets::DropLocation arg__1)
void(* Callback_onHoveredGroupChanged)(void *, KDDockWidgets::Core::Group *arg__1)
virtual void setParentView_impl(View *parent)
void removeHover()
Clears and hides drop indicators.
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22
Class to abstract QAction, so code still works with QtQuick and Flutter.
DropLocation
Enum describing the different drop indicator types.

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8