Decorations

Instances of this class provide the appearance and behavior of <code>Shells</code>, but are not top level shells or dialogs. Class <code>Shell</code> shares a significant amount of code with this class, and is a subclass. <p> IMPORTANT: This class was intended to be abstract and should <em>never</em> be referenced or instantiated. Instead, the class <code>Shell</code> should be used. </p> <p> Instances are always displayed in one of the maximized, minimized or normal states: <ul> <li> When an instance is marked as <em>maximized</em>, the window manager will typically resize it to fill the entire visible area of the display, and the instance is usually put in a state where it can not be resized (even if it has style <code>RESIZE</code>) until it is no longer maximized. </li><li> When an instance is in the <em>normal</em> state (neither maximized or minimized), its appearance is controlled by the style constants which were specified when it was created and the restrictions of the window manager (see below). </li><li> When an instance has been marked as <em>minimized</em>, its contents (client area) will usually not be visible, and depending on the window manager, it may be "iconified" (that is, replaced on the desktop by a small simplified representation of itself), relocated to a distinguished area of the screen, or hidden. Combinations of these changes are also possible. </li> </ul> </p> Note: The styles supported by this class must be treated as <em>HINT</em>s, since the window manager for the desktop on which the instance is visible has ultimate control over the appearance and behavior of decorations. For example, some window managers only support resizable windows and will always assume the RESIZE style, even if it is not set. <dl> <dt><b>Styles:</b></dt> <dd>BORDER, CLOSE, MIN, MAX, NO_TRIM, RESIZE, TITLE, ON_TOP, TOOL</dd> <dt><b>Events:</b></dt> <dd>(none)</dd> </dl> Class <code>SWT</code> provides two "convenience constants" for the most commonly required style combinations: <dl> <dt><code>SHELL_TRIM</code></dt> <dd> the result of combining the constants which are required to produce a typical application top level shell: (that is, <code>CLOSE | TITLE | MIN | MAX | RESIZE</code>) </dd> <dt><code>DIALOG_TRIM</code></dt> <dd> the result of combining the constants which are required to produce a typical application dialog shell: (that is, <code>TITLE | CLOSE | BORDER</code>) </dd> </dl> <p> IMPORTANT: This class is intended to be subclassed <em>only</em> within the SWT implementation. </p>

@see #getMinimized @see #getMaximized @see Shell @see SWT @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

Constructors

