Remove deprecated documentation sources and references

This commit is contained in:
david-swift 2024-03-31 20:51:03 +02:00
parent 5602a3692c
commit 8ad34dd199
200 changed files with 21 additions and 14512 deletions

View File

@ -1,4 +1,3 @@
version: 1
builder:
configs:
- documentation_targets: [Adwaita]
external_links:
documentation: "aparokshaui.github.io/adwaita-swift/"

View File

@ -27,9 +27,9 @@ Open the project folder in GNOME Builder, Xcode or another IDE.
- The `LICENSE.md` contains an GPL-3.0 license.
- `CONTRIBUTING.md` is this file.
- Directory `Icons` that contains PNG and PXD (Pixelmator Pro) files for the images used in the app and guides.
- Directory `Documentation` that contains the documentation generated with [SourceDocs][1].
- `Sources` contains the source code of the project.
- `Adwaita` contains the source code of the project.
- `Adwaita.docc` contains documentation.
- `Model` is the directory with Adwaita's basis.
- `Data Flow` contains property wrappers and protocols required for managing the updates of a view.
- `Extensions` contains all the extensions of types that are not defined in this project.
@ -48,5 +48,3 @@ Commit and push the fork.
### 6. Pull Request
Open GitHub to submit a pull request. Thank you very much for your contribution!
[1]: https://github.com/SourceDocs/SourceDocs

View File

@ -1,176 +0,0 @@
# Reference Documentation
## Protocols
- [App](protocols/App.md)
- [MenuItem](protocols/MenuItem.md)
- [MenuItemGroup](protocols/MenuItemGroup.md)
- [StateProtocol](protocols/StateProtocol.md)
- [View](protocols/View.md)
- [ViewSwitcherOption](protocols/ViewSwitcherOption.md)
- [Widget](protocols/Widget.md)
- [WindowScene](protocols/WindowScene.md)
- [WindowSceneGroup](protocols/WindowSceneGroup.md)
- [WindowType](protocols/WindowType.md)
- [WindowView](protocols/WindowView.md)
## Structs
- [AboutWindow](structs/AboutWindow.md)
- [ActionRow](structs/ActionRow.md)
- [AppearObserver](structs/AppearObserver.md)
- [Avatar](structs/Avatar.md)
- [Banner](structs/Banner.md)
- [Bin](structs/Bin.md)
- [Binding](structs/Binding.md)
- [Box](structs/Box.md)
- [Button](structs/Button.md)
- [ButtonContent](structs/ButtonContent.md)
- [Carousel](structs/Carousel.md)
- [CenterBox](structs/CenterBox.md)
- [CheckButton](structs/CheckButton.md)
- [Clamp](structs/Clamp.md)
- [ComboRow](structs/ComboRow.md)
- [ContentModifier](structs/ContentModifier.md)
- [EntryRow](structs/EntryRow.md)
- [ExpanderRow](structs/ExpanderRow.md)
- [FileDialog](structs/FileDialog.md)
- [FlowBox](structs/FlowBox.md)
- [ForEach](structs/ForEach.md)
- [Form](structs/Form.md)
- [Freeze](structs/Freeze.md)
- [HStack](structs/HStack.md)
- [HeaderBar](structs/HeaderBar.md)
- [InspectorWrapper](structs/InspectorWrapper.md)
- [Label](structs/Label.md)
- [LevelBar](structs/LevelBar.md)
- [LinkButton](structs/LinkButton.md)
- [ListBox](structs/ListBox.md)
- [Menu](structs/Menu.md)
- [MenuButton](structs/MenuButton.md)
- [MenuSection](structs/MenuSection.md)
- [ModifierStopper](structs/ModifierStopper.md)
- [NavigationSplitView](structs/NavigationSplitView.md)
- [NavigationView](structs/NavigationView.md)
- [NavigationView.NavigationStack](structs/NavigationView.NavigationStack.md)
- [Overlay](structs/Overlay.md)
- [OverlaySplitView](structs/OverlaySplitView.md)
- [PasswordEntryRow](structs/PasswordEntryRow.md)
- [Popover](structs/Popover.md)
- [PreferencesGroup](structs/PreferencesGroup.md)
- [PreferencesPage](structs/PreferencesPage.md)
- [PreferencesRow](structs/PreferencesRow.md)
- [ProgressBar](structs/ProgressBar.md)
- [ScrolledWindow](structs/ScrolledWindow.md)
- [SearchBar](structs/SearchBar.md)
- [SearchEntry](structs/SearchEntry.md)
- [Signal](structs/Signal.md)
- [SpinRow](structs/SpinRow.md)
- [Spinner](structs/Spinner.md)
- [SplitButton](structs/SplitButton.md)
- [State](structs/State.md)
- [StateWrapper](structs/StateWrapper.md)
- [StatusPage](structs/StatusPage.md)
- [Submenu](structs/Submenu.md)
- [SwitchRow](structs/SwitchRow.md)
- [ToastOverlay](structs/ToastOverlay.md)
- [ToggleButton](structs/ToggleButton.md)
- [ToolbarView](structs/ToolbarView.md)
- [ViewStack](structs/ViewStack.md)
- [ViewSwitcher](structs/ViewSwitcher.md)
- [Window](structs/Window.md)
- [WindowTitle](structs/WindowTitle.md)
## Classes
- [GTUIAboutWindow](classes/GTUIAboutWindow.md)
- [GTUIApp](classes/GTUIApp.md)
- [GTUIApplicationWindow](classes/GTUIApplicationWindow.md)
- [GTUIFileDialog](classes/GTUIFileDialog.md)
- [GTUIWindow](classes/GTUIWindow.md)
- [State.Content](classes/State.Content.md)
- [State.Storage](classes/State.Storage.md)
- [ViewStorage](classes/ViewStorage.md)
- [ViewStorage.SignalData](classes/ViewStorage.SignalData.md)
- [WindowStorage](classes/WindowStorage.md)
## Enums
- [Alignment](enums/Alignment.md)
- [ArrayBuilder](enums/ArrayBuilder.md)
- [ArrayBuilder.Component](enums/ArrayBuilder.Component.md)
- [Edge](enums/Edge.md)
- [Icon](enums/Icon.md)
- [Icon.DefaultIcon](enums/Icon.DefaultIcon.md)
- [NavigationView.Action](enums/NavigationView.Action.md)
- [Transition](enums/Transition.md)
- [UpdateManager](enums/UpdateManager.md)
- [ViewBuilder](enums/ViewBuilder.md)
- [ViewBuilder.Component](enums/ViewBuilder.Component.md)
## Extensions
- [ActionRow](extensions/ActionRow.md)
- [App](extensions/App.md)
- [Array](extensions/Array.md)
- [Banner](extensions/Banner.md)
- [Bool](extensions/Bool.md)
- [Button](extensions/Button.md)
- [Carousel](extensions/Carousel.md)
- [Clamp](extensions/Clamp.md)
- [ComboRow](extensions/ComboRow.md)
- [EntryRow](extensions/EntryRow.md)
- [FlowBox](extensions/FlowBox.md)
- [FormSection](extensions/FormSection.md)
- [HeaderBar](extensions/HeaderBar.md)
- [Int](extensions/Int.md)
- [List](extensions/List.md)
- [Menu](extensions/Menu.md)
- [MenuItem](extensions/MenuItem.md)
- [MenuItemGroup](extensions/MenuItemGroup.md)
- [NavigationView](extensions/NavigationView.md)
- [OpaquePointer](extensions/OpaquePointer.md)
- [OverlaySplitView](extensions/OverlaySplitView.md)
- [PasswordEntryRow](extensions/PasswordEntryRow.md)
- [Popover](extensions/Popover.md)
- [ProgressBar](extensions/ProgressBar.md)
- [ScrollView](extensions/ScrollView.md)
- [Set](extensions/Set.md)
- [SpinRow](extensions/SpinRow.md)
- [State](extensions/State.md)
- [StatusPage](extensions/StatusPage.md)
- [String](extensions/String.md)
- [SwitchRow](extensions/SwitchRow.md)
- [Text](extensions/Text.md)
- [ToastOverlay](extensions/ToastOverlay.md)
- [Toggle](extensions/Toggle.md)
- [UInt](extensions/UInt.md)
- [UnsafeMutablePointer](extensions/UnsafeMutablePointer.md)
- [UnsafeMutableRawPointer](extensions/UnsafeMutableRawPointer.md)
- [VStack](extensions/VStack.md)
- [View](extensions/View.md)
- [Widget](extensions/Widget.md)
- [WindowScene](extensions/WindowScene.md)
- [WindowSceneGroup](extensions/WindowSceneGroup.md)
## Typealiases
- [Body](typealiases/Body.md)
- [FormSection](typealiases/FormSection.md)
- [List](typealiases/List.md)
- [MenuBuilder](typealiases/MenuBuilder.md)
- [MenuContent](typealiases/MenuContent.md)
- [NavigationStack](typealiases/NavigationStack.md)
- [Scene](typealiases/Scene.md)
- [SceneBuilder](typealiases/SceneBuilder.md)
- [ScrollView](typealiases/ScrollView.md)
- [Text](typealiases/Text.md)
- [Toggle](typealiases/Toggle.md)
- [VStack](typealiases/VStack.md)
## Methods
- [filedialog_on_open_cb(ptr_file_userData_)](methods/filedialog_on_open_cb(ptr_file_userData_).md)
- [filedialog_on_save_cb(ptr_file_userData_)](methods/filedialog_on_save_cb(ptr_file_userData_).md)
This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs)

View File

@ -1,30 +0,0 @@
**CLASS**
# `GTUIAboutWindow`
A GTUI about window.
## Methods
### `init(filePath:)`
Initialize an about window using the AppStream metadata.
- Parameter filePath: The path.
### `generalData(title:icon:developer:version:)`
Set the general data.
- Parameters:
- title: The app name.
- icon: The app icon.
- developer: The app's developer.
- version: The app's version.
### `website(url:)`
Set the website.
- Parameter url: The website.
### `issues(url:)`
Set the URL for issues.
- Parameter issues: The issues website.

View File

