ExpandItem

Instances of this class represent a selectable user interface object that represents a expandable item in a expand bar. <p> <dl> <dt><b>Styles:</b></dt> <dd>(none)</dd> <dt><b>Events:</b></dt> <dd>(none)</dd> </dl> </p><p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>

@see ExpandBar @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

@since 3.2

class ExpandItem : Item {
ExpandBar parent;
Control control;
ImageList imageList;
GtkWidget* clientHandle;
GtkWidget* boxHandle;
GtkWidget* labelHandle;
GtkWidget* imageHandle;
bool expanded;
int x;
int y;
int width;
int height;
int imageHeight;
int imageWidth;
int TEXT_INSET;
int BORDER;
int CHEVRON_SIZE;
}

Constructors

this
this(ExpandBar parent, int style)

Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. <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>

this
this(ExpandBar parent, int style, int index)

Constructs a new instance of this class given its parent, a style value describing its behavior and appearance, and the index at which to place it in 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

getControl
Control getControl()

Returns the control that is shown when the item is expanded. If no control has been set, return <code>null</code>.

getExpanded
bool getExpanded()

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

getHeaderHeight
int getHeaderHeight()

Returns the height of the receiver's header

getHeight
int getHeight()

Gets the height of the receiver.

getParent
ExpandBar getParent()

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

setControl
void setControl(Control control)

Sets the control that is shown when the item is expanded.

setExpanded
void setExpanded(bool expanded)

Sets the expanded state of the receiver.

setHeight
void setHeight(int height)

Sets the height of the receiver. This is height of the item when it is expanded, excluding the height of the header.

Inherited Members

From Item

getImage
Image getImage()

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

getText
String getText()

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

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