KDDockWidgets API Documentation 2.0
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::isVisible();
60}
61KDDockWidgets::Point Controller_wrapper::mapToGlobal(KDDockWidgets::Point arg__1) const
62{
63 return ::KDDockWidgets::Core::Controller::mapToGlobal(arg__1);
64}
65KDDockWidgets::Point Controller_wrapper::pos() const
66{
67 return ::KDDockWidgets::Core::Controller::pos();
68}
69KDDockWidgets::Rect Controller_wrapper::rect() const
70{
71 return ::KDDockWidgets::Core::Controller::rect();
72}
78{
80 const void *thisPtr = this;
81 m_setParentView_implCallback(const_cast<void *>(thisPtr), parent);
82 } else {
84 }
85}
98KDDockWidgets::Size Controller_wrapper::size() const
99{
100 return ::KDDockWidgets::Core::Controller::size();
101}
103{
104 return ::KDDockWidgets::Core::Controller::type();
105}
107{
108 return ::KDDockWidgets::Core::Controller::view();
109}
111{
112 return ::KDDockWidgets::Core::Controller::width();
113}
115{
116 return ::KDDockWidgets::Core::Controller::x();
117}
119{
120 return ::KDDockWidgets::Core::Controller::y();
121}
125
126}
127}
129{
130 return reinterpret_cast<KDDockWidgets::Core::Controller *>(ptr);
131}
136extern "C" {
142{
143 auto arg__2 = reinterpret_cast<KDDockWidgets::Core::View *>(arg__2_);
145 return reinterpret_cast<void *>(ptr);
146}
147// close()
149{
150 const auto &result = fromPtr(thisObj)->close();
151 return result;
152}
153// destroyLater()
155{
156 fromPtr(thisObj)->destroyLater();
157}
158// geometry() const
160{
161 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->geometry() };
162 return result;
163}
164// height() const
166{
167 const auto &result = fromPtr(thisObj)->height();
168 return result;
169}
170// inDtor() const
172{
173 const auto &result = fromPtr(thisObj)->inDtor();
174 return result;
175}
176// isVisible() const
178{
179 const auto &result = fromPtr(thisObj)->isVisible();
180 return result;
181}
182// mapToGlobal(KDDockWidgets::Point arg__1) const
184{
185 assert(arg__1_);
186 auto &arg__1 = *reinterpret_cast<KDDockWidgets::Point *>(arg__1_);
187 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->mapToGlobal(arg__1) };
188 return result;
189}
190// pos() const
192{
193 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->pos() };
194 return result;
195}
196// rect() const
198{
199 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->rect() };
200 return result;
201}
202// setParentView(KDDockWidgets::Core::View * parent)
204{
205 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
206 fromPtr(thisObj)->setParentView(parent);
207}
208// setParentView_impl(KDDockWidgets::Core::View * parent)
210{
211 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
213}
214// setVisible(bool arg__1)
216{
217 fromPtr(thisObj)->setVisible(arg__1);
218}
219// show() const
221{
222 fromPtr(thisObj)->show();
223}
224// size() const
226{
227 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Size> { fromPtr(thisObj)->size() };
228 return result;
229}
230// type() const
232{
233 const auto &result = int(fromPtr(thisObj)->type());
234 return result;
235}
236// view() const
238{
239 const auto &result = fromPtr(thisObj)->view();
240 return result;
241}
242// width() const
244{
245 const auto &result = fromPtr(thisObj)->width();
246 return result;
247}
248// x() const
250{
251 const auto &result = fromPtr(thisObj)->x();
252 return result;
253}
254// y() const
256{
257 const auto &result = fromPtr(thisObj)->y();
258 return result;
259}
261{
262 delete fromPtr(thisObj);
263}
264void c_KDDockWidgets__Core__Controller__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
265{
266 auto wrapper = fromWrapperPtr(ptr);
267 switch (methodId) {
268 case 331:
269 wrapper->m_setParentView_implCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::Controller_wrapper::Callback_setParentView_impl>(callback);
270 break;
271 }
272}
273}
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)
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)
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