KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
KDDWBindingsCore/Stack_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 "Stack_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 {
38{
39 return ::KDDockWidgets::Core::Stack::contains(dw);
40}
42{
43 return ::KDDockWidgets::Core::Stack::group();
44}
46{
47 return ::KDDockWidgets::Core::Stack::insertDockWidget(dockwidget, index);
48}
50{
51 if (m_isMDICallback) {
52 const void *thisPtr = this;
53 return m_isMDICallback(const_cast<void *>(thisPtr));
54 } else {
55 return ::KDDockWidgets::Core::Stack::isMDI();
56 }
57}
59{
60 return ::KDDockWidgets::Core::Stack::isMDI();
61}
62bool Stack_wrapper::isPositionDraggable(KDDockWidgets::Point p) const
63{
65 const void *thisPtr = this;
66 return m_isPositionDraggableCallback(const_cast<void *>(thisPtr), &p);
67 } else {
68 return ::KDDockWidgets::Core::Stack::isPositionDraggable(p);
69 }
70}
71bool Stack_wrapper::isPositionDraggable_nocallback(KDDockWidgets::Point p) const
72{
73 return ::KDDockWidgets::Core::Stack::isPositionDraggable(p);
74}
76{
78 const void *thisPtr = this;
79 return m_isWindowCallback(const_cast<void *>(thisPtr));
80 } else {
81 return ::KDDockWidgets::Core::Stack::isWindow();
82 }
83}
85{
86 return ::KDDockWidgets::Core::Stack::isWindow();
87}
89{
90 return ::KDDockWidgets::Core::Stack::numDockWidgets();
91}
92bool Stack_wrapper::onMouseDoubleClick(KDDockWidgets::Point localPos)
93{
94 return ::KDDockWidgets::Core::Stack::onMouseDoubleClick(localPos);
95}
101{
103 const void *thisPtr = this;
104 m_setParentView_implCallback(const_cast<void *>(thisPtr), parent);
105 } else {
107 }
108}
118{
119 return ::KDDockWidgets::Core::Stack::tabBar();
120}
122{
123 return ::KDDockWidgets::Core::Stack::tabBarAutoHide();
124}
128
129}
130}
132{
133 return reinterpret_cast<KDDockWidgets::Core::Stack *>(ptr);
134}
139extern "C" {
141{
143} // addDockWidget(KDDockWidgets::Core::DockWidget * arg__1)
145{
146 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
147 fromPtr(thisObj)->addDockWidget(arg__1);
148}
149// contains(KDDockWidgets::Core::DockWidget * dw) const
151{
152 auto dw = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(dw_);
153 const auto &result = fromPtr(thisObj)->contains(dw);
154 return result;
155}
156// group() const
158{
159 const auto &result = fromPtr(thisObj)->group();
160 return result;
161}
162// insertDockWidget(KDDockWidgets::Core::DockWidget * dockwidget, int index)
163bool c_KDDockWidgets__Core__Stack__insertDockWidget_DockWidget_int(void *thisObj, void *dockwidget_, int index)
164{
165 auto dockwidget = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(dockwidget_);
166 const auto &result = fromPtr(thisObj)->insertDockWidget(dockwidget, index);
167 return result;
168}
169// isMDI() const
171{
172 const auto &result = [&] {auto targetPtr = fromPtr(thisObj);auto wrapperPtr = dynamic_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper*>(targetPtr);if (wrapperPtr) { return wrapperPtr->isMDI_nocallback();} else { return targetPtr->isMDI();} }();
173 return result;
174}
175// isPositionDraggable(KDDockWidgets::Point p) const
177{
178 assert(p_);
179 auto &p = *reinterpret_cast<KDDockWidgets::Point *>(p_);
180 const auto &result = [&] {auto targetPtr = fromPtr(thisObj);auto wrapperPtr = dynamic_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper*>(targetPtr);if (wrapperPtr) { return wrapperPtr->isPositionDraggable_nocallback(p);} else { return targetPtr->isPositionDraggable(p);} }();
181 return result;
182}
183// isWindow() const
185{
186 const auto &result = [&] {auto targetPtr = fromPtr(thisObj);auto wrapperPtr = dynamic_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper*>(targetPtr);if (wrapperPtr) { return wrapperPtr->isWindow_nocallback();} else { return targetPtr->isWindow();} }();
187 return result;
188}
189// numDockWidgets() const
191{
192 const auto &result = fromPtr(thisObj)->numDockWidgets();
193 return result;
194}
195// onMouseDoubleClick(KDDockWidgets::Point localPos)
197{
198 assert(localPos_);
199 auto &localPos = *reinterpret_cast<KDDockWidgets::Point *>(localPos_);
200 const auto &result = fromPtr(thisObj)->onMouseDoubleClick(localPos);
201 return result;
202}
203// setDocumentMode(bool arg__1)
205{
206 fromPtr(thisObj)->setDocumentMode(arg__1);
207}
208// setParentView_impl(KDDockWidgets::Core::View * parent)
210{
211 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
213}
214// setTabBarAutoHide(bool arg__1)
216{
217 fromPtr(thisObj)->setTabBarAutoHide(arg__1);
218}
219// singleDockWidget() const
221{
222 const auto &result = fromPtr(thisObj)->singleDockWidget();
223 return result;
224}
225// tabBar() const
227{
228 const auto &result = fromPtr(thisObj)->tabBar();
229 return result;
230}
231// tabBarAutoHide() const
233{
234 const auto &result = fromPtr(thisObj)->tabBarAutoHide();
235 return result;
236}
238{
239 delete fromPtr(thisObj);
240}
241void c_KDDockWidgets__Core__Stack__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
242{
243 auto wrapper = fromWrapperPtr(ptr);
244 switch (methodId) {
245 case 641:
246 wrapper->m_isMDICallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::Callback_isMDI>(callback);
247 break;
248 case 642:
249 wrapper->m_isPositionDraggableCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::Callback_isPositionDraggable>(callback);
250 break;
251 case 644:
252 wrapper->m_isWindowCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::Callback_isWindow>(callback);
253 break;
254 case 331:
255 wrapper->m_setParentView_implCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::Callback_setParentView_impl>(callback);
256 break;
257 case 655:
258 wrapper->m_singleDockWidgetCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper::Callback_singleDockWidget>(callback);
259 break;
260 }
261}
262}
void c_KDDockWidgets__Core__Stack__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
void * c_KDDockWidgets__Core__Stack__tabBar(void *thisObj)
bool c_KDDockWidgets__Core__Stack__isPositionDraggable_Point(void *thisObj, void *p_)
bool c_KDDockWidgets__Core__Stack__contains_DockWidget(void *thisObj, void *dw_)
bool c_KDDockWidgets__Core__Stack__insertDockWidget_DockWidget_int(void *thisObj, void *dockwidget_, int index)
void c_KDDockWidgets__Core__Stack__addDockWidget_DockWidget(void *thisObj, void *arg__1_)
bool c_KDDockWidgets__Core__Stack__isMDI(void *thisObj)
void * c_KDDockWidgets__Core__Stack__group(void *thisObj)
void c_KDDockWidgets__Core__Stack_Finalizer(void *cppObj)
void c_KDDockWidgets__Core__Stack__setParentView_impl_View(void *thisObj, void *parent_)
void c_KDDockWidgets__Core__Stack__setDocumentMode_bool(void *thisObj, bool arg__1)
void c_KDDockWidgets__Core__Stack__destructor(void *thisObj)
void c_KDDockWidgets__Core__Stack__setTabBarAutoHide_bool(void *thisObj, bool arg__1)
int c_KDDockWidgets__Core__Stack__numDockWidgets(void *thisObj)
bool c_KDDockWidgets__Core__Stack__isWindow(void *thisObj)
static KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Stack_wrapper * fromWrapperPtr(void *ptr)
void * c_KDDockWidgets__Core__Stack__singleDockWidget(void *thisObj)
bool c_KDDockWidgets__Core__Stack__tabBarAutoHide(void *thisObj)
static KDDockWidgets::Core::Stack * fromPtr(void *ptr)
bool c_KDDockWidgets__Core__Stack__onMouseDoubleClick_Point(void *thisObj, void *localPos_)
bool insertDockWidget(KDDockWidgets::Core::DockWidget *dockwidget, int index)
virtual void setParentView_impl_nocallback(KDDockWidgets::Core::View *parent)
KDDockWidgets::Core::DockWidget *(* Callback_singleDockWidget)(void *)
void(* Callback_setParentView_impl)(void *, KDDockWidgets::Core::View *parent)
virtual void setParentView_impl(View *parent)
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
bool insertDockWidget(DockWidget *dockwidget, int index)
inserts dockwidget into the TabWidget, at index
DockWidget * singleDockWidget() const override final
int numDockWidgets() const
returns the number of dock widgets in this TabWidget
bool contains(DockWidget *dw) const
Returns whether dockwidget dw is contained in this tab widget Equivalent to indexOf(dw) !...
Group * group() const
getter for the group
Core::TabBar * tabBar() const
Returns the tab bar.
void setDocumentMode(bool)
Enables document mode. Default is false.
bool onMouseDoubleClick(Point localPos)
void addDockWidget(DockWidget *)
appends a dock widget into this TabWidget
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22

© 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