TrayItem

Instances of this class represent icons that can be placed on the system tray or task bar status area. <p> <dl> <dt><b>Styles:</b></dt> <dd>(none)</dd> <dt><b>Events:</b></dt> <dd>DefaultSelection, MenuDetect, Selection</dd> </dl> </p><p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>

@see <a href="http://www.eclipse.org/swt/snippets/#tray">Tray, TrayItem snippets</a> @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

@since 3.0

Constructors

this
this(Tray parent, int style)

Constructs a new instance of this class given its parent (which must be a <code>Tray</code>) and a style value describing its behavior and appearance. The item is added to the end of the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses. </p>

Members

Functions

addMenuDetectListener
void addMenuDetectListener(MenuDetectListener listener)

Adds the listener to the collection of listeners who will be notified when the platform-specific context menu trigger has occurred, by sending it one of the messages defined in the <code>MenuDetectListener</code> interface.

addSelectionListener
void addSelectionListener(SelectionListener listener)

Adds the listener to the collection of listeners who will be notified when the receiver is selected by the user, by sending it one of the messages defined in the <code>SelectionListener</code> interface. <p> <code>widgetSelected</code> is called when the receiver is selected <code>widgetDefaultSelected</code> is called when the receiver is double-clicked </p>

checkSubclass
void checkSubclass()
Undocumented in source. Be warned that the author may not have intended to support it.
createHandle
void createHandle(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
createWidget
void createWidget(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
deregister
void deregister()
Undocumented in source. Be warned that the author may not have intended to support it.
destroyWidget
void destroyWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
getParent
Tray getParent()

Returns the receiver's parent, which must be a <code>Tray</code>.

getToolTip
ToolTip getToolTip()

Returns the receiver's tool tip, or null if it has not been set.

getToolTipText
String getToolTipText()

Returns the receiver's tool tip text, or null if it has not been set.

getVisible
bool getVisible()

Returns <code>true</code> if the receiver is visible and <code>false</code> otherwise.

gtk_button_press_event
int gtk_button_press_event(GtkWidget* widget, GdkEventButton* event)
Undocumented in source. Be warned that the author may not have intended to support it.
gtk_size_allocate
int gtk_size_allocate(GtkWidget* widget, ptrdiff_t allocation)
Undocumented in source. Be warned that the author may not have intended to support it.
hookEvents
void hookEvents()
Undocumented in source. Be warned that the author may not have intended to support it.
register
void register()
Undocumented in source. Be warned that the author may not have intended to support it.
releaseHandle
void releaseHandle()
Undocumented in source. Be warned that the author may not have intended to support it.
releaseWidget
void releaseWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
removeMenuDetectListener
void removeMenuDetectListener(MenuDetectListener listener)

Removes the listener from the collection of listeners who will be notified when the platform-specific context menu trigger has occurred.

removeSelectionListener
void removeSelectionListener(SelectionListener listener)

Removes the listener from the collection of listeners who will be notified when the receiver is selected by the user.

setImage
void setImage(Image image)

Sets the receiver's image.

setToolTip
void setToolTip(ToolTip toolTip)

Sets the receiver's tool tip to the argument, which may be null indicating that no tool tip should be shown.

setToolTipText
void setToolTipText(String string)

Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.

setVisible
void setVisible(bool visible)

Makes the receiver visible if the argument is <code>true</code>, and makes it invisible otherwise.

Variables

imageHandle
GtkWidget* imageHandle;
Undocumented in source.
imageList
ImageList imageList;
Undocumented in source.
parent
Tray parent;
Undocumented in source.
toolTip
ToolTip toolTip;
Undocumented in source.
toolTipText
String toolTipText;
Undocumented in source.
tooltipsHandle
GtkWidget* tooltipsHandle;
Undocumented in source.

Inherited Members

From Item

text
String text;
Undocumented in source.
image
Image image;
Undocumented in source.
checkSubclass
void checkSubclass()
Undocumented in source. Be warned that the author may not have intended to support it.
getImage
Image getImage()

Returns the receiver's image if it has one, or null if it does not.

getNameText
String getNameText()
Undocumented in source. Be warned that the author may not have intended to support it.
getText
String getText()

Returns the receiver's text, which will be an empty string if it has never been set.

releaseWidget
void releaseWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
setImage
void setImage(Image image)

Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.

setText
void setText(String string)

Sets the receiver's text.

Meta