io7m | single-page | multi-page | JSycamore User Manual
2.4.1. Description
Previous
2.4. Windows
Up
2.5. Components
Next

# 2.4.2. Window Decorations

- 2.4.2.1. Standard Components
- 2.4.2.2. Close Button
  - 2.4.2.2.1. Description
  - 2.4.2.2.2. Events
- 2.4.2.3. Maximize Button
  - 2.4.2.3.1. Description
  - 2.4.2.3.2. Events
- 2.4.2.4. Menu Button
  - 2.4.2.4.1. Description
- 2.4.2.5. Resize Handles
  - 2.4.2.5.1. Overview
  - 2.4.2.5.2. ResizeNW Handle
  - 2.4.2.5.3. ResizeN Handle
  - 2.4.2.5.4. ResizeNE Handle
  - 2.4.2.5.5. ResizeE Handle
  - 2.4.2.5.6. ResizeSE Handle
  - 2.4.2.5.7. ResizeS Handle
  - 2.4.2.5.8. ResizeSW Handle
  - 2.4.2.5.9. ResizeW Handle
- 2.4.2.6. Title Bar
- 2.4.2.7. Content Area

## 2.4.2.1. Standard Components

1
Windows are created with a standard set of attached components. These standard components allow users to perform actions such as closing windows, maximizing windows, and moving and resizing windows. Whether these components are visible or not is dependent upon both the window's theme, and other per-window configuration settings. By default, the standard components are visible if the window is configured as being decorated.

### 2.4.2.1.2. Decorated Window

3
As an example, the window shown in the above diagram appears as follows when marked as undecorated:

### 2.4.2.1.4. Undecorated Window

5
Windows can be switched between being decorated or undecorated at any time by setting the value of the decorated attribute. Note that, without window decorations, the user has very little control over the window: They cannot directly close it, move it, or resize it.

## 2.4.2.2. Close Button

## 2.4.2.2.1. Description

1
The close button, when clicked, closes the window. The button is a standard button and therefore follows the same behaviours with respect to keyboard and mouse interaction.
2
For a visible window, the close button is visible iff the following conditions hold:

### 2.4.2.2.1.3. Visibility Conditions

- The window is decorated.
- The window's closeButtonVisibility attribute is set to VISIBILITY_VISIBLE.

## 2.4.2.2.2. Events

1
When a window is closed, an event of type SyWindowClosed will be published.

## 2.4.2.3. Maximize Button

## 2.4.2.3.1. Description

1
The maximize button, when clicked, resizes the window to match the size of the screen's viewport. If the window has already been maximized, clicking the button again returns the window to its previous size. The button is a standard button and therefore follows the same behaviours with respect to keyboard and mouse interaction.
2
For a visible window, the maximize button is visible iff the following conditions hold:

### 2.4.2.3.1.3. Visibility Conditions

- The window is decorated.
- The window's maximizeButtonVisibility attribute is set to VISIBILITY_VISIBLE.

## 2.4.2.3.2. Events

1
When a window is maximized, an event of type SyWindowMaximized will be published. When a window is returned to normal size after having been maximized, an event of type SyWindowUnmaximized will be published.

## 2.4.2.4. Menu Button

## 2.4.2.4.1. Description

1
The menu button, when clicked, opens a menu containing a list of actions that can otherwise be performed by the other standard window buttons. Hypothetically, the menu button is capable of subsuming the functionality of the other window buttons at the cost of having the user go through an intermediate menu to perform actions. The button is a standard button and therefore follows the same behaviours with respect to keyboard and mouse interaction.

### 2.4.2.4.1.2. Menu Button Menu

3
For a visible window, the menu button is visible iff the following conditions hold:

### 2.4.2.4.1.4. Visibility Conditions

- The window is decorated.
- The window's menuButtonVisibility attribute is set to VISIBILITY_VISIBLE.

## 2.4.2.5. Resize Handles

## 2.4.2.5.1. Overview

1
Resize handles are typically placed on the edges and corners of windows (this is dependent upon the theme used), and allow the user to click and drag the handles to resize the windows.
2
There are up to eight visible resize handles, each corresponding to the eight compass directions, and each implementing a specific kind of resize behaviour as detailed in the following sections. The behaviour of each handle is specified in terms of the user dragging the handles on the X and Y axes independently; the resulting effect on the window should be understood to be the sum of the effects along both axes.
3
For a visible window, resize handle H is visible iff the following conditions hold:

### 2.4.2.5.1.4. Visibility Conditions

- The window is decorated.
- The window's theme specifies that H should be visible.

5
Note that it is not technically a requirement for a theme to allow any resize handle to be visible. However, making all handles invisible would be fairly user-hostile. Some applications may choose to design themes where only the southeast resize handle is visible, as this matches the design of many traditional windowing systems.

## 2.4.2.5.2. ResizeNW Handle

