1 //******************************************************************************
2 // Copyright (c) 2005-2013 by Jan Van hijfte
3 //
4 // See the included file COPYING.TXT for details about the copyright.
5 //
6 // This program is distributed in the hope that it will be useful,
7 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 //******************************************************************************
10
11
12 #include "qboxlayout_c.h"
13
QBoxLayout_Create(QBoxLayout::Direction AnonParam1,QWidgetH parent)14 QBoxLayoutH QBoxLayout_Create(QBoxLayout::Direction AnonParam1, QWidgetH parent)
15 {
16 return (QBoxLayoutH) new QBoxLayout(AnonParam1, (QWidget*)parent);
17 }
18
QBoxLayout_Destroy(QBoxLayoutH handle)19 void QBoxLayout_Destroy(QBoxLayoutH handle)
20 {
21 delete (QBoxLayout *)handle;
22 }
23
QBoxLayout_direction(QBoxLayoutH handle)24 QBoxLayout::Direction QBoxLayout_direction(QBoxLayoutH handle)
25 {
26 return (QBoxLayout::Direction) ((QBoxLayout *)handle)->direction();
27 }
28
QBoxLayout_setDirection(QBoxLayoutH handle,QBoxLayout::Direction AnonParam1)29 void QBoxLayout_setDirection(QBoxLayoutH handle, QBoxLayout::Direction AnonParam1)
30 {
31 ((QBoxLayout *)handle)->setDirection(AnonParam1);
32 }
33
QBoxLayout_addSpacing(QBoxLayoutH handle,int size)34 void QBoxLayout_addSpacing(QBoxLayoutH handle, int size)
35 {
36 ((QBoxLayout *)handle)->addSpacing(size);
37 }
38
QBoxLayout_addStretch(QBoxLayoutH handle,int stretch)39 void QBoxLayout_addStretch(QBoxLayoutH handle, int stretch)
40 {
41 ((QBoxLayout *)handle)->addStretch(stretch);
42 }
43
QBoxLayout_addSpacerItem(QBoxLayoutH handle,QSpacerItemH spacerItem)44 void QBoxLayout_addSpacerItem(QBoxLayoutH handle, QSpacerItemH spacerItem)
45 {
46 ((QBoxLayout *)handle)->addSpacerItem((QSpacerItem*)spacerItem);
47 }
48
QBoxLayout_addWidget(QBoxLayoutH handle,QWidgetH AnonParam1,int stretch,unsigned int alignment)49 void QBoxLayout_addWidget(QBoxLayoutH handle, QWidgetH AnonParam1, int stretch, unsigned int alignment)
50 {
51 ((QBoxLayout *)handle)->addWidget((QWidget*)AnonParam1, stretch, (Qt::Alignment)alignment);
52 }
53
QBoxLayout_addLayout(QBoxLayoutH handle,QLayoutH layout,int stretch)54 void QBoxLayout_addLayout(QBoxLayoutH handle, QLayoutH layout, int stretch)
55 {
56 ((QBoxLayout *)handle)->addLayout((QLayout*)layout, stretch);
57 }
58
QBoxLayout_addStrut(QBoxLayoutH handle,int AnonParam1)59 void QBoxLayout_addStrut(QBoxLayoutH handle, int AnonParam1)
60 {
61 ((QBoxLayout *)handle)->addStrut(AnonParam1);
62 }
63
QBoxLayout_addItem(QBoxLayoutH handle,QLayoutItemH AnonParam1)64 void QBoxLayout_addItem(QBoxLayoutH handle, QLayoutItemH AnonParam1)
65 {
66 ((QBoxLayout *)handle)->addItem((QLayoutItem*)AnonParam1);
67 }
68
QBoxLayout_insertSpacing(QBoxLayoutH handle,int index,int size)69 void QBoxLayout_insertSpacing(QBoxLayoutH handle, int index, int size)
70 {
71 ((QBoxLayout *)handle)->insertSpacing(index, size);
72 }
73
QBoxLayout_insertStretch(QBoxLayoutH handle,int index,int stretch)74 void QBoxLayout_insertStretch(QBoxLayoutH handle, int index, int stretch)
75 {
76 ((QBoxLayout *)handle)->insertStretch(index, stretch);
77 }
78
QBoxLayout_insertSpacerItem(QBoxLayoutH handle,int index,QSpacerItemH spacerItem)79 void QBoxLayout_insertSpacerItem(QBoxLayoutH handle, int index, QSpacerItemH spacerItem)
80 {
81 ((QBoxLayout *)handle)->insertSpacerItem(index, (QSpacerItem*)spacerItem);
82 }
83
QBoxLayout_insertWidget(QBoxLayoutH handle,int index,QWidgetH widget,int stretch,unsigned int alignment)84 void QBoxLayout_insertWidget(QBoxLayoutH handle, int index, QWidgetH widget, int stretch, unsigned int alignment)
85 {
86 ((QBoxLayout *)handle)->insertWidget(index, (QWidget*)widget, stretch, (Qt::Alignment)alignment);
87 }
88
QBoxLayout_insertLayout(QBoxLayoutH handle,int index,QLayoutH layout,int stretch)89 void QBoxLayout_insertLayout(QBoxLayoutH handle, int index, QLayoutH layout, int stretch)
90 {
91 ((QBoxLayout *)handle)->insertLayout(index, (QLayout*)layout, stretch);
92 }
93
QBoxLayout_insertItem(QBoxLayoutH handle,int index,QLayoutItemH AnonParam2)94 void QBoxLayout_insertItem(QBoxLayoutH handle, int index, QLayoutItemH AnonParam2)
95 {
96 ((QBoxLayout *)handle)->insertItem(index, (QLayoutItem*)AnonParam2);
97 }
98
QBoxLayout_spacing(QBoxLayoutH handle)99 int QBoxLayout_spacing(QBoxLayoutH handle)
100 {
101 return (int) ((QBoxLayout *)handle)->spacing();
102 }
103
QBoxLayout_setSpacing(QBoxLayoutH handle,int spacing)104 void QBoxLayout_setSpacing(QBoxLayoutH handle, int spacing)
105 {
106 ((QBoxLayout *)handle)->setSpacing(spacing);
107 }
108
QBoxLayout_setStretchFactor(QBoxLayoutH handle,QWidgetH w,int stretch)109 bool QBoxLayout_setStretchFactor(QBoxLayoutH handle, QWidgetH w, int stretch)
110 {
111 return (bool) ((QBoxLayout *)handle)->setStretchFactor((QWidget*)w, stretch);
112 }
113
QBoxLayout_setStretchFactor2(QBoxLayoutH handle,QLayoutH l,int stretch)114 bool QBoxLayout_setStretchFactor2(QBoxLayoutH handle, QLayoutH l, int stretch)
115 {
116 return (bool) ((QBoxLayout *)handle)->setStretchFactor((QLayout*)l, stretch);
117 }
118
QBoxLayout_setStretch(QBoxLayoutH handle,int index,int stretch)119 void QBoxLayout_setStretch(QBoxLayoutH handle, int index, int stretch)
120 {
121 ((QBoxLayout *)handle)->setStretch(index, stretch);
122 }
123
QBoxLayout_stretch(QBoxLayoutH handle,int index)124 int QBoxLayout_stretch(QBoxLayoutH handle, int index)
125 {
126 return (int) ((QBoxLayout *)handle)->stretch(index);
127 }
128
QBoxLayout_sizeHint(QBoxLayoutH handle,PSize retval)129 void QBoxLayout_sizeHint(QBoxLayoutH handle, PSize retval)
130 {
131 *(QSize *)retval = ((QBoxLayout *)handle)->sizeHint();
132 }
133
QBoxLayout_minimumSize(QBoxLayoutH handle,PSize retval)134 void QBoxLayout_minimumSize(QBoxLayoutH handle, PSize retval)
135 {
136 *(QSize *)retval = ((QBoxLayout *)handle)->minimumSize();
137 }
138
QBoxLayout_maximumSize(QBoxLayoutH handle,PSize retval)139 void QBoxLayout_maximumSize(QBoxLayoutH handle, PSize retval)
140 {
141 *(QSize *)retval = ((QBoxLayout *)handle)->maximumSize();
142 }
143
QBoxLayout_hasHeightForWidth(QBoxLayoutH handle)144 bool QBoxLayout_hasHeightForWidth(QBoxLayoutH handle)
145 {
146 return (bool) ((QBoxLayout *)handle)->hasHeightForWidth();
147 }
148
QBoxLayout_heightForWidth(QBoxLayoutH handle,int AnonParam1)149 int QBoxLayout_heightForWidth(QBoxLayoutH handle, int AnonParam1)
150 {
151 return (int) ((QBoxLayout *)handle)->heightForWidth(AnonParam1);
152 }
153
QBoxLayout_minimumHeightForWidth(QBoxLayoutH handle,int AnonParam1)154 int QBoxLayout_minimumHeightForWidth(QBoxLayoutH handle, int AnonParam1)
155 {
156 return (int) ((QBoxLayout *)handle)->minimumHeightForWidth(AnonParam1);
157 }
158
QBoxLayout_expandingDirections(QBoxLayoutH handle)159 unsigned int QBoxLayout_expandingDirections(QBoxLayoutH handle)
160 {
161 return (unsigned int) ((QBoxLayout *)handle)->expandingDirections();
162 }
163
QBoxLayout_invalidate(QBoxLayoutH handle)164 void QBoxLayout_invalidate(QBoxLayoutH handle)
165 {
166 ((QBoxLayout *)handle)->invalidate();
167 }
168
QBoxLayout_itemAt(QBoxLayoutH handle,int AnonParam1)169 QLayoutItemH QBoxLayout_itemAt(QBoxLayoutH handle, int AnonParam1)
170 {
171 return (QLayoutItemH) ((QBoxLayout *)handle)->itemAt(AnonParam1);
172 }
173
QBoxLayout_takeAt(QBoxLayoutH handle,int AnonParam1)174 QLayoutItemH QBoxLayout_takeAt(QBoxLayoutH handle, int AnonParam1)
175 {
176 return (QLayoutItemH) ((QBoxLayout *)handle)->takeAt(AnonParam1);
177 }
178
QBoxLayout_count(QBoxLayoutH handle)179 int QBoxLayout_count(QBoxLayoutH handle)
180 {
181 return (int) ((QBoxLayout *)handle)->count();
182 }
183
QBoxLayout_setGeometry(QBoxLayoutH handle,PRect AnonParam1)184 void QBoxLayout_setGeometry(QBoxLayoutH handle, PRect AnonParam1)
185 {
186 QRect t_AnonParam1;
187 copyPRectToQRect(AnonParam1, t_AnonParam1);
188 ((QBoxLayout *)handle)->setGeometry(t_AnonParam1);
189 }
190
QHBoxLayout_Create()191 QHBoxLayoutH QHBoxLayout_Create()
192 {
193 return (QHBoxLayoutH) new QHBoxLayout();
194 }
195
QHBoxLayout_Destroy(QHBoxLayoutH handle)196 void QHBoxLayout_Destroy(QHBoxLayoutH handle)
197 {
198 delete (QHBoxLayout *)handle;
199 }
200
QHBoxLayout_Create2(QWidgetH parent)201 QHBoxLayoutH QHBoxLayout_Create2(QWidgetH parent)
202 {
203 return (QHBoxLayoutH) new QHBoxLayout((QWidget*)parent);
204 }
205
QVBoxLayout_Create()206 QVBoxLayoutH QVBoxLayout_Create()
207 {
208 return (QVBoxLayoutH) new QVBoxLayout();
209 }
210
QVBoxLayout_Destroy(QVBoxLayoutH handle)211 void QVBoxLayout_Destroy(QVBoxLayoutH handle)
212 {
213 delete (QVBoxLayout *)handle;
214 }
215
QVBoxLayout_Create2(QWidgetH parent)216 QVBoxLayoutH QVBoxLayout_Create2(QWidgetH parent)
217 {
218 return (QVBoxLayoutH) new QVBoxLayout((QWidget*)parent);
219 }
220
221