this
this()
Undocumented in source.
this
this(Composite 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>

Members

Aliases

sort
alias sort = Canvas.sort
Undocumented in source.

Functions

_setImages
void _setImages(Image[] images)
Undocumented in source. Be warned that the author may not have intended to support it.
addMenu
void addMenu(Menu menu)
Undocumented in source. Be warned that the author may not have intended to support it.
checkSubclass
void checkSubclass()
Undocumented in source. Be warned that the author may not have intended to support it.
compare
int compare(ImageData data1, ImageData data2)
Undocumented in source. Be warned that the author may not have intended to support it.
computeTabGroup
Control computeTabGroup()
Undocumented in source. Be warned that the author may not have intended to support it.
computeTabRoot
Control computeTabRoot()
Undocumented in source. Be warned that the author may not have intended to support it.
createAccelGroup
void createAccelGroup()
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.
destroyAccelGroup
void destroyAccelGroup()
Undocumented in source. Be warned that the author may not have intended to support it.
fixAccelGroup
void fixAccelGroup()
Undocumented in source. Be warned that the author may not have intended to support it.
fixDecorations
void fixDecorations(Decorations newDecorations, Control control, Menu[] menus)
Undocumented in source. Be warned that the author may not have intended to support it.
getDefaultButton
Button getDefaultButton()

Returns the receiver's default button if one had previously been set, otherwise returns null.

getImage
Image getImage()

Returns the receiver's image if it had previously been set using <code>setImage()</code>. The image is typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states. <p> Note: This method will return null if called before <code>setImage()</code> is called. It does not provide access to a window manager provided, "default" image even if one exists. </p>

getImages
Image[] getImages()

Returns the receiver's images if they had previously been set using <code>setImages()</code>. Images are typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states. Depending where the icon is displayed, the platform chooses the icon with the "best" attributes. It is expected that the array will contain the same icon rendered at different sizes, with different depth and transparency attributes.

getMaximized
bool getMaximized()

Returns <code>true</code> if the receiver is currently maximized, and false otherwise. <p>

getMenuBar
Menu getMenuBar()

Returns the receiver's menu bar if one had previously been set, otherwise returns null.

getMinimized
bool getMinimized()

Returns <code>true</code> if the receiver is currently minimized, and false otherwise. <p>

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 is the string that the window manager will typically display as the receiver's <em>title</em>. If the text has not previously been set, returns an empty string.

isReparentable
bool isReparentable()
Undocumented in source. Be warned that the author may not have intended to support it.
isTabGroup
bool isTabGroup()
Undocumented in source. Be warned that the author may not have intended to support it.
isTabItem
bool isTabItem()
Undocumented in source. Be warned that the author may not have intended to support it.
menuShell
Decorations menuShell()
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.
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.
removeMenu
void removeMenu(Menu menu)
Undocumented in source. Be warned that the author may not have intended to support it.
restoreFocus
bool restoreFocus()
Undocumented in source. Be warned that the author may not have intended to support it.
setDefaultButton
void setDefaultButton(Button button)

If the argument is not null, sets the receiver's default button to the argument, and if the argument is null, sets the receiver's default button to the first button which was set as the receiver's default button (called the <em>saved default button</em>). If no default button had previously been set, or the saved default button was disposed, the receiver's default button will be set to null. <p> The default button is the button that is selected when the receiver is active and the user presses ENTER. </p>

setImage
void setImage(Image image)

Sets the receiver's image to the argument, which may be null. The image is typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states.

setImages
void setImages(Image[] images)

Sets the receiver's images to the argument, which may be an empty array. Images are typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states. Depending where the icon is displayed, the platform chooses the icon with the "best" attributes. It is expected that the array will contain the same icon rendered at different sizes, with different depth and transparency attributes.

setMaximized
void setMaximized(bool maximized)

Sets the maximized state of the receiver. If the argument is <code>true</code> causes the receiver to switch to the maximized state, and if the argument is <code>false</code> and the receiver was previously maximized, causes the receiver to switch back to either the minimized or normal states. <p> Note: The result of intermixing calls to <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will vary by platform. Typically, the behavior will match the platform user's expectations, but not always. This should be avoided if possible. </p>

setMenuBar
void setMenuBar(Menu menu)

Sets the receiver's menu bar to the argument, which may be null.

setMinimized
void setMinimized(bool minimized)

Sets the minimized stated of the receiver. If the argument is <code>true</code> causes the receiver to switch to the minimized state, and if the argument is <code>false</code> and the receiver was previously minimized, causes the receiver to switch back to either the maximized or normal states. <p> Note: The result of intermixing calls to <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will vary by platform. Typically, the behavior will match the platform user's expectations, but not always. This should be avoided if possible. </p>

setSavedFocus
void setSavedFocus(Control control)
Undocumented in source. Be warned that the author may not have intended to support it.
setText
void setText(String string)

Sets the receiver's text, which is the string that the window manager will typically display as the receiver's <em>title</em>, to the argument, which must not be null.

sort
void sort(Image[] images)
Undocumented in source. Be warned that the author may not have intended to support it.
traverseItem
bool traverseItem(bool next)
Undocumented in source. Be warned that the author may not have intended to support it.
traverseReturn
bool traverseReturn()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

checkStyle
int checkStyle(int style)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

accelGroup
GtkAccelGroup* accelGroup;
Undocumented in source.
defaultButton
Button defaultButton;
Undocumented in source.
image
Image image;
Undocumented in source.
images
Image[] images;
maximized
bool maximized;
Undocumented in source.
menuBar
Menu menuBar;
Undocumented in source.
menus
Menu[] menus;
Undocumented in source.
minimized
bool minimized;
saveDefault
Button saveDefault;
Undocumented in source.
savedFocus
Control savedFocus;
Undocumented in source.
text
String text;
Undocumented in source.
vboxHandle
GtkWidget* vboxHandle;
Undocumented in source.

Inherited Members

From Canvas

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()

Returns the IME.

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)

Sets the receiver's IME.

updateCaret
void updateCaret()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta