⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkwindow.sgml

📁 This GTK+ version 2.12.3. GTK+ is a multi-platform toolkit for creating graphical user interfaces.
💻 SGML
📖 第 1 页 / 共 2 页
字号:
<!-- ##### SECTION Title ##### -->GtkWindow<!-- ##### SECTION Short_Description ##### -->Toplevel which can contain other widgets<!-- ##### SECTION Long_Description ##### --><para></para><!-- ##### SECTION See_Also ##### --><para></para><!-- ##### SECTION Stability_Level ##### --><!-- ##### STRUCT GtkWindow ##### --><para></para><!-- ##### SIGNAL GtkWindow::activate-default ##### --><para></para>@window: the object which received the signal.<!-- ##### SIGNAL GtkWindow::activate-focus ##### --><para></para>@window: the object which received the signal.<!-- ##### SIGNAL GtkWindow::frame-event ##### --><para></para>@window: the object which received the signal.@event: @Returns: <!-- ##### SIGNAL GtkWindow::keys-changed ##### --><para></para>@window: the object which received the signal.<!-- ##### SIGNAL GtkWindow::set-focus ##### --><para></para>@window: the object which received the signal.@widget: <!-- ##### ARG GtkWindow:accept-focus ##### --><para></para><!-- ##### ARG GtkWindow:allow-grow ##### --><para></para><!-- ##### ARG GtkWindow:allow-shrink ##### --><para></para><!-- ##### ARG GtkWindow:decorated ##### --><para></para><!-- ##### ARG GtkWindow:default-height ##### --><para></para><!-- ##### ARG GtkWindow:default-width ##### --><para></para><!-- ##### ARG GtkWindow:deletable ##### --><para></para><!-- ##### ARG GtkWindow:destroy-with-parent ##### --><para></para><!-- ##### ARG GtkWindow:focus-on-map ##### --><para></para><!-- ##### ARG GtkWindow:gravity ##### --><para></para><!-- ##### ARG GtkWindow:has-toplevel-focus ##### --><para></para><!-- ##### ARG GtkWindow:icon ##### --><para></para><!-- ##### ARG GtkWindow:icon-name ##### --><para></para><!-- ##### ARG GtkWindow:is-active ##### --><para></para><!-- ##### ARG GtkWindow:modal ##### --><para></para><!-- ##### ARG GtkWindow:opacity ##### --><para></para><!-- ##### ARG GtkWindow:resizable ##### --><para></para><!-- ##### ARG GtkWindow:role ##### --><para></para><!-- ##### ARG GtkWindow:screen ##### --><para></para><!-- ##### ARG GtkWindow:skip-pager-hint ##### --><para></para><!-- ##### ARG GtkWindow:skip-taskbar-hint ##### --><para></para><!-- ##### ARG GtkWindow:startup-id ##### --><para></para><!-- ##### ARG GtkWindow:title ##### --><para></para><!-- ##### ARG GtkWindow:transient-for ##### --><para></para><!-- ##### ARG GtkWindow:type ##### --><para></para><!-- ##### ARG GtkWindow:type-hint ##### --><para></para><!-- ##### ARG GtkWindow:urgency-hint ##### --><para></para><!-- ##### ARG GtkWindow:window-position ##### --><para></para><!-- ##### FUNCTION gtk_window_new ##### --><para></para>@type: @Returns: <!-- ##### FUNCTION gtk_window_set_title ##### --><para></para>@window: @title: <!-- ##### FUNCTION gtk_window_set_wmclass ##### --><para></para>@window: @wmclass_name: @wmclass_class: <!-- ##### FUNCTION gtk_window_set_policy ##### --><para>Changes how a toplevel window deals with its size request and user resizeattempts. There are really only two reasonable ways to call this function:<orderedlist><listitem><para><literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE)</literal> means that the window is user-resizable.</para></listitem><listitem><para><literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, TRUE)</literal> means that the window's size is program-controlled, and should simply match the current size request of the window's children.</para></listitem></orderedlist>The first policy is the default, that is, by default windows are designed to be resized by users.</para><para>The basic ugly truth of this function is that it should be simply:<literal> void gtk_window_set_resizable (GtkWindow* window, gboolean setting);</literal>...which is why GTK+ 2.0 introduces gtk_window_set_resizable(), which you should use instead of gtk_window_set_policy().</para><para>If set to %TRUE, the @allow_grow parameter allows the user to expand the windowbeyond the size request of its child widgets. If @allow_grow is %TRUE, be sure tocheck that your child widgets work properly as the window is resized.</para><para>A toplevel window will always change size to ensure its child widgets receivetheir requested size. This means that if you add child widgets, the toplevelwindow will expand to contain them. However, normally the toplevel will notshrink to fit the size request of its children if it's too large; the@auto_shrink parameter causes the window to shrink when child widgets have toomuch space. @auto_shrink is normally used with the second of the two windowpolicies mentioned above.  That is, set @auto_shrink to %TRUE if you want thewindow to have a fixed, always-optimal size determined by your program.</para><para>Note that @auto_shrink doesn't do anything if @allow_shrink and @allow_grow areboth set to %FALSE.</para><para>Neither of the two suggested window policies set the @allow_shrink parameter to%TRUE.  If @allow_shrink is %TRUE, the user can shrink the window so that itschildren do not receive their full size request; this is basically a bad thing,because most widgets will look wrong if this happens. Furthermore GTK+ has atendency to re-expand the window if size is recalculated for any reason. Theupshot is that @allow_shrink should always be set to %FALSE.</para><para>Sometimes when you think you want to use @allow_shrink, the real problem is thatsome specific child widget is requesting too much space, so the user can'tshrink the window sufficiently. Perhaps you are calling gtk_widget_set_size_request()on a child widget, and forcing its size request to be too large. Instead ofsetting the child's usize, consider using gtk_window_set_default_size() so thatthe child gets a larger allocation than it requests.</para>@window: the window@allow_shrink: whether the user can shrink the window below its size request@allow_grow: whether the user can grow the window larger than its size request@auto_shrink: whether the window automatically snaps back to its size request               if it's larger@Deprecated: Use gtk_window_set_resizable() instead.<!-- ##### FUNCTION gtk_window_set_resizable ##### --><para></para>@window: @resizable: <!-- ##### FUNCTION gtk_window_get_resizable ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_add_accel_group ##### --><para></para>@window: @accel_group: <!-- ##### FUNCTION gtk_window_remove_accel_group ##### --><para></para>@window: @accel_group: <!-- ##### MACRO gtk_window_position ##### --><para>Deprecated alias for gtk_window_set_position().</para><!-- ##### FUNCTION gtk_window_activate_focus ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_activate_default ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_set_modal ##### --><para></para>@window: @modal: <!-- ##### FUNCTION gtk_window_set_default_size ##### --><para></para>@window: @width: @height: <!-- ##### FUNCTION gtk_window_set_geometry_hints ##### --><para></para>@window: @geometry_widget: @geometry: @geom_mask: <!-- ##### FUNCTION gtk_window_set_gravity ##### --><para></para>@window: @gravity: <!-- ##### FUNCTION gtk_window_get_gravity ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_set_position ##### --><para></para>@window: @position: <!-- ##### FUNCTION gtk_window_set_transient_for ##### --><para></para>@window: @parent: <!-- ##### FUNCTION gtk_window_set_destroy_with_parent ##### --><para></para>@window: @setting: <!-- ##### FUNCTION gtk_window_set_screen ##### --><para></para>@window: @screen: <!-- ##### FUNCTION gtk_window_get_screen ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_is_active ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_has_toplevel_focus ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_list_toplevels ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_window_add_mnemonic ##### --><para></para>@window: @keyval: @target: <!-- ##### FUNCTION gtk_window_remove_mnemonic ##### --><para></para>@window: @keyval: @target: <!-- ##### FUNCTION gtk_window_mnemonic_activate ##### --><para></para>@window: @keyval: @modifier: @Returns: <!-- ##### FUNCTION gtk_window_activate_key ##### --><para></para>@window: @event: @Returns: <!-- ##### FUNCTION gtk_window_propagate_key_event ##### --><para></para>@window: @event: @Returns: <!-- ##### FUNCTION gtk_window_get_focus ##### --><para></para>@window: @Returns: <!-- ##### FUNCTION gtk_window_set_focus ##### --><para></para>@window: @focus: <!-- ##### FUNCTION gtk_window_set_default ##### --><para></para>@window: @default_widget: <!-- ##### FUNCTION gtk_window_present ##### --><para></para>@window: <!-- ##### FUNCTION gtk_window_present_with_time ##### --><para></para>@window: @timestamp: <!-- ##### FUNCTION gtk_window_iconify ##### --><para></para>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -