Iclass* iupTabsNewClass(void) { Iclass* ic = iupClassNew(NULL); ic->name = "tabs"; ic->format = "g"; /* array of Ihandle */ ic->nativetype = IUP_TYPECONTROL; ic->childtype = IUP_CHILDMANY; ic->is_interactive = 1; ic->has_attrib_id = 1; /* Class functions */ ic->New = iupTabsNewClass; ic->Create = iTabsCreateMethod; ic->GetInnerNativeContainerHandle = iTabsGetInnerNativeContainerHandleMethod; ic->ComputeNaturalSize = iTabsComputeNaturalSizeMethod; ic->SetChildrenCurrentSize = iTabsSetChildrenCurrentSizeMethod; ic->SetChildrenPosition = iTabsSetChildrenPositionMethod; ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; ic->UnMap = iupdrvBaseUnMapMethod; /* IupTabs Callbacks */ iupClassRegisterCallback(ic, "TABCHANGE_CB", "nn"); iupClassRegisterCallback(ic, "TABCHANGEPOS_CB", "ii"); iupClassRegisterCallback(ic, "RIGHTCLICK_CB", "i"); /* Common Callbacks */ iupBaseRegisterCommonCallbacks(ic); /* Common */ iupBaseRegisterCommonAttrib(ic); /* Visual */ iupBaseRegisterVisualAttrib(ic); /* IupTabs only */ iupClassRegisterAttribute(ic, "VALUE", iTabsGetValueAttrib, iTabsSetValueAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); iupClassRegisterAttribute(ic, "VALUEPOS", iTabsGetValuePosAttrib, iTabsSetValuePosAttrib, IUPAF_SAMEASSYSTEM, "0", IUPAF_NO_SAVE|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); iupClassRegisterAttribute(ic, "VALUE_HANDLE", iTabsGetValueHandleAttrib, iTabsSetValueHandleAttrib, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT | IUPAF_IHANDLE | IUPAF_NO_STRING); iupClassRegisterAttribute(ic, "COUNT", iTabsGetCountAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); iupClassRegisterAttribute(ic, "SHOWCLOSE", iTabsGetShowCloseAttrib, iTabsSetShowCloseAttrib, NULL, NULL, IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* Base Container */ iupClassRegisterAttribute(ic, "CLIENTSIZE", iTabsGetClientSizeAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); iupClassRegisterAttribute(ic, "CLIENTOFFSET", iTabsGetClientOffsetAttrib, NULL, NULL, NULL, IUPAF_READONLY|IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, IUPAF_SAMEASSYSTEM, "YES", IUPAF_NOT_MAPPED|IUPAF_NO_INHERIT); /* Native Container */ iupClassRegisterAttribute(ic, "CHILDOFFSET", NULL, NULL, NULL, NULL, IUPAF_NOT_MAPPED | IUPAF_NO_INHERIT); iupdrvTabsInitClass(ic); return ic; }
Iclass* iupTabsGetClass(void) { Iclass* ic = iupClassNew(NULL); ic->name = "tabs"; ic->format = "g"; /* array of Ihandle */ ic->nativetype = IUP_TYPECONTROL; ic->childtype = IUP_CHILDMANY; ic->is_interactive = 1; ic->has_attrib_id = 1; /* Class functions */ ic->Create = iTabsCreateMethod; ic->GetInnerNativeContainerHandle = iTabsGetInnerNativeContainerMethod; ic->ComputeNaturalSize = iTabsComputeNaturalSizeMethod; ic->SetCurrentSize = iTabsSetCurrentSizeMethod; ic->SetPosition = iTabsSetPositionMethod; ic->LayoutUpdate = iupdrvBaseLayoutUpdateMethod; ic->UnMap = iupdrvBaseUnMapMethod; /* IupTabs Callbacks */ iupClassRegisterCallback(ic, "TABCHANGE_CB", "nn"); /* Common */ iupBaseRegisterCommonAttrib(ic); /* Visual */ iupBaseRegisterVisualAttrib(ic); /* IupTabs only */ iupClassRegisterAttribute(ic, "VALUE", iTabsGetValueAttrib, iTabsSetValueAttrib, NULL, IUP_NOT_MAPPED, IUP_NO_INHERIT); iupClassRegisterAttribute(ic, "VALUEPOS", iTabsGetValuePosAttrib, iTabsSetValuePosAttrib, NULL, IUP_NOT_MAPPED, IUP_NO_INHERIT); iupClassRegisterAttribute(ic, "VALUE_HANDLE", iTabsGetValueHandleAttrib, iTabsSetValueHandleAttrib, NULL, IUP_NOT_MAPPED, IUP_NO_INHERIT); /* Base Container */ iupClassRegisterAttribute(ic, "CLIENTSIZE", iTabsGetClientSizeAttrib, iupBaseNoSetAttrib, NULL, IUP_NOT_MAPPED, IUP_NO_INHERIT); iupClassRegisterAttribute(ic, "EXPAND", iupBaseContainerGetExpandAttrib, NULL, "YES", IUP_NOT_MAPPED, IUP_NO_INHERIT); iupdrvTabsInitClass(ic); return ic; }