@ -1,80 +0,0 @@
**CLASS**
# `GTUIApp`
The GTUI application.
## Properties
### `updateHandlers`
The handlers which are called when a state changes.
### `appID`
The app's id for the file name for storing the data.
### `pointer`
The pointer to the application.
### `fields`
Fields for additional information.
### `body`
The app's content.
### `sceneStorage`
The scenes that are displayed.
### `overwriteParentID`
A string signaling that the parent should not be overwritten.
## Methods
### `init(_:body:)`
Initialize the GTUI application.
- Parameters:
- id: The application id.
- body: The application's content.
### `onActivate()`
The entry point of the application.
### `run()`
Run the application.
### `addKeyboardShortcut(_:id:window:handler:)`
Add a keyboard shortcut to the application.
- Parameters:
- shortcut: The keyboard shortcut.
- id: The action's id.
- window: Optionally an application window.
- handler: The action's handler.
### `showWindow(_:)`
Focus the window with a certain id. Create the window if it doesn't already exist.
- Parameters:
- id: The window's id.
### `addWindow(_:parent:)`
Add a new window with the content of the window with a certain id.
- Parameters:
- id: The window's id.
- parent: The parent window.
### `setParentWindows()`
Set the parents of every window having a parent window.
### `quit()`
Terminate the application.

View File

@ -1,29 +0,0 @@
**CLASS**
# `GTUIApplicationWindow`
A GTUI application window.
## Properties
### `app`
The window's parent app.
## Methods
### `init(app:)`
Initialize the application window.
- Parameter app: The application.
### `addKeyboardShortcut(_:id:handler:)`
Add a keyboard shortcut.
- Parameters:
- shortcut: The keyboard shortcut.
- id: The action's id.
- handler: The action's handler.
### `setChild(_:)`
Set the window's child.
- Parameter child: The child.

View File

@ -1,77 +0,0 @@
**CLASS**
# `GTUIFileDialog`
A GTUI file dialog window.
## Properties
### `pointer`
The file dialog's pointer.
### `fields`
Fields for additional data.
### `selfAddr`
A link to the file dialog.
### `parent`
The parent window.
### `isImporter`
Whether the file dialog is an importer.
### `folder`
The selected folder in the file dialog.
### `onResult`
A closure triggered on selecting a file in the dialog.
### `onCancel`
A closure triggered when the dialog is canceled.
## Methods
### `init()`
Initialize the window.
### `setParentWindow(_:)`
Set the window's parent window.
- Parameter parent: The parent window.
### `setInitialName(_:)`
Set the initial name.
- Parameter name: The parent window.
### `setExtensions(_:)`
Set the allowed file extensions.
- Parameters:
- extensions: The file extensions.
### `show()`
Display the file dialog.
### `onOpen(_:)`
Run this when a file gets opened.
- Parameter path: The file path.
### `onSave(_:)`
Run this when a file gets saved.
- Parameter path: The file path.
### `onClose()`
Run this when the user cancels the action.

View File

@ -1,69 +0,0 @@
**CLASS**
# `GTUIWindow`
A GTUI window.
## Properties
### `pointer`
The window's pointer.
### `fields`
Fields for additional information.
## Methods
### `init()`
Initialize the window.
### `init(fields:)`
Initialize the window, but not the pointer.
- Parameter fields: The fields.
### `setDefaultSize(width:height:)`
Set the default window size.
- Parameters:
- width: The width.
- height: The height.
### `setResizability(_:)`
Set the resizability.
- Parameter resizable: Whether the window is resizable.
### `setDeletability(_:)`
Set the deletability.
- Parameter deletable: Whether the window is deletable.
### `setTitle(_:)`
Set the window title.
- Parameter title: The window's title.
### `setChild(_:)`
Set the window's child.
- Parameter child: The child.
### `show()`
Present the window.
### `observeHide(observer:)`
Observe when the window is being closed.
- Parameter observer: The signal closure.
### `close()`
Close the window.
### `setParentWindow(_:)`
Set the window's parent window.
- Parameter parent: The parent window.

View File

@ -1,16 +0,0 @@
**CLASS**
# `State.Content`
A class storing the state's content.
## Properties
### `storage`
The storage.
## Methods
### `init(storage:)`
Initialize the content.
- Parameter storage: The storage.

View File

@ -1,29 +0,0 @@
**CLASS**
# `State.Storage`
A class storing the value.
## Properties
### `value`
The stored value.
### `key`
The storage key.
### `folder`
The folder path.
### `update`
Whether to update the affected views.
## Methods
### `init(value:)`
Initialize the storage.
- Parameters:
- value: The value.

View File

@ -1,37 +0,0 @@
**CLASS**
# `ViewStorage.SignalData`
Data to pass to signal handlers.
## Properties
### `closure`
The closure.
### `handler`
The closure as a C handler.
### `threeParamsHandler`
The closure as a C handler with three parameters.
### `fourParamsHandler`
The closure as a C handler with four parameters.
### `fiveParamsHandler`
The closure as a C handler with five parameters.
## Methods
### `init(closure:)`
Initialize the signal data.
- Parameter closure: The signal's closure.
### `init(closure:)`
Initialize the signal data.
- Parameter closure: The signal's closure.

View File

@ -1,76 +0,0 @@
**CLASS**
# `ViewStorage`
Store a rendered view in a view storage.
## Properties
### `pointer`
The pointer.
### `content`
The view's content.
### `state`
The view's state (used in `StateWrapper`).
### `handlers`
The signal handlers.
### `fields`
Other properties.
## Methods
### `init(_:content:state:)`
Initialize a view storage.
- Parameters:
- pointer: The pointer to the Gtk widget.
- content: The view's content.
- state: The view's state.
### `notify(name:id:connectFlags:handler:)`
Connect a handler to the observer of a property.
- Parameters:
- name: The property's name.
- id: The handlers id to separate form others connecting to the signal.
- connectFlags: The GConnectFlags.
- handler: The signal's handler.
### `connectSignal(name:id:connectFlags:argCount:handler:)`
Connect a handler to a signal.
- Parameters:
- name: The signal's name.
- id: The handlers id to separate form others connecting to the signal.
- connectFlags: The GConnectFlags.
- argCount: The number of additional arguments (without the first and the last one).
- handler: The signal's handler.
### `connectSignal(name:id:connectFlags:argCount:handler:)`
Connect a handler to a signal.
- Parameters:
- name: The signal's name.
- id: The handlers id to separate form others connecting to the signal.
- connectFlags: The GConnectFlags.
- argCount: The number of additional arguments (without the first and the last one).
- handler: The signal's handler.
### `modify(_:)`
Modify the view.
- Parameter modify: The modification function.
### `modify(_:_:)`
Convert the pointer to a pointer of a certain type and modify the view.
- Parameters:
- type: The pointer's type.
- modify: The modification function.

View File

@ -1,35 +0,0 @@
**CLASS**
# `WindowStorage`
A storage for an app's window.
## Properties
### `id`
The window's identifier.
### `parentID`
The identifier of the window's parent window.
### `destroy`
Whether the reference to the window should disappear in the next update.
### `window`
The window.
### `view`
The content's storage.
## Methods
### `init(id:window:view:)`
Initialize a window storage.
- Parameters:
- id: The window's identifier.
- window: The window.
- view: The content's storage.

View File

@ -1,35 +0,0 @@
**ENUM**
# `Alignment`
The alignment for a widget.
## Cases
### `fill`
The widget will fill the available space.
### `start`
The widget will start at the beginning of the available space.
### `end`
The widget will end at the end of the available space.
### `center`
The widget will be centered in the available space.
### `baselineFill`
The widget will be baseline aligned in the available space.
### `baselineCenter`
The widget will be baseline aligned at the start of the available space.
## Properties
### `cAlign`
Get the GtkAlign alignment.

View File

@ -1,14 +0,0 @@
**ENUM**
# `ArrayBuilder.Component`
A component used in the ``ArrayBuilder``.
## Cases
### `element(_:)`
An element as a component.
### `components(_:)`
An array of components as a component.

View File

@ -1,75 +0,0 @@
**ENUM**
# `ArrayBuilder`
The ``ArrayBuilder`` is a simple result builder that outputs an array of any type.
You can define any array using Swift's DSL:
```swift
@ArrayBuilder<String> var string: [String] {
"Hello, "
if bool {
"world!"
} else {
"colibri!"
}
for x in 0...10 {
"\nIteration Number \(x)"
}
}
```
## Methods
### `buildBlock(_:)`
Build combined results from statement blocks.
- Parameter components: The components.
- Returns: The components in a component.
### `buildExpression(_:)`
Translate an element into an ``ArrayBuilder.Component``.
- Parameter element: The element to translate.
- Returns: A component created from the element.
### `buildExpression(_:)`
Translate an array of elements into an ``ArrayBuilder.Component``.
- Parameter elements: The elements to translate.
- Returns: A component created from the element.
### `buildExpression(_:)`
Fetch a component.
- Parameter component: A component.
- Returns: The component.
### `buildOptional(_:)`
Enables support for `if` statements without an `else`.
- Parameter component: An optional component.
- Returns: A nonoptional component.
### `buildEither(first:)`
Enables support for `if`-`else` and `switch` statements.
- Parameter component: A component.
- Returns: The component.
### `buildEither(second:)`
Enables support for `if`-`else` and `switch` statements.
- Parameter component: A component.
- Returns: The component.
### `buildArray(_:)`
Enables support for `for..in` loops.
- Parameter components: The components as a two dimensional array.
- Returns: The components as a one dimensional array.
### `buildFinalResult(_:)`
Convert a component to an array of elements.
- Parameter component: The component to convert.
- Returns: The generated array of elements.

View File

@ -1,22 +0,0 @@
**ENUM**
# `Edge`
The edges for a widget.
## Cases
### `leading`
The leading (start) edge.
### `trailing`
The trailing (end) edge.
### `top`
The top edge.
### `bottom`
The bottom edge.

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +0,0 @@
**ENUM**
# `Icon`
An icon.
## Cases
### `default(icon:)`
A preinstalled icon.
- Parameter icon: The default icon.
### `custom(name:)`
A custom icon.
- Parameter name: The icon's name.
## Properties
### `string`
A string representation of the icon.

View File

@ -1,14 +0,0 @@
**ENUM**
# `NavigationView.Action`
An action to run on a view update.
## Cases
### `pop`
Remove the last item.
### `push(component:)`
Add a new item.

View File

