gtkmm: Gtk::Window Class Reference

gtkmm 2.24.4

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions

# Gtk::Window Class Reference
Widgets

Toplevel Window This represents all widgets which are physical windows controlled by the window manager. More...

Inheritance diagram for Gtk::Window:
[legend]
Collaboration diagram for Gtk::Window:
[legend]

List of all members.

## Public Member Functions
virtual | ~Window ()
GtkWindow* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkWindow* | gobj () const
| Provides access to the underlying C GtkObject.
| Window (WindowType type=WINDOW_TOPLEVEL)
Glib::PropertyProxy_ReadOnly < WindowType > | property_type () const
| The type of the window.
Glib::PropertyProxy < Glib::ustring > | property_title ()
| The title of the window.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_title () const
| The title of the window.
Glib::PropertyProxy_WriteOnly < Glib::ustring > | property_startup_id ()
| Unique startup identifier for the window used by startup-notification.
Glib::PropertyProxy< bool > | property_allow_shrink ()
| If TRUE, the window has no mimimum size.
Glib::PropertyProxy_ReadOnly < bool > | property_allow_shrink () const
| If TRUE, the window has no mimimum size.
Glib::PropertyProxy< bool > | property_allow_grow ()
| If TRUE, users can expand the window beyond its minimum size.
Glib::PropertyProxy_ReadOnly < bool > | property_allow_grow () const
| If TRUE, users can expand the window beyond its minimum size.
Glib::PropertyProxy< bool > | property_resizable ()
| If TRUE, users can resize the window.
Glib::PropertyProxy_ReadOnly < bool > | property_resizable () const
| If TRUE, users can resize the window.
Glib::PropertyProxy< bool > | property_modal ()
| If TRUE, the window is modal (other windows are not usable while this one is up).
Glib::PropertyProxy_ReadOnly < bool > | property_modal () const
| If TRUE, the window is modal (other windows are not usable while this one is up).
Glib::PropertyProxy < WindowPosition > | property_window_position ()
| The initial position of the window.
Glib::PropertyProxy_ReadOnly < WindowPosition > | property_window_position () const
| The initial position of the window.
Glib::PropertyProxy< int > | property_default_width ()
| The default width of the window, used when initially showing the window.
Glib::PropertyProxy_ReadOnly< int > | property_default_width () const
| The default width of the window, used when initially showing the window.
Glib::PropertyProxy< int > | property_default_height ()
| The default height of the window, used when initially showing the window.
Glib::PropertyProxy_ReadOnly< int > | property_default_height () const
| The default height of the window, used when initially showing the window.
Glib::PropertyProxy< bool > | property_destroy_with_parent ()
| If this window should be destroyed when the parent is destroyed.
Glib::PropertyProxy_ReadOnly < bool > | property_destroy_with_parent () const
| If this window should be destroyed when the parent is destroyed.
Glib::PropertyProxy < Glib::RefPtr< Gdk::Pixbuf > > | property_icon ()
| Icon for this window.
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Gdk::Pixbuf > > | property_icon () const
| Icon for this window.
Glib::PropertyProxy< bool > | property_mnemonics_visible ()
| Whether mnemonics are currently visible in this window.
Glib::PropertyProxy_ReadOnly < bool > | property_mnemonics_visible () const
| Whether mnemonics are currently visible in this window.
Glib::PropertyProxy < Glib::ustring > | property_icon_name ()
| Name of the themed icon for this window.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_icon_name () const
| Name of the themed icon for this window.
Glib::PropertyProxy < Glib::RefPtr< Gdk::Screen > > | property_screen ()
| The screen where this window will be displayed.
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Gdk::Screen > > | property_screen () const
| The screen where this window will be displayed.
Glib::PropertyProxy_ReadOnly < bool > | property_is_active () const
| Whether the toplevel is the current active window.
Glib::PropertyProxy_ReadOnly < bool > | property_has_toplevel_focus () const
| Whether the input focus is within this GtkWindow.
Glib::PropertyProxy < GdkWindowTypeHint > | property_type_hint ()
| Hint to help the desktop environment understand what kind of window this is and how to treat it.
Glib::PropertyProxy_ReadOnly < GdkWindowTypeHint > | property_type_hint () const
| Hint to help the desktop environment understand what kind of window this is and how to treat it.
Glib::PropertyProxy< bool > | property_skip_taskbar_hint ()
| TRUE if the window should not be in the task bar.
Glib::PropertyProxy_ReadOnly < bool > | property_skip_taskbar_hint () const
| TRUE if the window should not be in the task bar.
Glib::PropertyProxy< bool > | property_skip_pager_hint ()
| TRUE if the window should not be in the pager.
Glib::PropertyProxy_ReadOnly < bool > | property_skip_pager_hint () const
| TRUE if the window should not be in the pager.
Glib::PropertyProxy < Glib::ustring > | property_role ()
| Unique identifier for the window to be used when restoring a session.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_role () const
| Unique identifier for the window to be used when restoring a session.
Glib::PropertyProxy< bool > | property_decorated ()
| Whether the window should be decorated by the window manager.
Glib::PropertyProxy_ReadOnly < bool > | property_decorated () const
| Whether the window should be decorated by the window manager.
Glib::PropertyProxy< Gdk::Gravity > | property_gravity ()
| The window gravity of the window.
Glib::PropertyProxy_ReadOnly < Gdk::Gravity > | property_gravity () const
| The window gravity of the window.
Glib::PropertyProxy< Window* > | property_transient_for ()
| The transient parent of the dialog.
Glib::PropertyProxy_ReadOnly < Window* > | property_transient_for () const
| The transient parent of the dialog.
Glib::PropertyProxy< double > | property_opacity ()
| The opacity of the window, from 0 to 1.
Glib::PropertyProxy_ReadOnly < double > | property_opacity () const
| The opacity of the window, from 0 to 1.
Glib::PropertyProxy< bool > | property_urgency_hint ()
| TRUE if the window should be brought to the user's attention.
Glib::PropertyProxy_ReadOnly < bool > | property_urgency_hint () const
| TRUE if the window should be brought to the user's attention.
Glib::PropertyProxy< bool > | property_accept_focus ()
| TRUE if the window should receive the input focus.
Glib::PropertyProxy_ReadOnly < bool > | property_accept_focus () const
| TRUE if the window should receive the input focus.
Glib::PropertyProxy< bool > | property_focus_on_map ()
| TRUE if the window should receive the input focus when mapped.
Glib::PropertyProxy_ReadOnly < bool > | property_focus_on_map () const
| TRUE if the window should receive the input focus when mapped.
Glib::PropertyProxy< bool > | property_deletable ()
| Whether the window frame should have a close button.
Glib::PropertyProxy_ReadOnly < bool > | property_deletable () const
| Whether the window frame should have a close button.
bool | is_toplevel () const
bool | is_popup () const
Glib::RefPtr< Gdk::Window > | get_frame ()
Glib::RefPtr< const Gdk::Window > | get_frame () const
Glib::SignalProxy1< void, Widget* > | signal_set_focus ()
Glib::SignalProxy1< bool, GdkEvent* > | signal_frame_event ()
void | set_title (const Glib::ustring& title)
| Sets the title of the Gtk::Window.
Glib::ustring | get_title () const
| Retrieves the title of the window.
void | set_wmclass (const Glib::ustring& wmclass_name, const Glib::ustring& wmclass_class)
| Don't use this function.
void | set_role (const Glib::ustring& role)
| This function is only useful on X11, not with other GTK+ targets.
Glib::ustring | get_role () const
| Returns the role of the window.
void | add_accel_group (const Glib::RefPtr< AccelGroup >& accel_group)
| Associate accel_group with window, such that calling gtk_accel_groups_activate() on window will activate accelerators in accel_group.
void | remove_accel_group (const Glib::RefPtr< AccelGroup >& accel_group)
| Reverses the effects of add_accel_group().
void | set_position (WindowPosition position)
| Sets a position constraint for this window.
bool | activate_focus ()
| Activates the current focused widget within the window.
void | set_focus (Gtk::Widget& focus)
| If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window.
void | unset_focus ()
Widget* | get_focus ()
| Retrieves the current focused widget within the window.
const Widget* | get_focus () const
| Retrieves the current focused widget within the window.
void | set_default (Gtk::Widget& default_widget)
| The default widget is the widget that's activated when the user presses Enter in a dialog (for example).
void | unset_default ()
bool | activate_default ()
| Activates the default widget for the window, unless the current focused widget has been configured to receive the default action (see Gtk::Widget::set_receives_default()), in which case the focused widget is activated.
void | set_transient_for (Window& parent)
| Dialog windows should be set transient for the main application window they were spawned from.
void | unset_transient_for ()
| Unsets the current transient window.
Window* | get_transient_for ()
| Fetches the transient parent for this window.
const Window* | get_transient_for () const
| Fetches the transient parent for this window.
void | set_opacity (double opacity)
| Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque.
double | get_opacity () const
| Fetches the requested opacity for this window.
void | set_type_hint (Gdk::WindowTypeHint hint)
| By setting the type hint for the window, you allow the window manager to decorate and handle the window in a way which is suitable to the function of the window in your application.
Gdk::WindowTypeHint | get_type_hint () const
| Gets the type hint for this window.
void | set_skip_taskbar_hint (bool setting=true)
| Windows may set a hint asking the desktop environment not to display the window in the task bar.
bool | get_skip_taskbar_hint () const
| Gets the value set by set_skip_taskbar_hint()
void | set_skip_pager_hint (bool setting=true)
| Windows may set a hint asking the desktop environment not to display the window in the pager.
bool | get_skip_pager_hint () const
| Gets the value set by set_skip_pager_hint().
void | set_urgency_hint (bool setting=true)
| Windows may set a hint asking the desktop environment to draw the users attention to the window.
bool | get_urgency_hint () const
| Gets the value set by set_urgency_hint()
void | set_accept_focus (bool setting=true)
| Windows may set a hint asking the desktop environment not to receive the input focus.
bool | get_accept_focus () const
| Gets the value set by set_accept_focus().
void | set_focus_on_map (bool setting=true)
| Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped.
bool | get_focus_on_map () const
| Gets the value set by set_focus_on_map().
bool | get_destroy_with_parent () const
| Returns whether the window will be destroyed with its transient parent.
void | set_mnemonics_visible (bool setting=true)
| Sets the Gtk::Window:mnemonics-visible property.
bool | get_mnemonics_visible () const
void | set_resizable (bool resizable=true)
| Sets whether the user can resize a window.
bool | get_resizable () const
| Gets the value set by set_resizable().
void | set_gravity (Gdk::Gravity gravity)
| Window gravity defines the meaning of coordinates passed to move().
Gdk::Gravity | get_gravity () const
| Gets the value set by set_gravity().
void | set_geometry_hints (Widget& geometry_widget, const Gdk::Geometry& geometry, Gdk::WindowHints geom_mask)
| This function sets up hints about how a window can be resized by the user.
void | set_screen (const Glib::RefPtr< Gdk::Screen >& screen)
| Sets the Gdk::Screen where the window is displayed; if the window is already mapped, it will be unmapped, and then remapped on the new screen.
Glib::RefPtr< Gdk::Screen > | get_screen ()
| Returns the Gdk::Screen associated with window.
Glib::RefPtr< const Gdk::Screen > | get_screen () const
| Returns the Gdk::Screen associated with window.
void | set_has_frame (bool setting=true)
| (Note: this is a special-purpose function for the framebuffer port, that causes GTK+ to draw its own window border.
bool | get_has_frame () const
| Accessor for whether the window has a frame window exterior to window->window.
void | set_frame_dimensions (int left, int top, int right, int bottom)
| (Note: this is a special-purpose function intended for the framebuffer port; see set_has_frame().
void | get_frame_dimensions (int& left, int& top, int& right, int& bottom) const
| (Note: this is a special-purpose function intended for the framebuffer port; see set_has_frame().
void | set_decorated (bool setting=true)
| By default, windows are decorated with a title bar, resize controls, etc.
bool | get_decorated () const
| Returns whether the window has been set to have decorations such as a title bar via set_decorated().
void | set_deletable (bool setting=true)
| By default, windows have a close button in the window frame.
bool | get_deletable () const
| Returns whether the window has been set to have a close button via set_deletable().
Glib::ListHandle< Glib::RefPtr < Gdk::Pixbuf > > | get_icon_list ()
| Retrieves the list of icons set by set_icon_list().
Glib::ListHandle< Glib::RefPtr < const Gdk::Pixbuf > > | get_icon_list () const
| Retrieves the list of icons set by set_icon_list().
void | set_icon_list (const Glib::ListHandle< Glib::RefPtr< Gdk::Pixbuf > >& list)
| Sets up the icon representing a Gtk::Window.
void | set_icon (const Glib::RefPtr< Gdk::Pixbuf >& icon)
| Sets up the icon representing a Gtk::Window.
void | set_icon_name (const Glib::ustring& name)
| Sets the icon for the window from a named themed icon.
bool | set_icon_from_file (const std::string& filename)
| Sets the icon for the window.
Glib::RefPtr< Gdk::Pixbuf > | get_icon ()
| Gets the value set by set_icon() (or if you've called set_icon_list(), gets the first icon in the icon list).
Glib::RefPtr< const Gdk::Pixbuf > | get_icon () const
| Gets the value set by set_icon() (or if you've called set_icon_list(), gets the first icon in the icon list).
Glib::ustring | get_icon_name () const
| Returns the name of the themed icon for the window, see set_icon_name().
void | set_modal (bool modal=true)
| Sets a window modal or non-modal.
bool | get_modal () const
| Returns whether the window is modal.
void | add_mnemonic (guint keyval, Widget& target)
| Adds a mnemonic to this window.
void | remove_mnemonic (guint keyval, Widget& target)
| Removes a mnemonic from this window.
bool | mnemonic_activate (guint keyval, Gdk::ModifierType modifier)
| Activates the targets associated with the mnemonic.
void | set_mnemonic_modifier (Gdk::ModifierType modifier)
| Sets the mnemonic modifier for this window.
Gdk::ModifierType | get_mnemonic_modifier ()
| Returns the mnemonic modifier for this window.
void | present ()
| Presents a window to the user.
void | present (guint32 timestamp)
| Presents a window to the user in response to a user interaction.
void | iconify ()
| Asks to iconify (i.e. minimize) the specified window.
void | deiconify ()
| Asks to deiconify (i.e. unminimize) the specified window.
void | stick ()
| Asks to stick window, which means that it will appear on all user desktops.
void | unstick ()
| Asks to unstick window, which means that it will appear on only one of the user's desktops.
void | maximize ()
| Asks to maximize window, so that it becomes full-screen.
void | unmaximize ()
| Asks to unmaximize window.
void | fullscreen ()
| Asks to place window in the fullscreen state.
void | unfullscreen ()
| Asks to toggle off the fullscreen state for window.
void | begin_resize_drag (Gdk::WindowEdge edge, int button, int root_x, int root_y, guint32 timestamp)
| Starts resizing a window.
void | begin_move_drag (int button, int root_x, int root_y, guint32 timestamp)
| Starts moving a window.
void | set_default_size (int width, int height)
| Sets the default size of a window.
void | get_default_size (int& width, int& height) const
| Gets the default size of the window.
void | resize (int width, int height)
| Resizes the window as if the user had done so, obeying geometry constraints.
void | get_size (int& width, int& height) const
| Obtains the current size of window.
void | move (int x, int y)
| Asks the has a nice table of gravities in the "implementation notes" section.
void | get_position (int& root_x, int& root_y) const
| This function returns the position you need to pass to move() to keep window in its current position.
bool | parse_geometry (const Glib::ustring& geometry)
| Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this.
Glib::RefPtr< WindowGroup > | get_group ()
| Returns the group for window or the default group, if window is `0` or if window does not have an explicit window group.
Glib::RefPtr< const WindowGroup > | get_group () const
| Returns the group for window or the default group, if window is `0` or if window does not have an explicit window group.
WindowType | get_window_type () const
| Gets the type of the window.
void | reshow_with_initial_size ()
| Hides window, then reshows it, resetting the default size and position of the window.
void | set_keep_above (bool setting=true)
| Asks to keep window above, so that it stays on top.
void | set_keep_below (bool setting=true)
| Asks to keep window below, so that it stays in bottom.
Glib::RefPtr< AccelGroup > | get_accel_group ()
| Returns a default accel group for this window This is a gtkmm-specific function.
virtual void | raise ()
| Brings the window to the front.
virtual void | set_manage ()
| Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no parent container.
## Static Public Member Functions
static void | set_default_icon_list (const Glib::ListHandle< Glib::RefPtr< Gdk::Pixbuf > >& list)
| Sets an icon list to be used as fallback for windows that haven't had set_icon_list() called on them to set up a window-specific icon list.
static Glib::ListHandle < Glib::RefPtr< Gdk::Pixbuf > > | get_default_icon_list ()
| Gets the value set by Gtk::Window::set_default_icon_list().
static void | set_default_icon (const Glib::RefPtr< Gdk::Pixbuf >& icon)
| Sets an icon to be used as fallback for windows that haven't had set_icon() called on them from a pixbuf.
static void | set_default_icon_name (const Glib::ustring& name)
| Sets an icon to be used as fallback for windows that haven't had set_icon_list() called on them from a named themed icon, see set_icon_name().
static bool | set_default_icon_from_file (const std::string& filename)
| Sets an icon to be used as fallback for windows that haven't had set_icon_list() called on them from a file on disk.
static void | set_auto_startup_notification (bool setting=true)
| By default, after showing the first Gtk::Window, GTK+ calls gdk_notify_startup_complete().
static Glib::ListHandle< Window* > | list_toplevels ()
| Returns a list of all existing toplevel windows.
## Protected Member Functions
virtual void | on_set_focus (Widget* focus)
virtual bool | on_frame_event (GdkEvent* event)
void | destroy_ ()
## Related Functions
(Note that these are not member functions.)
Gtk::Window* | wrap (GtkWindow* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Toplevel Window This represents all widgets which are physical windows controlled by the window manager.

The window will be hidden when the window manager's close button is clicked. Override on_delete_event() to stop this.

Gtk::manage() has no effect on Windows because they have no parent Containers.

## Constructor & Destructor Documentation

virtual Gtk::Window::~Window | ( |  | ) | `[virtual]`

Gtk::Window::Window | ( | WindowType | type = `WINDOW_TOPLEVEL` | ) | `[explicit]`

## Member Function Documentation

bool Gtk::Window::activate_default | ( |  | ) |

Activates the default widget for the window, unless the current focused widget has been configured to receive the default action (see Gtk::Widget::set_receives_default()), in which case the focused widget is activated.

Returns:
  `true` if a widget got activated.

bool Gtk::Window::activate_focus | ( |  | ) |

Activates the current focused widget within the window.

Returns:
  `true` if a widget got activated.

void Gtk::Window::add_accel_group | ( | const Glib::RefPtr< AccelGroup >& | accel_group | ) |

Associate accel_group with window, such that calling gtk_accel_groups_activate() on window will activate accelerators in accel_group.

Parameters:

  accel_group | A Gtk::AccelGroup.

void Gtk::Window::add_mnemonic | ( | guint | keyval,
|  | Widget& | target
| ) |  |

Adds a mnemonic to this window.

Parameters:

  keyval | The mnemonic.
  target | The widget that gets activated by the mnemonic.

void Gtk::Window::begin_move_drag | ( | int | button,
|  | int | root_x,
|  | int | root_y,
|  | guint32 | timestamp
| ) |  |

Starts moving a window.

This function is used if an application has window movement grips. When GDK can support it, the window movement will be done using the standard mechanism for the or windowing system. Otherwise, GDK will try to emulate window movement, potentially not all that well, depending on the windowing system.

Parameters:

  button | Mouse button that initiated the drag.
  root_x | X position where the user clicked to initiate the drag, in root window coordinates.
  root_y | Y position where the user clicked to initiate the drag.
  timestamp | Timestamp from the click event that initiated the drag.

void Gtk::Window::begin_resize_drag | ( | Gdk::WindowEdge | edge,
|  | int | button,
|  | int | root_x,
|  | int | root_y,
|  | guint32 | timestamp
| ) |  |

Starts resizing a window.

This function is used if an application has window resizing controls. When GDK can support it, the resize will be done using the standard mechanism for the or windowing system. Otherwise, GDK will try to emulate window resizing, potentially not all that well, depending on the windowing system.

Parameters:

  button | Mouse button that initiated the drag.
  edge | Position of the resize control.
  root_x | X position where the user clicked to initiate the drag, in root window coordinates.
  root_y | Y position where the user clicked to initiate the drag.
  timestamp | Timestamp from the click event that initiated the drag.

void Gtk::Window::deiconify | ( |  | ) |

Asks to deiconify (i.e. unminimize) the specified window.

Note that you shouldn't assume the window is definitely deiconified afterward, because other entities (e.g. the user or ) could iconify it again before your code which assumes deiconification gets to run.

You can track iconification via the "window-state-event" signal on Gtk::Widget.

void Gtk::Window::destroy_ | ( |  | ) | `[protected]`

void Gtk::Window::fullscreen | ( |  | ) |

Asks to place window in the fullscreen state.

Note that you shouldn't assume the window is definitely full screen afterward, because other entities (e.g. the user or ) could unfullscreen it again, and not all window managers honor requests to fullscreen windows. But normally the window will end up fullscreen. Just don't write code that crashes if not.

You can track the fullscreen state via the "window-state-event" signal on Gtk::Widget.

Since gtkmm 2.2:

Glib::RefPtr<AccelGroup> Gtk::Window::get_accel_group | ( |  | ) |

Returns a default accel group for this window This is a gtkmm-specific function.

This accel group can not be removed.

bool Gtk::Window::get_accept_focus | ( |  | ) | const

Gets the value set by set_accept_focus().

Since gtkmm 2.4:

Returns:
  `true` if window should receive the input focus.

bool Gtk::Window::get_decorated | ( |  | ) | const

Returns whether the window has been set to have decorations such as a title bar via set_decorated().

Returns:
  `true` if the window has been set to have decorations.

static Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > Gtk::Window::get_default_icon_list | ( |  | ) | `[static]`

Gets the value set by Gtk::Window::set_default_icon_list().

Returns:
  Copy of default icon list.

void Gtk::Window::get_default_size | ( | int & | width,
|  | int & | height
| ) |  | const

Gets the default size of the window.

A value of -1 for the width or height indicates that a default size has not been explicitly set for that dimension, so the "natural" size of the window will be used.

Parameters:

  width | Location to store the default width.
  height | Location to store the default height.

bool Gtk::Window::get_deletable | ( |  | ) | const

Returns whether the window has been set to have a close button via set_deletable().

Since gtkmm 2.10:

Returns:
  `true` if the window has been set to have a close button.

bool Gtk::Window::get_destroy_with_parent | ( |  | ) | const

Returns whether the window will be destroyed with its transient parent.

See set_destroy_with_parent().

Returns:
  `true` if the window will be destroyed with its transient parent.

Widget* Gtk::Window::get_focus | ( |  | ) |

Retrieves the current focused widget within the window.

Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then `gtk_widget_has_focus (widget)` will not be `true` for the widget.

Returns:
  The currently focused widget, or `0` if there is none.

const Widget* Gtk::Window::get_focus | ( |  | ) | const

Retrieves the current focused widget within the window.

Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then `gtk_widget_has_focus (widget)` will not be `true` for the widget.

Returns:
  The currently focused widget, or `0` if there is none.

bool Gtk::Window::get_focus_on_map | ( |  | ) | const

Gets the value set by set_focus_on_map().

Since gtkmm 2.6:

Returns:
  `true` if window should receive the input focus when mapped.

Glib::RefPtr<Gdk::Window> Gtk::Window::get_frame | ( |  | ) |

Deprecated:
  You should not need to call this method.

Glib::RefPtr<const Gdk::Window> Gtk::Window::get_frame | ( |  | ) | const

void Gtk::Window::get_frame_dimensions | ( | int & | left,
|  | int & | top,
|  | int & | right,
|  | int & | bottom
| ) |  | const

(Note: this is a special-purpose function intended for the framebuffer port; see set_has_frame().

It will not return the size of the window border drawn by the , which is the normal case when using a windowing system. See gdk_window_get_frame_extents() to get the standard window border extents.)

Retrieves the dimensions of the frame window for this toplevel. See set_has_frame(), set_frame_dimensions().

Deprecated: 2.24: This function will be removed in GTK+ 3

Parameters:

  left | Location to store the width of the frame at the left.
  top | Location to store the height of the frame at the top.
  right | Location to store the width of the frame at the returns.
  bottom | Location to store the height of the frame at the bottom.

Gdk::Gravity Gtk::Window::get_gravity | ( |  | ) | const

Gets the value set by set_gravity().

Returns:
  Window gravity.

Glib::RefPtr<WindowGroup> Gtk::Window::get_group | ( |  | ) |

Returns the group for window or the default group, if window is `0` or if window does not have an explicit window group.

Since gtkmm 2.10:

Returns:
  The Gtk::WindowGroup for a window or the default group.

Glib::RefPtr<const WindowGroup> Gtk::Window::get_group | ( |  | ) | const

Returns the group for window or the default group, if window is `0` or if window does not have an explicit window group.

Since gtkmm 2.10:

Returns:
  The Gtk::WindowGroup for a window or the default group.

bool Gtk::Window::get_has_frame | ( |  | ) | const

Accessor for whether the window has a frame window exterior to window->window.

Gets the value set by set_has_frame().

Deprecated: 2.24: This function will be removed in GTK+ 3

Returns:
  `true` if a frame has been added to the window via set_has_frame().

Glib::RefPtr<Gdk::Pixbuf> Gtk::Window::get_icon | ( |  | ) |

Gets the value set by set_icon() (or if you've called set_icon_list(), gets the first icon in the icon list).

Returns:
  Icon for window.

Glib::RefPtr<const Gdk::Pixbuf> Gtk::Window::get_icon | ( |  | ) | const

Gets the value set by set_icon() (or if you've called set_icon_list(), gets the first icon in the icon list).

Returns:
  Icon for window.

Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > Gtk::Window::get_icon_list | ( |  | ) |

Retrieves the list of icons set by set_icon_list().

The list is copied, but the reference count on each member won't be incremented.

Returns:
  Copy of window's icon list.

Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> > Gtk::Window::get_icon_list | ( |  | ) | const

Retrieves the list of icons set by set_icon_list().

The list is copied, but the reference count on each member won't be incremented.

Returns:
  Copy of window's icon list.

Glib::ustring Gtk::Window::get_icon_name | ( |  | ) | const

Returns the name of the themed icon for the window, see set_icon_name().

Since gtkmm 2.6:

Returns:
  The icon name or `0` if the window has no themed icon.

Gdk::ModifierType Gtk::Window::get_mnemonic_modifier | ( |  | ) |

Returns the mnemonic modifier for this window.

See set_mnemonic_modifier().

Returns:
  The modifier mask used to activate mnemonics on this window.

bool Gtk::Window::get_mnemonics_visible | ( |  | ) | const

bool Gtk::Window::get_modal | ( |  | ) | const

Returns whether the window is modal.

See set_modal().

Returns:
  `true` if the window is set to be modal and establishes a grab when shown.

double Gtk::Window::get_opacity | ( |  | ) | const

Fetches the requested opacity for this window.

See set_opacity().

Since gtkmm 2.12:

Returns:
  The requested opacity for this window.

void Gtk::Window::get_position | ( | int & | root_x,
|  | int & | root_y
| ) |  | const

This function returns the position you need to pass to move() to keep window in its current position.

This means that the meaning of the returned value varies with window gravity. See move() for more details.

If you haven't changed the window gravity, its gravity will be Gdk::GRAVITY_NORTH_WEST. This means that get_position() gets the position of the top-left corner of the window manager frame for the window. move() sets the position of this same top-left corner.

get_position() is not 100% reliable because the X Window System does not specify a way to obtain the geometry of the decorations placed on a window by the window manager. Thus GTK+ is using a "best guess" that works with most window managers.

Moreover, nearly all window managers are historically broken with respect to their handling of window gravity. So moving a window to its current position as returned by get_position() tends to result in moving the window slightly. Window managers are slowly getting better over time.

If a window has gravity Gdk::GRAVITY_STATIC the window manager frame is not relevant, and thus get_position() will always produce accurate results. However you can't use static gravity to do things like place a window in a corner of the screen, because static gravity ignores the window manager decorations.

If you are saving and restoring your application's window positions, you should know that it's impossible for applications to do this without getting it somewhat wrong because applications do not have sufficient knowledge of window manager state. The Correct Mechanism is to support the session management protocol (see the "GnomeClient" object in the GNOME libraries for example) and allow the window manager to save your window sizes and positions.

Parameters:

  root_x | Return location for X coordinate of gravity-determined reference point.
  root_y | Return location for Y coordinate of gravity-determined reference point.

bool Gtk::Window::get_resizable | ( |  | ) | const

Gets the value set by set_resizable().

Returns:
  `true` if the user can resize the window.

Glib::ustring Gtk::Window::get_role | ( |  | ) | const

Returns the role of the window.

See set_role() for further explanation.

Returns:
  The role of the window if set, or `0`. The returned is owned by the widget and must not be modified or freed.

Glib::RefPtr<const Gdk::Screen> Gtk::Window::get_screen | ( |  | ) | const

Returns the Gdk::Screen associated with window.

Since gtkmm 2.2:

Returns:
  A Gdk::Screen.

Reimplemented from Gtk::Widget.

Glib::RefPtr<Gdk::Screen> Gtk::Window::get_screen | ( |  | ) |

Returns the Gdk::Screen associated with window.

Since gtkmm 2.2:

Returns:
  A Gdk::Screen.

Reimplemented from Gtk::Widget.

void Gtk::Window::get_size | ( | int & | width,
|  | int & | height
| ) |  | const

Obtains the current size of window.

If window is not onscreen, it returns the size GTK+ will suggest to the a better way than doing it yourself - set_position() will frequently handle the details for you.

Parameters:

  width | Return location for width.
  height | Return location for height.

bool Gtk::Window::get_skip_pager_hint | ( |  | ) | const

Gets the value set by set_skip_pager_hint().

Since gtkmm 2.2:

Returns:
  `true` if window shouldn't be in pager.

bool Gtk::Window::get_skip_taskbar_hint | ( |  | ) | const

Gets the value set by set_skip_taskbar_hint()

Since gtkmm 2.2:

Returns:
  `true` if window shouldn't be in taskbar.

Glib::ustring Gtk::Window::get_title | ( |  | ) | const

Retrieves the title of the window.

See set_title().

Returns:
  The title of the window, or `0` if none has been set explicitely. The returned string is owned by the widget and must not be modified or freed.

Window* Gtk::Window::get_transient_for | ( |  | ) |

Fetches the transient parent for this window.

See set_transient_for().

Returns:
  The transient parent for this window, or `0` if no transient parent has been set.

const Window* Gtk::Window::get_transient_for | ( |  | ) | const

Fetches the transient parent for this window.

See set_transient_for().

Returns:
  The transient parent for this window, or `0` if no transient parent has been set.

Gdk::WindowTypeHint Gtk::Window::get_type_hint | ( |  | ) | const

Gets the type hint for this window.

See set_type_hint().

Returns:
  The type hint for window.

bool Gtk::Window::get_urgency_hint | ( |  | ) | const

Gets the value set by set_urgency_hint()

Since gtkmm 2.8:

Returns:
  `true` if window is urgent.

WindowType Gtk::Window::get_window_type | ( |  | ) | const

Gets the type of the window.

See Gtk::WindowType.

Since gtkmm 2.20:

Returns:
  The type of the window.

const GtkWindow* Gtk::Window::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Bin.

Reimplemented in Gtk::AboutDialog, Gtk::Assistant, Gtk::ColorSelectionDialog, Gtk::Dialog, Gtk::FileChooserDialog, Gtk::FileSelection, Gtk::FontSelectionDialog, Gtk::MessageDialog, Gtk::OffscreenWindow, Gtk::Plug, Gtk::RecentChooserDialog, Gtk::PageSetupUnixDialog, Gtk::PrintUnixDialog, and Gtk::InputDialog.

GtkWindow* Gtk::Window::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Bin.

Reimplemented in Gtk::AboutDialog, Gtk::Assistant, Gtk::ColorSelectionDialog, Gtk::Dialog, Gtk::FileChooserDialog, Gtk::FileSelection, Gtk::FontSelectionDialog, Gtk::MessageDialog, Gtk::OffscreenWindow, Gtk::Plug, Gtk::RecentChooserDialog, Gtk::PageSetupUnixDialog, Gtk::PrintUnixDialog, and Gtk::InputDialog.

void Gtk::Window::iconify | ( |  | ) |

Asks to iconify (i.e. minimize) the specified window.

Note that you shouldn't assume the window is definitely iconified afterward, because other entities (e.g. the user or ) could deiconify it again, or there may not be a window manager in which case iconification isn't possible, etc. But normally the window will end up iconified. Just don't write code that crashes if not.

It's permitted to call this function before showing a window, in which case the window will be iconified before it ever appears onscreen.

You can track iconification via the "window-state-event" signal on Gtk::Widget.

bool Gtk::Window::is_popup | ( |  | ) | const

Deprecated:
  Use get_window_type().

bool Gtk::Window::is_toplevel | ( |  | ) | const

Deprecated:
  Use Gtk::Widget::is_toplevel().

Reimplemented from Gtk::Widget.

static Glib::ListHandle<Window*> Gtk::Window::list_toplevels | ( |  | ) | `[static]`

Returns a list of all existing toplevel windows.

The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call `g_list_foreach (result, (GFunc)g_object_ref, `0`)` first, and then unref all the widgets afterwards.

Returns:
  List of toplevel widgets.

void Gtk::Window::maximize | ( |  | ) |

Asks to maximize window, so that it becomes full-screen.

Note that you shouldn't assume the window is definitely maximized afterward, because other entities (e.g. the user or ) could unmaximize it again, and not all window managers support maximization. But normally the window will end up maximized. Just don't write code that crashes if not.

It's permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.

You can track maximization via the "window-state-event" signal on Gtk::Widget.

bool Gtk::Window::mnemonic_activate | ( | guint | keyval,
|  | Gdk::ModifierType | modifier
| ) |  |

Activates the targets associated with the mnemonic.

Parameters:

  keyval | The mnemonic.
  modifier | The modifiers.

Returns:
  `true` if the activation is done.

void Gtk::Window::move | ( | int | x,
|  | int | y
| ) |  |

Asks the has a nice table of gravities in the "implementation notes" section.

The get_position() documentation may also be relevant.

Parameters:

  x | X coordinate to move window to.
  y | Y coordinate to move window to.

virtual bool Gtk::Window::on_frame_event | ( | GdkEvent * | event | ) | `[protected, virtual]`

virtual void Gtk::Window::on_set_focus | ( | Widget* | focus | ) | `[protected, virtual]`

bool Gtk::Window::parse_geometry | ( | const Glib::ustring & | geometry | ) |

Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this.

parse_geometry() does work on all GTK+ ports including Win32 but is primarily intended for an X environment.

If either a size or a position can be extracted from the geometry string, parse_geometry() returns `true` and calls set_default_size() and/or move() to resize/move the window.

If parse_geometry() returns `true`, it will also set the Gdk::HINT_USER_POS and/or Gdk::HINT_USER_SIZE hints indicating to the window manager that the size/position of the window was user-specified. This causes most window managers to honor the geometry.

Note that for parse_geometry() to work as expected, it has to be called when the window has its "final" size, i.e. after calling Gtk::Widget::show_all() on the contents and set_geometry_hints() on the window. |[ #include <gtk/gtk.h>

static void fill_with_content (GtkWidget *vbox) { / * fill with content... * / }

int main (int argc, char *argv[]) { GtkWidget *window, *vbox; GdkGeometry size_hints = { 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST };

gtk_init (&argc, &argv);

window = gtk_window_new (GTK_WINDOW_TOPLEVEL); vbox = gtk_vbox_new (`false`, 0);

gtk_container_add (GTK_CONTAINER (window), vbox); fill_with_content (vbox); gtk_widget_show_all (vbox);

gtk_window_set_geometry_hints (GTK_WINDOW (window), window, &size_hints, GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC);

if (argc > 1) { if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1])) fprintf (stderr, "Failed to parse '%s'<tt>\\n</tt>", argv[1]); }

gtk_widget_show_all (window); gtk_main();

return 0; } ]|

Parameters:

  geometry | Geometry string.

Returns:
  `true` if string was parsed successfully.

void Gtk::Window::present | ( | guint32 | timestamp | ) |

Presents a window to the user in response to a user interaction.

If you need to present a window without a timestamp, use present(). See present() for details.

Since gtkmm 2.8:

Parameters:

  timestamp | The timestamp of the user interaction (typically a button or key press event) which triggered this call.

void Gtk::Window::present | ( |  | ) |

Presents a window to the user.

This may mean raising the window in the stacking order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences.

If window is hidden, this function calls Gtk::Widget::show() as well.

This function should be used when the user tries to open a window that's already open. Say for example the preferences dialog is currently open, and the user chooses Preferences from the menu a second time; use present() to move the already-open dialog where the user can see it.

If you are calling this function in response to a user interaction, it is preferable to use present_with_time().

Glib::PropertyProxy<bool> Gtk::Window::property_accept_focus | ( |  | ) |

TRUE if the window should receive the input focus.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_accept_focus | ( |  | ) | const

TRUE if the window should receive the input focus.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_allow_grow | ( |  | ) |

If TRUE, users can expand the window beyond its minimum size.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_allow_grow | ( |  | ) | const

If TRUE, users can expand the window beyond its minimum size.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_allow_shrink | ( |  | ) |

If TRUE, the window has no mimimum size.

Setting this to TRUE is 99% of the time a bad idea.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_allow_shrink | ( |  | ) | const

If TRUE, the window has no mimimum size.

Setting this to TRUE is 99% of the time a bad idea.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_decorated | ( |  | ) |

Whether the window should be decorated by the window manager.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_decorated | ( |  | ) | const

Whether the window should be decorated by the window manager.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::Window::property_default_height | ( |  | ) |

The default height of the window, used when initially showing the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::Window::property_default_height | ( |  | ) | const

The default height of the window, used when initially showing the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<int> Gtk::Window::property_default_width | ( |  | ) |

The default width of the window, used when initially showing the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<int> Gtk::Window::property_default_width | ( |  | ) | const

The default width of the window, used when initially showing the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_deletable | ( |  | ) |

Whether the window frame should have a close button.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_deletable | ( |  | ) | const

Whether the window frame should have a close button.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_destroy_with_parent | ( |  | ) |

If this window should be destroyed when the parent is destroyed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_destroy_with_parent | ( |  | ) | const

If this window should be destroyed when the parent is destroyed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_focus_on_map | ( |  | ) |

TRUE if the window should receive the input focus when mapped.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_focus_on_map | ( |  | ) | const

TRUE if the window should receive the input focus when mapped.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Gdk::Gravity> Gtk::Window::property_gravity | ( |  | ) |

The window gravity of the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Gdk::Gravity> Gtk::Window::property_gravity | ( |  | ) | const

The window gravity of the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_has_toplevel_focus | ( |  | ) | const

Whether the input focus is within this GtkWindow.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Gtk::Window::property_icon | ( |  | ) |

Icon for this window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Gtk::Window::property_icon | ( |  | ) | const

Icon for this window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gtk::Window::property_icon_name | ( |  | ) |

Name of the themed icon for this window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Window::property_icon_name | ( |  | ) | const

Name of the themed icon for this window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_is_active | ( |  | ) | const

Whether the toplevel is the current active window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_mnemonics_visible | ( |  | ) |

Whether mnemonics are currently visible in this window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_mnemonics_visible | ( |  | ) | const

Whether mnemonics are currently visible in this window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_modal | ( |  | ) | const

If TRUE, the window is modal (other windows are not usable while this one is up).

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_modal | ( |  | ) |

If TRUE, the window is modal (other windows are not usable while this one is up).

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<double> Gtk::Window::property_opacity | ( |  | ) |

The opacity of the window, from 0 to 1.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<double> Gtk::Window::property_opacity | ( |  | ) | const

The opacity of the window, from 0 to 1.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_resizable | ( |  | ) |

If TRUE, users can resize the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_resizable | ( |  | ) | const

If TRUE, users can resize the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gtk::Window::property_role | ( |  | ) |

Unique identifier for the window to be used when restoring a session.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Window::property_role | ( |  | ) | const

Unique identifier for the window to be used when restoring a session.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > Gtk::Window::property_screen | ( |  | ) | const

The screen where this window will be displayed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > Gtk::Window::property_screen | ( |  | ) |

The screen where this window will be displayed.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_skip_pager_hint | ( |  | ) | const

TRUE if the window should not be in the pager.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_skip_pager_hint | ( |  | ) |

TRUE if the window should not be in the pager.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_skip_taskbar_hint | ( |  | ) |

TRUE if the window should not be in the task bar.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_skip_taskbar_hint | ( |  | ) | const

TRUE if the window should not be in the task bar.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly<Glib::ustring> Gtk::Window::property_startup_id | ( |  | ) |

Unique startup identifier for the window used by startup-notification.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Window::property_title | ( |  | ) | const

The title of the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::ustring> Gtk::Window::property_title | ( |  | ) |

The title of the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Window*> Gtk::Window::property_transient_for | ( |  | ) |

The transient parent of the dialog.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Window*> Gtk::Window::property_transient_for | ( |  | ) | const

The transient parent of the dialog.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<WindowType> Gtk::Window::property_type | ( |  | ) | const

The type of the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<GdkWindowTypeHint> Gtk::Window::property_type_hint | ( |  | ) |

Hint to help the desktop environment understand what kind of window this is and how to treat it.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint> Gtk::Window::property_type_hint | ( |  | ) | const

Hint to help the desktop environment understand what kind of window this is and how to treat it.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::Window::property_urgency_hint | ( |  | ) |

TRUE if the window should be brought to the user's attention.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::Window::property_urgency_hint | ( |  | ) | const

TRUE if the window should be brought to the user's attention.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<WindowPosition> Gtk::Window::property_window_position | ( |  | ) |

The initial position of the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<WindowPosition> Gtk::Window::property_window_position | ( |  | ) | const

The initial position of the window.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

virtual void Gtk::Window::raise | ( |  | ) | `[virtual]`

Brings the window to the front.

This is just a more obvious convenience wrapper for get_window()->raise().

void Gtk::Window::remove_accel_group | ( | const Glib::RefPtr< AccelGroup >& | accel_group | ) |

Reverses the effects of add_accel_group().

Parameters:

  accel_group | A Gtk::AccelGroup.

void Gtk::Window::remove_mnemonic | ( | guint | keyval,
|  | Widget& | target
| ) |  |

Removes a mnemonic from this window.

Parameters:

  keyval | The mnemonic.
  target | The widget that gets activated by the mnemonic.

void Gtk::Window::reshow_with_initial_size | ( |  | ) |

Hides window, then reshows it, resetting the default size and position of the window.

Used by GUI builders only.

void Gtk::Window::resize | ( | int | width,
|  | int | height
| ) |  |

Resizes the window as if the user had done so, obeying geometry constraints.

The default geometry constraint is that windows may not be smaller than their size request; to override this constraint, call Gtk::Widget::set_size_request() to set the window's request to a smaller value.

If resize() is called before showing a window for the first time, it overrides any default size set with set_default_size().

Windows may not be resized smaller than 1 by 1 pixels.

Parameters:

  width | Width in pixels to resize the window to.
  height | Height in pixels to resize the window to.

void Gtk::Window::set_accept_focus | ( | bool | setting = `true` | ) |

Windows may set a hint asking the desktop environment not to receive the input focus.

This function sets this hint.

Since gtkmm 2.4:

Parameters:

  setting | `true` to let this window receive input focus.

static void Gtk::Window::set_auto_startup_notification | ( | bool | setting = `true` | ) | `[static]`

By default, after showing the first Gtk::Window, GTK+ calls gdk_notify_startup_complete().

Call this function to disable the automatic startup notification. You might do this if your first window is a splash screen, and you want to delay notification until after your real main window has been shown, for example.

In that example, you would disable startup notification temporarily, show your splash screen, then re-enable it so that showing the main window would automatically result in notification.

Since gtkmm 2.2:

Parameters:

  setting | `true` to automatically do startup notification.

void Gtk::Window::set_decorated | ( | bool | setting = `true` | ) |

By default, windows are decorated with a title bar, resize controls, etc.

Some allow GTK+ to disable these decorations, creating a borderless window. If you set the decorated property to `false` using this function, GTK+ will do its best to convince the window manager not to decorate the window. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling gtk_window_show().

On Windows, this function always works, since there's no window manager policy involved.

Parameters:

  setting | `true` to decorate the window.

void Gtk::Window::set_default | ( | Gtk::Widget& | default_widget | ) |

The default widget is the widget that's activated when the user presses Enter in a dialog (for example).

This function sets the default widget for a Gtk::Window. When setting (rather than unsetting) the default widget it's generally easier to call Gtk::Widget::grab_focus() on the widget. Before making a widget the default widget, you must set the Gtk::CAN_DEFAULT flag on the widget you'd like to make the default using GTK_WIDGET_SET_FLAGS().

Parameters:

  default_widget | Widget to be the default.

static void Gtk::Window::set_default_icon | ( | const Glib::RefPtr< Gdk::Pixbuf >& | icon | ) | `[static]`

Sets an icon to be used as fallback for windows that haven't had set_icon() called on them from a pixbuf.

Since gtkmm 2.4:

Parameters:

  icon | The icon.

static bool Gtk::Window::set_default_icon_from_file | ( | const std::string & | filename | ) | `[static]`

Sets an icon to be used as fallback for windows that haven't had set_icon_list() called on them from a file on disk.

Warns on failure if err is `0`.

Since gtkmm 2.2:

Parameters:

  filename | Location of icon file.

Returns:
  `true` if setting the icon succeeded.

static void Gtk::Window::set_default_icon_list | ( | const Glib::ListHandle< Glib::RefPtr< Gdk::Pixbuf > >& | list | ) | `[static]`

Sets an icon list to be used as fallback for windows that haven't had set_icon_list() called on them to set up a window-specific icon list.

This function allows you to set up the icon for all windows in your app at once.

See set_icon_list() for more details.

Parameters:

  list | A list of Gdk::Pixbuf.

static void Gtk::Window::set_default_icon_name | ( | const Glib::ustring & | name | ) | `[static]`

Sets an icon to be used as fallback for windows that haven't had set_icon_list() called on them from a named themed icon, see set_icon_name().

Since gtkmm 2.6:

Parameters:

  name | The name of the themed icon.

void Gtk::Window::set_default_size | ( | int | width,
|  | int | height
| ) |  |

Sets the default size of a window.

If the window's "natural" size (its size request) is larger than the default, the default will be ignored. More generally, if the default size does not obey the geometry hints for the window (set_geometry_hints() can be used to set these explicitly), the default size will be clamped to the nearest permitted size.

Unlike Gtk::Widget::set_size_request(), which sets a size request for a widget and thus would keep users from shrinking the window, this function only sets the initial size, just as if the user had resized the window themselves. Users can still shrink the window again as they normally would. Setting a default size of -1 means to use the "natural" default size (the size request of the window).

For more control over a window's initial size and how resizing works, investigate set_geometry_hints().

For some uses, resize() is a more appropriate function. resize() changes the current size of the window, rather than the size to be used on initial display. resize() always affects the window itself, not the geometry widget.

The default size of a window only affects the first time a window is shown; if a window is hidden and re-shown, it will remember the size it had prior to hiding, rather than using the default size.

Windows can't actually be 0x0 in size, they must be at least 1x1, but passing 0 for width and height is OK, resulting in a 1x1 default size.

Parameters:

  width | Width in pixels, or -1 to unset the default width.
  height | Height in pixels, or -1 to unset the default height.

void Gtk::Window::set_deletable | ( | bool | setting = `true` | ) |

By default, windows have a close button in the window frame.

Some allow GTK+ to disable this button. If you set the deletable property to `false` using this function, GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling gtk_window_show().

On Windows, this function always works, since there's no window manager policy involved.

Since gtkmm 2.10:

Parameters:

  setting | `true` to decorate the window as deletable.

void Gtk::Window::set_focus | ( | Gtk::Widget& | focus | ) |

If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window.

To set the focus to a particular widget in the toplevel, it is usually more convenient to use Gtk::Widget::grab_focus() instead of this function.

Parameters:

  focus | Widget to be the new focus widget.

void Gtk::Window::set_focus_on_map | ( | bool | setting = `true` | ) |

Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped.

This function sets this hint.

Since gtkmm 2.6:

Parameters:

  setting | `true` to let this window receive input focus on map.

void Gtk::Window::set_frame_dimensions | ( | int | left,
|  | int | top,
|  | int | right,
|  | int | bottom
| ) |  |

(Note: this is a special-purpose function intended for the framebuffer port; see set_has_frame().

It will have no effect on the window border drawn by the window manager, which is the normal case when using the X Window system.)

For windows with frames (see set_has_frame()) this function can be used to change the size of the frame border.

Deprecated: 2.24: This function will be removed in GTK+ 3

Parameters:

  left | The width of the left border.
  top | The height of the top border.
  right | The width of the right border.
  bottom | The height of the bottom border.

void Gtk::Window::set_geometry_hints | ( | Widget& | geometry_widget,
|  | const Gdk::Geometry& | geometry,
|  | Gdk::WindowHints | geom_mask
| ) |  |

This function sets up hints about how a window can be resized by the user.

You can set a minimum and maximum size; allowed resize increments (e.g. for xterm, you can only resize by the size of a character); aspect ratios; and more. See the Gdk::Geometry struct.

Parameters:

  geometry_widget | Widget the geometry hints will be applied to.
  geometry | Struct containing geometry information.
  geom_mask | Mask indicating which struct fields should be paid attention to.

void Gtk::Window::set_gravity | ( | Gdk::Gravity | gravity | ) |

Window gravity defines the meaning of coordinates passed to move().

See move() and Gdk::Gravity for more details.

The default window gravity is Gdk::GRAVITY_NORTH_WEST which will typically "do what you mean."

Parameters:

  gravity | Window gravity.

void Gtk::Window::set_has_frame | ( | bool | setting = `true` | ) |

(Note: this is a special-purpose function for the framebuffer port, that causes GTK+ to draw its own window border.

For most applications, you want set_decorated() instead, which tells the window manager whether to draw the window border.)

If this function is called on a window with setting of `true`, before it is realized or showed, it will have a "frame" window around window->window, accessible in window->frame. Using the signal frame_event you can receive all events targeted at the frame.

This function is used by the linux-fb port to implement managed windows, but it could conceivably be used by X-programs that want to do their own window decorations.

Deprecated: 2.24: This function will be removed in GTK+ 3

Parameters:

  setting | A boolean.

void Gtk::Window::set_icon | ( | const Glib::RefPtr< Gdk::Pixbuf >& | icon | ) |

Sets up the icon representing a Gtk::Window.

This icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts.

The icon should be provided in whatever size it was naturally drawn; that is, don't scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.

If you have your icon hand-drawn in multiple sizes, use set_icon_list(). Then the best size will be used.

This function is equivalent to calling set_icon_list() with a 1-element list.

See also set_default_icon_list() to set the icon for all windows in your application in one go.

Parameters:

  icon | Icon image, or `0`.

bool Gtk::Window::set_icon_from_file | ( | const std::string & | filename | ) |

Sets the icon for the window.

This function is equivalent to calling set_icon() with a pixbuf created by loading the image from filename.

Parameters:

  filename | Location of icon file.

Returns:
  `true` if setting the icon succeeded.

void Gtk::Window::set_icon_list | ( | const Glib::ListHandle< Glib::RefPtr< Gdk::Pixbuf > >& | list | ) |

Sets up the icon representing a Gtk::Window.

The icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts.

set_icon_list() allows you to pass in the same icon in several hand-drawn sizes. The list should contain the natural sizes your icon is available in; that is, don't scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.

By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling.

Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them.

See also set_default_icon_list() to set the icon for all windows in your application in one go.

Note that transient windows (those who have been set transient for another window using set_transient_for()) will inherit their icon from their transient parent. So there's no need to explicitly set the icon on transient windows.

Parameters:

  list | List of Gdk::Pixbuf.

void Gtk::Window::set_icon_name | ( | const Glib::ustring & | name | ) |

Sets the icon for the window from a named themed icon.

See the docs for Gtk::IconTheme for more details.

Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.

Since gtkmm 2.6:

Parameters:

  name | The name of the themed icon.

void Gtk::Window::set_keep_above | ( | bool | setting = `true` | ) |

Asks to keep window above, so that it stays on top.

Note that you shouldn't assume the window is definitely above afterward, because other entities (e.g. the user or specification, the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs.

Since gtkmm 2.4:

Parameters:

  setting | Whether to keep window above other windows.

void Gtk::Window::set_keep_below | ( | bool | setting = `true` | ) |

Asks to keep window below, so that it stays in bottom.

Note that you shouldn't assume the window is definitely below afterward, because other entities (e.g. the user or specification, the above state is mainly meant for user preferences and should not be used by applications e.g. for drawing attention to their dialogs.

Since gtkmm 2.4:

Parameters:

  setting | Whether to keep window below other windows.

virtual void Gtk::Window::set_manage | ( |  | ) | `[virtual]`

Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no parent container.

void Gtk::Window::set_mnemonic_modifier | ( | Gdk::ModifierType | modifier | ) |

Sets the mnemonic modifier for this window.

Parameters:

  modifier | The modifier mask used to activate mnemonics on this window.

void Gtk::Window::set_mnemonics_visible | ( | bool | setting = `true` | ) |

Sets the Gtk::Window:mnemonics-visible property.

Since gtkmm 2.20:

Parameters:

  setting | The new value.

void Gtk::Window::set_modal | ( | bool | modal = `true` | ) |

Sets a window modal or non-modal.

Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use set_transient_for() to make the dialog transient for the parent; most will then disallow lowering the dialog below the parent.

Parameters:

  modal | Whether the window is modal.

void Gtk::Window::set_opacity | ( | double | opacity | ) |

Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque.

(Values of the opacity parameter are clamped to the [0,1] range.) On X11 this has any effect only on X screens with a compositing manager running. See Gtk::Widget::is_composited(). On Windows it should work always.

Note that setting a window's opacity after the window has been shown causes it to flicker once on Windows.

Since gtkmm 2.12:

Parameters:

  opacity | Desired opacity, between 0 and 1.

void Gtk::Window::set_position | ( | WindowPosition | position | ) |

Sets a position constraint for this window.

If the old or new constraint is Gtk::WIN_POS_CENTER_ALWAYS, this will also cause the window to be repositioned to satisfy the new constraint.

Parameters:

  position | A position constraint.

void Gtk::Window::set_resizable | ( | bool | resizable = `true` | ) |

Sets whether the user can resize a window.

Windows are user resizable by default.

Parameters:

  resizable | `true` if the user can resize this window.

void Gtk::Window::set_role | ( | const Glib::ustring & | role | ) |

This function is only useful on X11, not with other GTK+ targets.

In combination with the window title, the window role allows a to identify "the same" window when an application is restarted. So for example you might set the "toolbox" role on your app's toolbox window, so that when the user restarts their session, the window manager can put the toolbox back in the same place.

If a window already has a unique title, you don't need to set the role, since the WM can use the title to identify the window when restoring the session.

Parameters:

  role | Unique identifier for the window to be used when restoring a session.

void Gtk::Window::set_screen | ( | const Glib::RefPtr< Gdk::Screen >& | screen | ) |

Sets the Gdk::Screen where the window is displayed; if the window is already mapped, it will be unmapped, and then remapped on the new screen.

Since gtkmm 2.2:

Parameters:

  screen | A Gdk::Screen.

void Gtk::Window::set_skip_pager_hint | ( | bool | setting = `true` | ) |

Windows may set a hint asking the desktop environment not to display the window in the pager.

This function sets this hint. (A "pager" is any desktop navigation tool such as a workspace switcher that displays a thumbnail representation of the windows on the screen.)

Since gtkmm 2.2:

Parameters:

  setting | `true` to keep this window from appearing in the pager.

void Gtk::Window::set_skip_taskbar_hint | ( | bool | setting = `true` | ) |

Windows may set a hint asking the desktop environment not to display the window in the task bar.

This function sets this hint.

Since gtkmm 2.2:

Parameters:

  setting | `true` to keep this window from appearing in the task bar.

void Gtk::Window::set_title | ( | const Glib::ustring & | title | ) |

Sets the title of the Gtk::Window.

The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the , so exactly how the title appears to users may vary according to a user's exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.

Parameters:

  title | Title of the window.

void Gtk::Window::set_transient_for | ( | Window& | parent | ) |

Dialog windows should be set transient for the main application window they were spawned from.

This allows to e.g. keep the dialog on top of the main window, or center the dialog over the main window. Gtk::Dialog::new_with_buttons() and other convenience functions in GTK+ will sometimes call set_transient_for() on your behalf.

Passing `0` for parent unsets the current transient window.

On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.

Parameters:

  parent | Parent window, or `0`.

void Gtk::Window::set_type_hint | ( | Gdk::WindowTypeHint | hint | ) |

By setting the type hint for the window, you allow the window manager to decorate and handle the window in a way which is suitable to the function of the window in your application.

This function should be called before the window becomes visible.

Gtk::Dialog::new_with_buttons() and other convenience functions in GTK+ will sometimes call set_type_hint() on your behalf.

Parameters:

  hint | The window type.

void Gtk::Window::set_urgency_hint | ( | bool | setting = `true` | ) |

Windows may set a hint asking the desktop environment to draw the users attention to the window.

This function sets this hint.

Since gtkmm 2.8:

Parameters:

  setting | `true` to mark this window as urgent.

void Gtk::Window::set_wmclass | ( | const Glib::ustring & | wmclass_name,
|  | const Glib::ustring & | wmclass_class
| ) |  |

Don't use this function.

It sets the X Window System "class" and "name" hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an application, and GTK+ sets them to that value by default, so calling this function is sort of pointless. However, you may want to call set_role() on each window in your application, for the benefit of the session manager. Setting the role allows the window manager to restore window positions when loading a saved session.

Parameters:

  wmclass_name | Window name hint.
  wmclass_class | Window class hint.

Glib::SignalProxy1< bool,GdkEvent* > Gtk::Window::signal_frame_event | ( |  | ) |

Prototype:
  `bool on_my_frame_event(GdkEvent* event)`

Glib::SignalProxy1< void,Widget* > Gtk::Window::signal_set_focus | ( |  | ) |

Prototype:
  `void on_my_set_focus(Widget* focus)`

void Gtk::Window::stick | ( |  | ) |

Asks to stick window, which means that it will appear on all user desktops.

Note that you shouldn't assume the window is definitely stuck afterward, because other entities (e.g. the user or ) could unstick it again, and some window managers do not support sticking windows. But normally the window will end up stuck. Just don't write code that crashes if not.

It's permitted to call this function before showing a window.

You can track stickiness via the "window-state-event" signal on Gtk::Widget.

void Gtk::Window::unfullscreen | ( |  | ) |

Asks to toggle off the fullscreen state for window.

Note that you shouldn't assume the window is definitely not full screen afterward, because other entities (e.g. the user or ) could fullscreen it again, and not all window managers honor requests to unfullscreen windows. But normally the window will end up restored to its normal state. Just don't write code that crashes if not.

You can track the fullscreen state via the "window-state-event" signal on Gtk::Widget.

Since gtkmm 2.2:

void Gtk::Window::unmaximize | ( |  | ) |

Asks to unmaximize window.

Note that you shouldn't assume the window is definitely unmaximized afterward, because other entities (e.g. the user or ) could maximize it again, and not all window managers honor requests to unmaximize. But normally the window will end up unmaximized. Just don't write code that crashes if not.

You can track maximization via the "window-state-event" signal on Gtk::Widget.

void Gtk::Window::unset_default | ( |  | ) |

void Gtk::Window::unset_focus | ( |  | ) |

void Gtk::Window::unset_transient_for | ( |  | ) |

Unsets the current transient window.

See also:
  set_transient_for().

Since gtkmm 2.20:

void Gtk::Window::unstick | ( |  | ) |

Asks to unstick window, which means that it will appear on only one of the user's desktops.

Note that you shouldn't assume the window is definitely unstuck afterward, because other entities (e.g. the user or ) could stick it again. But normally the window will end up stuck. Just don't write code that crashes if not.

You can track stickiness via the "window-state-event" signal on Gtk::Widget.

## Friends And Related Function Documentation

Gtk::Window* wrap | ( | GtkWindow * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gtkmm/window.h