public class EventBox extends Bin
Quite a number of Widgets share underlying resources. That's not something
you normally need to worry about as a developer, but if you have called
getWindow()
and find yourself needing an
underlying [org.gnome.gdk
] Window specifically for your
Widget, then use an EventBox.
EventBoxes can also be used for things like painting a different background colour behind an otherwise transparent Widget.
Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
Constructor and Description |
---|
EventBox()
Create a new EventBox.
|
Modifier and Type | Method and Description |
---|---|
void |
setAboveChild(boolean setting)
Whether the EventBox should be "above" its child or not.
|
void |
setVisibleWindow(boolean setting)
Whether the EventBox will have a "visible" child.
|
add, getChildren, remove, setBorderWidth
activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll
public EventBox()
setAboveChild()
and setVisibleWindow()
if necessary.public void setAboveChild(boolean setting)
false
which is usually what you
want (ie, you don't want to mess with existing functionality in a
Widget, just add to it).public void setVisibleWindow(boolean setting)
true
; ordinarily you want the child Widget to be displayed
normally.