@ -1,25 +0,0 @@
**ENUM**
# `Transition`
A transition for a stack.
## Cases
### `none`
### `crossfade`
### `slideRight`
### `coverUp`
### `uncoverUp`
### `coverUpDown`
### `rotateLeft`
## Properties
### `cTransition`
Get the GtkStackTransitionType transition.

View File

@ -1,16 +0,0 @@
**ENUM**
# `UpdateManager`
This type manages view updates.
## Properties
### `blockUpdates`
The class storing the value.
## Methods
### `updateViews(force:)`
Update all of the views.
- Parameter force: Whether to force all views to update.

View File

@ -1,14 +0,0 @@
**ENUM**
# `ViewBuilder.Component`
A component used in the ``ArrayBuilder``.
## Cases
### `element(_:)`
A view as a component.
### `components(_:)`
An array of components as a component.

View File

@ -1,54 +0,0 @@
**ENUM**
# `ViewBuilder`
The ``ViewBuilder`` is a result builder for views.
## Methods
### `buildBlock(_:)`
Build combined results from statement blocks.
- Parameter components: The components.
- Returns: The components in a component.
### `buildExpression(_:)`
Translate an element into a ``ViewBuilder.Component``.
- Parameter element: The element to translate.
- Returns: A component created from the element.
### `buildExpression(_:)`
Translate an array of elements into a ``ViewBuilder.Component``.
- Parameter elements: The elements to translate.
- Returns: A component created from the element.
### `buildExpression(_:)`
Fetch a component.
- Parameter component: A component.
- Returns: The component.
### `buildOptional(_:)`
Enables support for `if` statements without an `else`.
- Parameter component: An optional component.
- Returns: A nonoptional component.
### `buildEither(first:)`
Enables support for `if`-`else` and `switch` statements.
- Parameter component: A component.
- Returns: The component.
### `buildEither(second:)`
Enables support for `if`-`else` and `switch` statements.
- Parameter component: A component.
- Returns: The component.
### `buildFinalResult(_:)`
Convert a component to an array of elements.
- Parameter component: The component to convert.
- Returns: The generated array of elements.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `ActionRow`
## Methods
### `init(_:)`
Initialize an action row.
- Parameter title: The row's title.

View File

@ -1,8 +0,0 @@
**EXTENSION**
# `App`
## Methods
### `main()`
The application's entry point.

View File

@ -1,38 +0,0 @@
**EXTENSION**
# `Array`
## Properties
### `view`
The array's view body is the array itself.
### `cArray`
Get the C version of the array.
## Methods
### `widget(modifiers:)`
Get a widget from a collection of views.
- Parameter modifiers: Modify views before being updated.
- Returns: A widget.
### `update(_:modifiers:updateProperties:)`
Update a collection of views with a collection of view storages.
- Parameters:
- storage: The collection of view storages.
- modifiers: Modify views before being updated.
- updateProperties: Whether to update properties.
### `windows()`
Get the content of an array of window scene groups.
- Returns: The array of windows.
### `checkIndex(_:)`
Check if a given index is valid for the array.
- Parameter index: The index to test.
- Returns: Return whether the index is valid or not.

View File

@ -1,19 +0,0 @@
**EXTENSION**
# `Banner`
## Methods
### `init(_:visible:)`
Initialize a text widget.
- Parameters:
- title: The content.
- visible: Whether the banner is visible.
### `button(_:handler:)`
Configure the banner's button.
- Parameters:
- label: The button's title.
- handler: The button's handler.
- Returns: The banner.

View File

@ -1,11 +0,0 @@
**EXTENSION**
# `Binding`
## Methods
### `model(_:)`
Share an observable model with the child view.
- Parameters
- model: The observable model.
- Returns: The binding.

View File

@ -1,8 +0,0 @@
**EXTENSION**
# `Bool`
## Properties
### `cBool`
Get the gboolean for C.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `Box`
## Methods
### `vertical()`
Initialize a vertical `Libadwaita.Box`.
- Returns: The vertical box.

View File

@ -1,39 +0,0 @@
**EXTENSION**
# `Button`
## Methods
### `init(_:icon:handler:)`
Initialize a button.
- Parameters:
- label: The button's label.
- icon: The button's icon.
- handler: The button's action handler.
### `init(_:handler:)`
Initialize a button.
- Parameters:
- label: The buttons label.
- handler: The button's action handler.
### `keyboardShortcut(_:window:)`
Create a keyboard shortcut for an application window from a button.
Note that the keyboard shortcut is available after the view has been visible for the first time.
- Parameters:
- shortcut: The keyboard shortcut.
- window: The application window.
- Returns: The button.
### `keyboardShortcut(_:app:)`
Create a keyboard shortcut for an application from a button.
Note that the keyboard shortcut is available after the view has been visible for the first time.
- Parameters:
- shortcut: The keyboard shortcut.
- window: The application.
- Returns: The button.

View File

@ -1,10 +0,0 @@
**EXTENSION**
# `Carousel`
## Methods
### `longSwipes(_:)`
Set whether long swipes are allowed or not.
- Parameter longSwipes: Whether long swipes are allowed.
- Returns: The carousel.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `Clamp`
## Methods
### `init(vertical:)`
Initialize either a horizontal or vertical clamp.
- Parameter vertical: Whether it is a vertical clamp.

View File

@ -1,17 +0,0 @@
**EXTENSION**
# `ComboRow`
## Properties
### `values`
### `stringList`
## Methods
### `init(_:selection:values:)`
Initialize a combo row.
- Parameters:
- title: The row's title.
- selection: The selected value.
- values: The available values.

View File

@ -1,26 +0,0 @@
**EXTENSION**
# `EntryRow`
## Properties
### `textField`
## Methods
### `init(_:text:)`
Initialize an entry row.
- Parameters:
- title: The row's title.
- text: The text.
### `onSubmit(_:)`
Set the entry row's subtitle.
- Parameter subtitle: The subtitle.
- Returns: The entry row.
### `secure(text:)`
Let the user securely enter private text.
- Parameter: The text.
- Returns: The entry row.

View File

@ -1,21 +0,0 @@
**EXTENSION**
# `FlowBox`
## Properties
### `selectionField`
The ID for the field storing the selection value.
### `elementsField`
The ID for the field storing the elements.
## Methods
### `init(_:selection:content:)`
Initialize `FlowBox`.
- Parameters:
- elements: The elements.
- selection: The identifier of the selected element. Selection disabled if `nil`.
- content: The view for an element.

View File

@ -1,17 +0,0 @@
**EXTENSION**
# `FormSection`
## Methods
### `init(_:content:)`
Initialize a form section.
- Parameters:
- title: The title.
- content: The content, usually one or more forms.
### `suffix(_:)`
Set the form section's suffix view.
- Parameter suffix: The suffix.
- Returns: The form section.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `GTUIWindow`
## Methods
### `setParentWindow(_:)`
Set the window's parent window.
- Parameter parent: The parent window.

View File

@ -1,35 +0,0 @@
**EXTENSION**
# `HeaderBar`
## Methods
### `init(titleButtons:start:end:)`
Initialize a header bar.
- Parameters:
- titleButtons: Whether the title buttons (e.g. close button) are visible.
- start: The start content.
- end: The end content.
### `empty()`
Initialize an empty header bar.
- Returns: The header bar.
### `start(start:)`
Initialize a header bar with only views at the start.
- Parameter start: The views.
- Returns: The header bar.
### `end(end:)`
Initialize a header bar with only views at the end.
- Parameter start: The views.
- Returns: The header bar.
### `headerBarTitle(view:)`
Set the title widget for the header bar.
- Parameter view: The widget in the header bar.
- Returns: The header bar.

View File

@ -1,12 +0,0 @@
**EXTENSION**
# `Int`
## Properties
### `id`
Get the integer itself as the identifier.
### `cInt`
The C integer.

View File

@ -1,48 +0,0 @@
**EXTENSION**
# `Libadwaita.FileDialog`
## Properties
### `importer`
An ID for the importer field.
### `folder`
An ID for the folder field.
### `result`
An ID for the result field.
### `cancel`
An ID for the cancel field.
### `isImporter`
Whether the file dialog is an importer.
### `folder`
The selected folder in the file dialog.
### `onResult`
A closure triggered on selecting a file in the dialog.
### `onCancel`
A closure triggered when the dialog is canceled.
## Methods
### `setParentWindow(_:)`
Set the window's parent window.
- Parameter parent: The parent window.
Currently not implemented.
### `show()`
Display the file dialog.

View File

@ -1,25 +0,0 @@
**EXTENSION**
# `List`
## Properties
### `selectionField`
The ID for the field storing the selection value.
### `elementsField`
The ID for the field storing the elements.
## Methods
### `init(_:selection:content:)`
Initialize `List`.
- Parameters:
- elements: The elements.
- selection: The identifier of the selected element. Selection disabled if `nil`.
- content: The view for an element.
### `sidebarStyle()`
Add the "navigation-sidebar" style class.

View File

@ -1,23 +0,0 @@
**EXTENSION**
# `Menu`
## Methods
### `init(_:icon:app:window:content:)`
Initialize a menu button.
- Parameters:
- label: The button's label.
- icon: The button's icon.
- app: The application.
- window: The application window.
- content: The menu's content.
### `init(_:app:window:content:)`
Initialize a menu button.
- Parameters:
- label: The buttons label.
- app: The application.
- window: The application window.
- content: The menu's content.

View File

@ -1,8 +0,0 @@
**EXTENSION**
# `MenuItem`
## Properties
### `content`
The menu item's content is itself.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `MenuItemGroup`
## Methods
### `addMenuItems(menu:app:window:)`
Add the menu items described by the group to a menu.
- Parameter menu: The menu.

View File

@ -1,23 +0,0 @@
**EXTENSION**
# `NativeWidgetPeer`
## Methods
### `update(_:modifiers:)`
A `Libadwaita.NativeWidgetPeer` is static.
- Parameters:
- storage: The view storage.
- modifiers: Modify views before being updated.
### `container(modifiers:)`
A `Libadwaita.NativeWidgetPeer`'s container is itself.
- Parameter modifiers: Modify views before being updated.
- Returns: The view storage.
### `modifier(code:)`
Get a modifier stirng.
- Parameter code: The modifier.
- Returns: The string.

View File