1
Dragging the northwest handle N units along the Y axis towards negative infinity will move the window N units towards negative infinity on the Y axis whilst also enlarging the window by N units on the Y axis.
2
Dragging the northwest handle M units along the X axis towards negative infinity will move the window M units towards negative infinity on the X axis whilst also enlarging the window by M units on the X axis.
3
Dragging the northwest handle P units along the Y axis towards positive infinity will move the window P units towards positive infinity on the Y axis whilst also shrinking the window by P units on the Y axis.
4
Dragging the northwest handle Q units along the X axis towards positive infinity will move the window Q units towards positive infinity on the X axis whilst also shrinking the window by Q units on the X axis.

### 2.4.2.5.2.5. Resize NW

## 2.4.2.5.3. ResizeN Handle

1
Dragging the north handle N units along the Y axis towards negative infinity will move the window N units towards negative infinity on the Y axis whilst also enlarging the window by N units on the Y axis.
2
Dragging the north handle M units along the Y axis towards positive infinity will move the window M units towards positive infinity on the Y axis whilst also shrinking the window by M units on the Y axis.
3
Dragging the north handle along the X axis has no effect on the window size or position.

### 2.4.2.5.3.4. Resize N

## 2.4.2.5.4. ResizeNE Handle

1
Dragging the northeast handle N units along the Y axis towards negative infinity will move the window N units towards negative infinity on the Y axis whilst also enlarging the window by N units on the Y axis.
2
Dragging the northeast handle M units along the X axis towards negative infinity will shrink the window by M units on the X axis.
3
Dragging the northeast handle P units along the Y axis towards positive infinity will move the window P units towards positive infinity on the Y axis whilst also shrinking the window by P units on the Y axis.
4
Dragging the northeast handle Q units along the X axis towards positive infinity will enlarge the window by M units on the X axis.

### 2.4.2.5.4.5. Resize NE

## 2.4.2.5.5. ResizeE Handle

1
Dragging the east handle M units along the X axis towards negative infinity will shrink the window by M units on the X axis.
2
Dragging the northeast handle Q units along the X axis towards positive infinity will enlarge the window by M units on the X axis.
3
Dragging the east handle along the Y axis has no effect on the window size or position.

### 2.4.2.5.5.4. Resize E

## 2.4.2.5.6. ResizeSE Handle

1
Dragging the southeast handle N units along the Y axis towards negative infinity will shrink the window by N units on the Y axis.
2
Dragging the southeast handle M units along the X axis towards negative infinity will shrink the window by M units on the X axis.
3
Dragging the southeast handle P units along the Y axis towards positive infinity will enlarge the window by P units on the Y axis.
4
Dragging the southeast handle Q units along the X axis towards positive infinity will enlarge the window by M units on the X axis.

### 2.4.2.5.6.5. Resize SE

## 2.4.2.5.7. ResizeS Handle

1
Dragging the south handle N units along the Y axis towards negative infinity will shrink the window by N units on the Y axis.
2
Dragging the south handle P units along the Y axis towards positive infinity will enlarge the window by P units on the Y axis.
3
Dragging the south handle along the X axis has no effect on the window size or position.

### 2.4.2.5.7.4. Resize S

## 2.4.2.5.8. ResizeSW Handle

1
Dragging the southwest handle N units along the Y axis towards negative infinity will shrink the window by N units on the Y axis.
2
Dragging the southwest handle M units along the X axis towards negative infinity will move the window M units towards negative infinity on the X axis whilst also enlarging the window by M units on the X axis.
3
Dragging the southwest handle P units along the Y axis towards positive infinity will enlarge the window by P units on the Y axis.
4
Dragging the southwest handle Q units along the X axis towards positive infinity will move the window Q units towards positive infinity on the X axis whilst also shrinking the window by Q units on the X axis.

### 2.4.2.5.8.5. Resize SW

## 2.4.2.5.9. ResizeW Handle

1
Dragging the west handle M units along the X axis towards negative infinity will move the window M units towards negative infinity on the X axis whilst also enlarging the window by M units on the X axis.
2
Dragging the west handle Q units along the X axis towards positive infinity will move the window Q units towards positive infinity on the X axis whilst also shrinking the window by Q units on the X axis.
3
Dragging the west handle along the Y axis has no effect on the window size or position.

### 2.4.2.5.9.4. Resize W

## 2.4.2.6. Title Bar

1
The title bar displays the contents of the window's title attribute, and allows the user to move the window by dragging with the mouse.
2
Dragging the title bar M units along the X axis will move the window M units along the X axis.
3
Dragging the title bar N units along the Y axis will move the window N units along the Y axis.
4
For a visible window, the title bar is visible iff the following conditions hold:

### 2.4.2.6.5. Visibility

- The window is decorated.

## 2.4.2.7. Content Area

1
The content area is the rectangular region dedicated to the actual content of the window; it is the component that serves as the parent component of components added to the window for display. The content area itself is effectively invisible; themes should not render the content area as being any particular colour or shape. The content area does not consume any events.
2
For a visible window, the content area is always visible.
2.4.1. Description
Previous
2.4. Windows
Up
2.5. Components
Next
io7m | single-page | multi-page | JSycamore User Manual