Styled button (or better yet, SCheckBox
) and SWidgetSwitcher
is how I would do it.
The screenshot you have above shows the system we call the TabManager
. It is responsible for:
- Letting you re-order tabs
- Re-arranging layout dynamically by pulling tabs out of the tab well and dropping them onto various targets
- Saving and restoring editor layouts
- Logical ownership of small (square) tabs by big (rounded) tabs
The feature matrix causes the system to get quite complicated. It is also designed with a very specific use-case in mind. I would avoid using it unless it is a near-perfect fit for your purposes. You can experience most of the features by customizing your editor layout and decide if you want to dig into all that code.
However, if simple tabs is what you are looking for, I suggest approach that you proposed:
- Check out the
CreateRadioButton
example inWidgetGallery.cpp
- Hook up some radio buttons to an
enum
or anint
that signifies the current tab; let’s call ittabIndex
. - Hook up an
SWidgetSwitcher
to the currenttabIndex
via an attribute.
The nice thing about this approach is that you have complete freedom to move radio buttons around. You can create a special tab that’s bigger than others and has a different image to represent it.
Let me know how it goes and if you have further questions.