@ -1,18 +0,0 @@
**EXTENSION**
# `NavigationView`
## Properties
### `componentID`
The ID for the component field in a content storage.
## Methods
### `init(_:_:content:initialView:)`
Initialize a navigation view.
- Parameters:
- stack: The navigation stack for pushing and popping.
- initialTitle: The title of the initial view.
- content: The view for a path component.
- initialView: The view that is displayed when the path is empty.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `OpaquePointer`
## Methods
### `cast()`
Convert an opaque pointer into an unsafe mutable pointer with a defined type.
- Returns: The unsafe mutable pointer.

View File

@ -1,18 +0,0 @@
**EXTENSION**
# `OverlaySplitView`
## Methods
### `init(visible:sidebar:content:)`
Initialize an overlay split view.
- Parameters:
- visible: Whether the sidebar is visible.
- sidebar: The sidebar content.
- content: The main content.
### `trailingSidebar(_:)`
The position of the sidebar.
- Parameter trailing: Whether the sidebar is at the trailing position.
- Returns: The navigation split view.

View File

@ -1,20 +0,0 @@
**EXTENSION**
# `PasswordEntryRow`
## Properties
### `textField`
## Methods
### `init(_:text:)`
Initialize an entry row.
- Parameters:
- title: The row's title.
- text: The text.
### `onSubmit(_:)`
Set the entry row's subtitle.
- Parameter subtitle: The subtitle.
- Returns: The entry row.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `Popover`
## Methods
### `init(visible:)`
Initialize either a horizontal or vertical clamp.
- Parameter vertical: Whether it is a vertical clamp.

View File

@ -1,11 +0,0 @@
**EXTENSION**
# `ProgressBar`
## Methods
### `init(value:total:)`
Initialize a progress bar widget.
- Parameters:
- value: The value.
- total: The maximum value.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `ScrollView`
## Methods
### `init(content:)`
Initialize a `ScrollView`.
- Parameter content: The view content.

View File

@ -1,39 +0,0 @@
**EXTENSION**
# `Set`
## Properties
### `all`
Horizontal and vertical edges.
### `vertical`
Top and bottom edges.
### `horizontal`
Leading and trailing edges.
### `top`
Top edge.
### `bottom`
Bottom edge.
### `leading`
Leading edge.
### `trailing`
Trailing edge.
## Methods
### `add(_:)`
Add a collection of edges to a collection of edges.
- Parameter edges: The collection of edges.
- Returns: Both collections combined.

View File

@ -1,34 +0,0 @@
**EXTENSION**
# `SpinRow`
## Methods
### `init(_:value:min:max:)`
Initialize a spin row.
- Parameters:
- title: The row's title.
- value: The selected value.
- min: The minimum value.
- max: The maximum value.
### `init(_:value:min:max:)`
Initialize a spin row.
- Parameters:
- title: The row's title.
- value: The selected value.
- min: The minimum value.
- max: The maximum value.
### `step(_:)`
Set the difference a single click on the increase/decrease buttons makes.
- Parameter step: The increase/decrease step.
- Returns: The spin row.
### `step(_:)`
Set the difference a single click on the increase/decrease buttons makes.
- Parameter step: The increase/decrease step.
- Returns: The spin row.

View File

@ -1,27 +0,0 @@
**EXTENSION**
# `State`
## Methods
### `init(wrappedValue:_:folder:forceUpdates:)`
Initialize a property representing a state in the view.
- Parameters:
- wrappedValue: The wrapped value.
- key: The unique storage key of the property.
- folder: The path to the folder containing the JSON file.
- forceUpdates: Whether to force update all available views when the property gets modified.
The folder path will be appended to the XDG data home directory.
### `checkFile()`
Check whether the settings file exists, and, if not, create it.
### `readValue()`
Update the local value with the value from the file.
### `writeCodableValue()`
Update the value on the file with the local value.

View File

@ -1,13 +0,0 @@
**EXTENSION**
# `StatusPage`
## Methods
### `init(_:icon:description:content:)`
Initialize a status page widget.
- Parameters:
- title: The title.
- icon: The icon.
- description: Additional details.
- content: Additional content.

View File

@ -1,47 +0,0 @@
**EXTENSION**
# `String`
## Properties
### `mainContent`
A label for main content in a view storage.
### `transition`
A label for the transition data in a GTUI widget's fields.
### `navigationLabel`
A label for the navigation label in a GTUI widget's fields.
## Methods
### `ctrl()`
Add the Ctrl key to a shortcut.
- Returns: The shortcut.
### `shift()`
Add the Shift key to a shortcut.
- Returns: The shortcut.
### `alt()`
Add the Alt key to a shortcut.
- Returns: The shortcut.
### `meta()`
Add the Meta key to a shortcut.
- Returns: The shortcut.
### `super()`
Add the Super key to a shortcut.
- Returns: The shortcut.
### `hyper()`
Add the Hyper key to a shortcut.
- Returns: The shortcut.

View File

@ -1,11 +0,0 @@
**EXTENSION**
# `SwitchRow`
## Methods
### `init(_:isOn:)`
Initialize a switch row.
- Parameters:
- title: The row's title.
- isOn: Whether the switch is on.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `Text`
## Methods
### `init(_:)`
Initialize a text widget.
- Parameter text: The content.

View File

@ -1,19 +0,0 @@
**EXTENSION**
# `ToastOverlay`
## Methods
### `init(_:signal:)`
Initialize a toast overlay.
- Parameters:
- title: The toast's title.
- signal: The signal for adding a toast.
### `action(button:handler:)`
Add an action button to the toast.
- Parameters:
- button: The button's label.
- handler: The handler.
- Returns: The toast overlay.

View File

@ -1,24 +0,0 @@
**EXTENSION**
# `Toggle`
## Methods
### `init(_:icon:isOn:)`
Initialize a toggle button.
- Parameters:
- label: The button's label.
- icon: The button's icon.
- isOn: Whether the toggle is on.
### `init(_:isOn:)`
Initialize a toggle button.
- Parameters:
- label: The buttons label.
- isOn: Whether the toggle is on.
### `checkButton()`
Use the check button style.
- Returns: The toggle.

View File

@ -1,8 +0,0 @@
**EXTENSION**
# `UInt`
## Properties
### `cInt`
Convert an unsigned integer into the C form.

View File

@ -1,14 +0,0 @@
**EXTENSION**
# `UnsafeMutablePointer`
## Methods
### `opaque()`
Convert into an opaque pointer.
- Returns: The opaque pointer.
### `cast()`
Convert into an unsafe mutable pointer of another type.
- Returns: The unsafe mutable pointer.

View File

@ -1,9 +0,0 @@
**EXTENSION**
# `UnsafeMutableRawPointer`
## Methods
### `cast()`
Convert into an unsafe mutable pointer of a certain type.
- Returns: The unsafe mutable pointer.

View File

@ -1,11 +0,0 @@
**EXTENSION**
# `VStack`
## Methods
### `init(content:)`
Initialize a `VStack`.
- Parameter content: The view content.
### `init(horizontal:content:)`

View File

@ -1,242 +0,0 @@
**EXTENSION**
# `View`
## Methods
### `widget(modifiers:)`
Wrap the view into a widget.
- Parameter modifiers: Modify views before being updated.
- Returns: The widget.
### `updateStorage(_:modifiers:updateProperties:)`
Update a storage to a view.
- Parameters:
- storage: The storage.
- modifiers: Modify views before being updated.
- updateProperties: Whether to update properties.
### `getState()`
### `storage(modifiers:)`
Get a storage.
- Parameter modifiers: Modify views before being updated.
- Returns: The storage.
### `getModified(modifiers:)`
### `inspectOnAppear(_:)`
Run a function on the widget when it appears for the first time.
- Parameter closure: The function.
- Returns: A view.
### `onAppear(_:)`
Run a function when the view appears for the first time.
- Parameter closure: The function.
- Returns: A view.
### `onClick(handler:)`
Run a function when the widget gets clicked.
- Parameter handler: The function.
- Returns: A view.
### `frame(maxSize:)`
Set the view's maximum width.
- Parameter maxSize: The maximum width.
- Returns: A view.
### `frame(maxWidth:)`
Set the view's maximum width.
- Parameter maxWidth: The maximum width.
- Returns: A view.
### `frame(maxHeight:)`
Set the view's maximum height.
- Parameter maxHeight: The maximum height.
- Returns: A view.
### `modifyContent(_:modify:)`
Replace every occurrence of a certain view type in the content.
- Parameters:
- type: The view type.
- modify: Modify the view.
- Returns: A view.
### `freeze(_:)`
Prevent a view from being updated.
- Parameter freeze: Whether to freeze the view.
- Returns: A view.
### `inspect(_:)`
Modify a GTUI widget before being displayed and when being updated.
- Parameter modify: Modify the widget.
- Returns: A view.
### `padding(_:_:)`
Add padding around a view.
- Parameters:
- padding: The size of the padding.
- edges: The edges which are affected by the padding.
- Returns: A view.
### `hexpand(_:)`
Enable or disable the horizontal expansion.
- Parameter enabled: Whether it is enabled or disabled.
- Returns: A view.
### `vexpand(_:)`
Enable or disable the vertical expansion.
- Parameter enabled: Whether it is enabled or disabled.
- Returns: A view.
### `halign(_:)`
Set the horizontal alignment.
- Parameter align: The alignment.
- Returns: A view.
### `valign(_:)`
Set the vertical alignment.
- Parameter align: The alignment.
- Returns: A view.
### `frame(minWidth:minHeight:)`
Set the view's minimal width or height.
- Parameters:
- minWidth: The minimal width.
- minHeight: The minimal height.
- Returns: A view.
### `transition(_:)`
Set the view's transition.
- Parameter transition: The transition.
- Returns: A view.
### `navigationTitle(_:)`
Set the view's navigation title.
- Parameter label: The navigation title.
- Returns: A view.
### `style(_:)`
Add a style class to the view.
- Parameter style: The style class.
- Returns: A view.
### `onUpdate(_:)`
Run a function when the view gets an update.
- Parameter onUpdate: The function.
- Returns: A view.
### `insensitive(_:)`
Make the view insensitive (useful e.g. in overlays).
- Parameter insensitive: Whether the view is insensitive.
- Returns: A view.
### `visible(_:)`
Set the view's visibility.
- Parameter visible: Whether the view is visible.
- Returns: A view.
### `focused(_:)`
Bind to the view's focus.
- Parameter focus: Whether the view is focused.
- Returns: A view.
### `focus(_:)`
Bind a signal that focuses the view.
- Parameter focus: Whether the view is focused.
- Returns: A view.
### `tooltip(_:)`
Add a tooltip to the widget.
- Parameter tooltip: The tooltip text.
- Returns: A view.
### `stopModifiers()`
Remove all of the content modifiers for the wrapped views.
- Returns: A view.
### `popover(visible:content:)`
Add a popover on top of the view.
- Parameters:
- visible: Whether the popover is displayed.
- content: The popover's content.
- Returns: The view.
### `toast(_:signal:)`
Present a toast when the signal gets activated.
- Parameters:
- title: The title of the toast.
- signal: The signal which activates the presentation of a toast.
- Returns: A view.
### `toast(_:signal:button:handler:)`
Present a toast with a button when the signal gets activated.
- Parameters:
- title: The title of the toast.
- signal: The signal which activates the presentation of a toast.
- button: The button's label.
- handler: The handler for the button.
- Returns: A view.
### `verticalCenter()`
Wrap the view in a vertical stack and center vertically.
- Returns: The view.
### `horizontalCenter()`
Wrap the view in a horizontal stack and center horizontally.
- Returns: The view.
### `topToolbar(visible:_:)`
Add a top toolbar to the view.
- Parameters:
- toolbar: The toolbar's content.
- visible: Whether the toolbar is visible.
- Returns: A view.
### `bottomToolbar(visible:_:)`
Add a bottom toolbar to the view.
- Parameters:
- toolbar: The toolbar's content.
- visible: Whether the toolbar is visible.
- Returns: A view.
### `overlay(_:)`
Add an overlay view.
- Parameters:
- overlay: The overlay view.
- Returns: A view.

