|
Gtk::Window Class ReferenceToplevel Window This represents all widgets which are physical windows controlled by the window manager.
More...
|
Public Methods | |
virtual | ~Window () |
GtkWindow* | gobj () |
const GtkWindow* | gobj () const |
Window (WindowType type=WINDOW_TOPLEVEL) | |
Glib::PropertyProxy<Glib::ustring> | property_title () |
Glib::PropertyProxy<bool> | property_allow_shrink () |
Glib::PropertyProxy<bool> | property_allow_grow () |
Glib::PropertyProxy<bool> | property_resizable () |
Glib::PropertyProxy<bool> | property_modal () |
Glib::PropertyProxy<WindowPosition> | property_window_position () |
Glib::PropertyProxy<int> | property_default_width () |
Glib::PropertyProxy<int> | property_default_height () |
Glib::PropertyProxy<bool> | property_destroy_with_parent () |
Glib::PropertyProxy< Glib::RefPtr< Gdk::Pixbuf > > | property_icon () |
bool | is_toplevel () const |
bool | is_dialog () const |
bool | is_popup () const |
WindowType | get_window_type () 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 () |
Glib::SignalProxy0<void> | signal_activate_focus () |
Glib::SignalProxy0<void> | signal_activate_default () |
Glib::SignalProxy1< void, DirectionType > | signal_move_focus () |
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. | |
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& defaultw) |
The default widget is the widget that's activated when the user presses Enter in a dialog (for example). | |
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::RECEIVES_DEFAULT in Gtk::WidgetFlags), 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. | |
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_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(). | |
bool | get_destroy_with_parent () const |
Returns whether the window will be destroyed with its transient parent. | |
void | set_resizable (bool resizeable=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(). | |
Glib::ListHandle< Glib::RefPtr< 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. | |
bool | set_icon_from_file (const std::string& filename) |
Sets the icon for window . | |
Glib::RefPtr<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). | |
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 | 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 window manager to move window to the given position. | |
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. | |
void | reshow_with_initial_size () |
Hides window , then reshows it, resetting the default size and position of the window. | |
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 Methods | |
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. | |
Glib::ListHandle< Glib::RefPtr< Gdk::Pixbuf > > | get_default_icon_list () |
Gets the value set by set_default_icon_list(). | |
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. | |
void | set_auto_startup_notification (bool setting=true) |
By default, after showing the first Gtk::Window for each Gdk::Screen, GTK+ calls gdk_screen_notify_startup_complete(). | |
Glib::ListHandle<Window*> | list_toplevels () |
Returns a list of all existing toplevel windows. | |
Protected Methods | |
virtual void | on_set_focus (Widget* focus) |
virtual bool | on_frame_event (GdkEvent* event) |
virtual void | on_activate_focus () |
virtual void | on_activate_default () |
virtual void | on_move_focus (DirectionType direction) |
void | destroy_ () |
void | _destroy_c_instance () |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::Window* | wrap (GtkWindow* object, bool take_copy=false) |
Gtk::manage() has no effect on Windows because they have no parent Containers.
|
|
|
|
|
Reimplemented from Gtk::Object. |
|
Activates the default widget for the window, unless the current focused widget has been configured to receive the default action (see Gtk::RECEIVES_DEFAULT in Gtk::WidgetFlags), in which case the focused widget is activated.
|
|
Activates the current focused widget within the window.
|
|
Associate accel_group with window , such that calling gtk_accel_groups_activate() on window will activate accelerators in accel_group .
|
|
Adds a mnemonic to this window.
|
|
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 window manager or windowing system. Otherwise, GDK will try to emulate window movement, potentially not all that well, depending on the windowing system.
|
|
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 window manager or windowing system. Otherwise, GDK will try to emulate window resizing, potentially not all that well, depending on the windowing system.
|
|
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 window manager) 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. |
|
Reimplemented from Gtk::Object. |
|
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 window manager) 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: 2.2 |
|
Returns a default accel group for this window This is a gtkmm-specific function. This accel group can not be removed. |
|
Returns whether the window has been set to have decorations such as a title bar via set_decorated().
|
|
Gets the value set by set_default_icon_list(). The list is a copy and should be freed with Glib::list_free(), but the pixbufs in the list have not had their reference count incremented.
|
|
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.
|
|
Returns whether the window will be destroyed with its transient parent. See set_destroy_with_parent().
|
|
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
|
|
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
|
|
|
|
|
|
(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 window manager, 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().
|
|
Gets the value set by set_gravity().
|
|
Accessor for whether the window has a frame window exterior to window ->window. Gets the value set by set_has_frame().
|
|
Gets the value set by set_icon() (or if you've called set_icon_list(), gets the first icon in the 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 the mnemonic modifier for this window.
|
|
Returns whether the window is modal. See set_modal().
|
|
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.
|
|
Gets the value set by set_resizable().
|
|
Returns the role of the window. See set_role() for further explanation.
|
|
Returns the Gdk::Screen associated with window .
Reimplemented from Gtk::Widget. |
|
Returns the Gdk::Screen associated with window .
Reimplemented from Gtk::Widget. |
|
Obtains the current size of window . If window is not onscreen, it returns the size GTK+ will suggest to the window manager for the initial window size (but this is not reliably the same as the size the window manager will actually select). The size obtained by get_size() is the last size received in a Gdk::EventConfigure, that is, GTK+ uses its locally-stored size, rather than querying the X server for the size. As a result, if you call resize() then immediately call get_size(), the size won't have taken effect yet. After the window manager processes the resize request, GTK+ receives notification that the size has changed via a configure event, and the size of the window gets updated.
|
|
Gets the value set by set_skip_pager_hint().
|
|
Gets the value set by set_skip_taskbar_hint().
|
|
Retrieves the title of the window. See set_title().
|
|
Fetches the transient parent for this window. See set_transient_for().
|
|
Fetches the transient parent for this window. See set_transient_for().
|
|
Gets the type hint for this window. See set_type_hint().
|
|
|
|
Reimplemented from Gtk::Bin. Reimplemented in Gtk::ColorSelectionDialog, Gtk::Dialog, Gtk::FileSelection, Gtk::FontSelectionDialog, Gtk::InputDialog, Gtk::MessageDialog, and Gtk::Plug. |
|
Reimplemented from Gtk::Bin. Reimplemented in Gtk::ColorSelectionDialog, Gtk::Dialog, Gtk::FileSelection, Gtk::FontSelectionDialog, Gtk::InputDialog, Gtk::MessageDialog, and Gtk::Plug. |
|
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 window manager) 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. |
|
|
|
|
|
Reimplemented from Gtk::Widget. |
|
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
|
|
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 window manager) 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. |
|
Activates the targets associated with the mnemonic.
|
|
Asks the window manager to move window to the given position. Window managers are free to ignore this; most window managers ignore requests for initial window positions (instead using a user-defined placement algorithm) and honor requests after the window has already been shown.
To position a window at the bottom right corner of the screen, you would set Gdk::GRAVITY_SOUTH_EAST, which means that the reference point is at x + the window width and y + the window height, and the bottom-right corner of the window border will be placed at that reference point. So, to place a window in the bottom right corner you would first set gravity to south east, then write: The extended window manager hints specification at http://www.freedesktop.org/standards/wm-spec.html has a nice table of gravities in the "implementation notes" section. The get_position() documentation may also be relevant.
|
|
|
|
|
|
|
|
|
|
|
|
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
If parse_geometry() returns
|
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Brings the window to the front. This is just a more obvious convenience wrapper for get_window()->raise(). |
|
Reverses the effects of add_accel_group().
|
|
Removes a mnemonic from this window.
|
|
Hides window , then reshows it, resetting the default size and position of the window. Used by GUI builders only. |
|
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.
|
|
By default, after showing the first Gtk::Window for each Gdk::Screen, GTK+ calls gdk_screen_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: 2.2
|
|
By default, windows are decorated with a title bar, resize controls, etc.
Some window managers allow GTK+ to disable these decorations, creating a borderless window. If you set the decorated property to On Windows, this function always works, since there's no window manager policy involved.
|
|
The default widget is the widget that's activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a Gtk::Window about. 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().
|
|
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
|
|
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.
|
|
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.
|
|
If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window.
If focus is
|
|
(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.
|
|
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.
|
|
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."
|
|
(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 This function is used by the linux-fb port to implement managed windows, but it could concievably be used by X-programs that want to do their own window decorations.
|
|
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.
|
|
Sets the icon for window .
Warns on failure if err is This function is equivalent to calling set_icon() with a pixbuf created by loading the image from filename .
|
|
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.
|
|
Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no parent container.
Reimplemented from Gtk::Object. |
|
Sets the mnemonic modifier for this window.
|
|
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 window managers will then disallow lowering the dialog below the parent.
|
|
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.
|
|
Sets whether the user can resize a window. Windows are user resizable by default.
|
|
This function is only useful on X11, not with other GTK+ targets. In combination with the window title, the window role allows a window manager 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.
|
|
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: 2.2
|
|
Windows may set a hint asking the desktop environment not to display the window in the pager. This function toggles 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: 2.2
|
|
Windows may set a hint asking the desktop environment not to display the window in the task bar. This function toggles this hint. Since: 2.2
|
|
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 window manager, 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.
|
|
Dialog windows should be set transient for the main application window they were spawned from. This allows window managers 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. On Windows, this function will and put the child window on top of the parent, much as the window manager would have done on X.
|
|
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.
|
|
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. |
|
|
|
|
|
|
|
|
|
|
|
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 window manager) 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. |
|
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 window manager) 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: 2.2 |
|
Asks to unmaximize window . Note that you shouldn't assume the window is definitely unmaximized afterward, because other entities (e.g. the user or window manager) 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. |
|
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 window manager) 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. |
|
|