?? gtkwidget.sgml
字號(hào):
<!-- ##### SECTION Title ##### -->GtkWidget<!-- ##### SECTION Short_Description ##### -->Base class for all widgets<!-- ##### SECTION Long_Description ##### --><para id="style-properties"><structname>GtkWidget</structname> introduces <firstterm>style properties</firstterm> - these are basically object properties that are storednot on the object, but in the style object associated to the widget. Styleproperties are set in <link linkend="gtk-Resource-Files">resource files</link>.This mechanism is used for configuring such things as the location of thescrollbar arrows through the theme, giving theme authors more control over thelook of applications without the need to write a theme engine in C.</para><para>Use gtk_widget_class_install_style_property() to install style properties for a widget class, gtk_widget_class_find_style_property() orgtk_widget_class_list_style_properties() to get information about existingstyle properties and gtk_widget_style_get_property(), gtk_widget_style_get() orgtk_widget_style_get_valist() to obtain the value of a style property.</para><!-- ##### SECTION See_Also ##### --><para></para><!-- ##### SECTION Stability_Level ##### --><!-- ##### STRUCT GtkWidget ##### --><para></para>@style: The style for the widget. The style contains the colors the widget should be drawn in for each state along with graphics contexts used to draw with and the font to use for text.@requisition: The widgets desired size.@allocation: The widgets allocated size.@window: The widgets window or its parent window if it does not have a window. (Which will be indicated by the #GTK_NO_WINDOW flag being set).@parent: <!-- ##### SIGNAL GtkWidget::accel-closures-changed ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::button-press-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::button-release-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::can-activate-accel ##### --><para></para>@widget: the object which received the signal.@arg1: @Returns: <!-- ##### SIGNAL GtkWidget::child-notify ##### --><para></para>@widget: the object which received the signal.@arg1: <!-- ##### SIGNAL GtkWidget::client-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::configure-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::delete-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::destroy-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::direction-changed ##### --><para></para>@widget: the object which received the signal.@arg1: <!-- ##### SIGNAL GtkWidget::drag-begin ##### --><para></para>@widget: the object which received the signal.@drag_context: <!-- ##### SIGNAL GtkWidget::drag-data-delete ##### --><para></para>@widget: the object which received the signal.@drag_context: <!-- ##### SIGNAL GtkWidget::drag-data-get ##### --><para></para>@widget: the object which received the signal.@drag_context: @data: @info: @time: <!-- # Unused Parameters # -->@time_: <!-- ##### SIGNAL GtkWidget::drag-data-received ##### --><para></para>@widget: the object which received the signal.@drag_context: @x: @y: @data: @info: @time: <!-- # Unused Parameters # -->@time_: <!-- ##### SIGNAL GtkWidget::drag-drop ##### --><para></para>@widget: the object which received the signal.@drag_context: @x: @y: @time: @Returns: <!-- # Unused Parameters # -->@time_: <!-- ##### SIGNAL GtkWidget::drag-end ##### --><para></para>@widget: the object which received the signal.@drag_context: <!-- ##### SIGNAL GtkWidget::drag-leave ##### --><para></para>@widget: the object which received the signal.@drag_context: @time: <!-- # Unused Parameters # -->@time_: <!-- ##### SIGNAL GtkWidget::drag-motion ##### --><para></para>@widget: the object which received the signal.@drag_context: @x: @y: @time: @Returns: <!-- # Unused Parameters # -->@time_: <!-- ##### SIGNAL GtkWidget::enter-notify-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::event-after ##### --><para></para>@widget: the object which received the signal.@event: <!-- ##### SIGNAL GtkWidget::expose-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::focus ##### --><para></para>@widget: the object which received the signal.@arg1: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::focus-in-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::focus-out-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::grab-focus ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::grab-notify ##### --><para></para>@widget: the object which received the signal.@arg1: <!-- ##### SIGNAL GtkWidget::hide ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::hierarchy-changed ##### --><para>Emitted when there is a chance in the hierarchy towhich a widget belong. More precisely, a widget is<firstterm>anchored</firstterm> when its toplevelancestor is a #GtkWindow. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.</para>@widget: the object which received the signal.@widget2: <!-- ##### SIGNAL GtkWidget::key-press-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::key-release-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::leave-notify-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::map ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::map-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::mnemonic-activate ##### --><para></para>@widget: the object which received the signal.@arg1: @Returns: <!-- ##### SIGNAL GtkWidget::motion-notify-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::no-expose-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::parent-set ##### --><para></para>@widget: the object which received the signal.@old_parent: <!-- ##### SIGNAL GtkWidget::popup-menu ##### --><para></para>@widget: the object which received the signal.@Returns: <!-- ##### SIGNAL GtkWidget::property-notify-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::proximity-in-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::proximity-out-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::realize ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::screen-changed ##### --><para></para>@widget: the object which received the signal.@arg1: <!-- ##### SIGNAL GtkWidget::scroll-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::selection-clear-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::selection-get ##### --><para></para>@widget: the object which received the signal.@data: @info: @time: <!-- # Unused Parameters # -->@time_: <!-- ##### SIGNAL GtkWidget::selection-notify-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::selection-received ##### --><para></para>@widget: the object which received the signal.@data: @time: <!-- # Unused Parameters # -->@time_: <!-- ##### SIGNAL GtkWidget::selection-request-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::show ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::show-help ##### --><para></para>@widget: the object which received the signal.@arg1: @Returns: <!-- ##### SIGNAL GtkWidget::size-allocate ##### --><para></para>@widget: the object which received the signal.@allocation: <!-- ##### SIGNAL GtkWidget::size-request ##### --><para></para>@widget: the object which received the signal.@requisition: <!-- ##### SIGNAL GtkWidget::state-changed ##### --><para></para>@widget: the object which received the signal.@state: <!-- ##### SIGNAL GtkWidget::style-set ##### --><para></para>@widget: the object which received the signal.@previous_style: <!-- ##### SIGNAL GtkWidget::unmap ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::unmap-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::unrealize ##### --><para></para>@widget: the object which received the signal.<!-- ##### SIGNAL GtkWidget::visibility-notify-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### SIGNAL GtkWidget::window-state-event ##### --><para></para>@widget: the object which received the signal.@event: @Returns: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.<!-- ##### ARG GtkWidget:app-paintable ##### --><para></para><!-- ##### ARG GtkWidget:can-default ##### --><para></para><!-- ##### ARG GtkWidget:can-focus ##### --><para></para><!-- ##### ARG GtkWidget:composite-child ##### --><para></para><!-- ##### ARG GtkWidget:events ##### --><para></para><!-- ##### ARG GtkWidget:extension-events ##### --><para></para><!-- ##### ARG GtkWidget:has-default ##### --><para></para><!-- ##### ARG GtkWidget:has-focus ##### --><para></para><!-- ##### ARG GtkWidget:height-request ##### --><para></para><!-- ##### ARG GtkWidget:is-focus ##### --><para></para><!-- ##### ARG GtkWidget:name ##### --><para></para><!-- ##### ARG GtkWidget:no-show-all ##### --><para></para><!-- ##### ARG GtkWidget:parent ##### --><para></para><!-- ##### ARG GtkWidget:receives-default ##### --><para></para><!-- ##### ARG GtkWidget:sensitive ##### --><para></para><!-- ##### ARG GtkWidget:style ##### --><para></para><!-- ##### ARG GtkWidget:visible ##### --><para></para><!-- ##### ARG GtkWidget:width-request ##### --><para></para><!-- ##### ARG GtkWidget:cursor-aspect-ratio ##### --><para></para><!-- ##### ARG GtkWidget:cursor-color ##### --><para></para><!-- ##### ARG GtkWidget:focus-line-pattern ##### --><para></para><!-- ##### ARG GtkWidget:focus-line-width ##### --><para></para><!-- ##### ARG GtkWidget:focus-padding ##### --><para></para><!-- ##### ARG GtkWidget:interior-focus ##### --><para></para><!-- ##### ARG GtkWidget:secondary-cursor-color ##### --><para></para><!-- ##### STRUCT GtkWidgetClass ##### --><para><structfield>activate_signal</structfield>The signal to emit when a widget of this class is activated,gtk_widget_activate() handles the emission. Implementation of thissignal is optional. </para><para><structfield>set_scroll_adjustment_signal</structfield>This signal is emitted when a widget of this class is addedto a scrolling aware parent, gtk_widget_set_scroll_adjustments()handles the emission.Implementation of this signal is optional.</para>@parent_class: @activate_signal: @set_scroll_adjustments_signal: <!-- ##### ENUM GtkWidgetFlags ##### --><para>Tells about certain properties of the widget.</para>@GTK_TOPLEVEL: widgets without a real parent, as there are #GtkWindow<!-- -->s and #GtkMenu<!-- -->s have this flag set throughout their lifetime. Toplevel widgets always contain their own #GdkWindow.@GTK_NO_WINDOW: Indicative for a widget that does not provide its own #GdkWindow. Visible action (e.g. drawing) is performed on the parent's #GdkWindow.@GTK_REALIZED: Set by gtk_widget_realize(), unset by gtk_widget_unrealize(). A realized widget has an associated #GdkWindow.@GTK_MAPPED: Set by gtk_widget_map(), unset by gtk_widget_unmap(). Only realized widgets can be mapped. It means that gdk_window_show() has been called on the widgets window(s).@GTK_VISIBLE: Set by gtk_widget_show(), unset by gtk_widget_hide(). Implies that a widget will be mapped as soon as its parent is mapped.@GTK_SENSITIVE: Set and unset by gtk_widget_set_sensitive(). The sensitivity of a widget determines whether it will receive certain events (e.g. button or key presses). One premise for the widgets sensitivity is to have this flag set.@GTK_PARENT_SENSITIVE: Set and unset by gtk_widget_set_sensitive() operations on the parents of the widget. This is the second premise for the widgets sensitivity. Once it has %GTK_SENSITIVE and %GTK_PARENT_SENSITIVE set, its state is effectively sensitive. This is expressed (and can be examined) by the #GTK_WIDGET_IS_SENSITIVE macro.@GTK_CAN_FOCUS: Determines whether a widget is able to handle focus grabs.@GTK_HAS_FOCUS: Set by gtk_widget_grab_focus() for widgets that also have %GTK_CAN_FOCUS set. The flag will be unset once another widget grabs the focus.@GTK_CAN_DEFAULT: The widget is allowed to receive the default action via gtk_widget_grab_default().@GTK_HAS_DEFAULT: The widget currently is receiving the default action.@GTK_HAS_GRAB: Set by gtk_grab_add(), unset by gtk_grab_remove(). It means that the widget is in the grab_widgets stack, and will be the preferred one for receiving events other than ones of cosmetic value.@GTK_RC_STYLE: Indicates that the widgets style has been looked up through the rc
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -