KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
KDDWBindingsCore/DropArea_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*/
11#include "DropArea_c.h"
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}
32namespace KDDWBindingsCore {
34 : ::KDDockWidgets::Core::DropArea(parent, options, isMDIWrapper)
35{
36}
38{
39 ::KDDockWidgets::Core::DropArea::_addDockWidget(dw, location, relativeTo, initialOption);
40}
49void DropArea_wrapper::addWidget(KDDockWidgets::Core::View *widget, KDDockWidgets::Location location, KDDockWidgets::Core::Item *relativeToItem, KDDockWidgets::InitialOption option)
50{
51 ::KDDockWidgets::Core::DropArea::addWidget(widget, location, relativeToItem, option);
52}
53KDDockWidgets::Core::Item *DropArea_wrapper::centralFrame() const
54{
55 return ::KDDockWidgets::Core::DropArea::centralFrame();
56}
58{
59 return ::KDDockWidgets::Core::DropArea::containsDockWidget(arg__1);
60}
62{
63 return ::KDDockWidgets::Core::DropArea::createCentralGroup(options);
64}
66{
67 return ::KDDockWidgets::Core::DropArea::currentDropLocation();
68}
70{
71 return ::KDDockWidgets::Core::DropArea::dropIndicatorOverlay();
72}
74{
75 return ::KDDockWidgets::Core::DropArea::hasSingleFloatingGroup();
76}
78{
79 return ::KDDockWidgets::Core::DropArea::hasSingleGroup();
80}
82{
83 return ::KDDockWidgets::Core::DropArea::isMDIWrapper();
84}
94{
95 return ::KDDockWidgets::Core::DropArea::mdiDockWidgetWrapper();
96}
102{
104 const void *thisPtr = this;
105 m_setParentView_implCallback(const_cast<void *>(thisPtr), parent);
106 } else {
108 }
109}
117
118}
119}
121{
122 return reinterpret_cast<KDDockWidgets::Core::DropArea *>(ptr);
123}
128extern "C" {
133void *c_KDDockWidgets__Core__DropArea__constructor_View_MainWindowOptions_bool(void *parent_, int options_, bool isMDIWrapper)
134{
135 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
136 auto options = static_cast<QFlags<KDDockWidgets::MainWindowOption>>(options_);
137 auto ptr = new KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DropArea_wrapper(parent, options, isMDIWrapper);
138 return reinterpret_cast<void *>(ptr);
139}
140//_addDockWidget(KDDockWidgets::Core::DockWidget * dw, KDDockWidgets::Location location, KDDockWidgets::Core::Item * relativeTo, KDDockWidgets::InitialOption initialOption)
141void c_KDDockWidgets__Core__DropArea___addDockWidget_DockWidget_Location_Item_InitialOption(void *thisObj, void *dw_, int location, void *relativeTo_, void *initialOption_)
142{
143 auto dw = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(dw_);
144 auto relativeTo = reinterpret_cast<KDDockWidgets::Core::Item *>(relativeTo_);
145 assert(initialOption_);
146 auto &initialOption = *reinterpret_cast<KDDockWidgets::InitialOption *>(initialOption_);
147 fromPtr(thisObj)->_addDockWidget(dw, static_cast<KDDockWidgets::Location>(location), relativeTo, initialOption);
148}
149// addDockWidget(KDDockWidgets::Core::DockWidget * dw, KDDockWidgets::Location location, KDDockWidgets::Core::DockWidget * relativeTo, KDDockWidgets::InitialOption initialOption)
150void c_KDDockWidgets__Core__DropArea__addDockWidget_DockWidget_Location_DockWidget_InitialOption(void *thisObj, void *dw_, int location, void *relativeTo_, void *initialOption_)
151{
152 auto dw = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(dw_);
153 auto relativeTo = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(relativeTo_);
154 assert(initialOption_);
155 auto &initialOption = *reinterpret_cast<KDDockWidgets::InitialOption *>(initialOption_);
156 fromPtr(thisObj)->addDockWidget(dw, static_cast<KDDockWidgets::Location>(location), relativeTo, initialOption);
157}
158// addMultiSplitter(KDDockWidgets::Core::DropArea * splitter, KDDockWidgets::Location location, KDDockWidgets::Core::Group * relativeToGroup, KDDockWidgets::InitialOption option)
159void c_KDDockWidgets__Core__DropArea__addMultiSplitter_DropArea_Location_Group_InitialOption(void *thisObj, void *splitter_, int location, void *relativeToGroup_, void *option_)
160{
161 auto splitter = reinterpret_cast<KDDockWidgets::Core::DropArea *>(splitter_);
162 auto relativeToGroup = reinterpret_cast<KDDockWidgets::Core::Group *>(relativeToGroup_);
163 assert(option_);
164 auto &option = *reinterpret_cast<KDDockWidgets::InitialOption *>(option_);
165 fromPtr(thisObj)->addMultiSplitter(splitter, static_cast<KDDockWidgets::Location>(location), relativeToGroup, option);
166}
167// addWidget(KDDockWidgets::Core::View * widget, KDDockWidgets::Location location, KDDockWidgets::Core::Item * relativeToItem, KDDockWidgets::InitialOption option)
168void c_KDDockWidgets__Core__DropArea__addWidget_View_Location_Item_InitialOption(void *thisObj, void *widget_, int location, void *relativeToItem_, void *option_)
169{
170 auto widget = reinterpret_cast<KDDockWidgets::Core::View *>(widget_);
171 auto relativeToItem = reinterpret_cast<KDDockWidgets::Core::Item *>(relativeToItem_);
172 assert(option_);
173 auto &option = *reinterpret_cast<KDDockWidgets::InitialOption *>(option_);
174 fromPtr(thisObj)->addWidget(widget, static_cast<KDDockWidgets::Location>(location), relativeToItem, option);
175}
176// centralFrame() const
178{
179 const auto &result = fromPtr(thisObj)->centralFrame();
180 return result;
181}
182// containsDockWidget(KDDockWidgets::Core::DockWidget * arg__1) const
184{
185 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
186 const auto &result = fromPtr(thisObj)->containsDockWidget(arg__1);
187 return result;
188}
189// createCentralGroup(QFlags<KDDockWidgets::MainWindowOption> options)
196// currentDropLocation() const
198{
199 const auto &result = int(fromPtr(thisObj)->currentDropLocation());
200 return result;
201}
202// dropIndicatorOverlay() const
204{
205 const auto &result = fromPtr(thisObj)->dropIndicatorOverlay();
206 return result;
207}
208// hasSingleFloatingGroup() const
210{
211 const auto &result = fromPtr(thisObj)->hasSingleFloatingGroup();
212 return result;
213}
214// hasSingleGroup() const
216{
217 const auto &result = fromPtr(thisObj)->hasSingleGroup();
218 return result;
219}
220// isMDIWrapper() const
222{
223 const auto &result = fromPtr(thisObj)->isMDIWrapper();
224 return result;
225}
226// layoutEqually()
228{
229 fromPtr(thisObj)->layoutEqually();
230}
231// layoutParentContainerEqually(KDDockWidgets::Core::DockWidget * arg__1)
233{
234 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
235 fromPtr(thisObj)->layoutParentContainerEqually(arg__1);
236}
237// mdiDockWidgetWrapper() const
239{
240 const auto &result = fromPtr(thisObj)->mdiDockWidgetWrapper();
241 return result;
242}
243// removeHover()
245{
246 fromPtr(thisObj)->removeHover();
247}
248// setParentView_impl(KDDockWidgets::Core::View * parent)
250{
251 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
253}
255{
256 delete fromPtr(thisObj);
257}
258void c_KDDockWidgets__Core__DropArea__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
259{
260 auto wrapper = fromWrapperPtr(ptr);
261 switch (methodId) {
262 case 331:
263 wrapper->m_setParentView_implCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DropArea_wrapper::Callback_setParentView_impl>(callback);
264 break;
265 }
266}
267}
void * c_KDDockWidgets__Core__DropArea__constructor_View_MainWindowOptions_bool(void *parent_, int options_, bool isMDIWrapper)
int c_KDDockWidgets__Core__DropArea__currentDropLocation(void *thisObj)
void * c_KDDockWidgets__Core__DropArea__mdiDockWidgetWrapper(void *thisObj)
void c_KDDockWidgets__Core__DropArea__removeHover(void *thisObj)
void * c_KDDockWidgets__Core__DropArea__dropIndicatorOverlay(void *thisObj)
void c_KDDockWidgets__Core__DropArea__setParentView_impl_View(void *thisObj, void *parent_)
bool c_KDDockWidgets__Core__DropArea__hasSingleFloatingGroup(void *thisObj)
void c_KDDockWidgets__Core__DropArea__layoutParentContainerEqually_DockWidget(void *thisObj, void *arg__1_)
void c_KDDockWidgets__Core__DropArea__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
void c_KDDockWidgets__Core__DropArea__addWidget_View_Location_Item_InitialOption(void *thisObj, void *widget_, int location, void *relativeToItem_, void *option_)
void c_KDDockWidgets__Core__DropArea___addDockWidget_DockWidget_Location_Item_InitialOption(void *thisObj, void *dw_, int location, void *relativeTo_, void *initialOption_)
void * c_KDDockWidgets__Core__DropArea__centralFrame(void *thisObj)
bool c_KDDockWidgets__Core__DropArea__containsDockWidget_DockWidget(void *thisObj, void *arg__1_)
static KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::DropArea_wrapper * fromWrapperPtr(void *ptr)
void c_KDDockWidgets__Core__DropArea__addMultiSplitter_DropArea_Location_Group_InitialOption(void *thisObj, void *splitter_, int location, void *relativeToGroup_, void *option_)
void c_KDDockWidgets__Core__DropArea__addDockWidget_DockWidget_Location_DockWidget_InitialOption(void *thisObj, void *dw_, int location, void *relativeTo_, void *initialOption_)
void c_KDDockWidgets__Core__DropArea_Finalizer(void *cppObj)
void c_KDDockWidgets__Core__DropArea__layoutEqually(void *thisObj)
bool c_KDDockWidgets__Core__DropArea__hasSingleGroup(void *thisObj)
void c_KDDockWidgets__Core__DropArea__destructor(void *thisObj)
void * c_static_KDDockWidgets__Core__DropArea__createCentralGroup_MainWindowOptions(int options_)
bool c_KDDockWidgets__Core__DropArea__isMDIWrapper(void *thisObj)
static KDDockWidgets::Core::DropArea * fromPtr(void *ptr)
void(* Callback_setParentView_impl)(void *, KDDockWidgets::Core::View *parent)
void _addDockWidget(KDDockWidgets::Core::DockWidget *dw, KDDockWidgets::Location location, KDDockWidgets::Core::Item *relativeTo, KDDockWidgets::InitialOption initialOption)
KDDockWidgets::Core::DropIndicatorOverlay * dropIndicatorOverlay() const
void addMultiSplitter(KDDockWidgets::Core::DropArea *splitter, KDDockWidgets::Location location, KDDockWidgets::Core::Group *relativeToGroup=nullptr, KDDockWidgets::InitialOption option=KDDockWidgets::DefaultSizeMode::Fair)
void addWidget(KDDockWidgets::Core::View *widget, KDDockWidgets::Location location, KDDockWidgets::Core::Item *relativeToItem=nullptr, KDDockWidgets::InitialOption option=KDDockWidgets::DefaultSizeMode::Fair)
static KDDockWidgets::Core::Group * createCentralGroup(QFlags< KDDockWidgets::MainWindowOption > options)
void addDockWidget(KDDockWidgets::Core::DockWidget *dw, KDDockWidgets::Location location, KDDockWidgets::Core::DockWidget *relativeTo, KDDockWidgets::InitialOption initialOption={})
DropArea_wrapper(KDDockWidgets::Core::View *parent, QFlags< KDDockWidgets::MainWindowOption > options, bool isMDIWrapper=false)
virtual void setParentView_impl(View *parent)
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
void layoutParentContainerEqually(DockWidget *)
void addWidget(View *widget, KDDockWidgets::Location location, Core::Item *relativeToItem=nullptr, const InitialOption &option=DefaultSizeMode::Fair)
Adds a widget to this MultiSplitter.
DropIndicatorOverlay * dropIndicatorOverlay() const
bool containsDockWidget(DockWidget *) const
void _addDockWidget(DockWidget *dw, KDDockWidgets::Location location, Item *relativeTo, const InitialOption &initialOption)
Core::Item * centralFrame() const
Core::DockWidget * mdiDockWidgetWrapper() const
Returns the helper dock widget for implementing DockWidgetOption_MDINestable.
void addDockWidget(DockWidget *dw, KDDockWidgets::Location location, DockWidget *relativeTo, const InitialOption &initialOption={})
void addMultiSplitter(Core::DropArea *splitter, KDDockWidgets::Location location, Core::Group *relativeToGroup=nullptr, const InitialOption &option=DefaultSizeMode::Fair)
void layoutEqually()
See docs for MainWindowBase::layoutEqually()
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.
Struct describing the preferred dock widget size and visibility when adding it to a layout.

© 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