Bits and Pieces: The Small BCardLayout | Haiku Project

A short post about something that’s not really documented. When working on a communication application for Haiku, I needed to create a typical configuration wizard window. I required a few views to be present in one spot, with only one being shown at the same time - with the ability to switch between them on user Next/Prev button press. Since Haiku exports a neat layout API, I wanted to use one of those if only possible. And then I found the BCardLayout. Since the Haiku API is still being worked on, some places are not yet well documented - with others not documented at all. The BCardLayout is the latter. It’s a rather easy-to-use feature though. There’s a living example in the Haiku core code as well - in the media preferences application (check out src/preferences/media/MediaWindow.cpp).


This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/sil2100/2012-01-21_bits_and_pieces_small_bcardlayout/