gtkmm-3.0 is an old version of the gtkmm API that installs in parallel with the still older gtkmm-2.4 API and the new gtkmm-4.0 API. The last version of the gtkmm-2.4 API was gtkmm 2.24. gtkmm 3 has no major fundamental differences to gtkmm 2 but does make several small changes that were not possible while maintaining binary compatibility. If you never used the gtkmm-2.4 API then you can safely ignore this chapter.
gtkmm 3's library is called
libgtkmm-3.0 rather than
libgtkmm-2.4 and installs its headers in a similarly-versioned directory, so your pkg-config check should ask for
gtkmm-3.0 rather than
gtkmm 3 added some new classes:
Gtk::AppChooserDialogallow the user to select an installed application to open a particular type of content.
Gtk::Gridis a new container widget that will eventually replace
Gtk::Table. It arranges its children according to properties of those children rather than its own layout details.
Gtk::Switchdisplays On/Off states more explicitly than
Gtk::CheckButton. It may be useful, for instance, when allowing users to activate hardware.
gtkmm 3 also made several small changes to the API, which you will probably encounter when porting code that used gtkmm-2.4. Here is a short list:
Gtk::CellLayout, used by
Gtk::ComboBox, now has a
Gtk::CellAreawhich can be used to specify more details of how the
CellRenderers are arranged and aligned.
Gdk::Cursorare now used via
Gtk::Separatornow derive from
Gtk::Orientable, allowing their orientation (vertical or horizontal) to be specified without requiring the use of a derived class such as
Gtk::TreeViewand other widgets derive from Scrollable instead of having their own methods such as
get_vadjustment()and instead of having their own set_scroll_adjustments signal.
Gtk::Rcwere removed, replaced by
Gtk::StyleProviders, such as
Cairo::Contextand does not require you to call
Color, adding an alpha component for opacity.
Colormapwas removed, along with its awkward use to allocate colors.
Gdk::Bitmapwere removed in favor of
Gdk::Drawablewas removed, with its methods moving into
All deprecated API was removed in gtkmm 3.0, though there have been new deprecations in later gtkmm 3.x versions.
As a first step to porting your source code to gtkmm-3.0 you should probably ensure that your application builds with the deprecated gtkmm-2.4 API disabled, by defining macro such as GTKMM_DISABLE_DEPRECATED. There are some autotools macros that can help with this by defining them optionally at build time. See the gtkmm 3 porting wiki page for more details.