View File

@ -1,8 +0,0 @@
**EXTENSION**
# `Widget`
## Properties
### `view`
A widget's view is empty.

View File

@ -1,27 +0,0 @@
**EXTENSION**
# `WindowScene`
## Properties
### `scene`
The window scene's body is itself.
## Methods
### `appKeyboardShortcut(_:action:)`
Add a keyboard shortcut that is available for the whole app.
- Parameters:
- shortcut: The keyboard shortcut.
- The closure to execute.
### `updateAppShortcuts(app:)`
Update the app shortcuts.
Call this function in types of window scene.
### `quitShortcut()`
Add the shortcut "<Ctrl>q" which terminates the application.
- Returns: The app.

View File

@ -1,17 +0,0 @@
**EXTENSION**
# `WindowSceneGroup`
## Methods
### `windows()`
Get the windows described by the group.
- Returns: The windows.
### `update(_:app:force:)`
Update the windows described by the group.
- Parameters:
- storage: The window's storage.
- app: The application.
- force: Whether to force update all the views.

View File

@ -1,7 +0,0 @@
### `filedialog_on_open_cb(ptr:file:userData:)`
Run when a file should be opened.
- Parameters:
- ptr: The pointer.
- file: The path to the file.
- userData: The file dialog data.

View File

@ -1,7 +0,0 @@
### `filedialog_on_save_cb(ptr:file:userData:)`
Run when a file should be saved.
- Parameters:
- ptr: The pointer.
- file: The path to the file.
- userData: The file dialog data.

View File

@ -1,37 +0,0 @@
**PROTOCOL**
# `App`
A structure conforming to `App` is the entry point of your app.
```swift
@main
struct Test: App {
let id = "io.github.AparokshaUI.TestApp"
var app: GTUIApp!
var scene: Scene {
WindowScene()
}
}
```
## Properties
### `id`
The app's application ID.
### `scene`
The app's windows.
### `app`
The app.
## Methods
### `init()`
An app has to have an `init()` initializer.

View File

@ -1,14 +0,0 @@
**PROTOCOL**
# `MenuItem`
A structure representing the content for a certain menu item type.
## Methods
### `addMenuItem(menu:app:window:)`
Add the menu item to a certain menu.
- Parameters:
- menu: The menu.
- app: The application containing the menu.
- window: The application window containing the menu.

View File

@ -1,10 +0,0 @@
**PROTOCOL**
# `MenuItemGroup`
A structure conforming to `MenuItemGroup` can be added to the content accepting a menu.
## Properties
### `content`
The menu's content.

View File

@ -1,34 +0,0 @@
**PROTOCOL**
# `Observable`
A protocol allowing a class to be observed by a view, window or app.
Views, windows and apps will automatically observe all of its children with an observable type.
```swift
@Observable
class ViewState {
var boolean = false
}
@View
struct TestView {
private let state = ViewState()
var view: Body {
// ...
}
}
```
## Properties
### `didChange`
This function gets called when a property changes.
A view will automatically add a function to this variable.

View File

@ -1,10 +0,0 @@
**PROTOCOL**
# `StateProtocol`
An interface for accessing `State` without specifying the generic type.
## Properties
### `content`
The class storing the value.

View File

@ -1,21 +0,0 @@
**PROTOCOL**
# `View`
A structure conforming to `View` is referred to as a view.
It can be part of a body.
```swift
struct Test: View {
var view: Body {
AnotherView()
}
}
```
## Properties
### `view`
The view's content.

View File

@ -1,19 +0,0 @@
**PROTOCOL**
# `ViewSwitcherOption`
The protocol an element type for view switcher has to conform to.
## Properties
### `title`
The title displayed in the switcher and used for identification.
### `icon`
A symbolic representation in the view switcher.
## Methods
### `init(title:)`
Get the element from the title.

View File

@ -1,19 +0,0 @@
**PROTOCOL**
# `Widget`
A widget is a view that know about its GTUI widget.
## Methods
### `container(modifiers:)`
The view storage.
- Parameter modifiers: Modify views before being updated.
### `update(_:modifiers:updateProperties:)`
Update the stored content.
- Parameters:
- storage: The storage to update.
- modifiers: Modify views before being updated
- updateProperties: Whether to update the view's properties.

View File

@ -1,37 +0,0 @@
**PROTOCOL**
# `WindowScene`
A structure representing the content for a certain window type.
## Properties
### `id`
The window type's identifier.
### `parentID`
The identifier of the window's parent window.
### `open`
The number of instances of the window at the startup.
### `appShortcuts`
The keyboard shortcuts on the application's level.
## Methods
### `createWindow(app:)`
Get the storage for the window.
- Parameter app: The application.
- Returns: The storage.
### `update(_:app:force:)`
Update a window storage's content.
- Parameters:
- storage: The storage to update.
- app: The application.
- force: Whether to force update all the views.

View File

@ -1,10 +0,0 @@
**PROTOCOL**
# `WindowSceneGroup`
A structure conforming to `WindowScene` can be added to an app's `scene`.
## Properties
### `scene`
The group's content.

View File

@ -1,20 +0,0 @@
**PROTOCOL**
# `WindowType`
A window type.
## Properties
### `fields`
A dictionary for custom data.
## Methods
### `setParentWindow(_:)`
Set a parent window.
- Parameter parent: The parent window.
### `show()`
Show the window.

View File

@ -1,13 +0,0 @@
**PROTOCOL**
# `WindowView`
A special view that can access the window of the current instance
if located as the first view directly inside a window.
## Methods
### `window(_:)`
Modify the window.
- Parameter window: The window.
- Returns: The window.

View File

@ -1,110 +0,0 @@
**STRUCT**
# `AboutWindow`
A structure representing an about window.
## Properties
### `id`
The window's identifier.
### `open`
Whether an instance of the window type should be opened when the app is starting up.
### `parentID`
The identifier of the window's parent.
### `appShortcuts`
The keyboard shortcuts on the app level.
### `appName`
The app's name.
### `developer`
The developer's name.
### `version`
The app version.
### `icon`
The app icon.
### `website`
The app's website.
### `issues`
The link for opening issues.
### `path`
The path to the app data file.
## Methods
### `init(id:appName:developer:version:)`
Create a window type with a certain identifier and content.
- Parameters:
- id: The identifier.
- appName: The app's name.
- developer: The developer's name.
- version: The app version.
### `init(id:path:)`
Create a window type with a certain identifier and content.
- Parameters:
- id: The identifier.
- path: The path to the app data file.
### `icon(_:)`
Set the app icon.
- Parameter icon: The app icon.
- Returns: The window.
### `website(_:)`
Set the app's website.
- Parameter url: The app's website.
- Returns: The window.
### `issues(_:)`
Set the app's website.
- Parameter url: The URL to the issue tracker.
- Returns: The window.
### `createWindow(app:)`
Get the storage for the window.
- Parameter app: The application.
- Returns: The storage.
### `createGTUIWindow(app:)`
Get the window.
- Parameter app: The application.
- Returns: The window.
### `update(_:app:force:)`
Update a window.
- Parameters:
- storage: The storage to update.
- app: The application.
- force: Whether to force update all the views.
### `updateData(window:)`
Update the data for a window.
- Parameter window: The window.

View File

