- _findMnemonic
dchar _findMnemonic(String str)
Undocumented in source. Be warned that the author may not have intended to support it.
- computeSize
Point computeSize(int wHint, int hHint, bool changed)
Undocumented in source. Be warned that the author may not have intended to support it.
- getAlignment
int getAlignment()
Returns the alignment.
The alignment style (LEFT, CENTER or RIGHT) is returned.
- getImage
Image getImage()
Return the CLabel's image or <code>null</code>.
- getStyle
int getStyle()
Undocumented in source. Be warned that the author may not have intended to support it.
- getText
String getText()
- getToolTipText
String getToolTipText()
Undocumented in source. Be warned that the author may not have intended to support it.
- onDispose
void onDispose(DisposeEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
- onMnemonic
void onMnemonic(TraverseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
- onPaint
void onPaint(PaintEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
- setAlignment
void setAlignment(int align_)
Set the alignment of the CLabel.
Use the values LEFT, CENTER and RIGHT to align image and text within the available space.
- setBackground
void setBackground(Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
- setBackground
void setBackground(Color[] colors, int[] percents)
Specify a gradient of colours to be drawn in the background of the CLabel.
<p>For example, to draw a gradient that varies from dark blue to blue and then to
white and stays white for the right half of the label, use the following call
to setBackground:</p>
<pre>
clabel.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_DARK_BLUE),
display.getSystemColor(SWT.COLOR_BLUE),
display.getSystemColor(SWT.COLOR_WHITE),
display.getSystemColor(SWT.COLOR_WHITE)},
new int[] {25, 50, 100});
</pre>
- setBackground
void setBackground(Color[] colors, int[] percents, bool vertical)
Specify a gradient of colours to be drawn in the background of the CLabel.
<p>For example, to draw a gradient that varies from dark blue to white in the vertical,
direction use the following call
to setBackground:</p>
<pre>
clabel.setBackground(new Color[]{display.getSystemColor(SWT.COLOR_DARK_BLUE),
display.getSystemColor(SWT.COLOR_WHITE)},
new int[] {100}, true);
</pre>
- setBackground
void setBackground(Image image)
Set the image to be drawn in the background of the label.
- setFont
void setFont(Font font)
Undocumented in source. Be warned that the author may not have intended to support it.
- setImage
void setImage(Image image)
Set the label's Image.
The value <code>null</code> clears it.
- setText
void setText(String text)
Set the label's text.
The value <code>null</code> clears it.
- setToolTipText
void setToolTipText(String string)
Undocumented in source. Be warned that the author may not have intended to support it.
- shortenText
String shortenText(GC gc, String t, int width)
Shorten the given text <code>t</code> so that its length doesn't exceed
the given width. The default implementation replaces characters in the
center of the original string with an ellipsis ("...").
Override if you need a different strategy.
- validateOffset
int validateOffset(TextLayout layout, int offset)
Undocumented in source. Be warned that the author may not have intended to support it.
- setBounds
alias setBounds = Composite.setBounds
Undocumented in source.
- caret
Caret caret;
Undocumented in source.
- ime
IME ime;
Undocumented in source.
- drawBackground
void drawBackground(GC gc, int x, int y, int width, int height)
Fills the interior of the rectangle specified by the arguments,
with the receiver's background.
- getCaret
Caret getCaret()
Returns the caret.
<p>
The caret for the control is automatically hidden
and shown when the control is painted or resized,
when focus is gained or lost and when an the control
is scrolled. To avoid drawing on top of the caret,
the programmer must hide and show the caret when
drawing in the window any other time.
</p>
- getIMCaretPos
Point getIMCaretPos()
Undocumented in source. Be warned that the author may not have intended to support it.
- getIME
IME getIME()
- 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_commit
int gtk_commit(GtkIMContext* imcontext, char* text)
Undocumented in source. Be warned that the author may not have intended to support it.
- gtk_expose_event
int gtk_expose_event(GtkWidget* widget, GdkEventExpose* event)
Undocumented in source. Be warned that the author may not have intended to support it.
- gtk_focus_in_event
int gtk_focus_in_event(GtkWidget* widget, GdkEventFocus* event)
Undocumented in source. Be warned that the author may not have intended to support it.
- gtk_focus_out_event
int gtk_focus_out_event(GtkWidget* widget, GdkEventFocus* event)
Undocumented in source. Be warned that the author may not have intended to support it.
- gtk_preedit_changed
int gtk_preedit_changed(GtkIMContext* imcontext)
Undocumented in source. Be warned that the author may not have intended to support it.
- redrawWidget
void redrawWidget(int x, int y, int width, int height, bool redrawAll, bool all, bool trim)
Undocumented in source. Be warned that the author may not have intended to support it.
- releaseChildren
void releaseChildren(bool destroy)
Undocumented in source. Be warned that the author may not have intended to support it.
- scroll
void scroll(int destX, int destY, int x, int y, int width, int height, bool all)
Scrolls a rectangular area of the receiver by first copying
the source area to the destination and then causing the area
of the source which is not covered by the destination to
be repainted. Children that intersect the rectangle are
optionally moved during the operation. In addition, outstanding
paint events are flushed before the source area is copied to
ensure that the contents of the canvas are drawn correctly.
- setBounds
int setBounds(int x, int y, int width, int height, bool move, bool resize)
Undocumented in source. Be warned that the author may not have intended to support it.
- setCaret
void setCaret(Caret caret)
Sets the receiver's caret.
<p>
The caret for the control is automatically hidden
and shown when the control is painted or resized,
when focus is gained or lost and when an the control
is scrolled. To avoid drawing on top of the caret,
the programmer must hide and show the caret when
drawing in the window any other time.
</p>
@param caret the new caret for the receiver, may be null
- setFont
void setFont(Font font)
Undocumented in source. Be warned that the author may not have intended to support it.
- setIME
void setIME(IME ime)
- updateCaret
void updateCaret()
Undocumented in source. Be warned that the author may not have intended to support it.
A Label which supports aligned text and/or an image and different border styles. <p> If there is not enough space a CLabel uses the following strategy to fit the information into the available space: <pre> ignores the indent in left align mode ignores the image and the gap shortens the text by replacing the center portion of the label with an ellipsis shortens the text by removing the center portion of the label </pre> <p> <dl> <dt><b>Styles:</b> <dd>LEFT, RIGHT, CENTER, SHADOW_IN, SHADOW_OUT, SHADOW_NONE</dd> <dt><b>Events:</b> <dd></dd> </dl>
</p><p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>
@see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: CustomControlExample</a> @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>