This code places an Elementary flip selector widget on a window, along with two buttons trigerring actions on it (though its API).
The selector is being populated with the following items:
Next, we create it, populating it with those items and registering two (smart) callbacks on it:
Those two callbacks will take place whenever one of those smart events occur, and they will just print something to stdout:
The two buttons below the flip selector will take the actions described in their labels:
Click on them to exercise those flip selector API calls. To interact with the other parts of this API, there's a command line interface, whose help string can be asked for with the 'h' key:
The 'n' and 'p' keys will exemplify elm_flipselector_flip_next() and elm_flipselector_flip_prev(), respectively. 'f' and 'l' account for elm_flipselector_first_item_get() and elm_flipselector_last_item_get(), respectively. Finally, 's' will issue elm_flipselector_selected_item_get() on our example flip selector widget.
See the full example, whose window should look like this picture:
See the full source code for this example.