Gtk.Widget Members

The members of Gtk.Widget are listed below.

See Also: Inherited members from Gtk.Object

Public Constructors

Internal constructor

Protected Constructors

Protected constructor.
Protected Constructor.

Public Properties

[read-only]
AccessibleAtk.Object. Obtains the default reading direction for widgets.
[read-only]
ActionAction. The action the widget proxies.
AllocationGdk.Rectangle. Gets or Sets the widget's allocation.
AppPaintablebool. Whether the application will paint directly on the widget.
CanDefaultbool. Evaluates to true if the widget is allowed to receive the default focus.
CanFocusbool. Determines whether the widget is able to receive the focus.
[read-only]
ChildRequisitionRequisition. Obtains the widget's requisition.
ChildVisiblebool. Sets or obtains whether widget should be mapped along with its when its parent is mapped and widget has been shown with Widget.Show.
ColormapGdk.Colormap. Sets or obtains the colormap that will be used to render widget.
[read-only]
CompositeChildbool. Whether the widget is part of a composite widget.
CompositeNamestring. Sets or obtains a widget composite name.
static
DefaultColormapGdk.Colormap. Sets or obtains the default colormap to use when creating widgets.
static
DefaultDirectionTextDirection. Sets or obtains the default reading direction for widgets.
[read-only]
static
DefaultStyleStyle. Obtains the default style used by all widgets initially.
[read-only]
static
DefaultVisualGdk.Visual. Obtains the visual of the default colormap.
DirectionTextDirection. Sets or obtains the reading direction on a particular widget.
[read-only]
DisplayGdk.Display. Obtains the Gdk.Display for the toplevel window associated with this widget.
[write-only]
DoubleBufferedbool. Use this property to turn off the double buffering.
EventsGdk.EventMask. Obtains or sets the event mask for the widget (a bitfield containing flags from Gdk.EventMask).
ExtensionEventsGdk.ExtensionMode. The mask that decides what kind of extension events the widget gets.
Flagsint. Obtains or sets the flags for this widget.
[read-only]
FocusLineWidthint. The width of the focus line in a widget.
GdkWindowGdk.Window. Obtains or sets the underlying Gdk.Window used to display the contents of the widget.
[read-only]
static
GTypeGLib.GType. GType Property.
HasDefaultbool. true when the widget currently is receiving the default action.
HasFocusbool. Whether the widget has the input focus.
[read-only]
HasGrabbool. Convenience property to check Flags for WidgetFlags.HasGrab
[read-only]
HasScreenbool. Checks whether there is a Gdk.Screen is associated with this widget.
HasTooltipbool. Documentation for this section has not yet been entered.
HeightRequestint. Override for the height request for the widget.
[read-only]
IsAppPaintablebool. Convenience property to check Flags for WidgetFlags.AppPaintable
[read-only]
IsCompositeChildbool. Convenience property to check Flags for WidgetFlags.CompositeChild
[read-only]
IsCompositedbool. Indicates if a widget can rely on its alpha channel being drawn correctly.
[read-only]
IsDoubleBufferedbool. Convenience property to check Flags for WidetFlags.DoubleBuffered
[read-only]
IsDrawablebool. Convenience property to check if the widget is Visible and Realized.
IsFocusbool. Determines if the widget is the focus widget within its toplevel.
[read-only]
IsMappedbool. Check to see if the widget is Mapped
[read-only]
IsNoWindowbool. Convenience property to check Flags for WidgetFlags.NoWindow
[read-only]
IsRealizedbool. Checks to see if the widget is Realized
[read-only]
IsTopLevelbool. Convenience property to check Flags for WidgetFlags.Toplevel
[read-only]
ModifierStyleRcStyle. Obtains the current modifier style for the widget.(As set by Widget.ModifyStyle)
Namestring. The name of the widget.
NoShowAllbool. This property determines whether the widget will be affected by Widget.ShowAll and Widget.HideAll.
[read-only]
PangoContextPango.Context. Obtains a Pango.Context with the appropriate colormap, font description and base direction for widget.
ParentWidget. The parent widget of this widget.
ParentWindowGdk.Window. Sets or obtains widget's parent window.
ReceivesDefaultbool. Whether to make the widget receive the default action when it is focused.
[write-only]
RedrawOnAllocatebool. Sets whether a widget size allocation changes, the entire widget is queued for drawing.
RequisitionRequisition. Gets or Sets the widget's requisition
[read-only]
RootWindowGdk.Window. The root window this Widget is attached to.
[read-only]
ScreenGdk.Screen. Obtains the Gdk.Screen from the toplevel window associated with this widget.
Sensitivebool. Sets the sensitivity of the Gtk.Widget. A widget is sensitive if the user can interact with it, otherwise, it is grayed.
[read-only]
SettingsSettings. Obtains the settings object holding the settings (global property settings, RC file information, etc) used for this widget.
StateStateType. Sets or obtains the state of a widget (insensitive, prelighted, etc.).
StyleStyle. The style of the widget.
TooltipMarkupstring. Documentation for this section has not yet been entered.
TooltipTextstring. Documentation for this section has not yet been entered.
TooltipWindowWindow. Documentation for this section has not yet been entered.
[read-only]
ToplevelWidget. Obtains the topmost widget in the container hierarchy widget is a part of.
Visiblebool. Whether the widget is visible.
[read-only]
VisualGdk.Visual. Obtains the visual that will be used to render widget.
WidgetFlagsWidgetFlags. Contains Widget specific flags values.
WidthRequestint. Override for the width request for the widget.

Public Methods

Activate() : bool
For widgets that can be "activated" (buttons, menu items, etc.) this method activates them.
AddAccelerator(string, AccelGroup, AccelKey)
Installs an accelerator for this widget in accel-group that causes accel_signal to be emitted if the accelerator is activated.
AddAccelerator(string, AccelGroup, uint, Gdk.ModifierType, AccelFlags)
Installs an accelerator for this widget in accel-group that causes accel_signal to be emitted if the accelerator is activated.
AddEvents(int)
Adds the events in the bitfield events to the event mask for widget.
AddMnemonicLabel(Widget)
Adds a widget to the list of mnemonic labels for this widget.
CanActivateAccel(uint) : bool
Determines whether an accelerator that activates the signal identified by signal_id can currently be activated.
ChildFocus(DirectionType) : bool
Move focus to particular widget.
ChildNotify(string)
Emits a Widget.ChildNotified event for the child property on widget.
ClassPath(out uint, out string, out string)
Same as Widget.Path, but always uses the name of a widget's type, never uses a custom name set with Widget.Name.
ClearFlag(WidgetFlags)
Convenince method to clear a flag
CreatePangoContext() : Pango.Context
Creates a new Widget.PangoContext with the appropriate colormap, font description, and base direction for drawing text for widget.
CreatePangoLayout(string) : Pango.Layout
Creates a new Pango.Layout with the appropriate colormap, font description, and base direction for drawing text for widget.
Draw(Gdk.Rectangle)
Deprecated.
EnsureStyle()
Ensures that widget has a style (widget->style).
ErrorBell()
Documentation for this section has not yet been entered.
FreezeChildNotify()
Stops emission of Widget.ChildNotified events on widget.
GetAncestor(GLib.GType) : Widget
Obtains the first ancestor of widget.
GetClipboard(Gdk.Atom) : Clipboard
Returns the clipboard object for the given selection to be used with widget.
GetPointer(out int, out int)
Obtains the location of the mouse pointer in widget coordinates.
GetSizeRequest(out int, out int)
Gets the size request that was explicitly set for the widget using Widget.SetSizeRequest.
GrabDefault()
Causes widget to become the default widget.
GrabFocus()
Causes a widget to have the keyboard focus for the Gtk.Window it's inside.
Hide()
Reverses the effects of Widget.Show, causing the widget to be hidden (invisible to the user).
HideAll()
Recursively hides a widget and any child widgets.
HideOnDelete() : bool
Utility method; intended to be connected to the Widget.DeleteEvent event on a Gtk.Window.
InputShapeCombineMask(Gdk.Pixmap, int, int)
Sets an input shape mask for the widget.
Intersect(Gdk.Rectangle, out Gdk.Rectangle) : bool
Computes the intersection of a widget's area and area.
IsAncestor(Widget) : bool
Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.
KeynavFailed(DirectionType) : bool
Documentation for this section has not yet been entered.
ListMnemonicLabels() : Widget[]
Returns a list of the widgets, normally Labels, for which this widget is a the target of a mnemonic
Map()
Causes a widget to be mapped if it isn't already.
MnemonicActivate(bool) : bool
Activates the targets associated with the mnemonic.
ModifyBase(StateType)
Resets the base color to the default color.
ModifyBase(StateType, Gdk.Color)
Sets the base color for a widget in a particular state.
ModifyBg(StateType)
Resets the background color to the default color.
ModifyBg(StateType, Gdk.Color)
Sets the background color for a widget in a particular state.
ModifyCursor(Gdk.Color, Gdk.Color)
Documentation for this section has not yet been entered.
ModifyFg(StateType)
Resets the foreground color to the default color.
ModifyFg(StateType, Gdk.Color)
Sets the foreground color for a widget in a particular state.
ModifyFont(Pango.FontDescription)
Sets the font to use for a widget.
ModifyStyle(RcStyle)
Modifies style values on the widget.
ModifyText(StateType)
Resets the text color to the default color.
ModifyText(StateType, Gdk.Color)
Sets the text color for a widget in a particular state.
Path(out uint, out string, out string)
Obtains the full path to widget.
static
PopColormap()
Removes a colormap pushed with Widget.PushColormap.
static
PopCompositeChild()
Cancels the effect of a previous call to Widget.PushCompositeChild.
ProcessEvent(Gdk.Event) : bool
Rarely-used method. This method is used to emit the events on a widget.
static
PushColormap(Gdk.Colormap)
Pushes cmap onto a global stack of colormaps.
static
PushCompositeChild()
Makes all newly-created widgets as composite children until the corresponding Widget.PopCompositeChild call.
QueueClear()
Deprecated: Use Widget.QueueDraw() instead.
QueueClearArea(int, int, int, int)
Deprecated equivalent of Widget.QueueDrawArea()
QueueDraw()
Equivalent to calling Widget.QueueDrawArea for the entire area of a widget.
QueueDrawArea(int, int, int, int)
Invalidates the rectangular area of a widget.
QueueResize()
Flags a widget to have its size renegotiated; should be called when a widget for some reason has a new Widget.SizeRequest.
QueueResizeNoRedraw()
This function works like Widget.QueueResize(), except that the widget is not invalidated.
Realize()
Creates the GDK (windowing system) resources associated with a widget.
RefAccessible() : Atk.Object
Gets a reference to an object's Atk.Object implementation.
RegionIntersect(Gdk.Region) : Gdk.Region
Computes the intersection of a widget's area and region, returning the intersection.
RemoveAccelerator(AccelGroup, uint, Gdk.ModifierType) : bool
Removes an accelerator from widget, previously installed with Widget.AddAccelerator.
RemoveMnemonicLabel(Widget)
Removes a widget from the list of mnemonic labels for this widget.
RenderIcon(string, IconSize, string) : Gdk.Pixbuf
A convenience method that uses the theme engine and RC file settings for widget to look up stock_id and render it to a Gdk.Pixbuf.
Reparent(Widget)
Moves a widget from one Gtk.Container to another, handling reference count issues to avoid destroying the widget.
ResetRcStyles()
Reset the styles of widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings.
ResetShapes()
Recursively resets the shape on widget and its descendants.
SendExpose(Gdk.Event) : int
Very rarely-used method. This method is used to emit an Widget.ExposeEvent events on a widget.
SetAccelPath(string, AccelGroup)
Given an accelerator group, accel_group, and an accelerator path, accel_path, sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, widget will be activated.
SetFlag(WidgetFlags)
Convenience method to set a flag.
SetScrollAdjustments(Adjustment, Adjustment) : bool
For widgets that support scrolling, sets the scroll adjustments.
SetSizeRequest(int, int)
Sets the minimum size of a widget; that is, the widget's size request will be width by height.
SetUposition(int, int)
Deprecated way to set the position of a widget.
SetUsize(int, int)
Sets the minimum size of a widget
ShapeCombineMask(Gdk.Pixmap, int, int)
Sets a shape for this widget's GDK window. This allows for transparent windows etc., see Gdk.Window.ShapeCombineMask for more information.
Show()
Flags a widget to be displayed.
ShowAll()
Recursively shows a widget, and any child widgets (if the widget is a container).
ShowNow()
Shows a widget.
SizeAllocate(Gdk.Rectangle)
This method is only used by Gtk.Container subclasses, to assign a size and position to their child widgets.
SizeRequest() : Requisition
Obtains the preferred size of a widget.
StyleGetProperty(string) : object
Obtains the value of a style property of widget.
ThawChildNotify()
Reverts the effect of a previous call to Widget.FreezeChildNotify.
TranslateCoordinates(Widget, int, int, out int, out int) : bool
Translate coordinates relative to widget's allocation to coordinates relative to dest_widget's allocations.
TriggerTooltipQuery()
Documentation for this section has not yet been entered.
Unmap()
Causes a widget to be unmapped if it's currently mapped.
Unparent()
Should be called by implementations of the remove method on Gtk.Container, to dissociate a child from the container.
Unrealize()
Causes a widget to be unrealized (frees all GDK resources associated with the widget).

