KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
SideBar_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 "SideBar_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 {
42{
43 return ::KDDockWidgets::Core::SideBar::containsDockWidget(arg__1);
44}
46{
47 return ::KDDockWidgets::Core::SideBar::isEmpty();
48}
50{
51 return ::KDDockWidgets::Core::SideBar::isVertical();
52}
54{
55 return ::KDDockWidgets::Core::SideBar::mainWindow();
56}
66{
68 const void *thisPtr = this;
69 m_setParentView_implCallback(const_cast<void *>(thisPtr), parent);
70 } else {
72 }
73}
85
86}
87}
89{
90 return reinterpret_cast<KDDockWidgets::Core::SideBar *>(ptr);
91}
96extern "C" {
98{
100} // addDockWidget(KDDockWidgets::Core::DockWidget * dw)
102{
103 auto dw = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(dw_);
104 fromPtr(thisObj)->addDockWidget(dw);
105}
106// clear()
108{
109 fromPtr(thisObj)->clear();
110}
111// containsDockWidget(KDDockWidgets::Core::DockWidget * arg__1) const
113{
114 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
115 const auto &result = fromPtr(thisObj)->containsDockWidget(arg__1);
116 return result;
117}
118// isEmpty() const
120{
121 const auto &result = fromPtr(thisObj)->isEmpty();
122 return result;
123}
124// isVertical() const
126{
127 const auto &result = fromPtr(thisObj)->isVertical();
128 return result;
129}
130// mainWindow() const
132{
133 const auto &result = fromPtr(thisObj)->mainWindow();
134 return result;
135}
136// onButtonClicked(KDDockWidgets::Core::DockWidget * dw)
138{
139 auto dw = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(dw_);
140 fromPtr(thisObj)->onButtonClicked(dw);
141}
142// removeDockWidget(KDDockWidgets::Core::DockWidget * dw)
144{
145 auto dw = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(dw_);
146 fromPtr(thisObj)->removeDockWidget(dw);
147}
148// setParentView_impl(KDDockWidgets::Core::View * parent)
150{
151 auto parent = reinterpret_cast<KDDockWidgets::Core::View *>(parent_);
153}
154// toggleOverlay(KDDockWidgets::Core::DockWidget * arg__1)
156{
157 auto arg__1 = reinterpret_cast<KDDockWidgets::Core::DockWidget *>(arg__1_);
158 fromPtr(thisObj)->toggleOverlay(arg__1);
159}
161{
162 delete fromPtr(thisObj);
163}
164void c_KDDockWidgets__Core__SideBar__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
165{
166 auto wrapper = fromWrapperPtr(ptr);
167 switch (methodId) {
168 case 331:
169 wrapper->m_setParentView_implCallback = reinterpret_cast<KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper::Callback_setParentView_impl>(callback);
170 break;
171 }
172}
173}
void c_KDDockWidgets__Core__SideBar__destructor(void *thisObj)
void c_KDDockWidgets__Core__SideBar__removeDockWidget_DockWidget(void *thisObj, void *dw_)
void c_KDDockWidgets__Core__SideBar__clear(void *thisObj)
void c_KDDockWidgets__Core__SideBar__setParentView_impl_View(void *thisObj, void *parent_)
static KDDockWidgets::Core::SideBar * fromPtr(void *ptr)
Definition SideBar_c.cpp:88
bool c_KDDockWidgets__Core__SideBar__isVertical(void *thisObj)
bool c_KDDockWidgets__Core__SideBar__isEmpty(void *thisObj)
void c_KDDockWidgets__Core__SideBar__toggleOverlay_DockWidget(void *thisObj, void *arg__1_)
void * c_KDDockWidgets__Core__SideBar__mainWindow(void *thisObj)
void c_KDDockWidgets__Core__SideBar__registerVirtualMethodCallback(void *ptr, void *callback, int methodId)
void c_KDDockWidgets__Core__SideBar_Finalizer(void *cppObj)
Definition SideBar_c.cpp:97
bool c_KDDockWidgets__Core__SideBar__containsDockWidget_DockWidget(void *thisObj, void *arg__1_)
void c_KDDockWidgets__Core__SideBar__onButtonClicked_DockWidget(void *thisObj, void *dw_)
void c_KDDockWidgets__Core__SideBar__addDockWidget_DockWidget(void *thisObj, void *dw_)
static KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::SideBar_wrapper * fromWrapperPtr(void *ptr)
Definition SideBar_c.cpp:92
virtual void setParentView_impl_nocallback(KDDockWidgets::Core::View *parent)
Definition SideBar_c.cpp:74
bool containsDockWidget(KDDockWidgets::Core::DockWidget *arg__1) const
Definition SideBar_c.cpp:41
void removeDockWidget(KDDockWidgets::Core::DockWidget *dw)
Definition SideBar_c.cpp:61
void onButtonClicked(KDDockWidgets::Core::DockWidget *dw)
Definition SideBar_c.cpp:57
void addDockWidget(KDDockWidgets::Core::DockWidget *dw)
Definition SideBar_c.cpp:33
void toggleOverlay(KDDockWidgets::Core::DockWidget *arg__1)
Definition SideBar_c.cpp:78
virtual void setParentView_impl(KDDockWidgets::Core::View *parent)
Definition SideBar_c.cpp:65
void(* Callback_setParentView_impl)(void *, KDDockWidgets::Core::View *parent)
Definition SideBar_c.h:35
virtual void setParentView_impl(View *parent)
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
The MainWindow base-class. MainWindow and MainWindowBase are only split in two so we can share some c...
void clear()
clears the sidebar (removes all dock widgets from it)
MainWindow * mainWindow() const
Returns the main window this side bar belongs to.
void removeDockWidget(DockWidget *dw)
bool isVertical() const
returns if this side bar has vertical orientation
void toggleOverlay(DockWidget *)
Toggles the dock widget overlay. Equivalent to the user clicking on the button.
bool containsDockWidget(DockWidget *) const
void onButtonClicked(DockWidget *dw)
void addDockWidget(DockWidget *dw)
bool isEmpty() const
returns whether there's no dock widgets
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