KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
Controller_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 "Controller_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::Controller::close();
40}
45KDDockWidgets::Rect Controller_wrapper::geometry() const
46{
47 return ::KDDockWidgets::Core::Controller::geometry();
48}
50{
51 return ::KDDockWidgets::Core::Controller::height();
52}
54{
55 return ::KDDockWidgets::Core::Controller::inDtor();
56}
58{
59 return ::KDDockWidgets::Core::Controller::isFixedHeight();
60}
62{
63 return ::KDDockWidgets::Core::Controller::isFixedWidth();
64}
66{
67 return ::KDDockWidgets::Core::Controller::isVisible();
68}
69KDDockWidgets::Point Controller_wrapper::mapToGlobal(KDDockWidgets::Point arg__1) const
70{
71 return ::KDDockWidgets::Core::Controller::mapToGlobal(arg__1);
72}
73KDDockWidgets::Point Controller_wrapper::pos() const
74{
75 return ::KDDockWidgets::Core::Controller::pos();
76}
77KDDockWidgets::Rect Controller_wrapper::rect() const
78{
79 return ::KDDockWidgets::Core::Controller::rect();
80}
86{
88 const void *thisPtr = this;
89 m_setParentView_implCallback(const_cast<void *>(thisPtr), parent);
90 } else {
92 }
93}
106KDDockWidgets::Size Controller_wrapper::size() const
107{
108 return ::KDDockWidgets::Core::Controller::size();
109}
111{
112 return ::KDDockWidgets::Core::Controller::type();
113}
115{
116 return ::KDDockWidgets::Core::Controller::view();
117}
119{
120 return ::KDDockWidgets::Core::Controller::width();
121}
123{
124 return ::KDDockWidgets::Core::Controller::x();
125}
127{
128 return ::KDDockWidgets::Core::Controller::y();
129}
133
134}
135}
137{
138 return reinterpret_cast<KDDockWidgets::Core::Controller *>(ptr);
139}
144extern "C" {
150{
151 auto arg__2 = reinterpret_cast<KDDockWidgets::Core::View *>(arg__2_);
153 return reinterpret_cast<void *>(ptr);
154}
155// close()
157{
158 const auto &result = fromPtr(thisObj)->close();
159 return result;
160}
161// destroyLater()
163{
164 fromPtr(thisObj)->destroyLater();
165}
166// geometry() const
168{
169 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->geometry() };
170 return result;
171}
172// height() const
174{
175 const auto &result = fromPtr(thisObj)->height();
176 return result;
177}
178// inDtor() const
180{
181 const auto &result = fromPtr(thisObj)->inDtor();
182 return result;
183}
184// isFixedHeight() const
186{
187 const auto &result = fromPtr(thisObj)->isFixedHeight();
188 return result;
189}
190// isFixedWidth() const
192{
193 const auto &result = fromPtr(thisObj)->isFixedWidth();
194 return result;
195}
196// isVisible() const
198{
199 const auto &result = fromPtr(thisObj)->isVisible();
200 return result;
201}
202// mapToGlobal(KDDockWidgets::Point arg__1) const
204{
205 assert(arg__1_);
206 auto &arg__1 = *reinterpret_cast<KDDockWidgets::Point *>(arg__1_);
207 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->mapToGlobal(arg__1) };
208 return result;
209}
210// pos() const
212{
213 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->pos() };
214 return result;
215}
216// rect() const
218{
219 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->rect() };
220 return result;
221}
222// setParentView(KDDockWidgets::Core::View * parent)
224{
225 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
226 fromPtr(thisObj)->setParentView(parent);
227}
228// setParentView_impl(KDDockWidgets::Core::View * parent)
230{
231 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
233}
234// setVisible(bool arg__1)
236{
237 fromPtr(thisObj)->setVisible(arg__1);
238}
239// show() const
241{
242 fromPtr(thisObj)->show();
243}
244// size() const
246{
247 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Size> { fromPtr(thisObj)->size() };
248 return result;
249}
250// type() const
252{
253 const auto &result = int(fromPtr(thisObj)->type());
254 return result;
255}
256// view() const
258{
259 const auto &result = fromPtr(thisObj)->view();
260 return result;
261}
262// width() const
264{
265 const auto &result = fromPtr(thisObj)->width();
266 return result;
267}
268// x() const
270{
271 const auto &result = fromPtr(thisObj)->x();
272 return result;
273}
274// y() const
276{
277 const auto &result = fromPtr(thisObj)->y();
278 return result;
279}
281{
282 delete fromPtr(thisObj);
283}
284void c_KDDockWidgets__Core__Controller__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
285{
286 auto wrapper = fromWrapperPtr(ptr);
287 switch (methodId) {
288 case 331:
289 wrapper->m_setParentView_implCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::Callback_setParentView_impl>(callback);
290 break;
291 }
292}
293}
int c_KDDockWidgets__Core__Controller__type(void *thisObj)
int c_KDDockWidgets__Core__Controller__x(void *thisObj)
int c_KDDockWidgets__Core__Controller__width(void *thisObj)
void c_KDDockWidgets__Core__Controller__destructor(void *thisObj)
void c_KDDockWidgets__Core__Controller__destroyLater(void *thisObj)
int c_KDDockWidgets__Core__Controller__height(void *thisObj)
bool c_KDDockWidgets__Core__Controller__isFixedHeight(void *thisObj)
static KDDockWidgets::Core::Controller * fromPtr(void *ptr)
void * c_KDDockWidgets__Core__Controller__constructor_ViewType_View(int type, void *arg__2_)
void c_KDDockWidgets__Core__Controller__show(void *thisObj)
bool c_KDDockWidgets__Core__Controller__isVisible(void *thisObj)
void * c_KDDockWidgets__Core__Controller__pos(void *thisObj)
void * c_KDDockWidgets__Core__Controller__rect(void *thisObj)
static KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper * fromWrapperPtr(void *ptr)
void * c_KDDockWidgets__Core__Controller__geometry(void *thisObj)
bool c_KDDockWidgets__Core__Controller__isFixedWidth(void *thisObj)
void c_KDDockWidgets__Core__Controller__setParentView_impl_View(void *thisObj, void *parent_)
bool c_KDDockWidgets__Core__Controller__inDtor(void *thisObj)
void c_KDDockWidgets__Core__Controller__setParentView_View(void *thisObj, void *parent_)
void * c_KDDockWidgets__Core__Controller__mapToGlobal_Point(void *thisObj, void *arg__1_)
bool c_KDDockWidgets__Core__Controller__close(void *thisObj)
void c_KDDockWidgets__Core__Controller__setVisible_bool(void *thisObj, bool arg__1)
void * c_KDDockWidgets__Core__Controller__size(void *thisObj)
void c_KDDockWidgets__Core__Controller__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
void c_KDDockWidgets__Core__Controller_Finalizer(void *cppObj)
int c_KDDockWidgets__Core__Controller__y(void *thisObj)
void * c_KDDockWidgets__Core__Controller__view(void *thisObj)
virtual void setParentView_impl_nocallback(KDDockWidgets::Core::View *parent)
Controller_wrapper(KDDockWidgets::Core::ViewType type, KDDockWidgets::Core::View *arg__2)
void(* Callback_setParentView_impl)(void *, KDDockWidgets::Core::View *parent)
KDDockWidgets::Point mapToGlobal(KDDockWidgets::Point arg__1) const
virtual void setParentView_impl(KDDockWidgets::Core::View *parent)
void setParentView(View *parent)
View * view() const
Returns the view associated with this controller, if any.
virtual void setParentView_impl(View *parent)
Point mapToGlobal(Point) const
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22
ViewType
Each View type also has a specific Controller associated with, except for ViewType::None.
Definition Controller.h:26
Class to abstract QAction, so code still works with QtQuick and Flutter.

© 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