Protected Methods

OnAccelCanActivate(uint) : bool
Method raised when the Widget.AccelCanActivate event happens; override this for additional functionality.
OnAccelClosuresChanged()
Default handler for the Widget.AccelClosuresChanged event.
OnActivate()
Method raised when the widget is activated, primarily by Widget.Activate.
OnButtonPressEvent(Gdk.EventButton) : bool
Default handler for the Widget.ButtonPressEvent event.
OnButtonReleaseEvent(Gdk.EventButton) : bool
Default handler for the Widget.ButtonReleaseEvent event.
OnChildNotified(IntPtr)
Default handler for the Widget.ChildNotified event.
OnClientEvent(Gdk.EventClient) : bool
Default handler for the Widget.ClientEvent event.
OnCompositedChanged()
Default handler for Widget.CompositedChanged event.
OnConfigureEvent(Gdk.EventConfigure) : bool
Default handler for the Widget.ConfigureEvent event.
OnDeleteEvent(Gdk.Event) : bool
Default handler for the Widget.DeleteEvent event.
OnDestroyEvent(Gdk.Event) : bool
Default handler for the Widget.DestroyEvent event.
OnDirectionChanged(TextDirection)
Default handler for the Widget.DirectionChanged event.
OnDragBegin(Gdk.DragContext)
Default handler for the Widget.DragBegin event.
OnDragDataDelete(Gdk.DragContext)
Default handler for the Widget.DragDataDelete event.
OnDragDataGet(Gdk.DragContext, SelectionData, uint, uint)
Default handler for the Widget.DragDataGet event.
OnDragDataReceived(Gdk.DragContext, int, int, SelectionData, uint, uint)
Default handler for the Widget.DragDataReceived event.
OnDragDrop(Gdk.DragContext, int, int, uint) : bool
Default handler for the Widget.DragDrop event.
OnDragEnd(Gdk.DragContext)
Default handler for the Widget.DragEnd event.
OnDragFailed(Gdk.DragContext, DragResult) : bool
Documentation for this section has not yet been entered.
OnDragLeave(Gdk.DragContext, uint)
Default handler for the Widget.DragLeave event.
OnDragMotion(Gdk.DragContext, int, int, uint) : bool
Default handler for the Widget.DragMotion event.
OnEnterNotifyEvent(Gdk.EventCrossing) : bool
Default handler for the Widget.EnterNotifyEvent event.
OnExposeEvent(Gdk.EventExpose) : bool
Default handler for the Widget.ExposeEvent event.
OnFocused(DirectionType) : bool
Default handler for the Widget.Focused event.
OnFocusGrabbed()
Default handler for the Widget.FocusGrabbed event.
OnFocusInEvent(Gdk.EventFocus) : bool
Default handler for the Widget.FocusInEvent event.
OnFocusOutEvent(Gdk.EventFocus) : bool
Default handler for the Widget.FocusOutEvent event.
OnGrabBrokenEvent(Gdk.EventGrabBroken) : bool
Default handler for the Widget.GrabBrokenEvent event.
OnGrabNotify(bool)
Default handler for the Widget.GrabNotify event.
OnHelpShown(WidgetHelpType) : bool
Default handler for the Widget.HelpShown event.
OnHidden()
Default handler for the Widget.Hidden event.
OnHierarchyChanged(Widget)
Default handler for the Widget.HierarchyChanged event.
OnKeyPressEvent(Gdk.EventKey) : bool
Default handler for the Widget.KeyPressEvent event.
OnKeyReleaseEvent(Gdk.EventKey) : bool
Default handler for the Widget.KeyReleaseEvent event.
OnLeaveNotifyEvent(Gdk.EventCrossing) : bool
Default handler for the Widget.LeaveNotifyEvent event.
OnMapEvent(Gdk.Event) : bool
Default handler for the Widget.MapEvent event.
OnMapped()
Default handler for the Widget.Mapped event.
OnMnemonicActivated(bool) : bool
Default handler for the Widget.MnemonicActivated event.
OnMotionNotifyEvent(Gdk.EventMotion) : bool
Default handler for the Widget.MotionNotifyEvent event.
OnNoExposeEvent(Gdk.Event) : bool
Default handler for the Widget.NoExposeEvent event.
OnParentSet(Widget)
Default handler for the Widget.ParentSet event.
OnPopupMenu() : bool
Default handler for the Widget.PopupMenu event.
OnPropertyNotifyEvent(Gdk.EventProperty) : bool
Default handler for the Widget.PropertyNotifyEvent event.
OnProximityInEvent(Gdk.EventProximity) : bool
Default handler for the Widget.ProximityInEvent event.
OnProximityOutEvent(Gdk.EventProximity) : bool
Default handler for the Widget.ProximityOutEvent event.
OnQueryTooltip(int, int, bool, Tooltip) : bool
Documentation for this section has not yet been entered.
OnRealized()
Default handler for the Widget.Realized event.
OnScreenChanged(Gdk.Screen)
Default handler for the Widget.ScreenChanged event.
OnScrollEvent(Gdk.EventScroll) : bool
Default handler for the Widget.ScrollEvent event.
OnSelectionClearEvent(Gdk.EventSelection) : bool
Default handler for the Widget.SelectionClearEvent event.
OnSelectionGet(SelectionData, uint, uint)
Default handler for the Widget.SelectionGet event.
OnSelectionNotifyEvent(Gdk.EventSelection) : bool
Default handler for the Widget.SelectionNotifyEvent event.
OnSelectionReceived(SelectionData, uint)
Default handler for the Widget.SelectionReceived event.
OnSelectionRequestEvent(Gdk.EventSelection) : bool
Default handler for the Widget.SelectionRequestEvent event.
OnSetScrollAdjustments(Adjustment, Adjustment)
Virtual method to support scrollable widgets.
OnShown()
Default handler for the Widget.Shown event.
OnSizeAllocated(Gdk.Rectangle)
Default handler for the Widget.SizeAllocated event.
OnSizeRequested(ref Requisition)
Default handler for the Widget.SizeRequested event.
OnStateChanged(StateType)
Default handler for the Widget.StateChanged event.
OnStyleSet(Style)
Default handler for the Widget.StyleSet event.
OnUnmapEvent(Gdk.Event) : bool
Default handler for the Widget.UnmapEvent event.
OnUnmapped()
Default handler for the Widget.Unmapped event.
OnUnrealized()
Default handler for the Widget.Unrealized event.
OnVisibilityNotifyEvent(Gdk.EventVisibility) : bool
Default handler for the Widget.VisibilityNotifyEvent event.
OnWidgetEvent(Gdk.Event) : bool
Default handler for the Widget.WidgetEvent event.
OnWidgetEventAfter(Gdk.Event)
Default handler for the Widget.WidgetEventAfter event.
OnWindowStateEvent(Gdk.EventWindowState) : bool
Default handler for the Widget.WindowStateEvent event.

