A tabbed gadget is derive from the frame gadget. It is a frame with tabs.
To create a tabbed control:
#include <oops/r3tabbed.h> char *labels[] = { "Foo", "Foo 2", NULL }; char *tooltips[] = { "Foo blaa blaa", "Foo even more ... ", NULL }; frame = R3New(R3CLID_TABBED, R3WGA_Parent, window, R3TABA_Labels, labels, R3TABA_ToolTips, tooltips, R3TAG_END);
You can also create icons based tabs:
void *class_icons[] = { foo_bits, foo2_bits, NULL }; frame = R3New(R3CLID_TABBED, R3WGA_Parent, window, R3TABA_IconWidth, icon_width, R3TABA_IconHeight, icon_height, R3TABA_Depth, icon_depth, R3TABA_Icons, icons, R3TAG_END);'
Note that the program doesn't handle the tabs for you. You have to ask the tab to talk to you with R3WGM_MAPCHANGES. When the user plays with the tabbed control, you can see what the current tab is and update the layout accordingly. For more information, study the 'samples/kernel/gadget/tabbed.c' sample.