in gtkmm 3, Gtk::SpinButton does not implement Gtk::Orientable, and cannot
because adding that would break ABI in a stable release.
so, you must do this by calling the C API yourself. that should be wrapped
behind type-safe helper functions. here is a working example (C++17, but
that isn't actually required).
finally, I would suggest an email subject that is a sentence, not just one
of the nouns that is (or in this case, is not!) involved in your question
:-)
```cpp
#include
#include
#include
static void
set_orientation(Gtk::SpinButton& spinButton, Gtk::Orientation const
orientation)
{
auto const gtk_orientable = GTK_ORIENTABLE( spinButton.gobj() );
auto const gtk_orientation = static_cast(orientation);
gtk_orientable_set_orientation(gtk_orientable, gtk_orientation);
}
static void
on_activate(Glib::RefPtr const& application, Gtk::Window&
window)
{
auto& spinButton = *Gtk::make_managed();
set_orientation(spinButton, Gtk::ORIENTATION_VERTICAL);
window.add(spinButton);
window.show_all();
application->add_window(window);
}
auto
main() -> int
{
auto const application = Gtk::Application::create("org.djb.test");
auto window = Gtk::Window{};
application->signal_activate().connect( [application, ]{
on_activate(application, window); } );
return application->run();
}
```
___
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list