gtkmm  3.13.2
New API in gtkmm 3.10
Member Gdk::Cursor::create (const Glib::RefPtr< Display >& display, const ::Cairo::RefPtr< ::Cairo::Surface >& surface, double x, double y)
Parameters
displayThe Gdk::Display for which the cursor will be created.
surfaceThe cairo image surface containing the cursor pixel data.
xThe horizontal offset of the “hotspot” of the cursor.
yThe vertical offset of the “hotspot” of the cursor.
Returns
A new Gdk::Cursor.
Member Gdk::Cursor::get_surface (double& x_hot, double& y_hot)
Parameters
x_hotLocation to store the hotspot x position, or 0.
y_hotLocation to store the hotspot y position, or 0.
Returns
A #cairo_surface_t representing cursor, or 0.
Member Gdk::Cursor::get_surface (double& x_hot, double& y_hot) const
Parameters
x_hotLocation to store the hotspot x position, or 0.
y_hotLocation to store the hotspot y position, or 0.
Returns
A #cairo_surface_t representing cursor, or 0.
Member Gdk::Device::get_position (double& x, double& y) const
Member Gdk::Device::get_position (Glib::RefPtr< Screen >& screen, double& x, double& y) const
Member Gdk::Screen::get_monitor_scale_factor (int monitor_num)
Parameters
monitor_numNumber of the monitor, between 0 and gdk_screen_get_n_monitors (screen).
Returns
The scale factor.
Member Gdk::Window::create_similar_image_surface (Cairo::Format format, int width, int height, int scale)
Parameters
formatThe format for the new surface.
widthWidth of the new surface.
heightHeight of the new surface.
scaleThe scale of the new surface, or 0 to use same as window.
Returns
A pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it.
Member Gdk::Window::get_device_position (const Glib::RefPtr< const Device >& device, double& x, double& y, ModifierType& mask) const
Parameters
devicePointer Gdk::Device to query to.
xReturn location for the X coordinate of device, or 0.
yReturn location for the Y coordinate of device, or 0.
maskReturn location for the modifier mask, or 0.
Returns
The window underneath device (as with Gdk::Device::get_window_at_position()), or 0 if the window is not known to GDK.
Member Gdk::Window::get_scale_factor () const
Returns
The scale factor.
Member Gdk::Window::set_opaque_region (const ::Cairo::RefPtr< const ::Cairo::Region >& region)
Parameters
regionA region.
Member Gtk::Box::get_baseline_position () const
Returns
The baseline position.
Member Gtk::Box::set_baseline_position (BaselinePosition position)
Parameters
positionA Gtk::BaselinePosition.
Member Gtk::Builder::get_application ()
Returns
The application being used by the builder, or 0.
Member Gtk::Builder::get_application () const
Returns
The application being used by the builder, or 0.
Member Gtk::Builder::set_application (const Glib::RefPtr< Application >& application)
Parameters
applicationA Gtk::Application.
Member Gtk::Button::set_image_from_icon_name (const Glib::ustring& icon_name, IconSize size=ICON_SIZE_BUTTON)
Member Gtk::Entry::get_tabs () const
Returns
The tabstops, or 0 if none was set.
Member Gtk::Entry::set_tabs (const Pango::TabArray& tabs)
Parameters
tabsA Pango::TabArray.
Member Gtk::FileChooser::get_current_name () const
Returns
The raw text from the file chooser’s “Name” entry. Free this with Glib::free(). Note that this string is not a full pathname or URI; it is whatever the contents of the entry are. Note also that this string is in UTF-8 encoding, which is not necessarily the system’s encoding for filenames.
Member Gtk::Grid::get_baseline_row () const
Returns
The row index defining the global baseline.
Member Gtk::Grid::get_row_baseline_position (int row) const
Parameters
rowA row index.
Returns
The baseline position of row.
Member Gtk::Grid::remove_column (int position)
Parameters
positionThe position of the column to remove.
Member Gtk::Grid::remove_row (int position)
Parameters
positionThe position of the row to remove.
Member Gtk::Grid::set_baseline_row (int row)
Parameters
rowThe row index.
Returns
The row index defining the global baseline.
Member Gtk::Grid::set_row_baseline_position (int row, BaselinePosition pos)
Parameters
rowA row index.
posA Gtk::BaselinePosition.
Class Gtk::HeaderBar
Member Gtk::HeaderBar::get_custom_title ()
Returns
The custom title widget of the header, or 0 if none has been set explicitly.
Member Gtk::HeaderBar::get_custom_title () const
Returns
The custom title widget of the header, or 0 if none has been set explicitly.
Member Gtk::HeaderBar::get_show_close_button () const
Returns
true if the decorations are shown.
Member Gtk::HeaderBar::get_subtitle () const
Returns
The subtitle of the header, or 0 if none has been set explicitly. The returned string is owned by the widget and must not be modified or freed.
Member Gtk::HeaderBar::get_title () const
Returns
The title of the header, or 0 if none has been set explicitly. The returned string is owned by the widget and must not be modified or freed.
Member Gtk::HeaderBar::pack_end (Gtk::Widget& child)
Parameters
childThe Gtk::Widget to be added to bar.
Member Gtk::HeaderBar::pack_start (Gtk::Widget& child)
Parameters
childThe Gtk::Widget to be added to bar.
Member Gtk::HeaderBar::set_custom_title (Gtk::Widget& title_widget)
Parameters
title_widgetA custom widget to use for a title.
Member Gtk::HeaderBar::set_show_close_button (bool setting=true)
Parameters
settingtrue to show standard widow decorations.
Member Gtk::HeaderBar::set_subtitle (const Glib::ustring& subtitle)
Parameters
subtitleA subtitle, or 0.
Member Gtk::HeaderBar::set_title (const Glib::ustring& title)
Parameters
titleA title, or 0.
Member Gtk::IconInfo::get_base_scale () const
Returns
The base scale.
Member Gtk::IconInfo::load_surface (const Glib::RefPtr< Gdk::Window >& for_window)
Parameters
for_windowGdk::Window to optimize drawing for, or 0.
Returns
The rendered icon; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. Use cairo_surface_destroy() to release your reference to the icon.
Member Gtk::IconTheme::choose_icon (const std::vector< Glib::ustring >& icon_names, int size, int scale, IconLookupFlags flags)
Parameters
icon_names0-terminated array of icon names to lookup.
sizeDesired icon size.
scaleDesired scale.
flagsFlags modifying the behavior of the icon lookup.
Returns
A Gtk::IconInfo object containing information about the icon, or 0 if the icon wasn’t found.
Member Gtk::IconTheme::load_icon (const Glib::ustring& icon_name, int size, int scale, IconLookupFlags flags=(IconLookupFlags) 0) const
Parameters
icon_nameThe name of the icon to lookup.
sizeThe desired icon size. The resulting icon may not be exactly this size; see Gtk::IconInfo::load_icon().
scaleDesired scale.
flagsFlags modifying the behavior of the icon lookup.
Returns
The rendered icon; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. Use Glib::object_unref() to release your reference to the icon. 0 if the icon isn’t found.
Member Gtk::IconTheme::load_surface (const Glib::ustring& icon_name, int size, int scale, const Glib::RefPtr< Gdk::Window >& for_window, IconLookupFlags flags=(IconLookupFlags) 0)
Parameters
icon_nameThe name of the icon to lookup.
sizeThe desired icon size. The resulting icon may not be exactly this size; see Gtk::IconInfo::load_icon().
scaleDesired scale.
for_windowGdk::Window to optimize drawing for, or 0.
flagsFlags modifying the behavior of the icon lookup.
Returns
The rendered icon; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. Use cairo_surface_destroy() to release your reference to the icon. 0 if the icon isn’t found.
Member Gtk::IconTheme::lookup_icon (const Glib::ustring& icon_name, int size, int scale, IconLookupFlags flags) const
Parameters
icon_nameThe name of the icon to lookup.
sizeDesired icon size.
scaleThe desired scale.
flagsFlags modifying the behavior of the icon lookup.
Returns
A Gtk::IconInfo object containing information about the icon, or 0 if the icon wasn’t found.
Member Gtk::IconTheme::lookup_icon (const Glib::RefPtr< const Gio::Icon >& icon, int size, int scale, IconLookupFlags flags) const
Parameters
iconThe Icon to look up.
sizeDesired icon size.
scaleThe desired scale.
flagsFlags modifying the behavior of the icon lookup.
Returns
A Gtk::IconInfo containing information about the icon, or 0 if the icon wasn’t found. Unref with Glib::object_unref().
Member Gtk::Image::set (const ::Cairo::RefPtr< ::Cairo::Surface >& surface)
Parameters
surfaceA cairo_surface_t.
Member Gtk::InfoBar::get_show_close_button () const
Returns
true if the widget displays standard close button.
Member Gtk::InfoBar::set_show_close_button (bool setting=true)
Parameters
settingtrue to include a close button.
Member Gtk::Label::get_lines () const
Returns
The number of lines.
Member Gtk::Label::set_lines (int lines)
Parameters
linesThe desired number of lines, or -1.
Class Gtk::ListBox
Member Gtk::ListBox::append (Widget& child)
Parameters
childThe Gtk::Widget to add.
Member Gtk::ListBox::drag_highlight_row (ListBoxRow& row)
Parameters
rowA Gtk::ListBoxRow.
Member Gtk::ListBox::drag_unhighlight_row ()
Member Gtk::ListBox::get_activate_on_single_click () const
Returns
true if rows are activated on single click, false otherwise.
Member Gtk::ListBox::get_adjustment ()
Returns
The adjustment.
Member Gtk::ListBox::get_adjustment () const
Returns
The adjustment.
Member Gtk::ListBox::get_row_at_index (int index)
Parameters
indexThe index of the row.
Returns
The child Gtk::Widget.
Member Gtk::ListBox::get_row_at_index (int index) const
Parameters
indexThe index of the row.
Returns
The child Gtk::Widget.
Member Gtk::ListBox::get_row_at_y (int y)
Parameters
yPosition.
Returns
The row.
Member Gtk::ListBox::get_row_at_y (int y) const
Parameters
yPosition.
Returns
The row.
Member Gtk::ListBox::get_selected_row ()
Returns
The selected Gtk::Widget.
Member Gtk::ListBox::get_selected_row () const
Returns
The selected Gtk::Widget.
Member Gtk::ListBox::get_selection_mode () const
Returns
A Gtk::SelectionMode.
Member Gtk::ListBox::insert (Widget& child, int position)
Parameters
childThe Gtk::Widget to add.
positionThe position to insert child in.
Member Gtk::ListBox::invalidate_filter ()
Member Gtk::ListBox::invalidate_headers ()
Member Gtk::ListBox::invalidate_sort ()
Member Gtk::ListBox::prepend (Widget& child)
Parameters
childThe Gtk::Widget to add.
Member Gtk::ListBox::select_row (ListBoxRow& row)
Parameters
rowThe row to select or 0.
Member Gtk::ListBox::set_activate_on_single_click (bool single=true)
Parameters
singleA boolean.
Member Gtk::ListBox::set_adjustment (const Glib::RefPtr< Adjustment >& adjustment)
Parameters
adjustmentThe adjustment, or 0.
Member Gtk::ListBox::set_filter_func (const SlotFilter& slot)
Member Gtk::ListBox::set_header_func (const SlotUpdateHeader& slot)
Member Gtk::ListBox::set_placeholder (Widget& placeholder)
Parameters
placeholderA Gtk::Widget or 0.
Member Gtk::ListBox::set_selection_mode (SelectionMode mode)
Parameters
modeThe Gtk::SelectionMode.
Member Gtk::ListBox::set_sort_func (const SlotSort& slot)
Member Gtk::ListBox::signal_row_activated ()
Parameters
rowThe activated row.
Member Gtk::ListBox::signal_row_selected ()
Parameters
rowThe selected row.
Member Gtk::ListBox::SlotFilter
Member Gtk::ListBox::SlotSort
Member Gtk::ListBox::SlotUpdateHeader
Member Gtk::ListBox::unselect_row ()
Member Gtk::ListBox::unset_filter_func ()
Member Gtk::ListBox::unset_header_func ()
Member Gtk::ListBox::unset_placeholder ()
Member Gtk::ListBox::unset_sort_func ()
Class Gtk::ListBoxRow
Member Gtk::ListBoxRow::changed ()
Member Gtk::ListBoxRow::get_header ()
Returns
The current header, or 0 if none.
Member Gtk::ListBoxRow::get_header () const
Returns
The current header, or 0 if none.
Member Gtk::ListBoxRow::get_index () const
Returns
The index of the row, or -1 if the row is not in a listbox.
Member Gtk::ListBoxRow::set_header (Widget& header)
Parameters
headerThe header.
Member Gtk::ListBoxRow::unset_header ()
Member Gtk::Menu::Menu (const Glib::RefPtr< Gio::MenuModel >& model)
Member Gtk::MenuBar::MenuBar (const Glib::RefPtr< Gio::MenuModel >& model)
Class Gtk::PlacesSidebar
Member Gtk::PlacesSidebar::add_shortcut (const Glib::RefPtr< Gio::File >& location)
Parameters
locationLocation to add as an application-specific shortcut.
Member Gtk::PlacesSidebar::get_location () const
Returns
A GFile with the selected location, or #0 if nothing is visually selected.
Member Gtk::PlacesSidebar::get_nth_bookmark (int n) const
Parameters
nIndex of the bookmark to query.
Returns
The bookmark specified by the index n, or #0 if no such index exist. Note that the indices start at 0, even though the file chooser starts them with the keyboard shortcut “Alt-1”.
Member Gtk::PlacesSidebar::get_open_flags () const
Returns
The Gtk::PlacesOpenFlags of sidebar.
Member Gtk::PlacesSidebar::get_show_connect_to_server () const
Returns
true if the sidebar will display a “Connect to Server” item.
Member Gtk::PlacesSidebar::get_show_desktop () const
Returns
true if the sidebar will display a builtin shortcut to the desktop folder.
Member Gtk::PlacesSidebar::list_shortcuts () const
Returns
A SList of File of the locations that have been added as application-specific shortcuts with add_shortcut(). To free this list, you can use
Member Gtk::PlacesSidebar::remove_shortcut (const Glib::RefPtr< Gio::File >& location)
Parameters
locationLocation to remove.
Member Gtk::PlacesSidebar::set_location (const Glib::RefPtr< const Gio::File >& location)
Parameters
locationLocation to select, or #0 for no current path.
Member Gtk::PlacesSidebar::set_open_flags (PlacesOpenFlags flags=PLACES_OPEN_NORMAL)
Parameters
flagsBitmask of modes in which the calling application can open locations.
Member Gtk::PlacesSidebar::set_show_connect_to_server (bool show_connect_to_server=true)
Parameters
show_connect_to_serverWhether to show an item for the Connect to Server command.
Member Gtk::PlacesSidebar::set_show_desktop (bool show_desktop=true)
Parameters
show_desktopWhether to show an item for the Desktop folder.
Member Gtk::PlacesSidebar::signal_drag_action_ask ()
Parameters
actionsPossible drag actions that need to be asked for.
Returns
The final drag action that the sidebar should pass to the drag side of the drag-and-drop operation.
Member Gtk::PlacesSidebar::signal_drag_action_requested ()
Parameters
contextGdk::DragContext with information about the drag operation.
dest_fileFile with the tentative location that is being hovered for a drop.
source_file_listList of File that are being dragged.
Returns
The drag action to use, for example, Gdk::ACTION_COPY or Gdk::ACTION_MOVE, or 0 if no action is allowed here (i.e. drops are not allowed in the specified dest_file).
Member Gtk::PlacesSidebar::signal_drag_perform_drop ()
Parameters
dest_fileDestination File.
source_file_listList of File that got dropped.
actionDrop action to perform.
Member Gtk::PlacesSidebar::signal_open_location ()
Parameters
locationFile to which the caller should switch.
open_flagsA single value from Gtk::PlacesOpenFlags specifying how the location should be opened.
Member Gtk::PlacesSidebar::signal_populate_popup ()
Parameters
menuA Gtk::Menu.
selected_itemFile with the item to which the menu should refer, or #0 in the case of a selected_volume.
selected_volumeVolume if the selected item is a volume, or #0 if it is a file.
Member Gtk::PlacesSidebar::signal_show_connect_to_server ()
Member Gtk::PlacesSidebar::signal_show_error_message ()
Parameters
primaryPrimary message with a summary of the error to show.
secondarySecondary message with details of the error to show.
Member Gtk::RadioToolButton::reset_group ()
Class Gtk::Revealer
Member Gtk::Revealer::get_child_revealed () const
Returns
true if the child is fully revealed.
Member Gtk::Revealer::get_reveal_child () const
Returns
true if the child is revealed.
Member Gtk::Revealer::get_transition_duration () const
Returns
The transition duration.
Member Gtk::Revealer::get_transition_type () const
Returns
The current transition type of revealer.
Member Gtk::Revealer::set_reveal_child (bool reveal_child=true)
Parameters
reveal_childtrue to reveal the child.
Member Gtk::Revealer::set_transition_duration (guint duration)
Parameters
durationThe new duration, in milliseconds.
Member Gtk::Revealer::set_transition_type (RevealerTransitionType transition)
Parameters
transitionThe new transition type.
Class Gtk::SearchBar
Member Gtk::SearchBar::connect_entry (Gtk::Entry& entry)
Parameters
entryA Gtk::Entry.
Member Gtk::SearchBar::get_search_mode () const
Returns
Whether search mode is toggled on.
Member Gtk::SearchBar::get_show_close_button () const
Returns
Whether the close button is shown.
Member Gtk::SearchBar::handle_event (GdkEventKey* event)
Parameters
eventA Gdk::Event containing key press events.
Returns
Gdk::EVENT_STOP if the key press event resulted in text being entered in the search entry (and revealing the search bar if necessary), Gdk::EVENT_PROPAGATE otherwise.
Member Gtk::SearchBar::set_search_mode (bool search_mode=true)
Parameters
search_modeThe new state of the search mode.
Member Gtk::SearchBar::set_show_close_button (bool visible=true)
Parameters
visibleWhether the close button will be shown or not.
Class Gtk::Stack
Member Gtk::Stack::add (Widget& child, const Glib::ustring& name)
Parameters
childThe widget to add.
nameThe name for child.
Member Gtk::Stack::add (Widget& child, const Glib::ustring& name, const Glib::ustring& title)
Parameters
childThe widget to add.
nameThe name for child.
titleA human-readable title for child.
Member Gtk::Stack::get_homogeneous () const
Returns
Whether stack is homogeneous.
Member Gtk::Stack::get_transition_duration () const
Returns
The transition duration.
Member Gtk::Stack::get_transition_type () const
Returns
The current transition type of stack.
Member Gtk::Stack::get_transition_type ()
Member Gtk::Stack::get_visible_child () const
Returns
The visible child of the Gtk::Stack.
Member Gtk::Stack::get_visible_child ()
Returns
The visible child of the Gtk::Stack.
Member Gtk::Stack::get_visible_child_name () const
Returns
The name of the visible child of the Gtk::Stack.
Member Gtk::Stack::set_homogeneous (bool homogeneous=true)
Parameters
homogeneoustrue to make stack homogeneous.
Member Gtk::Stack::set_transition_duration (guint duration)
Parameters
durationThe new duration, in milliseconds.
Member Gtk::Stack::set_transition_type (StackTransitionType transition)
Parameters
transitionThe new transition type.
Member Gtk::Stack::set_visible_child (Widget& child)
Parameters
childA child of stack.
Member Gtk::Stack::set_visible_child (const Glib::ustring& name)
Parameters
nameThe name of the child to make visible.
Member Gtk::Stack::set_visible_child (const Glib::ustring& name, StackTransitionType transition)
Parameters
nameThe name of the child to make visible.
transitionThe transition type to use.
Class Gtk::StackSwitcher
Member Gtk::StackSwitcher::get_stack () const
Returns
The stack, or 0 if none has been set explicitly.
Member Gtk::StackSwitcher::get_stack ()
Returns
The stack, or 0 if none has been set explicitly.
Member Gtk::StackSwitcher::set_stack (Stack& stack)
Parameters
stackA Gtk::Stack.
Member Gtk::StyleContext::set_scale (int scale)
Parameters
scaleScale.
Member Gtk::Widget::drag_begin (const Glib::RefPtr< TargetList >& targets, Gdk::DragAction actions, int button, GdkEvent* event, int x, int y)
Parameters
widgetThe source widget.
targetsThe targets (data formats) in which the source can provide the data.
actionsA bitmask of the allowed drag actions for this drag.
buttonThe button the user clicked to start the drag.
eventThe event that triggered the start of the drag.
xThe initial x coordinate to start dragging from, in the coordinate space of widget. If -1 is passed, the coordinates are retrieved from event or the current pointer position.
yThe initial y coordinate to start dragging from, in the coordinate space of widget. If -1 is passed, the coordinates are retrieved from event or the current pointer position.
Returns
The context for this drag.
Member Gtk::Widget::get_allocated_baseline () const
Returns
The baseline of the widget, or -1 if none.
Member Gtk::Widget::get_preferred_height_for_width (int width, int& minimum_height, int& natural_height, int& minimum_baseline, int& natural_baseline) const
Parameters
widthThe width which is available for allocation, or -1 if none.
minimum_heightLocation for storing the minimum height, or 0.
natural_heightLocation for storing the natural height, or 0.
minimum_baselineLocation for storing the baseline for the minimum height, or 0.
natural_baselineLocation for storing the baseline for the natural height, or 0.
Member Gtk::Widget::get_scale_factor () const
Returns
The scale factor for widget.
Member Gtk::Widget::get_valign_with_baseline () const
Returns
The vertical alignment of widget.
Member Gtk::Widget::remove_action_group (const Glib::ustring& name)
Member Gtk::Widget::size_allocate (const Allocation& allocation, int baseline)
Parameters
allocationPosition and size to be allocated to widget.
baselineThe baseline of the child, or -1.
Member Gtk::Window::close ()
Member Gtk::Window::set_titlebar (Widget& titlebar)
Parameters
titlebarThe widget to use as titlebar.