Gtk.Widget: Method Members

The methods of Gtk.Widget are listed below. For a list of all members, see the Widget Members list.

See Also: Inherited members from Gtk.Object

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.