@ -1,233 +0,0 @@
**STRUCT**
# `ActionRow`
A [class@Gtk.ListBoxRow] used to present actions.
<picture><source srcset="action-row-dark.png" media="(prefers-color-scheme: dark)"><img src="action-row.png" alt="action-row"></picture>
The `AdwActionRow` widget can have a title, a subtitle and an icon. The row
can receive additional widgets at its end, or prefix widgets at its start.
It is convenient to present a preference and its related actions.
`AdwActionRow` is unactivatable by default, giving it an activatable widget
will automatically make it activatable, but unsetting it won't change the
row's activatability.
## AdwActionRow as GtkBuildable
The `AdwActionRow` implementation of the [iface@Gtk.Buildable] interface
supports adding a child at its end by specifying “suffix” or omitting the
“type” attribute of a <child> element.
It also supports adding a child as a prefix widget by specifying “prefix” as
the “type” attribute of a <child> element.
## CSS nodes
`AdwActionRow` has a main CSS node with name `row`.
It contains the subnode `box.header` for its main horizontal box, and
`box.title` for the vertical box containing the title and subtitle labels.
It contains subnodes `label.title` and `label.subtitle` representing
respectively the title label and subtitle label.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `activatableWidget`
The widget to activate when the row is activated.
The row can be activated either by clicking on it, calling
[method@ActionRow.activate], or via mnemonics in the title.
See the [property@PreferencesRow:use-underline] property to enable
mnemonics.
The target widget will be activated by emitting the
[signal@Gtk.Widget::mnemonic-activate] signal on it.
### `iconName`
The icon name for this row.
### `subtitle`
The subtitle for this row.
The subtitle is interpreted as Pango markup unless
[property@PreferencesRow:use-markup] is set to `FALSE`.
### `subtitleLines`
The number of lines at the end of which the subtitle label will be
ellipsized.
If the value is 0, the number of lines won't be limited.
### `subtitleSelectable`
Whether the user can copy the subtitle from the label.
See also [property@Gtk.Label:selectable].
### `title`
The title of the preference represented by this row.
The title is interpreted as Pango markup unless
[property@PreferencesRow:use-markup] is set to `FALSE`.
### `titleLines`
The number of lines at the end of which the title label will be ellipsized.
If the value is 0, the number of lines won't be limited.
### `titleSelectable`
Whether the user can copy the title from the label.
See also [property@Gtk.Label:selectable].
### `useMarkup`
Whether to use Pango markup for the title label.
Subclasses may also use it for other labels, such as subtitle.
See also [func@Pango.parse_markup].
### `useUnderline`
Whether an embedded underline in the title indicates a mnemonic.
### `activated`
This signal is emitted after the row has been activated.
### `suffix`
The body for the widget "suffix".
### `prefix`
The body for the widget "prefix".
### `app`
The application.
### `window`
The window.
## Methods
### `init()`
Initialize `ActionRow`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `activatableWidget(_:)`
The widget to activate when the row is activated.
The row can be activated either by clicking on it, calling
[method@ActionRow.activate], or via mnemonics in the title.
See the [property@PreferencesRow:use-underline] property to enable
mnemonics.
The target widget will be activated by emitting the
[signal@Gtk.Widget::mnemonic-activate] signal on it.
### `iconName(_:)`
The icon name for this row.
### `subtitle(_:)`
The subtitle for this row.
The subtitle is interpreted as Pango markup unless
[property@PreferencesRow:use-markup] is set to `FALSE`.
### `subtitleLines(_:)`
The number of lines at the end of which the subtitle label will be
ellipsized.
If the value is 0, the number of lines won't be limited.
### `subtitleSelectable(_:)`
Whether the user can copy the subtitle from the label.
See also [property@Gtk.Label:selectable].
### `title(_:)`
The title of the preference represented by this row.
The title is interpreted as Pango markup unless
[property@PreferencesRow:use-markup] is set to `FALSE`.
### `titleLines(_:)`
The number of lines at the end of which the title label will be ellipsized.
If the value is 0, the number of lines won't be limited.
### `titleSelectable(_:)`
Whether the user can copy the title from the label.
See also [property@Gtk.Label:selectable].
### `useMarkup(_:)`
Whether to use Pango markup for the title label.
Subclasses may also use it for other labels, such as subtitle.
See also [func@Pango.parse_markup].
### `useUnderline(_:)`
Whether an embedded underline in the title indicates a mnemonic.
### `activated(_:)`
This signal is emitted after the row has been activated.
### `suffix(_:)`
Set the body for "suffix".
- Parameter body: The body.
- Returns: The widget.
### `prefix(_:)`
Set the body for "prefix".
- Parameter body: The body.
- Returns: The widget.

View File

@ -1,29 +0,0 @@
**STRUCT**
# `AppearObserver`
A widget which executes a custom code when being rendered for the first time.
## Properties
### `onAppear`
The function.
### `content`
The content.
## Methods
### `container(modifiers:)`
Get the content's container.
- Parameter modifiers: Modify views before being updated.
- Returns: The content's container.
### `update(_:modifiers:updateProperties:)`
Update the content.
- Parameters:
- storage: The content's storage.
- modifiers: Modify views before being updated.
- updateProperties: Whether to update properties.

View File

@ -1,78 +0,0 @@
**STRUCT**
# `ApplicationWindow`
A structure representing an application window type.
Note that multiple instances of a window can be opened at the same time.
## Properties
### `id`
The window's identifier.
### `content`
The window's content.
### `open`
Whether an instance of the window type should be opened when the app is starting up.
### `shortcuts`
The keyboard shortcuts.
### `appShortcuts`
The keyboard shortcuts on the app level.
## Methods
### `init(id:open:content:)`
Create a window type with a certain identifier and user interface.
- Parameters:
- id: The identifier.
- open: The number of instances of the window type when the app is starting.
- content: The window's content.
### `createWindow(app:)`
Get the storage for the window.
- Parameter app: The application.
- Returns: The storage.
### `createGTUIWindow(app:)`
Get the window.
- Parameter app: The application.
- Returns: The window.
### `getViewStorage(window:)`
Get the storage of the content view.
- Parameter window: The window.
- Returns: The storage of the content of the window.
### `update(_:app:)`
Update a window storage's content.
- Parameter storage: The storage to update.
### `keyboardShortcut(_:action:)`
Add a keyboard shortcut.
- Parameters:
- shortcut: The keyboard shortcut.
- action: The closure to execute when the keyboard shortcut is pressed.
- Returns: The window.
### `updateShortcuts(window:)`
Update the keyboard shortcuts.
- Parameter window: The application window.
### `closeShortcut()`
Add the shortcut "<Ctrl>w" which closes the window.
- Returns: The window.

View File

@ -1,106 +0,0 @@
**STRUCT**
# `Avatar`
A widget displaying an image, with a generated fallback.
<picture><source srcset="avatar-dark.png" media="(prefers-color-scheme: dark)"><img src="avatar.png" alt="avatar"></picture>
`AdwAvatar` is a widget that shows a round avatar.
`AdwAvatar` generates an avatar with the initials of the
[property@Avatar:text] on top of a colored background.
The color is picked based on the hash of the [property@Avatar:text].
If [property@Avatar:show-initials] is set to `FALSE`,
[property@Avatar:icon-name] or `avatar-default-symbolic` is shown instead of
the initials.
Use [property@Avatar:custom-image] to set a custom image.
## CSS nodes
`AdwAvatar` has a single CSS node with name `avatar`.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `iconName`
The name of an icon to use as a fallback.
If no name is set, `avatar-default-symbolic` will be used.
### `showInitials`
Whether initials are used instead of an icon on the fallback avatar.
See [property@Avatar:icon-name] for how to change the fallback icon.
### `size`
The size of the avatar.
### `text`
Sets the text used to generate the fallback initials and color.
It's only used to generate the color if [property@Avatar:show-initials] is
`FALSE`.
### `app`
The application.
### `window`
The window.
## Methods
### `init(showInitials:size:)`
Initialize `Avatar`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `iconName(_:)`
The name of an icon to use as a fallback.
If no name is set, `avatar-default-symbolic` will be used.
### `showInitials(_:)`
Whether initials are used instead of an icon on the fallback avatar.
See [property@Avatar:icon-name] for how to change the fallback icon.
### `size(_:)`
The size of the avatar.
### `text(_:)`
Sets the text used to generate the fallback initials and color.
It's only used to generate the color if [property@Avatar:show-initials] is
`FALSE`.

View File

@ -1,121 +0,0 @@
**STRUCT**
# `Banner`
A bar with contextual information.
<picture><source srcset="banner-dark.png" media="(prefers-color-scheme: dark)"><img src="banner.png" alt="banner"></picture>
Banners are hidden by default, use [property@Banner:revealed] to show them.
Banners have a title, set with [property@Banner:title]. Titles can be marked
up with Pango markup, use [property@Banner:use-markup] to enable it.
The title will be shown centered or left-aligned depending on available
space.
Banners can optionally have a button with text on it, set through
[property@Banner:button-label]. The button can be used with a `GAction`,
or with the [signal@Banner::button-clicked] signal.
## CSS nodes
`AdwBanner` has a main CSS node with the name `banner`.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `buttonLabel`
The label to show on the button.
If set to `""` or `NULL`, the button won't be shown.
The button can be used with a `GAction`, or with the
[signal@Banner::button-clicked] signal.
### `revealed`
Whether the banner is currently revealed.
### `title`
The title for this banner.
See also: [property@Banner:use-markup].
### `useMarkup`
Whether to use Pango markup for the banner title.
See also [func@Pango.parse_markup].
### `buttonClicked`
This signal is emitted after the action button has been clicked.
It can be used as an alternative to setting an action.
### `app`
The application.
### `window`
The window.
## Methods
### `init(title:)`
Initialize `Banner`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `buttonLabel(_:)`
The label to show on the button.
If set to `""` or `NULL`, the button won't be shown.
The button can be used with a `GAction`, or with the
[signal@Banner::button-clicked] signal.
### `revealed(_:)`
Whether the banner is currently revealed.
### `title(_:)`
The title for this banner.
See also: [property@Banner:use-markup].
### `useMarkup(_:)`
Whether to use Pango markup for the banner title.
See also [func@Pango.parse_markup].
### `buttonClicked(_:)`
This signal is emitted after the action button has been clicked.
It can be used as an alternative to setting an action.

View File

@ -1,57 +0,0 @@
**STRUCT**
# `Bin`
A widget with one child.
<picture><source srcset="bin-dark.png" media="(prefers-color-scheme: dark)"><img src="bin.png" alt="bin"></picture>
The `AdwBin` widget has only one child, set with the [property@Bin:child]
property.
It is useful for deriving subclasses, since it provides common code needed
for handling a single child widget.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `child`
The child widget of the `AdwBin`.
### `app`
The application.
### `window`
The window.
## Methods
### `init()`
Initialize `Bin`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `child(_:)`
The child widget of the `AdwBin`.

View File

@ -1,68 +0,0 @@
**STRUCT**
# `Binding`
A property wrapper for a property of a view that binds the property of the parent view.
```swift
struct Grandparent: View {
@State private var state = false
var view: Body {
Parent(value: $state)
}
}
struct Parent: View {
@Binding var value: Bool
var view: Body {
Child(value: $value)
}
}
struct Child: View {
@Binding var value: Bool
var view: Body {
// ...
}
}
```
## Properties
### `wrappedValue`
The value.
### `projectedValue`
Get the value as a binding using the `$` prefix.
### `getValue`
The closure for getting the value.
### `setValue`
The closure for settings the value.
## Methods
### `init(get:set:)`
Initialize a property that is bound from a parent view.
- Parameters:
- get: The closure for getting the value.
- set: The closure for setting the value.
### `constant(_:)`
Initialize a property that does not react to changes in the child view.
- Parameters:
- value: The constant value.
- Returns: The binding.

