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 "qlayout_c.h"
13 
QLayout_margin(QLayoutH handle)14 int QLayout_margin(QLayoutH handle)
15 {
16 	return (int) ((QLayout *)handle)->margin();
17 }
18 
QLayout_spacing(QLayoutH handle)19 int QLayout_spacing(QLayoutH handle)
20 {
21 	return (int) ((QLayout *)handle)->spacing();
22 }
23 
QLayout_setMargin(QLayoutH handle,int AnonParam1)24 void QLayout_setMargin(QLayoutH handle, int AnonParam1)
25 {
26 	((QLayout *)handle)->setMargin(AnonParam1);
27 }
28 
QLayout_setSpacing(QLayoutH handle,int AnonParam1)29 void QLayout_setSpacing(QLayoutH handle, int AnonParam1)
30 {
31 	((QLayout *)handle)->setSpacing(AnonParam1);
32 }
33 
QLayout_setContentsMargins(QLayoutH handle,int left,int top,int right,int bottom)34 void QLayout_setContentsMargins(QLayoutH handle, int left, int top, int right, int bottom)
35 {
36 	((QLayout *)handle)->setContentsMargins(left, top, right, bottom);
37 }
38 
QLayout_setContentsMargins2(QLayoutH handle,const QMarginsH margins)39 void QLayout_setContentsMargins2(QLayoutH handle, const QMarginsH margins)
40 {
41 	((QLayout *)handle)->setContentsMargins(*(const QMargins*)margins);
42 }
43 
QLayout_getContentsMargins(QLayoutH handle,int * left,int * top,int * right,int * bottom)44 void QLayout_getContentsMargins(QLayoutH handle, int* left, int* top, int* right, int* bottom)
45 {
46 	((QLayout *)handle)->getContentsMargins(left, top, right, bottom);
47 }
48 
QLayout_contentsMargins(QLayoutH handle,QMarginsH retval)49 void QLayout_contentsMargins(QLayoutH handle, QMarginsH retval)
50 {
51 	*(QMargins *)retval = ((QLayout *)handle)->contentsMargins();
52 }
53 
QLayout_contentsRect(QLayoutH handle,PRect retval)54 void QLayout_contentsRect(QLayoutH handle, PRect retval)
55 {
56 	QRect t_retval;
57 	t_retval = ((QLayout *)handle)->contentsRect();
58 	copyQRectToPRect(t_retval, retval);
59 }
60 
QLayout_setAlignment(QLayoutH handle,QWidgetH w,unsigned int alignment)61 bool QLayout_setAlignment(QLayoutH handle, QWidgetH w, unsigned int alignment)
62 {
63 	return (bool) ((QLayout *)handle)->setAlignment((QWidget*)w, (Qt::Alignment)alignment);
64 }
65 
QLayout_setAlignment2(QLayoutH handle,QLayoutH l,unsigned int alignment)66 bool QLayout_setAlignment2(QLayoutH handle, QLayoutH l, unsigned int alignment)
67 {
68 	return (bool) ((QLayout *)handle)->setAlignment((QLayout*)l, (Qt::Alignment)alignment);
69 }
70 
QLayout_setSizeConstraint(QLayoutH handle,QLayout::SizeConstraint AnonParam1)71 void QLayout_setSizeConstraint(QLayoutH handle, QLayout::SizeConstraint AnonParam1)
72 {
73 	((QLayout *)handle)->setSizeConstraint(AnonParam1);
74 }
75 
QLayout_sizeConstraint(QLayoutH handle)76 QLayout::SizeConstraint QLayout_sizeConstraint(QLayoutH handle)
77 {
78 	return (QLayout::SizeConstraint) ((QLayout *)handle)->sizeConstraint();
79 }
80 
QLayout_setMenuBar(QLayoutH handle,QWidgetH w)81 void QLayout_setMenuBar(QLayoutH handle, QWidgetH w)
82 {
83 	((QLayout *)handle)->setMenuBar((QWidget*)w);
84 }
85 
QLayout_menuBar(QLayoutH handle)86 QWidgetH QLayout_menuBar(QLayoutH handle)
87 {
88 	return (QWidgetH) ((QLayout *)handle)->menuBar();
89 }
90 
QLayout_parentWidget(QLayoutH handle)91 QWidgetH QLayout_parentWidget(QLayoutH handle)
92 {
93 	return (QWidgetH) ((QLayout *)handle)->parentWidget();
94 }
95 
QLayout_invalidate(QLayoutH handle)96 void QLayout_invalidate(QLayoutH handle)
97 {
98 	((QLayout *)handle)->invalidate();
99 }
100 
QLayout_geometry(QLayoutH handle,PRect retval)101 void QLayout_geometry(QLayoutH handle, PRect retval)
102 {
103 	QRect t_retval;
104 	t_retval = ((QLayout *)handle)->geometry();
105 	copyQRectToPRect(t_retval, retval);
106 }
107 
QLayout_activate(QLayoutH handle)108 bool QLayout_activate(QLayoutH handle)
109 {
110 	return (bool) ((QLayout *)handle)->activate();
111 }
112 
QLayout_update(QLayoutH handle)113 void QLayout_update(QLayoutH handle)
114 {
115 	((QLayout *)handle)->update();
116 }
117 
QLayout_addWidget(QLayoutH handle,QWidgetH w)118 void QLayout_addWidget(QLayoutH handle, QWidgetH w)
119 {
120 	((QLayout *)handle)->addWidget((QWidget*)w);
121 }
122 
QLayout_addItem(QLayoutH handle,QLayoutItemH AnonParam1)123 void QLayout_addItem(QLayoutH handle, QLayoutItemH AnonParam1)
124 {
125 	((QLayout *)handle)->addItem((QLayoutItem*)AnonParam1);
126 }
127 
QLayout_removeWidget(QLayoutH handle,QWidgetH w)128 void QLayout_removeWidget(QLayoutH handle, QWidgetH w)
129 {
130 	((QLayout *)handle)->removeWidget((QWidget*)w);
131 }
132 
QLayout_removeItem(QLayoutH handle,QLayoutItemH AnonParam1)133 void QLayout_removeItem(QLayoutH handle, QLayoutItemH AnonParam1)
134 {
135 	((QLayout *)handle)->removeItem((QLayoutItem*)AnonParam1);
136 }
137 
QLayout_expandingDirections(QLayoutH handle)138 unsigned int QLayout_expandingDirections(QLayoutH handle)
139 {
140 	return (unsigned int) ((QLayout *)handle)->expandingDirections();
141 }
142 
QLayout_minimumSize(QLayoutH handle,PSize retval)143 void QLayout_minimumSize(QLayoutH handle, PSize retval)
144 {
145 	*(QSize *)retval = ((QLayout *)handle)->minimumSize();
146 }
147 
QLayout_maximumSize(QLayoutH handle,PSize retval)148 void QLayout_maximumSize(QLayoutH handle, PSize retval)
149 {
150 	*(QSize *)retval = ((QLayout *)handle)->maximumSize();
151 }
152 
QLayout_setGeometry(QLayoutH handle,PRect AnonParam1)153 void QLayout_setGeometry(QLayoutH handle, PRect AnonParam1)
154 {
155 	QRect t_AnonParam1;
156 	copyPRectToQRect(AnonParam1, t_AnonParam1);
157 	((QLayout *)handle)->setGeometry(t_AnonParam1);
158 }
159 
QLayout_itemAt(QLayoutH handle,int index)160 QLayoutItemH QLayout_itemAt(QLayoutH handle, int index)
161 {
162 	return (QLayoutItemH) ((QLayout *)handle)->itemAt(index);
163 }
164 
QLayout_takeAt(QLayoutH handle,int index)165 QLayoutItemH QLayout_takeAt(QLayoutH handle, int index)
166 {
167 	return (QLayoutItemH) ((QLayout *)handle)->takeAt(index);
168 }
169 
QLayout_indexOf(QLayoutH handle,QWidgetH AnonParam1)170 int QLayout_indexOf(QLayoutH handle, QWidgetH AnonParam1)
171 {
172 	return (int) ((QLayout *)handle)->indexOf((QWidget*)AnonParam1);
173 }
174 
QLayout_count(QLayoutH handle)175 int QLayout_count(QLayoutH handle)
176 {
177 	return (int) ((QLayout *)handle)->count();
178 }
179 
QLayout_isEmpty(QLayoutH handle)180 bool QLayout_isEmpty(QLayoutH handle)
181 {
182 	return (bool) ((QLayout *)handle)->isEmpty();
183 }
184 
QLayout_controlTypes(QLayoutH handle)185 unsigned int QLayout_controlTypes(QLayoutH handle)
186 {
187 	return (unsigned int) ((QLayout *)handle)->controlTypes();
188 }
189 
QLayout_totalHeightForWidth(QLayoutH handle,int w)190 int QLayout_totalHeightForWidth(QLayoutH handle, int w)
191 {
192 	return (int) ((QLayout *)handle)->totalHeightForWidth(w);
193 }
194 
QLayout_totalMinimumSize(QLayoutH handle,PSize retval)195 void QLayout_totalMinimumSize(QLayoutH handle, PSize retval)
196 {
197 	*(QSize *)retval = ((QLayout *)handle)->totalMinimumSize();
198 }
199 
QLayout_totalMaximumSize(QLayoutH handle,PSize retval)200 void QLayout_totalMaximumSize(QLayoutH handle, PSize retval)
201 {
202 	*(QSize *)retval = ((QLayout *)handle)->totalMaximumSize();
203 }
204 
QLayout_totalSizeHint(QLayoutH handle,PSize retval)205 void QLayout_totalSizeHint(QLayoutH handle, PSize retval)
206 {
207 	*(QSize *)retval = ((QLayout *)handle)->totalSizeHint();
208 }
209 
QLayout_layout(QLayoutH handle)210 QLayoutH QLayout_layout(QLayoutH handle)
211 {
212 	return (QLayoutH) ((QLayout *)handle)->layout();
213 }
214 
QLayout_setEnabled(QLayoutH handle,bool AnonParam1)215 void QLayout_setEnabled(QLayoutH handle, bool AnonParam1)
216 {
217 	((QLayout *)handle)->setEnabled(AnonParam1);
218 }
219 
QLayout_isEnabled(QLayoutH handle)220 bool QLayout_isEnabled(QLayoutH handle)
221 {
222 	return (bool) ((QLayout *)handle)->isEnabled();
223 }
224 
QLayout_closestAcceptableSize(PSize retval,const QWidgetH w,const QSizeH s)225 void QLayout_closestAcceptableSize(PSize retval, const QWidgetH w, const QSizeH s)
226 {
227 	*(QSize *)retval = QLayout::closestAcceptableSize((const QWidget*)w, *(const QSize*)s);
228 }
229 
QLayout_to_QLayoutItem(QLayoutH handle)230 QLayoutItemH QLayout_to_QLayoutItem(QLayoutH handle)
231 {
232 	return (QLayoutItemH)(QLayoutItem *)(QLayout *)handle;
233 }
234 
235