KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
Rect_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 "Rect_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}
36Rect_wrapper::Rect_wrapper(KDDockWidgets::Point pos, KDDockWidgets::Size size)
37 : ::KDDockWidgets::Rect(pos, size)
38{
39}
40Rect_wrapper::Rect_wrapper(int x, int y, int width, int height)
41 : ::KDDockWidgets::Rect(x, y, width, height)
42{
43}
44void Rect_wrapper::adjust(int l, int t, int r, int b)
45{
46 ::KDDockWidgets::Rect::adjust(l, t, r, b);
47}
48KDDockWidgets::Rect Rect_wrapper::adjusted(int l, int t, int r, int b) const
49{
50 return ::KDDockWidgets::Rect::adjusted(l, t, r, b);
51}
53{
54 return ::KDDockWidgets::Rect::bottom();
55}
56KDDockWidgets::Point Rect_wrapper::bottomLeft() const
57{
58 return ::KDDockWidgets::Rect::bottomLeft();
59}
60KDDockWidgets::Point Rect_wrapper::bottomRight() const
61{
62 return ::KDDockWidgets::Rect::bottomRight();
63}
64KDDockWidgets::Point Rect_wrapper::center() const
65{
66 return ::KDDockWidgets::Rect::center();
67}
68bool Rect_wrapper::contains(KDDockWidgets::Point pt) const
69{
70 return ::KDDockWidgets::Rect::contains(pt);
71}
72bool Rect_wrapper::contains(KDDockWidgets::Rect other) const
73{
74 return ::KDDockWidgets::Rect::contains(other);
75}
77{
78 return ::KDDockWidgets::Rect::height();
79}
80KDDockWidgets::Rect Rect_wrapper::intersected(KDDockWidgets::Rect other) const
81{
82 return ::KDDockWidgets::Rect::intersected(other);
83}
84bool Rect_wrapper::intersects(KDDockWidgets::Rect other) const
85{
86 return ::KDDockWidgets::Rect::intersects(other);
87}
89{
90 return ::KDDockWidgets::Rect::isEmpty();
91}
93{
94 return ::KDDockWidgets::Rect::isNull();
95}
97{
98 return ::KDDockWidgets::Rect::isValid();
99}
101{
102 return ::KDDockWidgets::Rect::left();
103}
104KDDockWidgets::Rect Rect_wrapper::marginsAdded(KDDockWidgets::Margins m) const
105{
106 return ::KDDockWidgets::Rect::marginsAdded(m);
107}
109{
110 ::KDDockWidgets::Rect::moveBottom(b);
111}
112void Rect_wrapper::moveCenter(KDDockWidgets::Point pt)
113{
114 ::KDDockWidgets::Rect::moveCenter(pt);
115}
117{
118 ::KDDockWidgets::Rect::moveLeft(x);
119}
121{
122 ::KDDockWidgets::Rect::moveRight(r);
123}
124void Rect_wrapper::moveTo(KDDockWidgets::Point pt)
125{
126 ::KDDockWidgets::Rect::moveTo(pt);
127}
128void Rect_wrapper::moveTo(int x, int y)
129{
130 ::KDDockWidgets::Rect::moveTo(x, y);
131}
133{
134 ::KDDockWidgets::Rect::moveTop(y);
135}
136void Rect_wrapper::moveTopLeft(KDDockWidgets::Point pt)
137{
138 ::KDDockWidgets::Rect::moveTopLeft(pt);
139}
140KDDockWidgets::Point Rect_wrapper::pos() const
141{
142 return ::KDDockWidgets::Rect::pos();
143}
145{
146 return ::KDDockWidgets::Rect::right();
147}
149{
150 ::KDDockWidgets::Rect::setBottom(b);
151}
153{
154 ::KDDockWidgets::Rect::setHeight(h);
155}
157{
158 ::KDDockWidgets::Rect::setLeft(x);
159}
161{
162 ::KDDockWidgets::Rect::setRight(r);
163}
164void Rect_wrapper::setSize(KDDockWidgets::Size sz)
165{
166 ::KDDockWidgets::Rect::setSize(sz);
167}
169{
170 ::KDDockWidgets::Rect::setTop(y);
171}
172void Rect_wrapper::setTopLeft(KDDockWidgets::Point pt)
173{
174 ::KDDockWidgets::Rect::setTopLeft(pt);
175}
177{
178 ::KDDockWidgets::Rect::setWidth(w);
179}
181{
182 ::KDDockWidgets::Rect::setX(x);
183}
185{
186 ::KDDockWidgets::Rect::setY(y);
187}
188KDDockWidgets::Size Rect_wrapper::size() const
189{
190 return ::KDDockWidgets::Rect::size();
191}
193{
194 return ::KDDockWidgets::Rect::top();
195}
196KDDockWidgets::Point Rect_wrapper::topLeft() const
197{
198 return ::KDDockWidgets::Rect::topLeft();
199}
200KDDockWidgets::Point Rect_wrapper::topRight() const
201{
202 return ::KDDockWidgets::Rect::topRight();
203}
204void Rect_wrapper::translate(KDDockWidgets::Point pt)
205{
206 ::KDDockWidgets::Rect::translate(pt);
207}
209{
210 return ::KDDockWidgets::Rect::width();
211}
213{
214 return ::KDDockWidgets::Rect::x();
215}
217{
218 return ::KDDockWidgets::Rect::y();
219}
223
224}
225static KDDockWidgets::Rect *fromPtr(void *ptr)
226{
227 return reinterpret_cast<KDDockWidgets::Rect *>(ptr);
228}
233extern "C" {
235{
236 delete reinterpret_cast<KDDockWidgetsBindings_wrappersNS::Rect_wrapper *>(cppObj);
237}
239{
241 return reinterpret_cast<void *>(ptr);
242}
244{
245 assert(pos_);
246 auto &pos = *reinterpret_cast<KDDockWidgets::Point *>(pos_);
247 assert(size_);
248 auto &size = *reinterpret_cast<KDDockWidgets::Size *>(size_);
249 auto ptr = new KDDockWidgetsBindings_wrappersNS::Rect_wrapper(pos, size);
250 return reinterpret_cast<void *>(ptr);
251}
252void *c_KDDockWidgets__Rect__constructor_int_int_int_int(int x, int y, int width, int height)
253{
254 auto ptr = new KDDockWidgetsBindings_wrappersNS::Rect_wrapper(x, y, width, height);
255 return reinterpret_cast<void *>(ptr);
256}
257// adjust(int l, int t, int r, int b)
258void c_KDDockWidgets__Rect__adjust_int_int_int_int(void *thisObj, int l, int t, int r, int b)
259{
260 fromPtr(thisObj)->adjust(l, t, r, b);
261}
262// adjusted(int l, int t, int r, int b) const
263void *c_KDDockWidgets__Rect__adjusted_int_int_int_int(void *thisObj, int l, int t, int r, int b)
264{
265 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->adjusted(l, t, r, b) };
266 return result;
267}
268// bottom() const
270{
271 const auto &result = fromPtr(thisObj)->bottom();
272 return result;
273}
274// bottomLeft() const
276{
277 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->bottomLeft() };
278 return result;
279}
280// bottomRight() const
282{
283 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->bottomRight() };
284 return result;
285}
286// center() const
288{
289 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->center() };
290 return result;
291}
292// contains(KDDockWidgets::Point pt) const
293bool c_KDDockWidgets__Rect__contains_Point(void *thisObj, void *pt_)
294{
295 assert(pt_);
296 auto &pt = *reinterpret_cast<KDDockWidgets::Point *>(pt_);
297 const auto &result = fromPtr(thisObj)->contains(pt);
298 return result;
299}
300// contains(KDDockWidgets::Rect other) const
301bool c_KDDockWidgets__Rect__contains_Rect(void *thisObj, void *other_)
302{
303 assert(other_);
304 auto &other = *reinterpret_cast<KDDockWidgets::Rect *>(other_);
305 const auto &result = fromPtr(thisObj)->contains(other);
306 return result;
307}
308// height() const
310{
311 const auto &result = fromPtr(thisObj)->height();
312 return result;
313}
314// intersected(KDDockWidgets::Rect other) const
315void *c_KDDockWidgets__Rect__intersected_Rect(void *thisObj, void *other_)
316{
317 assert(other_);
318 auto &other = *reinterpret_cast<KDDockWidgets::Rect *>(other_);
319 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->intersected(other) };
320 return result;
321}
322// intersects(KDDockWidgets::Rect other) const
323bool c_KDDockWidgets__Rect__intersects_Rect(void *thisObj, void *other_)
324{
325 assert(other_);
326 auto &other = *reinterpret_cast<KDDockWidgets::Rect *>(other_);
327 const auto &result = fromPtr(thisObj)->intersects(other);
328 return result;
329}
330// isEmpty() const
332{
333 const auto &result = fromPtr(thisObj)->isEmpty();
334 return result;
335}
336// isNull() const
338{
339 const auto &result = fromPtr(thisObj)->isNull();
340 return result;
341}
342// isValid() const
344{
345 const auto &result = fromPtr(thisObj)->isValid();
346 return result;
347}
348// left() const
350{
351 const auto &result = fromPtr(thisObj)->left();
352 return result;
353}
354// marginsAdded(KDDockWidgets::Margins m) const
356{
357 assert(m_);
358 auto &m = *reinterpret_cast<KDDockWidgets::Margins *>(m_);
359 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Rect> { fromPtr(thisObj)->marginsAdded(m) };
360 return result;
361}
362// moveBottom(int b)
364{
365 fromPtr(thisObj)->moveBottom(b);
366}
367// moveCenter(KDDockWidgets::Point pt)
368void c_KDDockWidgets__Rect__moveCenter_Point(void *thisObj, void *pt_)
369{
370 assert(pt_);
371 auto &pt = *reinterpret_cast<KDDockWidgets::Point *>(pt_);
372 fromPtr(thisObj)->moveCenter(pt);
373}
374// moveLeft(int x)
375void c_KDDockWidgets__Rect__moveLeft_int(void *thisObj, int x)
376{
377 fromPtr(thisObj)->moveLeft(x);
378}
379// moveRight(int r)
380void c_KDDockWidgets__Rect__moveRight_int(void *thisObj, int r)
381{
382 fromPtr(thisObj)->moveRight(r);
383}
384// moveTo(KDDockWidgets::Point pt)
385void c_KDDockWidgets__Rect__moveTo_Point(void *thisObj, void *pt_)
386{
387 assert(pt_);
388 auto &pt = *reinterpret_cast<KDDockWidgets::Point *>(pt_);
389 fromPtr(thisObj)->moveTo(pt);
390}
391// moveTo(int x, int y)
392void c_KDDockWidgets__Rect__moveTo_int_int(void *thisObj, int x, int y)
393{
394 fromPtr(thisObj)->moveTo(x, y);
395}
396// moveTop(int y)
397void c_KDDockWidgets__Rect__moveTop_int(void *thisObj, int y)
398{
399 fromPtr(thisObj)->moveTop(y);
400}
401// moveTopLeft(KDDockWidgets::Point pt)
402void c_KDDockWidgets__Rect__moveTopLeft_Point(void *thisObj, void *pt_)
403{
404 assert(pt_);
405 auto &pt = *reinterpret_cast<KDDockWidgets::Point *>(pt_);
406 fromPtr(thisObj)->moveTopLeft(pt);
407}
408// pos() const
409void *c_KDDockWidgets__Rect__pos(void *thisObj)
410{
411 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->pos() };
412 return result;
413}
414// right() const
416{
417 const auto &result = fromPtr(thisObj)->right();
418 return result;
419}
420// setBottom(int b)
421void c_KDDockWidgets__Rect__setBottom_int(void *thisObj, int b)
422{
423 fromPtr(thisObj)->setBottom(b);
424}
425// setHeight(int h)
426void c_KDDockWidgets__Rect__setHeight_int(void *thisObj, int h)
427{
428 fromPtr(thisObj)->setHeight(h);
429}
430// setLeft(int x)
431void c_KDDockWidgets__Rect__setLeft_int(void *thisObj, int x)
432{
433 fromPtr(thisObj)->setLeft(x);
434}
435// setRight(int r)
436void c_KDDockWidgets__Rect__setRight_int(void *thisObj, int r)
437{
438 fromPtr(thisObj)->setRight(r);
439}
440// setSize(KDDockWidgets::Size sz)
441void c_KDDockWidgets__Rect__setSize_Size(void *thisObj, void *sz_)
442{
443 assert(sz_);
444 auto &sz = *reinterpret_cast<KDDockWidgets::Size *>(sz_);
445 fromPtr(thisObj)->setSize(sz);
446}
447// setTop(int y)
448void c_KDDockWidgets__Rect__setTop_int(void *thisObj, int y)
449{
450 fromPtr(thisObj)->setTop(y);
451}
452// setTopLeft(KDDockWidgets::Point pt)
453void c_KDDockWidgets__Rect__setTopLeft_Point(void *thisObj, void *pt_)
454{
455 assert(pt_);
456 auto &pt = *reinterpret_cast<KDDockWidgets::Point *>(pt_);
457 fromPtr(thisObj)->setTopLeft(pt);
458}
459// setWidth(int w)
460void c_KDDockWidgets__Rect__setWidth_int(void *thisObj, int w)
461{
462 fromPtr(thisObj)->setWidth(w);
463}
464// setX(int x)
465void c_KDDockWidgets__Rect__setX_int(void *thisObj, int x)
466{
467 fromPtr(thisObj)->setX(x);
468}
469// setY(int y)
470void c_KDDockWidgets__Rect__setY_int(void *thisObj, int y)
471{
472 fromPtr(thisObj)->setY(y);
473}
474// size() const
475void *c_KDDockWidgets__Rect__size(void *thisObj)
476{
477 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Size> { fromPtr(thisObj)->size() };
478 return result;
479}
480// top() const
482{
483 const auto &result = fromPtr(thisObj)->top();
484 return result;
485}
486// topLeft() const
488{
489 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->topLeft() };
490 return result;
491}
492// topRight() const
494{
495 const auto &result = new Dartagnan::ValueWrapper<KDDockWidgets::Point> { fromPtr(thisObj)->topRight() };
496 return result;
497}
498// translate(KDDockWidgets::Point pt)
499void c_KDDockWidgets__Rect__translate_Point(void *thisObj, void *pt_)
500{
501 assert(pt_);
502 auto &pt = *reinterpret_cast<KDDockWidgets::Point *>(pt_);
503 fromPtr(thisObj)->translate(pt);
504}
505// width() const
507{
508 const auto &result = fromPtr(thisObj)->width();
509 return result;
510}
511// x() const
512int c_KDDockWidgets__Rect__x(void *thisObj)
513{
514 const auto &result = fromPtr(thisObj)->x();
515 return result;
516}
517// y() const
518int c_KDDockWidgets__Rect__y(void *thisObj)
519{
520 const auto &result = fromPtr(thisObj)->y();
521 return result;
522}
524{
525 delete fromPtr(thisObj);
526}
527}
int c_KDDockWidgets__Rect__top(void *thisObj)
Definition Rect_c.cpp:481
void c_KDDockWidgets__Rect__setWidth_int(void *thisObj, int w)
Definition Rect_c.cpp:460
int c_KDDockWidgets__Rect__x(void *thisObj)
Definition Rect_c.cpp:512
bool c_KDDockWidgets__Rect__isEmpty(void *thisObj)
Definition Rect_c.cpp:331
void * c_KDDockWidgets__Rect__center(void *thisObj)
Definition Rect_c.cpp:287
void c_KDDockWidgets__Rect__moveTo_int_int(void *thisObj, int x, int y)
Definition Rect_c.cpp:392
void * c_KDDockWidgets__Rect__constructor_Point_Size(void *pos_, void *size_)
Definition Rect_c.cpp:243
bool c_KDDockWidgets__Rect__contains_Point(void *thisObj, void *pt_)
Definition Rect_c.cpp:293
void c_KDDockWidgets__Rect__setHeight_int(void *thisObj, int h)
Definition Rect_c.cpp:426
int c_KDDockWidgets__Rect__height(void *thisObj)
Definition Rect_c.cpp:309
bool c_KDDockWidgets__Rect__isNull(void *thisObj)
Definition Rect_c.cpp:337
void * c_KDDockWidgets__Rect__constructor()
Definition Rect_c.cpp:238
void * c_KDDockWidgets__Rect__topRight(void *thisObj)
Definition Rect_c.cpp:493
void c_KDDockWidgets__Rect__moveTop_int(void *thisObj, int y)
Definition Rect_c.cpp:397
int c_KDDockWidgets__Rect__y(void *thisObj)
Definition Rect_c.cpp:518
static KDDockWidgetsBindings_wrappersNS::Rect_wrapper * fromWrapperPtr(void *ptr)
Definition Rect_c.cpp:229
void c_KDDockWidgets__Rect_Finalizer(void *cppObj)
Definition Rect_c.cpp:234
void * c_KDDockWidgets__Rect__bottomRight(void *thisObj)
Definition Rect_c.cpp:281
void * c_KDDockWidgets__Rect__bottomLeft(void *thisObj)
Definition Rect_c.cpp:275
bool c_KDDockWidgets__Rect__intersects_Rect(void *thisObj, void *other_)
Definition Rect_c.cpp:323
void c_KDDockWidgets__Rect__setTop_int(void *thisObj, int y)
Definition Rect_c.cpp:448
void c_KDDockWidgets__Rect__moveTopLeft_Point(void *thisObj, void *pt_)
Definition Rect_c.cpp:402
void c_KDDockWidgets__Rect__setSize_Size(void *thisObj, void *sz_)
Definition Rect_c.cpp:441
void c_KDDockWidgets__Rect__moveLeft_int(void *thisObj, int x)
Definition Rect_c.cpp:375
void c_KDDockWidgets__Rect__setX_int(void *thisObj, int x)
Definition Rect_c.cpp:465
void c_KDDockWidgets__Rect__adjust_int_int_int_int(void *thisObj, int l, int t, int r, int b)
Definition Rect_c.cpp:258
int c_KDDockWidgets__Rect__width(void *thisObj)
Definition Rect_c.cpp:506
void c_KDDockWidgets__Rect__setBottom_int(void *thisObj, int b)
Definition Rect_c.cpp:421
void * c_KDDockWidgets__Rect__size(void *thisObj)
Definition Rect_c.cpp:475
void c_KDDockWidgets__Rect__destructor(void *thisObj)
Definition Rect_c.cpp:523
bool c_KDDockWidgets__Rect__contains_Rect(void *thisObj, void *other_)
Definition Rect_c.cpp:301
bool c_KDDockWidgets__Rect__isValid(void *thisObj)
Definition Rect_c.cpp:343
void * c_KDDockWidgets__Rect__topLeft(void *thisObj)
Definition Rect_c.cpp:487
void c_KDDockWidgets__Rect__setTopLeft_Point(void *thisObj, void *pt_)
Definition Rect_c.cpp:453
static KDDockWidgets::Rect * fromPtr(void *ptr)
Definition Rect_c.cpp:225
int c_KDDockWidgets__Rect__left(void *thisObj)
Definition Rect_c.cpp:349
int c_KDDockWidgets__Rect__bottom(void *thisObj)
Definition Rect_c.cpp:269
void c_KDDockWidgets__Rect__setY_int(void *thisObj, int y)
Definition Rect_c.cpp:470
void * c_KDDockWidgets__Rect__marginsAdded_Margins(void *thisObj, void *m_)
Definition Rect_c.cpp:355
void c_KDDockWidgets__Rect__setRight_int(void *thisObj, int r)
Definition Rect_c.cpp:436
void c_KDDockWidgets__Rect__setLeft_int(void *thisObj, int x)
Definition Rect_c.cpp:431
void c_KDDockWidgets__Rect__moveTo_Point(void *thisObj, void *pt_)
Definition Rect_c.cpp:385
void * c_KDDockWidgets__Rect__constructor_int_int_int_int(int x, int y, int width, int height)
Definition Rect_c.cpp:252
void * c_KDDockWidgets__Rect__intersected_Rect(void *thisObj, void *other_)
Definition Rect_c.cpp:315
int c_KDDockWidgets__Rect__right(void *thisObj)
Definition Rect_c.cpp:415
void c_KDDockWidgets__Rect__moveCenter_Point(void *thisObj, void *pt_)
Definition Rect_c.cpp:368
void c_KDDockWidgets__Rect__moveRight_int(void *thisObj, int r)
Definition Rect_c.cpp:380
void c_KDDockWidgets__Rect__translate_Point(void *thisObj, void *pt_)
Definition Rect_c.cpp:499
void * c_KDDockWidgets__Rect__adjusted_int_int_int_int(void *thisObj, int l, int t, int r, int b)
Definition Rect_c.cpp:263
void c_KDDockWidgets__Rect__moveBottom_int(void *thisObj, int b)
Definition Rect_c.cpp:363
void * c_KDDockWidgets__Rect__pos(void *thisObj)
Definition Rect_c.cpp:409
KDDockWidgets::Rect intersected(KDDockWidgets::Rect other) const
Definition Rect_c.cpp:80
void translate(KDDockWidgets::Point pt)
Definition Rect_c.cpp:204
void setTopLeft(KDDockWidgets::Point pt)
Definition Rect_c.cpp:172
void setSize(KDDockWidgets::Size sz)
Definition Rect_c.cpp:164
KDDockWidgets::Point topLeft() const
Definition Rect_c.cpp:196
KDDockWidgets::Rect marginsAdded(KDDockWidgets::Margins m) const
Definition Rect_c.cpp:104
KDDockWidgets::Point bottomLeft() const
Definition Rect_c.cpp:56
void moveTo(KDDockWidgets::Point pt)
Definition Rect_c.cpp:124
void moveCenter(KDDockWidgets::Point pt)
Definition Rect_c.cpp:112
void moveTopLeft(KDDockWidgets::Point pt)
Definition Rect_c.cpp:136
KDDockWidgets::Point bottomRight() const
Definition Rect_c.cpp:60
KDDockWidgets::Point topRight() const
Definition Rect_c.cpp:200
bool intersects(KDDockWidgets::Rect other) const
Definition Rect_c.cpp:84
KDDockWidgets::Rect adjusted(int l, int t, int r, int b) const
Definition Rect_c.cpp:48
bool contains(KDDockWidgets::Point pt) const
Definition Rect_c.cpp:68
void adjust(int l, int t, int r, int b)
Definition Rect_c.cpp:44
KDDockWidgets::Point center() const
Definition Rect_c.cpp:64
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.

© 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