View File

@ -1,130 +0,0 @@
**STRUCT**
# `Box`
The `GtkBox` widget arranges child widgets into a single row or column.
![An example GtkBox](box.png)
Whether it is a row or column depends on the value of its
[property@Gtk.Orientable:orientation] property. Within the other
dimension, all children are allocated the same size. Of course, the
[property@Gtk.Widget:halign] and [property@Gtk.Widget:valign] properties
can be used on the children to influence their allocation.
Use repeated calls to [method@Gtk.Box.append] to pack widgets into a
`GtkBox` from start to end. Use [method@Gtk.Box.remove] to remove widgets
from the `GtkBox`. [method@Gtk.Box.insert_child_after] can be used to add
a child at a particular position.
Use [method@Gtk.Box.set_homogeneous] to specify whether or not all children
of the `GtkBox` are forced to get the same amount of space.
Use [method@Gtk.Box.set_spacing] to determine how much space will be minimally
placed between all children in the `GtkBox`. Note that spacing is added
*between* the children.
Use [method@Gtk.Box.reorder_child_after] to move a child to a different
place in the box.
# CSS nodes
`GtkBox` uses a single CSS node with name box.
# Accessibility
Until GTK 4.10, `GtkBox` used the `GTK_ACCESSIBLE_ROLE_GROUP` role.
Starting from GTK 4.12, `GtkBox` uses the `GTK_ACCESSIBLE_ROLE_GENERIC` role.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `accessibleRole`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `baselineChild`
The child that determines the baseline, in vertical orientation.
### `homogeneous`
Whether the children should all be the same size.
### `spacing`
The amount of space between children.
### `append`
The body for the widget "append".
### `prepend`
The body for the widget "prepend".
### `app`
The application.
### `window`
The window.
## Methods
### `init(spacing:)`
Initialize `Box`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `accessibleRole(_:)`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `baselineChild(_:)`
The child that determines the baseline, in vertical orientation.
### `homogeneous(_:)`
Whether the children should all be the same size.
### `spacing(_:)`
The amount of space between children.
### `append(_:)`
Set the body for "append".
- Parameter body: The body.
- Returns: The widget.
### `prepend(_:)`
Set the body for "prepend".
- Parameter body: The body.
- Returns: The widget.

View File

@ -1,180 +0,0 @@
**STRUCT**
# `Button`
The `GtkButton` widget is generally used to trigger a callback function that is
called when the button is pressed.
![An example GtkButton](button.png)
The `GtkButton` widget can hold any valid child widget. That is, it can hold
almost any other standard `GtkWidget`. The most commonly used child is the
`GtkLabel`.
# CSS nodes
`GtkButton` has a single CSS node with name button. The node will get the
style classes .image-button or .text-button, if the content is just an
image or label, respectively. It may also receive the .flat style class.
When activating a button via the keyboard, the button will temporarily
gain the .keyboard-activating style class.
Other style classes that are commonly used with `GtkButton` include
.suggested-action and .destructive-action. In special cases, buttons
can be made round by adding the .circular style class.
Button-like widgets like [class@Gtk.ToggleButton], [class@Gtk.MenuButton],
[class@Gtk.VolumeButton], [class@Gtk.LockButton], [class@Gtk.ColorButton]
or [class@Gtk.FontButton] use style classes such as .toggle, .popup, .scale,
.lock, .color on the button node to differentiate themselves from a plain
`GtkButton`.
# Accessibility
`GtkButton` uses the %GTK_ACCESSIBLE_ROLE_BUTTON role.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `accessibleRole`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `actionName`
action-name
### `canShrink`
Whether the size of the button can be made smaller than the natural
size of its contents.
For text buttons, setting this property will allow ellipsizing the label.
If the contents of a button are an icon or a custom widget, setting this
property has no effect.
### `child`
The child widget.
### `hasFrame`
Whether the button has a frame.
### `iconName`
The name of the icon used to automatically populate the button.
### `label`
Text of the label inside the button, if the button contains a label widget.
### `useUnderline`
If set, an underline in the text indicates that the following character is
to be used as mnemonic.
### `activate`
Emitted to animate press then release.
This is an action signal. Applications should never connect
to this signal, but use the [signal@Gtk.Button::clicked] signal.
The default bindings for this signal are all forms of the
<kbd></kbd> and <kbd>Enter</kbd> keys.
### `clicked`
Emitted when the button has been activated (pressed and released).
### `app`
The application.
### `window`
The window.
## Methods
### `init()`
Initialize `Button`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `accessibleRole(_:)`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `actionName(_:)`
action-name
### `canShrink(_:)`
Whether the size of the button can be made smaller than the natural
size of its contents.
For text buttons, setting this property will allow ellipsizing the label.
If the contents of a button are an icon or a custom widget, setting this
property has no effect.
### `child(_:)`
The child widget.
### `hasFrame(_:)`
Whether the button has a frame.
### `iconName(_:)`
The name of the icon used to automatically populate the button.
### `label(_:)`
Text of the label inside the button, if the button contains a label widget.
### `useUnderline(_:)`
If set, an underline in the text indicates that the following character is
to be used as mnemonic.
### `activate(_:)`
Emitted to animate press then release.
This is an action signal. Applications should never connect
to this signal, but use the [signal@Gtk.Button::clicked] signal.
The default bindings for this signal are all forms of the
<kbd></kbd> and <kbd>Enter</kbd> keys.
### `clicked(_:)`
Emitted when the button has been activated (pressed and released).

View File

@ -1,127 +0,0 @@
**STRUCT**
# `ButtonContent`
A helper widget for creating buttons.
<picture><source srcset="button-content-dark.png" media="(prefers-color-scheme: dark)"><img src="button-content.png" alt="button-content"></picture>
`AdwButtonContent` is a box-like widget with an icon and a label.
It's intended to be used as a direct child of [class@Gtk.Button],
[class@Gtk.MenuButton] or [class@SplitButton], when they need to have both an
icon and a label, as follows:
```xml
<object class="GtkButton"><property name="child"><object class="AdwButtonContent"><property name="icon-name">document-open-symbolic</property><property name="label" translatable="yes">_Open</property><property name="use-underline">True</property></object></property></object>
```
`AdwButtonContent` handles style classes and connecting the mnemonic to the
button automatically.
## CSS nodes
```
buttoncontent
├── image
╰── label
```
`AdwButtonContent`'s CSS node is called `buttoncontent`. It contains the
subnodes `image` and `label`.
When inside a `GtkButton` or `AdwSplitButton`, the button will receive the
`.image-text-button` style class. When inside a `GtkMenuButton`, the
internal `GtkButton` will receive it instead.
## Accessibility
`AdwButtonContent` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `canShrink`
Whether the button can be smaller than the natural size of its contents.
If set to `TRUE`, the label will ellipsize.
See [property@Gtk.Button:can-shrink].
### `iconName`
The name of the displayed icon.
If empty, the icon is not shown.
### `label`
The displayed label.
### `useUnderline`
Whether an underline in the text indicates a mnemonic.
The mnemonic can be used to activate the parent button.
See [property@ButtonContent:label].
### `app`
The application.
### `window`
The window.
## Methods
### `init()`
Initialize `ButtonContent`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `canShrink(_:)`
Whether the button can be smaller than the natural size of its contents.
If set to `TRUE`, the label will ellipsize.
See [property@Gtk.Button:can-shrink].
### `iconName(_:)`
The name of the displayed icon.
If empty, the icon is not shown.
### `label(_:)`
The displayed label.
### `useUnderline(_:)`
Whether an underline in the text indicates a mnemonic.
The mnemonic can be used to activate the parent button.
See [property@ButtonContent:label].

View File

@ -1,155 +0,0 @@
**STRUCT**
# `Carousel`
A paginated scrolling widget.
<picture><source srcset="carousel-dark.png" media="(prefers-color-scheme: dark)"><img src="carousel.png" alt="carousel"></picture>
The `AdwCarousel` widget can be used to display a set of pages with
swipe-based navigation between them.
[class@CarouselIndicatorDots] and [class@CarouselIndicatorLines] can be used
to provide page indicators for `AdwCarousel`.
## CSS nodes
`AdwCarousel` has a single CSS node with name `carousel`.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `allowLongSwipes`
Whether to allow swiping for more than one page at a time.
If the value is `FALSE`, each swipe can only move to the adjacent pages.
### `allowMouseDrag`
Sets whether the `AdwCarousel` can be dragged with mouse pointer.
If the value is `FALSE`, dragging is only available on touch.
### `allowScrollWheel`
Whether the widget will respond to scroll wheel events.
If the value is `FALSE`, wheel events will be ignored.
### `interactive`
Whether the carousel can be navigated.
This can be used to temporarily disable the carousel to only allow
navigating it in a certain state.
### `nPages`
The number of pages in a `AdwCarousel`.
### `revealDuration`
Page reveal duration, in milliseconds.
Reveal duration is used when animating adding or removing pages.
### `spacing`
Spacing between pages in pixels.
### `pageChanged`
This signal is emitted after a page has been changed.
It can be used to implement "infinite scrolling" by amending the pages
after every scroll. Note that an empty carousel is indicated by
`(int)index == -1`.
### `elements`
The dynamic widget elements.
### `content`
The dynamic widget content.
### `app`
The application.
### `window`
The window.
## Methods
### `init(_:content:)`
Initialize `Carousel`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `allowLongSwipes(_:)`
Whether to allow swiping for more than one page at a time.
If the value is `FALSE`, each swipe can only move to the adjacent pages.
### `allowMouseDrag(_:)`
Sets whether the `AdwCarousel` can be dragged with mouse pointer.
If the value is `FALSE`, dragging is only available on touch.
### `allowScrollWheel(_:)`
Whether the widget will respond to scroll wheel events.
If the value is `FALSE`, wheel events will be ignored.
### `interactive(_:)`
Whether the carousel can be navigated.
This can be used to temporarily disable the carousel to only allow
navigating it in a certain state.
### `nPages(_:)`
The number of pages in a `AdwCarousel`.
### `revealDuration(_:)`
Page reveal duration, in milliseconds.
Reveal duration is used when animating adding or removing pages.
### `spacing(_:)`
Spacing between pages in pixels.
### `pageChanged(_:)`
This signal is emitted after a page has been changed.
It can be used to implement "infinite scrolling" by amending the pages
after every scroll. Note that an empty carousel is indicated by
`(int)index == -1`.

