int drv_layout(int drvid, void *a0, void* a1, void* a2, void* a3, void* a4, void* a5, void* a6, void* a7, void* a8, void* a9) { handle_head* head = (handle_head*)a0; QLayout *self = (QLayout*)head->native; switch (drvid) { case LAYOUT_ADDLAYOUT: { self->addItem(drvGetLayout(a1)); break; } case LAYOUT_ADDWIDGET: { self->addWidget(drvGetWidget(a1)); break; } case LAYOUT_SETSPACING: { self->setSpacing(drvGetInt(a1)); break; } case LAYOUT_SPACING: { drvSetInt(a1,self->spacing()); break; } case LAYOUT_SETMARGINS: { self->setContentsMargins(drvGetMargins(a1)); break; } case LAYOUT_MARGINS: { drvSetMargins(a1,self->contentsMargins()); break; } case LAYOUT_SETMENUBAR: { self->setMenuBar(drvGetWidget(a1)); break; } case LAYOUT_MENUBAR: { drvSetHandle(a1,self->menuBar()); break; } default: return 0; } return 1; }
int WWidgetGroup::layoutSpacing() const { QLayout* pLayout = layout(); return pLayout ? pLayout->spacing() : 0; }