Public Events

AccelCanActivate This signal is present to allow applications and derived widgets to override the default Gtk.Widget handling for determining whether an accelerator can be activated.
AccelClosuresChangedRaised when the closures for this widget's accelerator change.
ButtonPressEventRaised when a button is pressed.
ButtonReleaseEventRaised when a (mouse) button is released on this widget.
ChildNotifiedEmitted when a child has been notified.
ClientEventRaised when a message is received from another application.
CompositedChangedRaised with the composited status changes.
ConfigureEventRaised when the configuration of the window has changed (it has been moved or resized).
DeleteEventRaised when the user has clicked on the "close" button in the window's frame (the button that is automatically set by the window manager).
DestroyEventRaised when this widget is destroyed.
DirectionChangedRaised when the text direction for this widget is changed.
DragBeginRaised on a source widget when the user begins a drag.
DragDataDeleteRaised on a source widget when dragged data is deleted.
DragDataGetRaised when the drag-and-drop process gets data from a source widget.
DragDataReceivedRaised on a destination widget when it receives dragged data.
DragDropRaised on a source widget when dragged data is dropped.
DragEndRaised on a source widget when a drag operation is completed.
DragFailedDocumentation for this section has not yet been entered.
DragLeaveRaised when a drag action leaves this widget.
DragMotionRaised on a source widget when the user is moving a dragged selection.
EnterNotifyEventThe pointer has just entered the widget.
ExposeEventRaised when the widget needs to be (fully or partially) redrawn.
FocusedRaised whenever this widget is focused.
FocusGrabbedRaised when this widget grabs the keyboard focus.
FocusInEventRaised when the widget has just gained the focus.
FocusOutEventRaised when the focus leaves this widget.
GrabBrokenEventRaised when an existing grab is broken by another.
GrabNotifyEmitted when a widget grabs focus.
HelpShownRaised when the help text is shown.
HiddenRaised whenever this widget is hidden.
HierarchyChangedRaised when the hierarchy (parent or child relationships) of this widget or its parent or children changes.
KeyPressEventRaised when a key is pressed within this widget.
KeyReleaseEventRaised when a key is released within this widget.
LeaveNotifyEventRaised when the mouse leaves this widget.
MapEventRaised just after the widget is mapped.
MappedRaised when this widget is mapped.
MnemonicActivatedRaised when someone presses a mnemonic key.
MotionNotifyEventRaised when the pointer moves within this widget.
NoExposeEventEmits NoExposeEvent
ParentSetRaised whenever this widget's parent widget is set.
PopupMenuRaised when this widget's popup menu is activated.
PropertyNotifyEventEmitted when a property is changed.
ProximityInEventRaised when the user is using a stylus or touch screen and their pointer comes near the widget.
ProximityOutEventRaised when the user is using a stylus or touch screen and their pointer leaves the area near the widget.
QueryTooltipDocumentation for this section has not yet been entered.
RealizedEmitted when a widget is realized.
ScreenChangedEmitted when the screen has changed.
ScrollEventRaised when the widget is scrolled.
SelectionClearEventRaised when the current selection is cleared.
SelectionGetRaised when this widget gets a selection from the clipboard.
SelectionNotifyEventEmitted when a selection is made.
SelectionReceivedRaised when this widget is the destination of a received selection.
SelectionRequestEventRaised whenever the widget receives a request for a selection.
ShownRaised when the widget is shown.
SizeAllocatedRaised when size is allocated for this widget.
SizeRequestedRaised when this widget needs to notify another object of its preferred size.
StateChangedRaised when the state of the widget changes.
StyleSetRaised when a Gtk.Style is set for this widget.t
UnmapEventRaised whenever this widget (or its parent, if Widget.ChildVisible is true for the parent) is told to hide itself.
UnmappedRaised when the widget is unmapped on the screen.
UnrealizedRaised when a widget is unrealized.
VisibilityNotifyEventRaised whenever the visibility state of the widget changes--- partially visible or fully visible, for example.
WidgetEventEmits the WidgetEvent.
WidgetEventAfterEmits the WidgetEventAfter.
WindowStateEventEmitted when the Window state changes.