View File

@ -1,148 +0,0 @@
**STRUCT**
# `CenterBox`
`GtkCenterBox` arranges three children in a row, keeping the middle child
centered as well as possible.
![An example GtkCenterBox](centerbox.png)
To add children to `GtkCenterBox`, use [method@Gtk.CenterBox.set_start_widget],
[method@Gtk.CenterBox.set_center_widget] and
[method@Gtk.CenterBox.set_end_widget].
The sizing and positioning of children can be influenced with the
align and expand properties of the children.
# GtkCenterBox as GtkBuildable
The `GtkCenterBox` implementation of the `GtkBuildable` interface
supports placing children in the 3 positions by specifying “start”, “center”
or “end” as the “type” attribute of a `<child>` element.
# CSS nodes
`GtkCenterBox` uses a single CSS node with the name “box”,
The first child of the `GtkCenterBox` will be allocated depending on the
text direction, i.e. in left-to-right layouts it will be allocated on the
left and in right-to-left layouts on the right.
In vertical orientation, the nodes of the children are arranged from top to
bottom.
# Accessibility
Until GTK 4.10, `GtkCenterBox` used the `GTK_ACCESSIBLE_ROLE_GROUP` role.
Starting from GTK 4.12, `GtkCenterBox` uses the `GTK_ACCESSIBLE_ROLE_GENERIC` role.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `accessibleRole`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `centerWidget`
The widget that is placed at the center position.
### `endWidget`
The widget that is placed at the end position.
In vertical orientation, the end position is at the bottom.
In horizontal orientation, the end position is at the trailing
edge wrt. to the text direction.
### `shrinkCenterLast`
Whether to shrink the center widget after other children.
By default, when there's no space to give all three children their
natural widths, the start and end widgets start shrinking and the
center child keeps natural width until they reach minimum width.
If set to `FALSE`, start and end widgets keep natural width and the
center widget starts shrinking instead.
### `startWidget`
The widget that is placed at the start position.
In vertical orientation, the start position is at the top.
In horizontal orientation, the start position is at the leading
edge wrt. to the text direction.
### `app`
The application.
### `window`
The window.
## Methods
### `init()`
Initialize `CenterBox`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `accessibleRole(_:)`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `centerWidget(_:)`
The widget that is placed at the center position.
### `endWidget(_:)`
The widget that is placed at the end position.
In vertical orientation, the end position is at the bottom.
In horizontal orientation, the end position is at the trailing
edge wrt. to the text direction.
### `shrinkCenterLast(_:)`
Whether to shrink the center widget after other children.
By default, when there's no space to give all three children their
natural widths, the start and end widgets start shrinking and the
center child keeps natural width until they reach minimum width.
If set to `FALSE`, start and end widgets keep natural width and the
center widget starts shrinking instead.
### `startWidget(_:)`
The widget that is placed at the start position.
In vertical orientation, the start position is at the top.
In horizontal orientation, the start position is at the leading
edge wrt. to the text direction.

View File

@ -1,207 +0,0 @@
**STRUCT**
# `CheckButton`
A `GtkCheckButton` places a label next to an indicator.
![Example GtkCheckButtons](check-button.png)
A `GtkCheckButton` is created by calling either [ctor@Gtk.CheckButton.new]
or [ctor@Gtk.CheckButton.new_with_label].
The state of a `GtkCheckButton` can be set specifically using
[method@Gtk.CheckButton.set_active], and retrieved using
[method@Gtk.CheckButton.get_active].
# Inconsistent state
In addition to "on" and "off", check buttons can be an
"in between" state that is neither on nor off. This can be used
e.g. when the user has selected a range of elements (such as some
text or spreadsheet cells) that are affected by a check button,
and the current values in that range are inconsistent.
To set a `GtkCheckButton` to inconsistent state, use
[method@Gtk.CheckButton.set_inconsistent].
# Grouping
Check buttons can be grouped together, to form mutually exclusive
groups - only one of the buttons can be toggled at a time, and toggling
another one will switch the currently toggled one off.
Grouped check buttons use a different indicator, and are commonly referred
to as *radio buttons*.
![Example GtkCheckButtons](radio-button.png)
To add a `GtkCheckButton` to a group, use [method@Gtk.CheckButton.set_group].
When the code must keep track of the state of a group of radio buttons, it
is recommended to keep track of such state through a stateful
`GAction` with a target for each button. Using the `toggled` signals to keep
track of the group changes and state is discouraged.
# CSS nodes
```
checkbutton[.text-button]
├── check
╰── [label]
```
A `GtkCheckButton` has a main node with name checkbutton. If the
[property@Gtk.CheckButton:label] or [property@Gtk.CheckButton:child]
properties are set, it contains a child widget. The indicator node
is named check when no group is set, and radio if the checkbutton
is grouped together with other checkbuttons.
# Accessibility
`GtkCheckButton` uses the %GTK_ACCESSIBLE_ROLE_CHECKBOX role.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `accessibleRole`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `actionName`
action-name
### `active`
If the check button is active.
Setting `active` to %TRUE will add the `:checked:` state to both
the check button and the indicator CSS node.
### `child`
The child widget.
### `inconsistent`
If the check button is in an “in between” state.
The inconsistent state only affects visual appearance,
not the semantics of the button.
### `label`
Text of the label inside the check button, if it contains a label widget.
### `useUnderline`
If set, an underline in the text indicates that the following
character is to be used as mnemonic.
### `activate`
Emitted to when the check button is activated.
The `::activate` signal on `GtkCheckButton` is an action signal and
emitting it causes the button to animate press then release.
Applications should never connect to this signal, but use the
[signal@Gtk.CheckButton::toggled] signal.
The default bindings for this signal are all forms of the
<kbd></kbd> and <kbd>Enter</kbd> keys.
### `toggled`
Emitted when the buttons's [property@Gtk.CheckButton:active]
property changes.
### `app`
The application.
### `window`
The window.
## Methods
### `init()`
Initialize `CheckButton`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `accessibleRole(_:)`
The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.
### `actionName(_:)`
action-name
### `active(_:)`
If the check button is active.
Setting `active` to %TRUE will add the `:checked:` state to both
the check button and the indicator CSS node.
### `child(_:)`
The child widget.
### `inconsistent(_:)`
If the check button is in an “in between” state.
The inconsistent state only affects visual appearance,
not the semantics of the button.
### `label(_:)`
Text of the label inside the check button, if it contains a label widget.
### `useUnderline(_:)`
If set, an underline in the text indicates that the following
character is to be used as mnemonic.
### `activate(_:)`
Emitted to when the check button is activated.
The `::activate` signal on `GtkCheckButton` is an action signal and
emitting it causes the button to animate press then release.
Applications should never connect to this signal, but use the
[signal@Gtk.CheckButton::toggled] signal.
The default bindings for this signal are all forms of the
<kbd></kbd> and <kbd>Enter</kbd> keys.
### `toggled(_:)`
Emitted when the buttons's [property@Gtk.CheckButton:active]
property changes.

View File

@ -1,112 +0,0 @@
**STRUCT**
# `Clamp`
A widget constraining its child to a given size.
<picture><source srcset="clamp-wide-dark.png" media="(prefers-color-scheme: dark)"><img src="clamp-wide.png" alt="clamp-wide"></picture><picture><source srcset="clamp-narrow-dark.png" media="(prefers-color-scheme: dark)"><img src="clamp-narrow.png" alt="clamp-narrow"></picture>
The `AdwClamp` widget constrains the size of the widget it contains to a
given maximum size. It will constrain the width if it is horizontal, or the
height if it is vertical. The expansion of the child from its minimum to its
maximum size is eased out for a smooth transition.
If the child requires more than the requested maximum size, it will be
allocated the minimum size it can fit in instead.
`AdwClamp` can scale with the text scale factor, use the
[property@ClampLayout:unit] property to enable that behavior.
## CSS nodes
`AdwClamp` has a single CSS node with name `clamp`.
## Properties
### `updateFunctions`
Additional update functions for type extensions.
### `appearFunctions`
Additional appear functions for type extensions.
### `child`
The child widget of the `AdwClamp`.
### `maximumSize`
The maximum size allocated to the child.
It is the width if the clamp is horizontal, or the height if it is vertical.
### `tighteningThreshold`
The size above which the child is clamped.
Starting from this size, the clamp will tighten its grip on the child,
slowly allocating less and less of the available size up to the maximum
allocated size. Below that threshold and below the maximum size, the child
will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child,
the child will be allocated all the size up to the maximum.
If the threshold is lower than the minimum size to allocate to the child,
that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum
size makes transitions to and from the maximum size smoother when resizing.
### `app`
The application.
### `window`
The window.
## Methods
### `init()`
Initialize `Clamp`.
### `container(modifiers:)`
Get the widget's view storage.
- Parameter modifiers: The view modifiers.
- Returns: The view storage.
### `update(_:modifiers:updateProperties:)`
Update the widget's view storage.
- Parameters:
- storage: The view storage.
- modifiers: The view modifiers.
- updateProperties: Whether to update the view's properties.
### `child(_:)`
The child widget of the `AdwClamp`.
### `maximumSize(_:)`
The maximum size allocated to the child.
It is the width if the clamp is horizontal, or the height if it is vertical.
### `tighteningThreshold(_:)`
The size above which the child is clamped.
Starting from this size, the clamp will tighten its grip on the child,
slowly allocating less and less of the available size up to the maximum
allocated size. Below that threshold and below the maximum size, the child
will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child,
the child will be allocated all the size up to the maximum.
If the threshold is lower than the minimum size to allocate to the child,
that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum
size makes transitions to and from the maximum size smoother when resizing.

Some files were not shown because too many files have changed in this diff Show More