public class Image extends Misc
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 |
---|
Image()
Create a new, but empty, Image Widget.
|
Image(Icon icon,
IconSize size)
Construct a new Image based on an icon which is in the icons theme.
|
Image(Pixbuf pixbuf)
Construct a new Image Widget from an image already loaded into a
Pixbuf.
|
Image(Stock stock,
IconSize size)
Construct a new Image based on one of the Stock icons.
|
Image(String filename)
Construct a new Image Widget from the image located at the specified
path.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Reset this Image to be empty.
|
void |
setImage(Icon icon,
IconSize size)
Specify the icon to be displayed by this Image.
|
void |
setImage(Pixbuf pixbuf)
Specify the Pixbuf to be presented by this Image.
|
void |
setImage(Stock stock,
IconSize size)
Specify a stock icon to be displayed by this Image.
|
void |
setImage(String filename)
Specify the filename to load and parse as image data to be displayed in
this Image.
|
getAlignmentX, getAlignmentY, getPaddingX, getPaddingY, setAlignment, setPadding
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 Image()
Although this can be used as a blank slate upon which you can do
arbitrary Cairo drawing in an Widget.Draw
signal handler,
you are better off using DrawingArea
for that purpose.
public Image(Icon icon, IconSize size)
public Image(Pixbuf pixbuf)
public Image(Stock stock, IconSize size)
In most cases, you shouldn't need this; most of the special purpose
Widgets have constructors which directly use a Stock item (see
ImageMenuItem
or
ToolButton
for example) and which
will take care of the sizing issues for you.
public Image(String filename)
public void clear()
public void setImage(Icon icon, IconSize size)
constructor
taking an Icon instance.public void setImage(Pixbuf pixbuf)
public void setImage(Stock stock, IconSize size)
constructor
taking a Stock instance.public void setImage(String filename)
constructor
.