diff --git a/.spi.yml b/.spi.yml index 82fa3bd..ce3c421 100644 --- a/.spi.yml +++ b/.spi.yml @@ -1,4 +1,3 @@ version: 1 -builder: - configs: - - documentation_targets: [Adwaita] +external_links: + documentation: "aparokshaui.github.io/adwaita-swift/" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4b3e66..ecf05f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/Documentation/Reference/README.md b/Documentation/Reference/README.md deleted file mode 100644 index 9f9d57d..0000000 --- a/Documentation/Reference/README.md +++ /dev/null @@ -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) \ No newline at end of file diff --git a/Documentation/Reference/classes/GTUIAboutWindow.md b/Documentation/Reference/classes/GTUIAboutWindow.md deleted file mode 100644 index 3ddf50b..0000000 --- a/Documentation/Reference/classes/GTUIAboutWindow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/GTUIApp.md b/Documentation/Reference/classes/GTUIApp.md deleted file mode 100644 index e3f0d97..0000000 --- a/Documentation/Reference/classes/GTUIApp.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/GTUIApplicationWindow.md b/Documentation/Reference/classes/GTUIApplicationWindow.md deleted file mode 100644 index 04c3e96..0000000 --- a/Documentation/Reference/classes/GTUIApplicationWindow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/GTUIFileDialog.md b/Documentation/Reference/classes/GTUIFileDialog.md deleted file mode 100644 index 988a882..0000000 --- a/Documentation/Reference/classes/GTUIFileDialog.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/GTUIWindow.md b/Documentation/Reference/classes/GTUIWindow.md deleted file mode 100644 index 963e1ea..0000000 --- a/Documentation/Reference/classes/GTUIWindow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/State.Content.md b/Documentation/Reference/classes/State.Content.md deleted file mode 100644 index 1c0cd02..0000000 --- a/Documentation/Reference/classes/State.Content.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/State.Storage.md b/Documentation/Reference/classes/State.Storage.md deleted file mode 100644 index fa2c671..0000000 --- a/Documentation/Reference/classes/State.Storage.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/ViewStorage.SignalData.md b/Documentation/Reference/classes/ViewStorage.SignalData.md deleted file mode 100644 index 288ab25..0000000 --- a/Documentation/Reference/classes/ViewStorage.SignalData.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/ViewStorage.md b/Documentation/Reference/classes/ViewStorage.md deleted file mode 100644 index 4a9ecf9..0000000 --- a/Documentation/Reference/classes/ViewStorage.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/classes/WindowStorage.md b/Documentation/Reference/classes/WindowStorage.md deleted file mode 100644 index 6513645..0000000 --- a/Documentation/Reference/classes/WindowStorage.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/Alignment.md b/Documentation/Reference/enums/Alignment.md deleted file mode 100644 index ce7a695..0000000 --- a/Documentation/Reference/enums/Alignment.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/ArrayBuilder.Component.md b/Documentation/Reference/enums/ArrayBuilder.Component.md deleted file mode 100644 index 74aed8f..0000000 --- a/Documentation/Reference/enums/ArrayBuilder.Component.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/ArrayBuilder.md b/Documentation/Reference/enums/ArrayBuilder.md deleted file mode 100644 index 47286e4..0000000 --- a/Documentation/Reference/enums/ArrayBuilder.md +++ /dev/null @@ -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 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. diff --git a/Documentation/Reference/enums/Edge.md b/Documentation/Reference/enums/Edge.md deleted file mode 100644 index 88355b6..0000000 --- a/Documentation/Reference/enums/Edge.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/Icon.DefaultIcon.md b/Documentation/Reference/enums/Icon.DefaultIcon.md deleted file mode 100644 index aab9784..0000000 --- a/Documentation/Reference/enums/Icon.DefaultIcon.md +++ /dev/null @@ -1,1431 +0,0 @@ -**ENUM** - -# `Icon.DefaultIcon` - -A preinstalled icon. - -## Cases -### `acAdapter` - -### `accessoriesCalculator` - -### `accessoriesCharacterMap` - -### `accessoriesDictionary` - -### `accessoriesTextEditor` - -### `actionUnavailable` - -### `addressBookNew` - -### `airplaneMode` - -### `alarm` - -### `appRemove` - -### `appletsScreenshooter` - -### `applicationCertificate` - -### `applicationExitRtl` - -### `applicationExit` - -### `applicationRss_plus_xml` - -### `applicationXAddon` - -### `applicationXAppliance` - -### `applicationXExecutable` - -### `applicationXFirmware` - -### `applicationXSharedlib` - -### `applicationsEngineering` - -### `applicationsGames` - -### `applicationsGraphics` - -### `applicationsMultimedia` - -### `applicationsScience` - -### `applicationsSystem` - -### `applicationsUtilities` - -### `appointmentMissed` - -### `appointmentNew` - -### `appointmentSoon` - -### `audioCard` - -### `audioHeadphones` - -### `audioHeadset` - -### `audioInputMicrophone` - -### `audioSpeakersRtl` - -### `audioSpeakers` - -### `audioVolumeHighRtl` - -### `audioVolumeHigh` - -### `audioVolumeLowRtl` - -### `audioVolumeLow` - -### `audioVolumeMediumRtl` - -### `audioVolumeMedium` - -### `audioVolumeMutedRtl` - -### `audioVolumeMuted` - -### `audioVolumeOveramplifiedRtl` - -### `audioVolumeOveramplified` - -### `audioXGeneric` - -### `authFace` - -### `authFingerprint` - -### `authSimLocked` - -### `authSimMissing` - -### `authSim` - -### `authSmartcard` - -### `avatarDefault` - -### `batteryAction` - -### `batteryCautionCharging` - -### `batteryCaution` - -### `batteryEmptyCharging` - -### `batteryEmpty` - -### `batteryFullCharged` - -### `batteryFullCharging` - -### `batteryFull` - -### `batteryGoodCharging` - -### `batteryGood` - -### `batteryLevel_0Charging` - -### `batteryLevel_0` - -### `batteryLevel_10Charging` - -### `batteryLevel_10` - -### `batteryLevel_100Charged` - -### `batteryLevel_100` - -### `batteryLevel_20Charging` - -### `batteryLevel_20` - -### `batteryLevel_30Charging` - -### `batteryLevel_30` - -### `batteryLevel_40Charging` - -### `batteryLevel_40` - -### `batteryLevel_50Charging` - -### `batteryLevel_50` - -### `batteryLevel_60Charging` - -### `batteryLevel_60` - -### `batteryLevel_70Charging` - -### `batteryLevel_70` - -### `batteryLevel_80Charging` - -### `batteryLevel_80` - -### `batteryLevel_90Charging` - -### `batteryLevel_90` - -### `batteryLowCharging` - -### `batteryLow` - -### `batteryMissing` - -### `battery` - -### `bluetoothAcquiring` - -### `bluetoothActive` - -### `bluetoothDisabled` - -### `bluetoothDisconnected` - -### `bluetoothHardwareDisabled` - -### `bluetooth` - -### `bookmarkNew` - -### `callIncoming` - -### `callMissed` - -### `callOutgoing` - -### `callStart` - -### `callStop` - -### `cameraDisabled` - -### `cameraHardwareDisabled` - -### `cameraPhoto` - -### `cameraSwitch` - -### `cameraVideo` - -### `cameraWeb` - -### `capsLock` - -### `changesAllow` - -### `changesPrevent` - -### `channelInsecure` - -### `channelSecure` - -### `chatMessageNew` - -### `checkboxChecked` - -### `checkboxMixed` - -### `checkbox` - -### `colorSelect` - -### `colorimeterColorhug` - -### `completionSnippet` - -### `completionWord` - -### `computerAppleIpad` - -### `computerFail` - -### `computer` - -### `contactNew` - -### `contentLoading` - -### `daytimeSunrise` - -### `daytimeSunset` - -### `dialogError` - -### `dialogInformation` - -### `dialogPassword` - -### `dialogQuestion` - -### `dialogWarning` - -### `displayBrightness` - -### `displayProjector` - -### `documentEdit` - -### `documentNew` - -### `documentOpenRecent` - -### `documentOpen` - -### `documentPageSetup` - -### `documentPrintPreview` - -### `documentPrint` - -### `documentProperties` - -### `documentRevertRtl` - -### `documentRevert` - -### `documentSaveAs` - -### `documentSave` - -### `documentSend` - -### `driveHarddiskIeee1394` - -### `driveHarddiskSolidstate` - -### `driveHarddisk` - -### `driveHarddiskSystem` - -### `driveHarddiskUsb` - -### `driveMultidisk` - -### `driveOptical` - -### `driveRemovableMedia` - -### `editClearAll` - -### `editClearRtl` - -### `editClear` - -### `editCopy` - -### `editCut` - -### `editDelete` - -### `editFindReplace` - -### `editFind` - -### `editPaste` - -### `editRedo` - -### `editSelectAll` - -### `editSelect` - -### `editUndo` - -### `emblemDefault` - -### `emblemDocuments` - -### `emblemFavorite` - -### `emblemImportant` - -### `emblemMusic` - -### `emblemOk` - -### `emblemPhotos` - -### `emblemShared` - -### `emblemSynchronizing` - -### `emblemSystem` - -### `emblemVideos` - -### `emojiActivities` - -### `emojiBody` - -### `emojiFlags` - -### `emojiFood` - -### `emojiNature` - -### `emojiObjects` - -### `emojiPeople` - -### `emojiRecent` - -### `emojiSymbols` - -### `emojiTravel` - -### `emoteLove` - -### `errorCorrect` - -### `faceAngel` - -### `faceAngry` - -### `faceConfused` - -### `faceCool` - -### `faceCrying` - -### `faceDevilish` - -### `faceEmbarrassed` - -### `faceGlasses` - -### `faceKiss` - -### `faceLaugh` - -### `faceMonkey` - -### `facePlain` - -### `faceRaspberry` - -### `faceSad` - -### `faceShutmouth` - -### `faceSick` - -### `faceSmileBig` - -### `faceSmile` - -### `faceSmirk` - -### `faceSurprise` - -### `faceTired` - -### `faceUncertain` - -### `faceWink` - -### `faceWorried` - -### `faceYawn` - -### `findLocation` - -### `focusLegacySystray` - -### `focusTopBar` - -### `focusWindows` - -### `folderDocuments` - -### `folderDownload` - -### `folderDragAccept` - -### `folderMusic` - -### `folderNew` - -### `folderOpen` - -### `folderPictures` - -### `folderPublicshare` - -### `folderRemote` - -### `folderSavedSearch` - -### `folder` - -### `folderTemplates` - -### `folderVideos` - -### `folderVisiting` - -### `fontSelect` - -### `fontXGeneric` - -### `formatIndentLessRtl` - -### `formatIndentLess` - -### `formatIndentMoreRtl` - -### `formatIndentMore` - -### `formatJustifyCenter` - -### `formatJustifyFill` - -### `formatJustifyLeft` - -### `formatJustifyRight` - -### `formatTextBold` - -### `formatTextDirectionLtr` - -### `formatTextDirectionRtl` - -### `formatTextDirection` - -### `formatTextItalic` - -### `formatTextPlaintext` - -### `formatTextRich` - -### `formatTextStrikethrough` - -### `formatTextUnderline` - -### `functionLinear` - -### `gestureSwipeLeft` - -### `gestureSwipeRight` - -### `gnomeDisksStateStandby` - -### `gnomePowerManager` - -### `goBottom` - -### `goDown` - -### `goFirst` - -### `goHome` - -### `goJumpRtl` - -### `goJump` - -### `goLast` - -### `goNext` - -### `goPrevious` - -### `goTop` - -### `goUp` - -### `goaAccountExchange` - -### `goaAccountGoogle` - -### `goaAccountLastfm` - -### `goaAccountMsn` - -### `goaAccountOwncloud` - -### `goaAccount` - -### `goaPanel` - -### `gtk3Demo` - -### `gtk3WidgetFactory` - -### `helpAbout` - -### `helpBrowser` - -### `helpContents` - -### `helpFaq` - -### `imageLoading` - -### `imageMissing` - -### `imageXGeneric` - -### `info` - -### `inodeDirectory` - -### `inputDialpad` - -### `inputGaming` - -### `inputKeyboard` - -### `inputMouse` - -### `inputTablet` - -### `inputTouchpad` - -### `insertImage` - -### `insertLink` - -### `insertObject` - -### `insertText` - -### `keyboardBrightness` - -### `langClass` - -### `langDefine` - -### `langEnum` - -### `langEnumValue` - -### `langFunction` - -### `langInclude` - -### `langMethod` - -### `langNamespace` - -### `langStructField` - -### `langStruct` - -### `langTypedef` - -### `langUnion` - -### `langVariable` - -### `libreofficeBase` - -### `libreofficeCalc` - -### `libreofficeDraw` - -### `libreofficeImpress` - -### `libreofficeMain` - -### `libreofficeMath` - -### `libreofficeWriter` - -### `listAdd` - -### `listDragHandle` - -### `listRemoveAll` - -### `listRemove` - -### `locationServicesActive` - -### `locationServicesDisabled` - -### `mailAttachment` - -### `mailForward` - -### `mailMarkImportant` - -### `mailMarkJunk` - -### `mailMarkNotjunk` - -### `mailMessageNew` - -### `mailRead` - -### `mailRepliedRtl` - -### `mailReplied` - -### `mailReplyAllRtl` - -### `mailReplyAll` - -### `mailReplySender` - -### `mailSendReceive` - -### `mailSend` - -### `mailUnread` - -### `markLocation` - -### `mediaEject` - -### `mediaFlash` - -### `mediaFloppy` - -### `mediaOpticalBd` - -### `mediaOpticalCdAudio` - -### `mediaOpticalCd` - -### `mediaOpticalDvd` - -### `mediaOptical` - -### `mediaPlaybackPause` - -### `mediaPlaybackStart` - -### `mediaPlaybackStop` - -### `mediaPlaylistConsecutive` - -### `mediaPlaylistRepeatSong` - -### `mediaPlaylistRepeat` - -### `mediaPlaylistShuffle` - -### `mediaRecord` - -### `mediaRemovable` - -### `mediaSeekBackward` - -### `mediaSeekForward` - -### `mediaSkipBackward` - -### `mediaSkipForward` - -### `mediaTape` - -### `mediaViewSubtitles` - -### `mediaZip` - -### `microphoneDisabled` - -### `microphoneHardwareDisabled` - -### `microphoneSensitivityHigh` - -### `microphoneSensitivityLow` - -### `microphoneSensitivityMedium` - -### `microphoneSensitivityMuted` - -### `modem` - -### `multimediaPlayerAppleIpodTouch` - -### `multimediaPlayer` - -### `multimediaVolumeControl` - -### `networkCellular_2g` - -### `networkCellular_3g` - -### `networkCellular_4g` - -### `networkCellular_5g` - -### `networkCellularAcquiringRtl` - -### `networkCellularAcquiring` - -### `networkCellularConnected` - -### `networkCellularDisabledRtl` - -### `networkCellularDisabled` - -### `networkCellularEdge` - -### `networkCellularGprs` - -### `networkCellularHardwareDisabledRtl` - -### `networkCellularHardwareDisabled` - -### `networkCellularHspa` - -### `networkCellularNoRouteRtl` - -### `networkCellularNoRoute` - -### `networkCellularOfflineRtl` - -### `networkCellularOffline` - -### `networkCellularSignalExcellentRtl` - -### `networkCellularSignalExcellent` - -### `networkCellularSignalGoodRtl` - -### `networkCellularSignalGood` - -### `networkCellularSignalNoneRtl` - -### `networkCellularSignalNone` - -### `networkCellularSignalOkRtl` - -### `networkCellularSignalOk` - -### `networkCellularSignalWeakRtl` - -### `networkCellularSignalWeak` - -### `networkCellular` - -### `networkError` - -### `networkIdle` - -### `networkNoRoute` - -### `networkOffline` - -### `networkReceive` - -### `networkServer` - -### `networkTransmitReceive` - -### `networkTransmit` - -### `networkVpnAcquiring` - -### `networkVpnDisabled` - -### `networkVpnDisconnected` - -### `networkVpnNoRoute` - -### `networkVpn` - -### `networkWiredAcquiring` - -### `networkWiredDisconnected` - -### `networkWiredNoRoute` - -### `networkWired` - -### `networkWirelessAcquiring` - -### `networkWirelessConnected` - -### `networkWirelessDisabled` - -### `networkWirelessEncrypted` - -### `networkWirelessHardwareDisabled` - -### `networkWirelessHotspot` - -### `networkWirelessNoRoute` - -### `networkWirelessOffline` - -### `networkWirelessSignalExcellent` - -### `networkWirelessSignalGood` - -### `networkWirelessSignalNone` - -### `networkWirelessSignalOk` - -### `networkWirelessSignalWeak` - -### `networkWireless` - -### `networkWorkgroup` - -### `nightLightDisabled` - -### `nightLight` - -### `nmDeviceWiredSecure` - -### `nmDeviceWired` - -### `nmDeviceWwan` - -### `nonStarred` - -### `notificationsDisabled` - -### `objectFlipHorizontal` - -### `objectFlipVertical` - -### `objectRotateLeft` - -### `objectRotateRight` - -### `objectSelect` - -### `openMenu` - -### `orca` - -### `fedoraprojectAnacondaInstaller` - -### `freedesktopMalcontentControl` - -### `gnomeAdwaita1Demo` - -### `gnomeBoxes` - -### `gnomeBuilder` - -### `gnomeCalculator` - -### `gnomeCharacters` - -### `gnomeCheese` - -### `gnomeConsole` - -### `gnomeDiskUtility` - -### `gnomeEpiphany` - -### `gnomeEvince` - -### `gnomeLogs` - -### `gnomeMaps` - -### `gnomeNautilus` - -### `gnomePhotos` - -### `gnomeRhythmbox3` - -### `gnomeSettingsAbout` - -### `gnomeSettingsAccessibility` - -### `gnomeSettingsAppearance` - -### `gnomeSettingsApplications` - -### `gnomeSettingsBluetooth` - -### `gnomeSettingsCamera` - -### `gnomeSettingsColor` - -### `gnomeSettingsDefaultApps` - -### `gnomeSettingsDiagnostics` - -### `gnomeSettingsDisplay` - -### `gnomeSettingsFileHistory` - -### `gnomeSettingsKeyboard` - -### `gnomeSettingsLocation` - -### `gnomeSettingsMicrophone` - -### `gnomeSettingsMobileNetwork` - -### `gnomeSettingsMouse` - -### `gnomeSettingsMultitasking` - -### `gnomeSettingsNetwork` - -### `gnomeSettingsNotifications` - -### `gnomeSettingsOnlineAccounts` - -### `gnomeSettingsPower` - -### `gnomeSettingsPinters` - -### `gnomeSettingsRegion` - -### `gnomeSettingsRemovableMedia` - -### `gnomeSettingsSearch` - -### `gnomeSettingsSharing` - -### `gnomeSettingsSound` - -### `gnomeSettings` - -### `gnomeSettingsSystemLockScreen` - -### `gnomeSettingsThunderbolt` - -### `gnomeSettingsTime` - -### `gnomeSettingsUsers` - -### `gnomeSettingsWacom` - -### `gnomeShellExtensions` - -### `gnomeSoftware` - -### `gnomeSystemMonitor` - -### `gnomeTextEditor` - -### `gnomeTotem` - -### `gnomeWeather` - -### `gnomeYelp` - -### `gnomeBaobab` - -### `gnomeClocks` - -### `gnomeDesignIconLibrary` - -### `gnomeEog` - -### `gnomeFontViewer` - -### `gnomeTweaks` - -### `gtkDemo4` - -### `gtkIconBrowser4` - -### `gtkPrintEditor4` - -### `gtkWidgetFactory4` - -### `gtkGtk4NodeEditor` - -### `orientationLandscapeInverse` - -### `orientationLandscape` - -### `orientationPortraitInverse` - -### `orientationPortraitLeft` - -### `orientationPortraitRight` - -### `orientationProtrait` - -### `packageXGeneric` - -### `panDown` - -### `panEnd` - -### `panStart` - -### `panUp` - -### `panelBottom` - -### `panelCenter` - -### `panelLeft` - -### `panelModified` - -### `panelRight` - -### `panelTop` - -### `pda` - -### `phoneAppleIphone` - -### `phoneOld` - -### `phone` - -### `powerProfileBalancedRtl` - -### `powerProfileBalanced` - -### `powerProfilePerformanceRtl` - -### `powerProfilePerformance` - -### `powerProfilePowerSaverRtl` - -### `powerProfilePowerSaver` - -### `preferencesColor` - -### `preferencesDesktopAccessibility` - -### `preferencesDesktopAppearance` - -### `preferencesDesktopApps` - -### `preferencesDesktopDisplay` - -### `preferencesDesktopFont` - -### `preferencesDesktopKeyboardShortcuts` - -### `preferencesDesktopKeyboard` - -### `preferencesDesktopLocale` - -### `preferencesDesktopMultitasking` - -### `preferencesDesktopRemoteDesktop` - -### `preferencesDesktopScreensaver` - -### `preferencesDesktopWallpaper` - -### `preferencesOther` - -### `preferencesSystemDetails` - -### `preferencesSystemDevices` - -### `preferencesSystemNetworkProxy` - -### `preferencesSystemNetwork` - -### `preferencesSystemNotifications` - -### `preferencesSystemParentalControls` - -### `preferencesSystemPrivacy` - -### `preferencesSystemSearch` - -### `preferencesSystemSharing` - -### `preferencesSystem` - -### `preferencesSystemTime` - -### `printerError` - -### `printerNetwork` - -### `printerPrinting` - -### `printer` - -### `printerWarning` - -### `processStop` - -### `processWorking` - -### `radioChecked` - -### `radioMixed` - -### `radio` - -### `rotationAllowed` - -### `rotationLocked` - -### `scanner` - -### `screenShared` - -### `securityHigh` - -### `securityLow` - -### `securityMediumRtl` - -### `securityMedium` - -### `selectionEnd` - -### `selectionMode` - -### `selectionStart` - -### `semiStarredRtl` - -### `semiStarred` - -### `sendTo` - -### `sidebarShowRight` - -### `sidebarShow` - -### `softwareUpdateAvailable` - -### `softwareUpdateUrgent` - -### `speedometer` - -### `starNew` - -### `starred` - -### `startHere` - -### `switchOff` - -### `switchOn` - -### `systemFileManager` - -### `systemHelp` - -### `systemLockScreen` - -### `systemLogOutRtl` - -### `systemLogOut` - -### `systemReboot` - -### `systemRun` - -### `systemSearch` - -### `systemShutdown` - -### `systemSoftwareInstall` - -### `systemSwitchUserRtl` - -### `systemSwitchUser` - -### `systemUsers` - -### `tabNew` - -### `tablet` - -### `taskDue` - -### `taskPastDue` - -### `temperature` - -### `textEditor` - -### `textXGeneric` - -### `thunderboltAcquiring` - -### `thunderbolt` - -### `toolsCheckSpelling` - -### `totemTv` - -### `touchDisabled` - -### `touchpadDisabled` - -### `tv` - -### `uninterruptiblePowerSupply` - -### `userAvailable` - -### `userAway` - -### `userBookmarks` - -### `userBusy` - -### `userDesktop` - -### `userHome` - -### `userIdle` - -### `userInfo` - -### `userInvisible` - -### `userNotTracked` - -### `userOffline` - -### `userStatusPending` - -### `userTrashFull` - -### `userTrash` - -### `utilitiesTerminal` - -### `valueDecrease` - -### `valueIncrease` - -### `videoDisplay` - -### `videoJoineDisplays` - -### `videoSingleDisplay` - -### `videoXGeneric` - -### `viewAppGrid` - -### `viewConceal` - -### `viewContinuous` - -### `viewDual` - -### `viewFullscreen` - -### `viewGrid` - -### `viewListBulletRtl` - -### `viewListBullet` - -### `viewListOrderedRtl` - -### `viewListOrdered` - -### `viewListRtl` - -### `viewList` - -### `viewMirror` - -### `viewMoreHorizontal` - -### `viewMore` - -### `viewPagedRtl` - -### `viewPaged` - -### `viewPin` - -### `viewRefresh` - -### `viewRestore` - -### `viewReveal` - -### `viewSortAscendingRtl` - -### `viewSortAscending` - -### `viewSortDescendingRtl` - -### `viewSortDescending` - -### `viewWrappedRtl` - -### `viewWrapped` - -### `weatherClearNight` - -### `weatherClear` - -### `weatherFewCloudsNight` - -### `weatherFewClouds` - -### `weatherFog` - -### `weatherHourly` - -### `weatherOvercast` - -### `weatherSevereAlert` - -### `weatherShowersScattered` - -### `weatherShowers` - -### `weatherSnow` - -### `weatherStorm` - -### `weatherTornado` - -### `weatherWindy` - -### `webBrowser` - -### `windowClose` - -### `windowMaximize` - -### `windowMinimize` - -### `windowNew` - -### `windowRestore` - -### `xOfficeAddressBook` - -### `xOfficeCalendar` - -### `xOfficeDocument` - -### `xOfficeDrawing` - -### `xOfficePresentation` - -### `xOfficeSpreadsheet` - -### `zoomFitBest` - -### `zoomIn` - -### `zoomOriginal` - -### `zoomOut` - -## Properties -### `string` - -A string representation of the icon. diff --git a/Documentation/Reference/enums/Icon.md b/Documentation/Reference/enums/Icon.md deleted file mode 100644 index df04215..0000000 --- a/Documentation/Reference/enums/Icon.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/NavigationView.Action.md b/Documentation/Reference/enums/NavigationView.Action.md deleted file mode 100644 index 6c6e5c8..0000000 --- a/Documentation/Reference/enums/NavigationView.Action.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/Transition.md b/Documentation/Reference/enums/Transition.md deleted file mode 100644 index add6138..0000000 --- a/Documentation/Reference/enums/Transition.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/UpdateManager.md b/Documentation/Reference/enums/UpdateManager.md deleted file mode 100644 index 4669866..0000000 --- a/Documentation/Reference/enums/UpdateManager.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/ViewBuilder.Component.md b/Documentation/Reference/enums/ViewBuilder.Component.md deleted file mode 100644 index e9afc1b..0000000 --- a/Documentation/Reference/enums/ViewBuilder.Component.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/enums/ViewBuilder.md b/Documentation/Reference/enums/ViewBuilder.md deleted file mode 100644 index 43f4ad1..0000000 --- a/Documentation/Reference/enums/ViewBuilder.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/ActionRow.md b/Documentation/Reference/extensions/ActionRow.md deleted file mode 100644 index fa48f5c..0000000 --- a/Documentation/Reference/extensions/ActionRow.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `ActionRow` - -## Methods -### `init(_:)` - -Initialize an action row. -- Parameter title: The row's title. diff --git a/Documentation/Reference/extensions/App.md b/Documentation/Reference/extensions/App.md deleted file mode 100644 index 4281312..0000000 --- a/Documentation/Reference/extensions/App.md +++ /dev/null @@ -1,8 +0,0 @@ -**EXTENSION** - -# `App` - -## Methods -### `main()` - -The application's entry point. diff --git a/Documentation/Reference/extensions/Array.md b/Documentation/Reference/extensions/Array.md deleted file mode 100644 index dade731..0000000 --- a/Documentation/Reference/extensions/Array.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Banner.md b/Documentation/Reference/extensions/Banner.md deleted file mode 100644 index c61a38e..0000000 --- a/Documentation/Reference/extensions/Banner.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Binding.md b/Documentation/Reference/extensions/Binding.md deleted file mode 100644 index 36f5803..0000000 --- a/Documentation/Reference/extensions/Binding.md +++ /dev/null @@ -1,11 +0,0 @@ -**EXTENSION** - -# `Binding` - -## Methods -### `model(_:)` - -Share an observable model with the child view. -- Parameters - - model: The observable model. -- Returns: The binding. diff --git a/Documentation/Reference/extensions/Bool.md b/Documentation/Reference/extensions/Bool.md deleted file mode 100644 index ca11f79..0000000 --- a/Documentation/Reference/extensions/Bool.md +++ /dev/null @@ -1,8 +0,0 @@ -**EXTENSION** - -# `Bool` - -## Properties -### `cBool` - -Get the gboolean for C. diff --git a/Documentation/Reference/extensions/Box.md b/Documentation/Reference/extensions/Box.md deleted file mode 100644 index 077471b..0000000 --- a/Documentation/Reference/extensions/Box.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `Box` - -## Methods -### `vertical()` - -Initialize a vertical `Libadwaita.Box`. -- Returns: The vertical box. diff --git a/Documentation/Reference/extensions/Button.md b/Documentation/Reference/extensions/Button.md deleted file mode 100644 index 0fc4593..0000000 --- a/Documentation/Reference/extensions/Button.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Carousel.md b/Documentation/Reference/extensions/Carousel.md deleted file mode 100644 index 1a01464..0000000 --- a/Documentation/Reference/extensions/Carousel.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Clamp.md b/Documentation/Reference/extensions/Clamp.md deleted file mode 100644 index 0e72b06..0000000 --- a/Documentation/Reference/extensions/Clamp.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `Clamp` - -## Methods -### `init(vertical:)` - -Initialize either a horizontal or vertical clamp. -- Parameter vertical: Whether it is a vertical clamp. diff --git a/Documentation/Reference/extensions/ComboRow.md b/Documentation/Reference/extensions/ComboRow.md deleted file mode 100644 index a825ccb..0000000 --- a/Documentation/Reference/extensions/ComboRow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/EntryRow.md b/Documentation/Reference/extensions/EntryRow.md deleted file mode 100644 index 7316d98..0000000 --- a/Documentation/Reference/extensions/EntryRow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/FlowBox.md b/Documentation/Reference/extensions/FlowBox.md deleted file mode 100644 index 0c04f7a..0000000 --- a/Documentation/Reference/extensions/FlowBox.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/FormSection.md b/Documentation/Reference/extensions/FormSection.md deleted file mode 100644 index 5d5482f..0000000 --- a/Documentation/Reference/extensions/FormSection.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/GTUIWindow.md b/Documentation/Reference/extensions/GTUIWindow.md deleted file mode 100644 index f834fd1..0000000 --- a/Documentation/Reference/extensions/GTUIWindow.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `GTUIWindow` - -## Methods -### `setParentWindow(_:)` - -Set the window's parent window. -- Parameter parent: The parent window. diff --git a/Documentation/Reference/extensions/HeaderBar.md b/Documentation/Reference/extensions/HeaderBar.md deleted file mode 100644 index e91ec2b..0000000 --- a/Documentation/Reference/extensions/HeaderBar.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Int.md b/Documentation/Reference/extensions/Int.md deleted file mode 100644 index 1d6a3a6..0000000 --- a/Documentation/Reference/extensions/Int.md +++ /dev/null @@ -1,12 +0,0 @@ -**EXTENSION** - -# `Int` - -## Properties -### `id` - -Get the integer itself as the identifier. - -### `cInt` - -The C integer. diff --git a/Documentation/Reference/extensions/Libadwaita.FileDialog.md b/Documentation/Reference/extensions/Libadwaita.FileDialog.md deleted file mode 100644 index cb3d422..0000000 --- a/Documentation/Reference/extensions/Libadwaita.FileDialog.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/List.md b/Documentation/Reference/extensions/List.md deleted file mode 100644 index 4edd999..0000000 --- a/Documentation/Reference/extensions/List.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Menu.md b/Documentation/Reference/extensions/Menu.md deleted file mode 100644 index 4e5e891..0000000 --- a/Documentation/Reference/extensions/Menu.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/MenuItem.md b/Documentation/Reference/extensions/MenuItem.md deleted file mode 100644 index 81dfbdb..0000000 --- a/Documentation/Reference/extensions/MenuItem.md +++ /dev/null @@ -1,8 +0,0 @@ -**EXTENSION** - -# `MenuItem` - -## Properties -### `content` - -The menu item's content is itself. diff --git a/Documentation/Reference/extensions/MenuItemGroup.md b/Documentation/Reference/extensions/MenuItemGroup.md deleted file mode 100644 index 435e04e..0000000 --- a/Documentation/Reference/extensions/MenuItemGroup.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/NativeWidgetPeer.md b/Documentation/Reference/extensions/NativeWidgetPeer.md deleted file mode 100644 index 86a0410..0000000 --- a/Documentation/Reference/extensions/NativeWidgetPeer.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/NavigationView.md b/Documentation/Reference/extensions/NavigationView.md deleted file mode 100644 index b266b0a..0000000 --- a/Documentation/Reference/extensions/NavigationView.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/OpaquePointer.md b/Documentation/Reference/extensions/OpaquePointer.md deleted file mode 100644 index f7ddc2a..0000000 --- a/Documentation/Reference/extensions/OpaquePointer.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/OverlaySplitView.md b/Documentation/Reference/extensions/OverlaySplitView.md deleted file mode 100644 index a2505ef..0000000 --- a/Documentation/Reference/extensions/OverlaySplitView.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/PasswordEntryRow.md b/Documentation/Reference/extensions/PasswordEntryRow.md deleted file mode 100644 index ca01011..0000000 --- a/Documentation/Reference/extensions/PasswordEntryRow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Popover.md b/Documentation/Reference/extensions/Popover.md deleted file mode 100644 index 4a18e7c..0000000 --- a/Documentation/Reference/extensions/Popover.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `Popover` - -## Methods -### `init(visible:)` - -Initialize either a horizontal or vertical clamp. -- Parameter vertical: Whether it is a vertical clamp. diff --git a/Documentation/Reference/extensions/ProgressBar.md b/Documentation/Reference/extensions/ProgressBar.md deleted file mode 100644 index 595af9b..0000000 --- a/Documentation/Reference/extensions/ProgressBar.md +++ /dev/null @@ -1,11 +0,0 @@ -**EXTENSION** - -# `ProgressBar` - -## Methods -### `init(value:total:)` - -Initialize a progress bar widget. -- Parameters: - - value: The value. - - total: The maximum value. diff --git a/Documentation/Reference/extensions/ScrollView.md b/Documentation/Reference/extensions/ScrollView.md deleted file mode 100644 index 9430d07..0000000 --- a/Documentation/Reference/extensions/ScrollView.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `ScrollView` - -## Methods -### `init(content:)` - -Initialize a `ScrollView`. -- Parameter content: The view content. diff --git a/Documentation/Reference/extensions/Set.md b/Documentation/Reference/extensions/Set.md deleted file mode 100644 index 508679c..0000000 --- a/Documentation/Reference/extensions/Set.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/SpinRow.md b/Documentation/Reference/extensions/SpinRow.md deleted file mode 100644 index 993a60b..0000000 --- a/Documentation/Reference/extensions/SpinRow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/State.md b/Documentation/Reference/extensions/State.md deleted file mode 100644 index 77b5bb3..0000000 --- a/Documentation/Reference/extensions/State.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/StatusPage.md b/Documentation/Reference/extensions/StatusPage.md deleted file mode 100644 index e128793..0000000 --- a/Documentation/Reference/extensions/StatusPage.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/String.md b/Documentation/Reference/extensions/String.md deleted file mode 100644 index d219da1..0000000 --- a/Documentation/Reference/extensions/String.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/SwitchRow.md b/Documentation/Reference/extensions/SwitchRow.md deleted file mode 100644 index 25f977c..0000000 --- a/Documentation/Reference/extensions/SwitchRow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Text.md b/Documentation/Reference/extensions/Text.md deleted file mode 100644 index 125688b..0000000 --- a/Documentation/Reference/extensions/Text.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `Text` - -## Methods -### `init(_:)` - -Initialize a text widget. -- Parameter text: The content. diff --git a/Documentation/Reference/extensions/ToastOverlay.md b/Documentation/Reference/extensions/ToastOverlay.md deleted file mode 100644 index a3027bc..0000000 --- a/Documentation/Reference/extensions/ToastOverlay.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Toggle.md b/Documentation/Reference/extensions/Toggle.md deleted file mode 100644 index 2c5ec13..0000000 --- a/Documentation/Reference/extensions/Toggle.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/UInt.md b/Documentation/Reference/extensions/UInt.md deleted file mode 100644 index b30342c..0000000 --- a/Documentation/Reference/extensions/UInt.md +++ /dev/null @@ -1,8 +0,0 @@ -**EXTENSION** - -# `UInt` - -## Properties -### `cInt` - -Convert an unsigned integer into the C form. diff --git a/Documentation/Reference/extensions/UnsafeMutablePointer.md b/Documentation/Reference/extensions/UnsafeMutablePointer.md deleted file mode 100644 index 543b4ac..0000000 --- a/Documentation/Reference/extensions/UnsafeMutablePointer.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/UnsafeMutableRawPointer.md b/Documentation/Reference/extensions/UnsafeMutableRawPointer.md deleted file mode 100644 index c8b9bc6..0000000 --- a/Documentation/Reference/extensions/UnsafeMutableRawPointer.md +++ /dev/null @@ -1,9 +0,0 @@ -**EXTENSION** - -# `UnsafeMutableRawPointer` - -## Methods -### `cast()` - -Convert into an unsafe mutable pointer of a certain type. -- Returns: The unsafe mutable pointer. diff --git a/Documentation/Reference/extensions/VStack.md b/Documentation/Reference/extensions/VStack.md deleted file mode 100644 index 2f2e334..0000000 --- a/Documentation/Reference/extensions/VStack.md +++ /dev/null @@ -1,11 +0,0 @@ -**EXTENSION** - -# `VStack` - -## Methods -### `init(content:)` - -Initialize a `VStack`. -- Parameter content: The view content. - -### `init(horizontal:content:)` diff --git a/Documentation/Reference/extensions/View.md b/Documentation/Reference/extensions/View.md deleted file mode 100644 index a0a9ab9..0000000 --- a/Documentation/Reference/extensions/View.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/extensions/Widget.md b/Documentation/Reference/extensions/Widget.md deleted file mode 100644 index 6a38c6e..0000000 --- a/Documentation/Reference/extensions/Widget.md +++ /dev/null @@ -1,8 +0,0 @@ -**EXTENSION** - -# `Widget` - -## Properties -### `view` - -A widget's view is empty. diff --git a/Documentation/Reference/extensions/WindowScene.md b/Documentation/Reference/extensions/WindowScene.md deleted file mode 100644 index 89264b5..0000000 --- a/Documentation/Reference/extensions/WindowScene.md +++ /dev/null @@ -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 "q" which terminates the application. -- Returns: The app. diff --git a/Documentation/Reference/extensions/WindowSceneGroup.md b/Documentation/Reference/extensions/WindowSceneGroup.md deleted file mode 100644 index 24907c6..0000000 --- a/Documentation/Reference/extensions/WindowSceneGroup.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/methods/filedialog_on_open_cb(ptr_file_userData_).md b/Documentation/Reference/methods/filedialog_on_open_cb(ptr_file_userData_).md deleted file mode 100644 index d660bc8..0000000 --- a/Documentation/Reference/methods/filedialog_on_open_cb(ptr_file_userData_).md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/methods/filedialog_on_save_cb(ptr_file_userData_).md b/Documentation/Reference/methods/filedialog_on_save_cb(ptr_file_userData_).md deleted file mode 100644 index dfc0b3a..0000000 --- a/Documentation/Reference/methods/filedialog_on_save_cb(ptr_file_userData_).md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/App.md b/Documentation/Reference/protocols/App.md deleted file mode 100644 index 21da6c6..0000000 --- a/Documentation/Reference/protocols/App.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/MenuItem.md b/Documentation/Reference/protocols/MenuItem.md deleted file mode 100644 index c58eefa..0000000 --- a/Documentation/Reference/protocols/MenuItem.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/MenuItemGroup.md b/Documentation/Reference/protocols/MenuItemGroup.md deleted file mode 100644 index eda9fe4..0000000 --- a/Documentation/Reference/protocols/MenuItemGroup.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/Observable.md b/Documentation/Reference/protocols/Observable.md deleted file mode 100644 index 47e54dc..0000000 --- a/Documentation/Reference/protocols/Observable.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/StateProtocol.md b/Documentation/Reference/protocols/StateProtocol.md deleted file mode 100644 index be56774..0000000 --- a/Documentation/Reference/protocols/StateProtocol.md +++ /dev/null @@ -1,10 +0,0 @@ -**PROTOCOL** - -# `StateProtocol` - -An interface for accessing `State` without specifying the generic type. - -## Properties -### `content` - -The class storing the value. diff --git a/Documentation/Reference/protocols/View.md b/Documentation/Reference/protocols/View.md deleted file mode 100644 index 324f2f3..0000000 --- a/Documentation/Reference/protocols/View.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/ViewSwitcherOption.md b/Documentation/Reference/protocols/ViewSwitcherOption.md deleted file mode 100644 index 44343b8..0000000 --- a/Documentation/Reference/protocols/ViewSwitcherOption.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/Widget.md b/Documentation/Reference/protocols/Widget.md deleted file mode 100644 index 6497a04..0000000 --- a/Documentation/Reference/protocols/Widget.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/WindowScene.md b/Documentation/Reference/protocols/WindowScene.md deleted file mode 100644 index 259a400..0000000 --- a/Documentation/Reference/protocols/WindowScene.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/WindowSceneGroup.md b/Documentation/Reference/protocols/WindowSceneGroup.md deleted file mode 100644 index a2bd7e0..0000000 --- a/Documentation/Reference/protocols/WindowSceneGroup.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/WindowType.md b/Documentation/Reference/protocols/WindowType.md deleted file mode 100644 index 68c7df6..0000000 --- a/Documentation/Reference/protocols/WindowType.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/protocols/WindowView.md b/Documentation/Reference/protocols/WindowView.md deleted file mode 100644 index 267719d..0000000 --- a/Documentation/Reference/protocols/WindowView.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/structs/AboutWindow.md b/Documentation/Reference/structs/AboutWindow.md deleted file mode 100644 index 9f06ee2..0000000 --- a/Documentation/Reference/structs/AboutWindow.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/structs/ActionRow.md b/Documentation/Reference/structs/ActionRow.md deleted file mode 100644 index 89fbcc1..0000000 --- a/Documentation/Reference/structs/ActionRow.md +++ /dev/null @@ -1,233 +0,0 @@ -**STRUCT** - -# `ActionRow` - -A [class@Gtk.ListBoxRow] used to present actions. - -action-row - -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 element. - -It also supports adding a child as a prefix widget by specifying “prefix” as -the “type” attribute of a 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. diff --git a/Documentation/Reference/structs/AppearObserver.md b/Documentation/Reference/structs/AppearObserver.md deleted file mode 100644 index 993c195..0000000 --- a/Documentation/Reference/structs/AppearObserver.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/structs/ApplicationWindow.md b/Documentation/Reference/structs/ApplicationWindow.md deleted file mode 100644 index a086a32..0000000 --- a/Documentation/Reference/structs/ApplicationWindow.md +++ /dev/null @@ -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 "w" which closes the window. -- Returns: The window. diff --git a/Documentation/Reference/structs/Avatar.md b/Documentation/Reference/structs/Avatar.md deleted file mode 100644 index 0e00d9b..0000000 --- a/Documentation/Reference/structs/Avatar.md +++ /dev/null @@ -1,106 +0,0 @@ -**STRUCT** - -# `Avatar` - -A widget displaying an image, with a generated fallback. - -avatar - -`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`. diff --git a/Documentation/Reference/structs/Banner.md b/Documentation/Reference/structs/Banner.md deleted file mode 100644 index 12a7fcf..0000000 --- a/Documentation/Reference/structs/Banner.md +++ /dev/null @@ -1,121 +0,0 @@ -**STRUCT** - -# `Banner` - -A bar with contextual information. - -banner - -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. diff --git a/Documentation/Reference/structs/Bin.md b/Documentation/Reference/structs/Bin.md deleted file mode 100644 index 400fff3..0000000 --- a/Documentation/Reference/structs/Bin.md +++ /dev/null @@ -1,57 +0,0 @@ -**STRUCT** - -# `Bin` - -A widget with one child. - -bin - -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`. diff --git a/Documentation/Reference/structs/Binding.md b/Documentation/Reference/structs/Binding.md deleted file mode 100644 index 517de30..0000000 --- a/Documentation/Reference/structs/Binding.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/structs/Box.md b/Documentation/Reference/structs/Box.md deleted file mode 100644 index a85c0be..0000000 --- a/Documentation/Reference/structs/Box.md +++ /dev/null @@ -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. diff --git a/Documentation/Reference/structs/Button.md b/Documentation/Reference/structs/Button.md deleted file mode 100644 index a506f18..0000000 --- a/Documentation/Reference/structs/Button.md +++ /dev/null @@ -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 - and Enter 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 - and Enter keys. - -### `clicked(_:)` - -Emitted when the button has been activated (pressed and released). diff --git a/Documentation/Reference/structs/ButtonContent.md b/Documentation/Reference/structs/ButtonContent.md deleted file mode 100644 index baaee89..0000000 --- a/Documentation/Reference/structs/ButtonContent.md +++ /dev/null @@ -1,127 +0,0 @@ -**STRUCT** - -# `ButtonContent` - -A helper widget for creating buttons. - -button-content - -`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 -document-open-symbolic_OpenTrue -``` - -`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]. diff --git a/Documentation/Reference/structs/Carousel.md b/Documentation/Reference/structs/Carousel.md deleted file mode 100644 index 7705511..0000000 --- a/Documentation/Reference/structs/Carousel.md +++ /dev/null @@ -1,155 +0,0 @@ -**STRUCT** - -# `Carousel` - -A paginated scrolling widget. - -carousel - -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`. diff --git a/Documentation/Reference/structs/CenterBox.md b/Documentation/Reference/structs/CenterBox.md deleted file mode 100644 index 0bc80ee..0000000 --- a/Documentation/Reference/structs/CenterBox.md +++ /dev/null @@ -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 `` 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. diff --git a/Documentation/Reference/structs/CheckButton.md b/Documentation/Reference/structs/CheckButton.md deleted file mode 100644 index 2dddd21..0000000 --- a/Documentation/Reference/structs/CheckButton.md +++ /dev/null @@ -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 - and Enter 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 - and Enter keys. - -### `toggled(_:)` - -Emitted when the buttons's [property@Gtk.CheckButton:active] -property changes. diff --git a/Documentation/Reference/structs/Clamp.md b/Documentation/Reference/structs/Clamp.md deleted file mode 100644 index a5a44f0..0000000 --- a/Documentation/Reference/structs/Clamp.md +++ /dev/null @@ -1,112 +0,0 @@ -**STRUCT** - -# `Clamp` - -A widget constraining its child to a given size. - -clamp-wideclamp-narrow - -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. diff --git a/Documentation/Reference/structs/ComboRow.md b/Documentation/Reference/structs/ComboRow.md deleted file mode 100644 index e5af96c..0000000 --- a/Documentation/Reference/structs/ComboRow.md +++ /dev/null @@ -1,291 +0,0 @@ -**STRUCT** - -# `ComboRow` - -A [class@Gtk.ListBoxRow] used to choose from a list of items. - -combo-row - -The `AdwComboRow` widget allows the user to choose from a list of valid -choices. The row displays the selected choice. When activated, the row -displays a popover which allows the user to make a new choice. - -Example of an `AdwComboRow` UI definition: -```xml -Combo RowFooBarBaz -``` - -The [property@ComboRow:selected] and [property@ComboRow:selected-item] -properties can be used to keep track of the selected item and react to their -changes. - -`AdwComboRow` mirrors [class@Gtk.DropDown], see that widget for details. - -`AdwComboRow` is [property@Gtk.ListBoxRow:activatable] if a model is set. - -## CSS nodes - -`AdwComboRow` has a main CSS node with name `row` and the `.combo` style -class. - -Its popover has the node named `popover` with the `.menu` style class, it -contains a [class@Gtk.ScrolledWindow], which in turn contains a -[class@Gtk.ListView], both are accessible via their regular nodes. - -## Accessibility - -`AdwComboRow` uses the `GTK_ACCESSIBLE_ROLE_COMBO_BOX` role. - -## 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. - -### `enableSearch` - -Whether to show a search entry in the popup. - -If set to `TRUE`, a search entry will be shown in the popup that -allows to search for items in the list. - -Search requires [property@ComboRow:expression] to be set. - -### `iconName` - -The icon name for this row. - -### `selected` - -The position of the selected item. - -If no item is selected, the property has the value -[const@Gtk.INVALID_LIST_POSITION] - -### `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]. - -### `useSubtitle` - -Whether to use the current value as the subtitle. - -If you use a custom list item factory, you will need to give the row a -name conversion expression with [property@ComboRow:expression]. - -If set to `TRUE`, you should not access [property@ActionRow:subtitle]. - -The subtitle is interpreted as Pango markup if -[property@PreferencesRow:use-markup] is set to `TRUE`. - -### `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 `ComboRow`. - -### `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. - -### `enableSearch(_:)` - -Whether to show a search entry in the popup. - -If set to `TRUE`, a search entry will be shown in the popup that -allows to search for items in the list. - -Search requires [property@ComboRow:expression] to be set. - -### `iconName(_:)` - -The icon name for this row. - -### `selected(_:)` - -The position of the selected item. - -If no item is selected, the property has the value -[const@Gtk.INVALID_LIST_POSITION] - -### `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]. - -### `useSubtitle(_:)` - -Whether to use the current value as the subtitle. - -If you use a custom list item factory, you will need to give the row a -name conversion expression with [property@ComboRow:expression]. - -If set to `TRUE`, you should not access [property@ActionRow:subtitle]. - -The subtitle is interpreted as Pango markup if -[property@PreferencesRow:use-markup] is set to `TRUE`. - -### `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. diff --git a/Documentation/Reference/structs/Container.md b/Documentation/Reference/structs/Container.md deleted file mode 100644 index 95af77e..0000000 --- a/Documentation/Reference/structs/Container.md +++ /dev/null @@ -1,60 +0,0 @@ -**STRUCT** - -# `Container` - -A container widget. - -## Properties -### `elements` - -The elements. - -### `content` - -The content. - -### `container` - -Get the container for initialization. - -### `elementsID` - -The identifier of the elements storage. - -## Methods -### `init(_:content:container:)` - -Initialize `Container`. -- Parameters: - - elements: The elements. - - content: The view for an element. - - container: Get the initial Libadwaita container widget. - -### `update(_:modifiers:)` - -Update a view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `container(modifiers:)` - -Get a view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. - -### `updateContainer(_:content:modifiers:)` - -Update the container's content. -- Parameters: - - container: The container. - - content: The content's view storage. - - modifiers: The view modifiers. - -### `getWidget(element:modifiers:)` - -Get the view storage of an element. -- Parameters: - - element: The element. - - modifiers: The modifiers. -- Returns: The view storage. diff --git a/Documentation/Reference/structs/ContentModifier.md b/Documentation/Reference/structs/ContentModifier.md deleted file mode 100644 index 0332511..0000000 --- a/Documentation/Reference/structs/ContentModifier.md +++ /dev/null @@ -1,34 +0,0 @@ -**STRUCT** - -# `ContentModifier` - -A widget which replaces views of a specific type in its content. - -## Properties -### `content` - -The wrapped view. - -### `modify` - -The closure for the modification. - -## 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. - -### `modifyView(_:)` - -Apply the modifier to a view. -- Parameter view: The view. diff --git a/Documentation/Reference/structs/EitherView.md b/Documentation/Reference/structs/EitherView.md deleted file mode 100644 index 6183301..0000000 --- a/Documentation/Reference/structs/EitherView.md +++ /dev/null @@ -1,64 +0,0 @@ -**STRUCT** - -# `EitherView` - -An equivalent to GtkStack for two views. - -## Properties -### `trueView` - -The view that is displayed when `isTrue` is true. - -### `falseView` - -The view that is displayed when `isTrue` is false. - -### `isTrue` - -The state. - -## Methods -### `init(_:_:else:)` - -Initialize an `EitherView`. -- Parameters: - - isTrue: The state. - - _: The view that is presented if `isTrue` is true. - - else: The view that is presented if `isTrue` is false. - -### `init(_:_:else:)` - -Initialize an `EitherView`. -- Parameters: - - isTrue: The state. - - trueView: The view that is presented if `isTrue` is true. - - falseView: The view that is presented if `isTrue` is false. - -### `update(_:modifiers:)` - -Update an `EitherView`'s storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `updateContent(_:state:stack:modifiers:)` - -Update the content of a view in the view storage. -- Parameters: - - storage: The view storage. - - state: Whether it is the true or false view. - - stack: The stack. - - modifiers: Modify views before being updated. - -### `setVisible(_:view:)` - -Set the visible content page. -- Parameters: - - stack: The stack. - - view: The visible view. - -### `container(modifiers:)` - -Get a GtkStack view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. diff --git a/Documentation/Reference/structs/EntryRow.md b/Documentation/Reference/structs/EntryRow.md deleted file mode 100644 index 0352511..0000000 --- a/Documentation/Reference/structs/EntryRow.md +++ /dev/null @@ -1,205 +0,0 @@ -**STRUCT** - -# `EntryRow` - -A [class@Gtk.ListBoxRow] with an embedded text entry. - -entry-row - -`AdwEntryRow` has a title that doubles as placeholder text. It shows an icon -indicating that it's editable and can receive additional widgets before or -after the editable part. - -If [property@EntryRow:show-apply-button] is set to `TRUE`, `AdwEntryRow` can -show an apply button when editing its contents. This can be useful if -changing its contents can result in an expensive operation, such as network -activity. - -`AdwEntryRow` provides only minimal API and should be used with the -[iface@Gtk.Editable] API. - -See also [class@PasswordEntryRow]. - -## AdwEntryRow as GtkBuildable - -The `AdwEntryRow` implementation of the [iface@Gtk.Buildable] interface -supports adding a child at its end by specifying “suffix” or omitting the -“type” attribute of a element. - -It also supports adding a child as a prefix widget by specifying “prefix” as -the “type” attribute of a element. - -## CSS nodes - -`AdwEntryRow` has a single CSS node with name `row` and the `.entry` style -class. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `activatesDefault` - -Whether activating the embedded entry can activate the default widget. - -### `enableEmojiCompletion` - -Whether to suggest emoji replacements on the entry row. - -Emoji replacement is done with :-delimited names, like `:heart:`. - -### `showApplyButton` - -Whether to show the apply button. - -When set to `TRUE`, typing text in the entry will reveal an apply button. -Clicking it or pressing the Enter key will hide the button and -emit the [signal@EntryRow::apply] signal. - -This is useful if changing the entry contents can trigger an expensive -operation, e.g. network activity, to avoid triggering it after typing every -character. - -### `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`. - -### `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. - -### `apply` - -Emitted when the apply button is pressed. - -See [property@EntryRow:show-apply-button]. - -### `entryActivated` - -Emitted when the embedded entry is activated. - -### `suffix` - -The body for the widget "suffix". - -### `prefix` - -The body for the widget "prefix". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `EntryRow`. - -### `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. - -### `activatesDefault(_:)` - -Whether activating the embedded entry can activate the default widget. - -### `enableEmojiCompletion(_:)` - -Whether to suggest emoji replacements on the entry row. - -Emoji replacement is done with :-delimited names, like `:heart:`. - -### `showApplyButton(_:)` - -Whether to show the apply button. - -When set to `TRUE`, typing text in the entry will reveal an apply button. -Clicking it or pressing the Enter key will hide the button and -emit the [signal@EntryRow::apply] signal. - -This is useful if changing the entry contents can trigger an expensive -operation, e.g. network activity, to avoid triggering it after typing every -character. - -### `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`. - -### `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. - -### `apply(_:)` - -Emitted when the apply button is pressed. - -See [property@EntryRow:show-apply-button]. - -### `entryActivated(_:)` - -Emitted when the embedded entry is 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. diff --git a/Documentation/Reference/structs/ExpanderRow.md b/Documentation/Reference/structs/ExpanderRow.md deleted file mode 100644 index 56bf794..0000000 --- a/Documentation/Reference/structs/ExpanderRow.md +++ /dev/null @@ -1,217 +0,0 @@ -**STRUCT** - -# `ExpanderRow` - -A [class@Gtk.ListBoxRow] used to reveal widgets. - -expander-row - -The `AdwExpanderRow` widget allows the user to reveal or hide widgets below -it. It also allows the user to enable the expansion of the row, allowing to -disable all that the row contains. - -## AdwExpanderRow as GtkBuildable - -The `AdwExpanderRow` implementation of the [iface@Gtk.Buildable] interface -supports adding a child as an suffix widget by specifying “suffix” as the -“type” attribute of a element. - -It also supports adding it as a prefix widget by specifying “prefix” as the -“type” attribute of a element. - -## CSS nodes - -`AdwExpanderRow` has a main CSS node with name `row` and the `.expander` -style class. It has the `.empty` style class when it contains no children. - -It contains the subnodes `row.header` for its main embedded row, -`list.nested` for the list it can expand, and `image.expander-row-arrow` for -its arrow. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `enableExpansion` - -Whether expansion is enabled. - -### `expanded` - -Whether the row is expanded. - -### `iconName` - -The icon name for this row. - -### `showEnableSwitch` - -Whether the switch enabling the expansion is visible. - -### `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. - -### `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. - -### `rows` - -The body for the widget "rows". - -### `suffix` - -The body for the widget "suffix". - -### `prefix` - -The body for the widget "prefix". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `ExpanderRow`. - -### `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. - -### `enableExpansion(_:)` - -Whether expansion is enabled. - -### `expanded(_:)` - -Whether the row is expanded. - -### `iconName(_:)` - -The icon name for this row. - -### `showEnableSwitch(_:)` - -Whether the switch enabling the expansion is visible. - -### `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. - -### `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. - -### `rows(_:)` - -Set the body for "rows". -- Parameter body: The body. -- Returns: The widget. - -### `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. diff --git a/Documentation/Reference/structs/FileDialog.md b/Documentation/Reference/structs/FileDialog.md deleted file mode 100644 index 410a8e0..0000000 --- a/Documentation/Reference/structs/FileDialog.md +++ /dev/null @@ -1,86 +0,0 @@ -**STRUCT** - -# `FileDialog` - -A structure representing a file dialog window. - -## Properties -### `id` - -The window's identifier. - -### `importer` - -Whether the window is an importer. - -### `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. - -### `initialFolder` - -The initial folder. - -### `initialName` - -The initial file name for the file exporter. - -### `extensions` - -The accepted extensions for the file importer. - -### `result` - -The closure to run when the import or export is successful. - -### `cancel` - -The closure to run when the import or export is not successful. - -## Methods -### `init(importer:initialFolder:extensions:onOpen:onClose:)` - -Create an importer file dialog window. -- Parameters: - - importer: The window's identifier. - - initialFolder: The URL to the folder open when being opened. - - extensions: The accepted file extensions. - - folders: Whether folders are accepted. - - onOpen: Run this when a file for importing has been chosen. - - onClose: Run this when the user cancelled the action. - -### `init(exporter:initialFolder:initialName:onSave:onClose:)` - -Create an exporter file dialog window. -- Parameters: - - exporter: The window's identifier. - - initialFolder: The URL to the folder open when being opened. - - initialName: The default file name. - - onSave: Run this when a path for exporting has been chosen. - - onClose: Run this when the user cancelled the action. - -### `createWindow(app:)` - -Get the storage for the window. -- Parameter app: The application. -- Returns: The storage. - -### `update(_:app:force:)` - -Update a window. -- Parameters: - - storage: The storage to update. - - app: The application. - -### `update(window:)` - -Update the window. -- Parameter window: The window. diff --git a/Documentation/Reference/structs/FlowBox.md b/Documentation/Reference/structs/FlowBox.md deleted file mode 100644 index 006391d..0000000 --- a/Documentation/Reference/structs/FlowBox.md +++ /dev/null @@ -1,302 +0,0 @@ -**STRUCT** - -# `FlowBox` - -A `GtkFlowBox` puts child widgets in reflowing grid. - -For instance, with the horizontal orientation, the widgets will be -arranged from left to right, starting a new row under the previous -row when necessary. Reducing the width in this case will require more -rows, so a larger height will be requested. - -Likewise, with the vertical orientation, the widgets will be arranged -from top to bottom, starting a new column to the right when necessary. -Reducing the height will require more columns, so a larger width will -be requested. - -The size request of a `GtkFlowBox` alone may not be what you expect; -if you need to be able to shrink it along both axes and dynamically -reflow its children, you may have to wrap it in a `GtkScrolledWindow` -to enable that. - -The children of a `GtkFlowBox` can be dynamically sorted and filtered. - -Although a `GtkFlowBox` must have only `GtkFlowBoxChild` children, you -can add any kind of widget to it via [method@Gtk.FlowBox.insert], and a -`GtkFlowBoxChild` widget will automatically be inserted between the box -and the widget. - -Also see [class@Gtk.ListBox]. - -# CSS nodes - -``` -flowbox -├── flowboxchild -│ ╰── ├── flowboxchild -│ ╰── ┊ -╰── [rubberband] -``` - -`GtkFlowBox` uses a single CSS node with name flowbox. `GtkFlowBoxChild` -uses a single CSS node with name flowboxchild. For rubberband selection, -a subnode with name rubberband is used. - -# Accessibility - -`GtkFlowBox` uses the %GTK_ACCESSIBLE_ROLE_GRID role, and `GtkFlowBoxChild` -uses the %GTK_ACCESSIBLE_ROLE_GRID_CELL role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `acceptUnpairedRelease` - -accept-unpaired-release - -### `accessibleRole` - -The accessible role of the given `GtkAccessible` implementation. - -The accessible role cannot be changed once set. - -### `activateOnSingleClick` - -Determines whether children can be activated with a single -click, or require a double-click. - -### `columnSpacing` - -The amount of horizontal space between two children. - -### `homogeneous` - -Determines whether all children should be allocated the -same size. - -### `maxChildrenPerLine` - -The maximum amount of children to request space for consecutively -in the given orientation. - -### `minChildrenPerLine` - -The minimum number of children to allocate consecutively -in the given orientation. - -Setting the minimum children per line ensures -that a reasonably small height will be requested -for the overall minimum width of the box. - -### `rowSpacing` - -The amount of vertical space between two children. - -### `activateCursorChild` - -Emitted when the user activates the @box. - -This is a [keybinding signal](class.SignalAction.html). - -### `childActivated` - -Emitted when a child has been activated by the user. - -### `moveCursor` - -Emitted when the user initiates a cursor movement. - -This is a [keybinding signal](class.SignalAction.html). -Applications should not connect to it, but may emit it with -g_signal_emit_by_name() if they need to control the cursor -programmatically. - -The default bindings for this signal come in two variants, -the variant with the Shift modifier extends the selection, -the variant without the Shift modifier does not. -There are too many key combinations to list them all here. - -- , , , -move by individual children -- Home, End move to the ends of the box -- PgUp, PgDn move vertically by pages - -### `selectAll` - -Emitted to select all children of the box, -if the selection mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default bindings for this signal is Ctrl-a. - -### `selectedChildrenChanged` - -Emitted when the set of selected children changes. - -Use [method@Gtk.FlowBox.selected_foreach] or -[method@Gtk.FlowBox.get_selected_children] to obtain the -selected children. - -### `toggleCursorChild` - -Emitted to toggle the selection of the child that has the focus. - -This is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is Ctrl-Space. - -### `unselectAll` - -Emitted to unselect all children of the box, -if the selection mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default bindings for this signal is Ctrl-Shift-a. - -### `elements` - -The dynamic widget elements. - -### `content` - -The dynamic widget content. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init(_:content:)` - -Initialize `FlowBox`. - -### `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. - -### `acceptUnpairedRelease(_:)` - -accept-unpaired-release - -### `accessibleRole(_:)` - -The accessible role of the given `GtkAccessible` implementation. - -The accessible role cannot be changed once set. - -### `activateOnSingleClick(_:)` - -Determines whether children can be activated with a single -click, or require a double-click. - -### `columnSpacing(_:)` - -The amount of horizontal space between two children. - -### `homogeneous(_:)` - -Determines whether all children should be allocated the -same size. - -### `maxChildrenPerLine(_:)` - -The maximum amount of children to request space for consecutively -in the given orientation. - -### `minChildrenPerLine(_:)` - -The minimum number of children to allocate consecutively -in the given orientation. - -Setting the minimum children per line ensures -that a reasonably small height will be requested -for the overall minimum width of the box. - -### `rowSpacing(_:)` - -The amount of vertical space between two children. - -### `activateCursorChild(_:)` - -Emitted when the user activates the @box. - -This is a [keybinding signal](class.SignalAction.html). - -### `childActivated(_:)` - -Emitted when a child has been activated by the user. - -### `moveCursor(_:)` - -Emitted when the user initiates a cursor movement. - -This is a [keybinding signal](class.SignalAction.html). -Applications should not connect to it, but may emit it with -g_signal_emit_by_name() if they need to control the cursor -programmatically. - -The default bindings for this signal come in two variants, -the variant with the Shift modifier extends the selection, -the variant without the Shift modifier does not. -There are too many key combinations to list them all here. - -- , , , -move by individual children -- Home, End move to the ends of the box -- PgUp, PgDn move vertically by pages - -### `selectAll(_:)` - -Emitted to select all children of the box, -if the selection mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default bindings for this signal is Ctrl-a. - -### `selectedChildrenChanged(_:)` - -Emitted when the set of selected children changes. - -Use [method@Gtk.FlowBox.selected_foreach] or -[method@Gtk.FlowBox.get_selected_children] to obtain the -selected children. - -### `toggleCursorChild(_:)` - -Emitted to toggle the selection of the child that has the focus. - -This is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is Ctrl-Space. - -### `unselectAll(_:)` - -Emitted to unselect all children of the box, -if the selection mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default bindings for this signal is Ctrl-Shift-a. diff --git a/Documentation/Reference/structs/ForEach.md b/Documentation/Reference/structs/ForEach.md deleted file mode 100644 index ac41cce..0000000 --- a/Documentation/Reference/structs/ForEach.md +++ /dev/null @@ -1,37 +0,0 @@ -**STRUCT** - -# `ForEach` - -A dynamic list but without a list design in the user interface. - -## Properties -### `elements` - -The dynamic widget elements. - -### `content` - -The dynamic widget content. - -### `horizontal` - -Whether the list is horizontal. - -## Methods -### `init(_:horizontal:content:)` - -Initialize `ForEach`. - -### `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. diff --git a/Documentation/Reference/structs/Form.md b/Documentation/Reference/structs/Form.md deleted file mode 100644 index 21a1bf4..0000000 --- a/Documentation/Reference/structs/Form.md +++ /dev/null @@ -1,20 +0,0 @@ -**STRUCT** - -# `Form` - -A list with no dynamic content styled as a boxed list. - -## Properties -### `content` - -The content. - -### `view` - -The view's body. - -## Methods -### `init(content:)` - -Initialize a `Form`. -- Parameter content: The view content, usually different kind of rows. diff --git a/Documentation/Reference/structs/FormSection.md b/Documentation/Reference/structs/FormSection.md deleted file mode 100644 index 6540548..0000000 --- a/Documentation/Reference/structs/FormSection.md +++ /dev/null @@ -1,64 +0,0 @@ -**STRUCT** - -# `FormSection` - -A section usually groups forms. - -## Properties -### `title` - -The title. - -### `content` - -The content. - -### `description` - -The description. - -### `suffix` - -The suffix. - -### `suffixID` - -The identifier for the suffix content. - -## Methods -### `init(_:content:)` - -Initialize a form section. -- Parameters: - - title: The title. - - content: The content, usually one or more forms. - -### `update(_:modifiers:)` - -Update a view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `container(modifiers:)` - -Get a view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. - -### `update(group:)` - -Update the form section. -- Parameter group: The form section. - -### `description(_:)` - -Set the form section's description. -- Parameter description: The description. -- Returns: The form section. - -### `suffix(_:)` - -Set the form section's suffix view. -- Parameter suffix: The suffix. -- Returns: The form section. diff --git a/Documentation/Reference/structs/Freeze.md b/Documentation/Reference/structs/Freeze.md deleted file mode 100644 index a54cd48..0000000 --- a/Documentation/Reference/structs/Freeze.md +++ /dev/null @@ -1,29 +0,0 @@ -**STRUCT** - -# `Freeze` - -State whether to update the child views or not. - -## Properties -### `freeze` - -Whether not to update the child view. - -### `content` - -The wrapped view. - -## 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. diff --git a/Documentation/Reference/structs/HStack.md b/Documentation/Reference/structs/HStack.md deleted file mode 100644 index 42e828c..0000000 --- a/Documentation/Reference/structs/HStack.md +++ /dev/null @@ -1,20 +0,0 @@ -**STRUCT** - -# `HStack` - -A horizontal GtkBox equivalent. - -## Properties -### `content` - -The content. - -### `view` - -The view's body. - -## Methods -### `init(content:)` - -Initialize a `HStack`. -- Parameter content: The view content. diff --git a/Documentation/Reference/structs/HeaderBar.md b/Documentation/Reference/structs/HeaderBar.md deleted file mode 100644 index b37abfe..0000000 --- a/Documentation/Reference/structs/HeaderBar.md +++ /dev/null @@ -1,256 +0,0 @@ -**STRUCT** - -# `HeaderBar` - -A title bar widget. - -header-bar - -`AdwHeaderBar` is similar to [class@Gtk.HeaderBar], but provides additional -features compared to it. Refer to `GtkHeaderBar` for details. It is typically -used as a top bar within [class@ToolbarView]. - -## Navigation View Integration - -When placed inside an [class@NavigationPage], `AdwHeaderBar` will display the -page title instead of window title. - -When used together with [class@NavigationView] or [class@NavigationSplitView], -it will also display a back button that can be used to go back to the previous -page. The button also has a context menu, allowing to pop multiple pages at -once, potentially across multiple navigation views. In rare scenarios, set -[property@HeaderBar:show-back-button] to `FALSE` to disable the back button -if it's unwanted (e.g. in an extra header bar on the same page). - -## Split View Integration - -When placed inside `AdwNavigationSplitView` or `AdwOverlaySplitView`, -`AdwHeaderBar` will automatically hide the title buttons other than at the -edges of the window. - -## Centering Policy - -[property@HeaderBar:centering-policy] allows to enforce strict centering of -the title widget. This can be useful for entries inside [class@Clamp]. - -## Title Buttons - -Unlike `GtkHeaderBar`, `AdwHeaderBar` allows to toggle title button -visibility for each side individually, using the -[property@HeaderBar:show-start-title-buttons] and -[property@HeaderBar:show-end-title-buttons] properties. - -## CSS nodes - -``` -headerbar -╰── windowhandle -╰── box -├── widget -│ ╰── box.start -│ ├── windowcontrols.start -│ ├── widget -│ │ ╰── [button.back] -│ ╰── [other children] -├── widget -│ ╰── [Title Widget] -╰── widget -╰── box.end -├── [other children] -╰── windowcontrols.end -``` - -`AdwHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle` -subnode, which contains a `box` subnode, which contains three `widget` -subnodes at the start, center and end of the header bar. The start and end -subnotes contain a `box` subnode with the `.start` and `.end` style classes -respectively, and the center node contains a node that represents the title. - -Each of the boxes contains a `windowcontrols` subnode, see -[class@Gtk.WindowControls] for details, as well as other children. - -When [property@HeaderBar:show-back-button] is `TRUE`, the start box also -contains a node with the name `widget` that contains a node with the name -`button` and `.back` style class. - -## Accessibility - -`AdwHeaderBar` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `decorationLayout` - -The decoration layout for buttons. - -If this property is not set, the -[property@Gtk.Settings:gtk-decoration-layout] setting is used. - -The format of the string is button names, separated by commas. A colon -separates the buttons that should appear at the start from those at the -end. Recognized button names are minimize, maximize, close and icon (the -window icon). - -For example, “icon:minimize,maximize,close” specifies an icon at the start, -and minimize, maximize and close buttons at the end. - -### `showBackButton` - -Whether the header bar can show the back button. - -The back button will never be shown unless the header bar is placed inside an -[class@NavigationView]. Usually, there is no reason to set this to `FALSE`. - -### `showEndTitleButtons` - -Whether to show title buttons at the end of the header bar. - -See [property@HeaderBar:show-start-title-buttons] for the other side. - -Which buttons are actually shown and where is determined by the -[property@HeaderBar:decoration-layout] property, and by the state of the -window (e.g. a close button will not be shown if the window can't be -closed). - -### `showStartTitleButtons` - -Whether to show title buttons at the start of the header bar. - -See [property@HeaderBar:show-end-title-buttons] for the other side. - -Which buttons are actually shown and where is determined by the -[property@HeaderBar:decoration-layout] property, and by the state of the -window (e.g. a close button will not be shown if the window can't be -closed). - -### `showTitle` - -Whether the title widget should be shown. - -### `titleWidget` - -The title widget to display. - -When set to `NULL`, the header bar will display the title of the window it -is contained in. - -To use a different title, use [class@WindowTitle]: - -```xml -Title -``` - -### `start` - -The body for the widget "start". - -### `end` - -The body for the widget "end". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `HeaderBar`. - -### `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. - -### `decorationLayout(_:)` - -The decoration layout for buttons. - -If this property is not set, the -[property@Gtk.Settings:gtk-decoration-layout] setting is used. - -The format of the string is button names, separated by commas. A colon -separates the buttons that should appear at the start from those at the -end. Recognized button names are minimize, maximize, close and icon (the -window icon). - -For example, “icon:minimize,maximize,close” specifies an icon at the start, -and minimize, maximize and close buttons at the end. - -### `showBackButton(_:)` - -Whether the header bar can show the back button. - -The back button will never be shown unless the header bar is placed inside an -[class@NavigationView]. Usually, there is no reason to set this to `FALSE`. - -### `showEndTitleButtons(_:)` - -Whether to show title buttons at the end of the header bar. - -See [property@HeaderBar:show-start-title-buttons] for the other side. - -Which buttons are actually shown and where is determined by the -[property@HeaderBar:decoration-layout] property, and by the state of the -window (e.g. a close button will not be shown if the window can't be -closed). - -### `showStartTitleButtons(_:)` - -Whether to show title buttons at the start of the header bar. - -See [property@HeaderBar:show-end-title-buttons] for the other side. - -Which buttons are actually shown and where is determined by the -[property@HeaderBar:decoration-layout] property, and by the state of the -window (e.g. a close button will not be shown if the window can't be -closed). - -### `showTitle(_:)` - -Whether the title widget should be shown. - -### `titleWidget(_:)` - -The title widget to display. - -When set to `NULL`, the header bar will display the title of the window it -is contained in. - -To use a different title, use [class@WindowTitle]: - -```xml -Title -``` - -### `start(_:)` - -Set the body for "start". -- Parameter body: The body. -- Returns: The widget. - -### `end(_:)` - -Set the body for "end". -- Parameter body: The body. -- Returns: The widget. diff --git a/Documentation/Reference/structs/InspectorWrapper.md b/Documentation/Reference/structs/InspectorWrapper.md deleted file mode 100644 index 0d41c6c..0000000 --- a/Documentation/Reference/structs/InspectorWrapper.md +++ /dev/null @@ -1,29 +0,0 @@ -**STRUCT** - -# `InspectorWrapper` - -A widget which executes a custom code on the GTUI widget when being created and updated. - -## Properties -### `modify` - -The custom code to edit the widget. - -### `content` - -The wrapped view. - -## 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. diff --git a/Documentation/Reference/structs/Label.md b/Documentation/Reference/structs/Label.md deleted file mode 100644 index 20f628a..0000000 --- a/Documentation/Reference/structs/Label.md +++ /dev/null @@ -1,429 +0,0 @@ -**STRUCT** - -# `Label` - -The `GtkLabel` widget displays a small amount of text. - -As the name implies, most labels are used to label another widget -such as a [class@Button]. - -![An example GtkLabel](label.png) - -# CSS nodes - -``` -label -├── [selection] -├── [link] -┊ -╰── [link] -``` - -`GtkLabel` has a single CSS node with the name label. A wide variety -of style classes may be applied to labels, such as .title, .subtitle, -.dim-label, etc. In the `GtkShortcutsWindow`, labels are used with the -.keycap style class. - -If the label has a selection, it gets a subnode with name selection. - -If the label has links, there is one subnode per link. These subnodes -carry the link or visited state depending on whether they have been -visited. In this case, label node also gets a .link style class. - -# GtkLabel as GtkBuildable - -The GtkLabel implementation of the GtkBuildable interface supports a -custom `` element, which supports any number of `` -elements. The `` element has attributes named “name“, “value“, -“start“ and “end“ and allows you to specify [struct@Pango.Attribute] -values for this label. - -An example of a UI definition fragment specifying Pango attributes: -```xml - -``` - -The start and end attributes specify the range of characters to which the -Pango attribute applies. If start and end are not specified, the attribute is -applied to the whole text. Note that specifying ranges does not make much -sense with translatable attributes. Use markup embedded in the translatable -content instead. - -# Accessibility - -`GtkLabel` uses the %GTK_ACCESSIBLE_ROLE_LABEL role. - -# Mnemonics - -Labels may contain “mnemonics”. Mnemonics are underlined characters in the -label, used for keyboard navigation. Mnemonics are created by providing a -string with an underscore before the mnemonic character, such as `"_File"`, -to the functions [ctor@Gtk.Label.new_with_mnemonic] or -[method@Gtk.Label.set_text_with_mnemonic]. - -Mnemonics automatically activate any activatable widget the label is -inside, such as a [class@Gtk.Button]; if the label is not inside the -mnemonic’s target widget, you have to tell the label about the target -using [method@Gtk.Label.set_mnemonic_widget]. - -Here’s a simple example where the label is inside a button: - -```c -// Pressing Alt+H will activate this button -GtkWidget *button = gtk_button_new (); -GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello"); -gtk_button_set_child (GTK_BUTTON (button), label); -``` - -There’s a convenience function to create buttons with a mnemonic label -already inside: - -```c -// Pressing Alt+H will activate this button -GtkWidget *button = gtk_button_new_with_mnemonic ("_Hello"); -``` - -To create a mnemonic for a widget alongside the label, such as a -[class@Gtk.Entry], you have to point the label at the entry with -[method@Gtk.Label.set_mnemonic_widget]: - -```c -// Pressing Alt+H will focus the entry -GtkWidget *entry = gtk_entry_new (); -GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello"); -gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry); -``` - -# Markup (styled text) - -To make it easy to format text in a label (changing colors, -fonts, etc.), label text can be provided in a simple -markup format: - -Here’s how to create a label with a small font: -```c -GtkWidget *label = gtk_label_new (NULL); -gtk_label_set_markup (GTK_LABEL (label), "Small text"); -``` - -(See the Pango manual for complete documentation] of available -tags, [func@Pango.parse_markup]) - -The markup passed to [method@Gtk.Label.set_markup] must be valid; for example, -literal `<`, `>` and `&` characters must be escaped as `<`, `>`, and `&`. -If you pass text obtained from the user, file, or a network to -[method@Gtk.Label.set_markup], you’ll want to escape it with -[func@GLib.markup_escape_text] or [func@GLib.markup_printf_escaped]. - -Markup strings are just a convenient way to set the [struct@Pango.AttrList] -on a label; [method@Gtk.Label.set_attributes] may be a simpler way to set -attributes in some cases. Be careful though; [struct@Pango.AttrList] tends -to cause internationalization problems, unless you’re applying attributes -to the entire string (i.e. unless you set the range of each attribute -to [0, %G_MAXINT)). The reason is that specifying the start_index and -end_index for a [struct@Pango.Attribute] requires knowledge of the exact -string being displayed, so translations will cause problems. - -# Selectable labels - -Labels can be made selectable with [method@Gtk.Label.set_selectable]. -Selectable labels allow the user to copy the label contents to -the clipboard. Only labels that contain useful-to-copy information -— such as error messages — should be made selectable. - -# Text layout - -A label can contain any number of paragraphs, but will have -performance problems if it contains more than a small number. -Paragraphs are separated by newlines or other paragraph separators -understood by Pango. - -Labels can automatically wrap text if you call [method@Gtk.Label.set_wrap]. - -[method@Gtk.Label.set_justify] sets how the lines in a label align -with one another. If you want to set how the label as a whole aligns -in its available space, see the [property@Gtk.Widget:halign] and -[property@Gtk.Widget:valign] properties. - -The [property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars] -properties can be used to control the size allocation of ellipsized or -wrapped labels. For ellipsizing labels, if either is specified (and less -than the actual text size), it is used as the minimum width, and the actual -text size is used as the natural width of the label. For wrapping labels, -width-chars is used as the minimum width, if specified, and max-width-chars -is used as the natural width. Even if max-width-chars specified, wrapping -labels will be rewrapped to use all of the available width. - -# Links - -GTK supports markup for clickable hyperlinks in addition to regular Pango -markup. The markup for links is borrowed from HTML, using the `` with -“href“, “title“ and “class“ attributes. GTK renders links similar to the -way they appear in web browsers, with colored, underlined text. The “title“ -attribute is displayed as a tooltip on the link. The “class“ attribute is -used as style class on the CSS node for the link. - -An example looks like this: - -```c -const char *text = -"Go to the " -"" -"GTK website for more..."; -GtkWidget *label = gtk_label_new (NULL); -gtk_label_set_markup (GTK_LABEL (label), text); -``` - -It is possible to implement custom handling for links and their tooltips -with the [signal@Gtk.Label::activate-link] signal and the -[method@Gtk.Label.get_current_uri] function. - -## 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. - -### `label` - -The contents of the label. - -If the string contains Pango markup (see [func@Pango.parse_markup]), -you will have to set the [property@Gtk.Label:use-markup] property to -%TRUE in order for the label to display the markup attributes. See also -[method@Gtk.Label.set_markup] for a convenience function that sets both -this property and the [property@Gtk.Label:use-markup] property at the -same time. - -If the string contains underlines acting as mnemonics, you will have to -set the [property@Gtk.Label:use-underline] property to %TRUE in order -for the label to display them. - -### `lines` - -The number of lines to which an ellipsized, wrapping label -should be limited. - -This property has no effect if the label is not wrapping or ellipsized. -Set this property to -1 if you don't want to limit the number of lines. - -### `maxWidthChars` - -The desired maximum width of the label, in characters. - -If this property is set to -1, the width will be calculated automatically. - -See the section on [text layout](class.Label.html#text-layout) for details of how -[property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars] -determine the width of ellipsized and wrapped labels. - -### `mnemonicKeyval` - -The mnemonic accelerator key for the label. - -### `mnemonicWidget` - -The widget to be activated when the labels mnemonic key is pressed. - -### `selectable` - -Whether the label text can be selected with the mouse. - -### `singleLineMode` - -Whether the label is in single line mode. - -In single line mode, the height of the label does not depend on the -actual text, it is always set to ascent + descent of the font. This -can be an advantage in situations where resizing the label because -of text changes would be distracting, e.g. in a statusbar. - -### `useMarkup` - -%TRUE if the text of the label includes Pango markup. - -See [func@Pango.parse_markup]. - -### `useUnderline` - -%TRUE if the text of the label indicates a mnemonic with an _ -before the mnemonic character. - -### `widthChars` - -The desired width of the label, in characters. - -If this property is set to -1, the width will be calculated automatically. - -See the section on [text layout](class.Label.html#text-layout) for details of how -[property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars] -determine the width of ellipsized and wrapped labels. - -### `wrap` - -%TRUE if the label text will wrap if it gets too wide. - -### `xalign` - -The horizontal alignment of the label text inside its size allocation. - -Compare this to [property@Gtk.Widget:halign], which determines how the -labels size allocation is positioned in the space available for the label. - -### `yalign` - -The vertical alignment of the label text inside its size allocation. - -Compare this to [property@Gtk.Widget:valign], which determines how the -labels size allocation is positioned in the space available for the label. - -### `copyClipboard` - -Gets emitted to copy the selection to the clipboard. - -The ::copy-clipboard signal is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is Ctrl+c. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init(label:)` - -Initialize `Label`. - -### `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. - -### `label(_:)` - -The contents of the label. - -If the string contains Pango markup (see [func@Pango.parse_markup]), -you will have to set the [property@Gtk.Label:use-markup] property to -%TRUE in order for the label to display the markup attributes. See also -[method@Gtk.Label.set_markup] for a convenience function that sets both -this property and the [property@Gtk.Label:use-markup] property at the -same time. - -If the string contains underlines acting as mnemonics, you will have to -set the [property@Gtk.Label:use-underline] property to %TRUE in order -for the label to display them. - -### `lines(_:)` - -The number of lines to which an ellipsized, wrapping label -should be limited. - -This property has no effect if the label is not wrapping or ellipsized. -Set this property to -1 if you don't want to limit the number of lines. - -### `maxWidthChars(_:)` - -The desired maximum width of the label, in characters. - -If this property is set to -1, the width will be calculated automatically. - -See the section on [text layout](class.Label.html#text-layout) for details of how -[property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars] -determine the width of ellipsized and wrapped labels. - -### `mnemonicKeyval(_:)` - -The mnemonic accelerator key for the label. - -### `mnemonicWidget(_:)` - -The widget to be activated when the labels mnemonic key is pressed. - -### `selectable(_:)` - -Whether the label text can be selected with the mouse. - -### `singleLineMode(_:)` - -Whether the label is in single line mode. - -In single line mode, the height of the label does not depend on the -actual text, it is always set to ascent + descent of the font. This -can be an advantage in situations where resizing the label because -of text changes would be distracting, e.g. in a statusbar. - -### `useMarkup(_:)` - -%TRUE if the text of the label includes Pango markup. - -See [func@Pango.parse_markup]. - -### `useUnderline(_:)` - -%TRUE if the text of the label indicates a mnemonic with an _ -before the mnemonic character. - -### `widthChars(_:)` - -The desired width of the label, in characters. - -If this property is set to -1, the width will be calculated automatically. - -See the section on [text layout](class.Label.html#text-layout) for details of how -[property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars] -determine the width of ellipsized and wrapped labels. - -### `wrap(_:)` - -%TRUE if the label text will wrap if it gets too wide. - -### `xalign(_:)` - -The horizontal alignment of the label text inside its size allocation. - -Compare this to [property@Gtk.Widget:halign], which determines how the -labels size allocation is positioned in the space available for the label. - -### `yalign(_:)` - -The vertical alignment of the label text inside its size allocation. - -Compare this to [property@Gtk.Widget:valign], which determines how the -labels size allocation is positioned in the space available for the label. - -### `copyClipboard(_:)` - -Gets emitted to copy the selection to the clipboard. - -The ::copy-clipboard signal is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is Ctrl+c. diff --git a/Documentation/Reference/structs/LevelBar.md b/Documentation/Reference/structs/LevelBar.md deleted file mode 100644 index 8a586f5..0000000 --- a/Documentation/Reference/structs/LevelBar.md +++ /dev/null @@ -1,209 +0,0 @@ -**STRUCT** - -# `LevelBar` - -`GtkLevelBar` is a widget that can be used as a level indicator. - -Typical use cases are displaying the strength of a password, or -showing the charge level of a battery. - -![An example GtkLevelBar](levelbar.png) - -Use [method@Gtk.LevelBar.set_value] to set the current value, and -[method@Gtk.LevelBar.add_offset_value] to set the value offsets at which -the bar will be considered in a different state. GTK will add a few -offsets by default on the level bar: %GTK_LEVEL_BAR_OFFSET_LOW, -%GTK_LEVEL_BAR_OFFSET_HIGH and %GTK_LEVEL_BAR_OFFSET_FULL, with -values 0.25, 0.75 and 1.0 respectively. - -Note that it is your responsibility to update preexisting offsets -when changing the minimum or maximum value. GTK will simply clamp -them to the new range. - -## Adding a custom offset on the bar - -```c -static GtkWidget * -create_level_bar (void) -{ -GtkWidget *widget; -GtkLevelBar *bar; - -widget = gtk_level_bar_new (); -bar = GTK_LEVEL_BAR (widget); - -// This changes the value of the default low offset - -gtk_level_bar_add_offset_value (bar, -GTK_LEVEL_BAR_OFFSET_LOW, -0.10); - -// This adds a new offset to the bar; the application will -// be able to change its color CSS like this: -// -// levelbar block.my-offset { -// background-color: magenta; -// border-style: solid; -// border-color: black; -// border-width: 1px; -// } - -gtk_level_bar_add_offset_value (bar, "my-offset", 0.60); - -return widget; -} -``` - -The default interval of values is between zero and one, but it’s possible -to modify the interval using [method@Gtk.LevelBar.set_min_value] and -[method@Gtk.LevelBar.set_max_value]. The value will be always drawn in -proportion to the admissible interval, i.e. a value of 15 with a specified -interval between 10 and 20 is equivalent to a value of 0.5 with an interval -between 0 and 1. When %GTK_LEVEL_BAR_MODE_DISCRETE is used, the bar level -is rendered as a finite number of separated blocks instead of a single one. -The number of blocks that will be rendered is equal to the number of units -specified by the admissible interval. - -For instance, to build a bar rendered with five blocks, it’s sufficient to -set the minimum value to 0 and the maximum value to 5 after changing the -indicator mode to discrete. - -# GtkLevelBar as GtkBuildable - -The `GtkLevelBar` implementation of the `GtkBuildable` interface supports a -custom `` element, which can contain any number of `` elements, -each of which must have "name" and "value" attributes. - -# CSS nodes - -``` -levelbar[.discrete] -╰── trough -├── block.filled.level-name -┊ -├── block.empty -┊ -``` - -`GtkLevelBar` has a main CSS node with name levelbar and one of the style -classes .discrete or .continuous and a subnode with name trough. Below the -trough node are a number of nodes with name block and style class .filled -or .empty. In continuous mode, there is exactly one node of each, in discrete -mode, the number of filled and unfilled nodes corresponds to blocks that are -drawn. The block.filled nodes also get a style class .level-name corresponding -to the level for the current value. - -In horizontal orientation, the nodes are always arranged from left to right, -regardless of text direction. - -# Accessibility - -`GtkLevelBar` uses the %GTK_ACCESSIBLE_ROLE_METER 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. - -### `inverted` - -Whether the `GtkLeveBar` is inverted. - -Level bars normally grow from top to bottom or left to right. -Inverted level bars grow in the opposite direction. - -### `maxValue` - -Determines the maximum value of the interval that can be displayed by the bar. - -### `minValue` - -Determines the minimum value of the interval that can be displayed by the bar. - -### `value` - -Determines the currently filled value of the level bar. - -### `offsetChanged` - -Emitted when an offset specified on the bar changes value. - -This typically is the result of a [method@Gtk.LevelBar.add_offset_value] -call. - -The signal supports detailed connections; you can connect to the -detailed signal "changed::x" in order to only receive callbacks when -the value of offset "x" changes. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `LevelBar`. - -### `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. - -### `inverted(_:)` - -Whether the `GtkLeveBar` is inverted. - -Level bars normally grow from top to bottom or left to right. -Inverted level bars grow in the opposite direction. - -### `maxValue(_:)` - -Determines the maximum value of the interval that can be displayed by the bar. - -### `minValue(_:)` - -Determines the minimum value of the interval that can be displayed by the bar. - -### `value(_:)` - -Determines the currently filled value of the level bar. - -### `offsetChanged(_:)` - -Emitted when an offset specified on the bar changes value. - -This typically is the result of a [method@Gtk.LevelBar.add_offset_value] -call. - -The signal supports detailed connections; you can connect to the -detailed signal "changed::x" in order to only receive callbacks when -the value of offset "x" changes. diff --git a/Documentation/Reference/structs/LinkButton.md b/Documentation/Reference/structs/LinkButton.md deleted file mode 100644 index a3af692..0000000 --- a/Documentation/Reference/structs/LinkButton.md +++ /dev/null @@ -1,196 +0,0 @@ -**STRUCT** - -# `LinkButton` - -A `GtkLinkButton` is a button with a hyperlink. - -![An example GtkLinkButton](link-button.png) - -It is useful to show quick links to resources. - -A link button is created by calling either [ctor@Gtk.LinkButton.new] or -[ctor@Gtk.LinkButton.new_with_label]. If using the former, the URI you -pass to the constructor is used as a label for the widget. - -The URI bound to a `GtkLinkButton` can be set specifically using -[method@Gtk.LinkButton.set_uri]. - -By default, `GtkLinkButton` calls [method@Gtk.FileLauncher.launch] when the button -is clicked. This behaviour can be overridden by connecting to the -[signal@Gtk.LinkButton::activate-link] signal and returning %TRUE from -the signal handler. - -# CSS nodes - -`GtkLinkButton` has a single CSS node with name button. To differentiate -it from a plain `GtkButton`, it gets the .link style class. - -# Accessibility - -`GtkLinkButton` uses the %GTK_ACCESSIBLE_ROLE_LINK 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. - -### `uri` - -The URI bound to this button. - -### `useUnderline` - -If set, an underline in the text indicates that the following character is -to be used as mnemonic. - -### `visited` - -The 'visited' state of this button. - -A visited link is drawn in a different color. - -### `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 - and Enter keys. - -### `clicked` - -Emitted when the button has been activated (pressed and released). - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init(uri:)` - -Initialize `LinkButton`. - -### `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. - -### `uri(_:)` - -The URI bound to this button. - -### `useUnderline(_:)` - -If set, an underline in the text indicates that the following character is -to be used as mnemonic. - -### `visited(_:)` - -The 'visited' state of this button. - -A visited link is drawn in a different color. - -### `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 - and Enter keys. - -### `clicked(_:)` - -Emitted when the button has been activated (pressed and released). diff --git a/Documentation/Reference/structs/List.md b/Documentation/Reference/structs/List.md deleted file mode 100644 index cf9f791..0000000 --- a/Documentation/Reference/structs/List.md +++ /dev/null @@ -1,69 +0,0 @@ -**STRUCT** - -# `List` - -A list box widget. - -## Properties -### `elements` - -The elements. - -### `content` - -The content. - -### `selection` - -The identifier of the selected element. - -### `elementsID` - -The identifier of the elements storage. - -## Methods -### `init(_:selection:content:)` - -Initialize `List`. -- Parameters: - - elements: The elements. - - selection: The identifier of the selected element. - - content: The view for an element. - -### `update(_:modifiers:)` - -Update a view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `container(modifiers:)` - -Get a view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. - -### `updateList(box:content:modifiers:)` - -Update the list's content and selection. -- Parameters: - - box: The list box. - - content: The content's view storage. - - modifiers: The view modifiers. - -### `updateSelection(box:)` - -Update the list's selection. -- Parameter box: The list box. - -### `getWidget(element:modifiers:)` - -Get the view storage of an element. -- Parameters: - - element: The element. - - modifiers: The modifiers. -- Returns: The view storage. - -### `sidebarStyle()` - -Add the "navigation-sidebar" style class. diff --git a/Documentation/Reference/structs/ListBox.md b/Documentation/Reference/structs/ListBox.md deleted file mode 100644 index 70459d6..0000000 --- a/Documentation/Reference/structs/ListBox.md +++ /dev/null @@ -1,235 +0,0 @@ -**STRUCT** - -# `ListBox` - -`GtkListBox` is a vertical list. - -A `GtkListBox` only contains `GtkListBoxRow` children. These rows can -by dynamically sorted and filtered, and headers can be added dynamically -depending on the row content. It also allows keyboard and mouse navigation -and selection like a typical list. - -Using `GtkListBox` is often an alternative to `GtkTreeView`, especially -when the list contents has a more complicated layout than what is allowed -by a `GtkCellRenderer`, or when the contents is interactive (i.e. has a -button in it). - -Although a `GtkListBox` must have only `GtkListBoxRow` children, you can -add any kind of widget to it via [method@Gtk.ListBox.prepend], -[method@Gtk.ListBox.append] and [method@Gtk.ListBox.insert] and a -`GtkListBoxRow` widget will automatically be inserted between the list -and the widget. - -`GtkListBoxRows` can be marked as activatable or selectable. If a row is -activatable, [signal@Gtk.ListBox::row-activated] will be emitted for it when -the user tries to activate it. If it is selectable, the row will be marked -as selected when the user tries to select it. - -# GtkListBox as GtkBuildable - -The `GtkListBox` implementation of the `GtkBuildable` interface supports -setting a child as the placeholder by specifying “placeholder” as the “type” -attribute of a `` element. See [method@Gtk.ListBox.set_placeholder] -for info. - -# CSS nodes - -|[ -list[.separators][.rich-list][.navigation-sidebar][.boxed-list] -╰── row[.activatable] -]| - -`GtkListBox` uses a single CSS node named list. It may carry the .separators -style class, when the [property@Gtk.ListBox:show-separators] property is set. -Each `GtkListBoxRow` uses a single CSS node named row. The row nodes get the -.activatable style class added when appropriate. - -It may also carry the .boxed-list style class. In this case, the list will be -automatically surrounded by a frame and have separators. - -The main list node may also carry style classes to select -the style of [list presentation](section-list-widget.html#list-styles): -.rich-list, .navigation-sidebar or .data-table. - -# Accessibility - -`GtkListBox` uses the %GTK_ACCESSIBLE_ROLE_LIST role and `GtkListBoxRow` uses -the %GTK_ACCESSIBLE_ROLE_LIST_ITEM role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `acceptUnpairedRelease` - -Whether to accept unpaired release events. - -### `accessibleRole` - -The accessible role of the given `GtkAccessible` implementation. - -The accessible role cannot be changed once set. - -### `activateOnSingleClick` - -Determines whether children can be activated with a single -click, or require a double-click. - -### `showSeparators` - -Whether to show separators between rows. - -### `activateCursorRow` - -activateCursorRow - -### `moveCursor` - -moveCursor - -### `rowActivated` - -Emitted when a row has been activated by the user. - -### `rowSelected` - -Emitted when a new row is selected, or (with a %NULL @row) -when the selection is cleared. - -When the @box is using %GTK_SELECTION_MULTIPLE, this signal will not -give you the full picture of selection changes, and you should use -the [signal@Gtk.ListBox::selected-rows-changed] signal instead. - -### `selectAll` - -Emitted to select all children of the box, if the selection -mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is Ctrl-a. - -### `selectedRowsChanged` - -Emitted when the set of selected rows changes. - -### `toggleCursorRow` - -toggleCursorRow - -### `unselectAll` - -Emitted to unselect all children of the box, if the selection -mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is -Ctrl-Shift-a. - -### `elements` - -The dynamic widget elements. - -### `content` - -The dynamic widget content. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init(_:content:)` - -Initialize `ListBox`. - -### `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. - -### `acceptUnpairedRelease(_:)` - -Whether to accept unpaired release events. - -### `accessibleRole(_:)` - -The accessible role of the given `GtkAccessible` implementation. - -The accessible role cannot be changed once set. - -### `activateOnSingleClick(_:)` - -Determines whether children can be activated with a single -click, or require a double-click. - -### `showSeparators(_:)` - -Whether to show separators between rows. - -### `activateCursorRow(_:)` - -activateCursorRow - -### `moveCursor(_:)` - -moveCursor - -### `rowActivated(_:)` - -Emitted when a row has been activated by the user. - -### `rowSelected(_:)` - -Emitted when a new row is selected, or (with a %NULL @row) -when the selection is cleared. - -When the @box is using %GTK_SELECTION_MULTIPLE, this signal will not -give you the full picture of selection changes, and you should use -the [signal@Gtk.ListBox::selected-rows-changed] signal instead. - -### `selectAll(_:)` - -Emitted to select all children of the box, if the selection -mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is Ctrl-a. - -### `selectedRowsChanged(_:)` - -Emitted when the set of selected rows changes. - -### `toggleCursorRow(_:)` - -toggleCursorRow - -### `unselectAll(_:)` - -Emitted to unselect all children of the box, if the selection -mode permits it. - -This is a [keybinding signal](class.SignalAction.html). - -The default binding for this signal is -Ctrl-Shift-a. diff --git a/Documentation/Reference/structs/Menu.md b/Documentation/Reference/structs/Menu.md deleted file mode 100644 index 5d57e87..0000000 --- a/Documentation/Reference/structs/Menu.md +++ /dev/null @@ -1,219 +0,0 @@ -**STRUCT** - -# `Menu` - -The `GtkMenuButton` widget is used to display a popup when clicked. - -![An example GtkMenuButton](menu-button.png) - -This popup can be provided either as a `GtkPopover` or as an abstract -`GMenuModel`. - -The `GtkMenuButton` widget can show either an icon (set with the -[property@Gtk.MenuButton:icon-name] property) or a label (set with the -[property@Gtk.MenuButton:label] property). If neither is explicitly set, -a [class@Gtk.Image] is automatically created, using an arrow image oriented -according to [property@Gtk.MenuButton:direction] or the generic -“open-menu-symbolic” icon if the direction is not set. - -The positioning of the popup is determined by the -[property@Gtk.MenuButton:direction] property of the menu button. - -For menus, the [property@Gtk.Widget:halign] and [property@Gtk.Widget:valign] -properties of the menu are also taken into account. For example, when the -direction is %GTK_ARROW_DOWN and the horizontal alignment is %GTK_ALIGN_START, -the menu will be positioned below the button, with the starting edge -(depending on the text direction) of the menu aligned with the starting -edge of the button. If there is not enough space below the button, the -menu is popped up above the button instead. If the alignment would move -part of the menu offscreen, it is “pushed in”. - -| | start | center | end | -| - | --- | --- | --- | -| **down** | ![](down-start.png) | ![](down-center.png) | ![](down-end.png) | -| **up** | ![](up-start.png) | ![](up-center.png) | ![](up-end.png) | -| **left** | ![](left-start.png) | ![](left-center.png) | ![](left-end.png) | -| **right** | ![](right-start.png) | ![](right-center.png) | ![](right-end.png) | - -# CSS nodes - -``` -menubutton -╰── button.toggle -╰── ╰── [arrow] -``` - -`GtkMenuButton` has a single CSS node with name `menubutton` -which contains a `button` node with a `.toggle` style class. - -If the button contains an icon, it will have the `.image-button` style class, -if it contains text, it will have `.text-button` style class. If an arrow is -visible in addition to an icon, text or a custom child, it will also have -`.arrow-button` style class. - -Inside the toggle button content, there is an `arrow` node for -the indicator, which will carry one of the `.none`, `.up`, `.down`, -`.left` or `.right` style classes to indicate the direction that -the menu will appear in. The CSS is expected to provide a suitable -image for each of these cases using the `-gtk-icon-source` property. - -Optionally, the `menubutton` node can carry the `.circular` style class -to request a round appearance. - -# Accessibility - -`GtkMenuButton` 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. - -### `active` - -Whether the menu button is active. - -### `alwaysShowArrow` - -Whether to show a dropdown arrow even when using an icon or a custom child. - -### `canShrink` - -Whether the size of the button can be made smaller than the natural -size of its contents. - -### `child` - -The child widget. - -### `hasFrame` - -Whether the button has a frame. - -### `iconName` - -The name of the icon used to automatically populate the button. - -### `label` - -The label for the button. - -### `menuModel` - -The `GMenuModel` from which the popup will be created. - -See [method@Gtk.MenuButton.set_menu_model] for the interaction -with the [property@Gtk.MenuButton:popover] property. - -### `primary` - -Whether the menu button acts as a primary menu. - -Primary menus can be opened using the F10 key - -### `useUnderline` - -If set an underscore in the text indicates a mnemonic. - -### `activate` - -Emitted to when the menu button is activated. - -The `::activate` signal on `GtkMenuButton` is an action signal and -emitting it causes the button to pop up its menu. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `Menu`. - -### `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. - -### `active(_:)` - -Whether the menu button is active. - -### `alwaysShowArrow(_:)` - -Whether to show a dropdown arrow even when using an icon or a custom child. - -### `canShrink(_:)` - -Whether the size of the button can be made smaller than the natural -size of its contents. - -### `child(_:)` - -The child widget. - -### `hasFrame(_:)` - -Whether the button has a frame. - -### `iconName(_:)` - -The name of the icon used to automatically populate the button. - -### `label(_:)` - -The label for the button. - -### `menuModel(app:window:_:)` - -The `GMenuModel` from which the popup will be created. - -See [method@Gtk.MenuButton.set_menu_model] for the interaction -with the [property@Gtk.MenuButton:popover] property. - -### `primary(_:)` - -Whether the menu button acts as a primary menu. - -Primary menus can be opened using the F10 key - -### `useUnderline(_:)` - -If set an underscore in the text indicates a mnemonic. - -### `activate(_:)` - -Emitted to when the menu button is activated. - -The `::activate` signal on `GtkMenuButton` is an action signal and -emitting it causes the button to pop up its menu. diff --git a/Documentation/Reference/structs/MenuButton.md b/Documentation/Reference/structs/MenuButton.md deleted file mode 100644 index 8129038..0000000 --- a/Documentation/Reference/structs/MenuButton.md +++ /dev/null @@ -1,52 +0,0 @@ -**STRUCT** - -# `MenuButton` - -A button widget for menus. - -## Properties -### `label` - -The button's label. - -### `handler` - -The button's action handler. - -### `shortcut` - -The keyboard shortcut. - -### `preferApplicationWindow` - -Whether to prefer adding the action to the application window. - -### `filteredLabel` - -The action label. - -## Methods -### `init(_:window:handler:)` - -Initialize a menu button. -- Parameters: - - label: The buttons label. - - window: Whether to prefer adding the action to the application window. - - handler: The button's action handler. - -### `addMenuItem(menu:app:window:)` - -Add the button to a menu. -- Parameters: - - menu: The menu. - - app: The application containing the menu. - - window: The application window containing the menu. - -### `keyboardShortcut(_:)` - -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. -- Returns: The button. diff --git a/Documentation/Reference/structs/MenuSection.md b/Documentation/Reference/structs/MenuSection.md deleted file mode 100644 index 73e143b..0000000 --- a/Documentation/Reference/structs/MenuSection.md +++ /dev/null @@ -1,24 +0,0 @@ -**STRUCT** - -# `MenuSection` - -A section for menus. - -## Properties -### `sectionContent` - -The content of the section. - -## Methods -### `init(content:)` - -Initialize a section for menus. -- Parameter content: The content of the section. - -### `addMenuItem(menu:app:window:)` - -Add the section to a menu. -- Parameters: - - menu: The menu. - - app: The application containing the menu. - - window: The application window containing the menu. diff --git a/Documentation/Reference/structs/ModifierStopper.md b/Documentation/Reference/structs/ModifierStopper.md deleted file mode 100644 index 54e81be..0000000 --- a/Documentation/Reference/structs/ModifierStopper.md +++ /dev/null @@ -1,25 +0,0 @@ -**STRUCT** - -# `ModifierStopper` - -Remove all of the content modifiers for the wrapped views. - -## Properties -### `content` - -The wrapped view. - -## 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. diff --git a/Documentation/Reference/structs/NavigationSplitView.md b/Documentation/Reference/structs/NavigationSplitView.md deleted file mode 100644 index f1bb728..0000000 --- a/Documentation/Reference/structs/NavigationSplitView.md +++ /dev/null @@ -1,44 +0,0 @@ -**STRUCT** - -# `NavigationSplitView` - -A navigation split view widget. - -## Properties -### `sidebar` - -The sidebar's content. - -### `content` - -The split view's main content. - -### `sidebarID` - -The sidebar content's id. - -### `contentID` - -The main content's id. - -## Methods -### `init(sidebar:content:)` - -Initialize a navigation split view. -- Parameters: - - sidebar: The sidebar content. - - content: The main content. - -### `container(modifiers:)` - -Get the container of the navigation split view widget. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. - -### `update(_:modifiers:updateProperties:)` - -Update the view storage of the navigation split view widget. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - - updateProperties: Whether to update properties. diff --git a/Documentation/Reference/structs/NavigationView.NavigationStack.md b/Documentation/Reference/structs/NavigationView.NavigationStack.md deleted file mode 100644 index 440411f..0000000 --- a/Documentation/Reference/structs/NavigationView.NavigationStack.md +++ /dev/null @@ -1,24 +0,0 @@ -**STRUCT** - -# `NavigationView.NavigationStack` - -A stack controls a navigation view. - -## Properties -### `action` - -The action to run at the next view update, if any. - -## Methods -### `init()` - -Initialize a navigation stack. - -### `pop()` - -Remove the last item from the navigation view. - -### `push(_:)` - -Add a new item to the navigation view. -- Parameter component: The component's value. diff --git a/Documentation/Reference/structs/NavigationView.md b/Documentation/Reference/structs/NavigationView.md deleted file mode 100644 index 9e3d3b7..0000000 --- a/Documentation/Reference/structs/NavigationView.md +++ /dev/null @@ -1,248 +0,0 @@ -**STRUCT** - -# `NavigationView` - -A page-based navigation container. - -navigation-view - -`AdwNavigationView` presents one child at a time, similar to -[class@Gtk.Stack]. - -`AdwNavigationView` can only contain [class@NavigationPage] children. - -It maintains a navigation stack that can be controlled with -[method@NavigationView.push] and [method@NavigationView.pop]. The whole -navigation stack can also be replaced using [method@NavigationView.replace]. - -`AdwNavigationView` allows to manage pages statically or dynamically. - -Static pages can be added using the [method@NavigationView.add] method. The -`AdwNavigationView` will keep a reference to these pages, but they aren't -accessible to the user until [method@NavigationView.push] is called (except -for the first page, which is pushed automatically). Use the -[method@NavigationView.remove] method to remove them. This is useful for -applications that have a small number of unique pages and just need -navigation between them. - -Dynamic pages are automatically destroyed once they are popped off the -navigation stack. To add a page like this, push it using the -[method@NavigationView.push] method without calling -[method@NavigationView.add] first. - -## Tags - -Static pages, as well as any pages in the navigation stack, can be accessed -by their [property@NavigationPage:tag]. For example, -[method@NavigationView.push_by_tag] can be used to push a static page that's -not in the navigation stack without having to keep a reference to it manually. - -## Header Bar Integration - -When used inside `AdwNavigationView`, [class@HeaderBar] will automatically -display a back button that can be used to go back to the previous page when -possible. The button also has a context menu, allowing to pop multiple pages -at once, potentially across multiple navigation views. - -Set [property@HeaderBar:show-back-button] to `FALSE` to disable this behavior -if it's unwanted. - -`AdwHeaderBar` will also display the title of the `AdwNavigationPage` it's -placed into, so most applications shouldn't need to customize it at all. - -## Shortcuts and Gestures - -`AdwNavigationView` supports the following shortcuts for going to the -previous page: - -- Escape (unless [property@NavigationView:pop-on-escape] is set to -`FALSE`) -- Alt+ -- Back mouse button - -Additionally, it supports interactive gestures: - -- One-finger swipe towards the right on touchscreens -- Scrolling towards the right on touchpads (usually two-finger swipe) - -These gestures have transitions enabled regardless of the -[property@NavigationView:animate-transitions] value. - -Applications can also enable shortcuts for pushing another page onto the -navigation stack via connecting to the [signal@NavigationView::get-next-page] -signal, in that case the following shortcuts are supported: - -- Alt+ -- Forward mouse button -- Swipe/scrolling towards the left - -For right-to-left locales, the gestures and shortcuts are reversed. - -[property@NavigationPage:can-pop] can be used to disable them, along with the -header bar back buttons. - -## Actions - -`AdwNavigationView` defines actions for controlling the navigation stack. -actions for controlling the navigation stack: - -- `navigation.push` takes a string parameter specifying the tag of the page to -push, and is equivalent to calling [method@NavigationView.push_by_tag]. - -- `navigation.pop` doesn't take any parameters and pops the current page from -the navigation stack, equivalent to calling [method@NavigationView.pop]. - -## `AdwNavigationView` as `GtkBuildable` - -`AdwNavigationView` allows to add pages as children, equivalent to using the -[method@NavigationView.add] method. - -Example of an `AdwNavigationView` UI definition: - -```xml -Page 1Open Page 2centercenternavigation.push'page-2'Page 2page-2 -``` - -navigation-view-example - -## CSS nodes - -`AdwNavigationView` has a single CSS node with the name `navigation-view`. - -## Accessibility - -`AdwNavigationView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `animateTransitions` - -Whether to animate page transitions. - -Gesture-based transitions are always animated. - -### `popOnEscape` - -Whether pressing Escape pops the current page. - -Applications using `AdwNavigationView` to implement a browser may want to -disable it. - -### `getNextPage` - -Emitted when a push shortcut or a gesture is triggered. - -To support the push shortcuts and gestures, the application is expected to -return the page to push in the handler. - -This signal can be emitted multiple times for the gestures, for example -when the gesture is cancelled by the user. As such, the application must -not make any irreversible changes in the handler, such as removing the page -from a forward stack. - -Instead, it should be done in the [signal@NavigationView::pushed] handler. - -### `popped` - -Emitted after @page has been popped from the navigation stack. - -See [method@NavigationView.pop]. - -When using [method@NavigationView.pop_to_page] or -[method@NavigationView.pop_to_tag], this signal is emitted for each of the -popped pages. - -### `pushed` - -Emitted after a page has been pushed to the navigation stack. - -See [method@NavigationView.push]. - -### `replaced` - -Emitted after the navigation stack has been replaced. - -See [method@NavigationView.replace]. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `NavigationView`. - -### `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. - -### `animateTransitions(_:)` - -Whether to animate page transitions. - -Gesture-based transitions are always animated. - -### `popOnEscape(_:)` - -Whether pressing Escape pops the current page. - -Applications using `AdwNavigationView` to implement a browser may want to -disable it. - -### `getNextPage(_:)` - -Emitted when a push shortcut or a gesture is triggered. - -To support the push shortcuts and gestures, the application is expected to -return the page to push in the handler. - -This signal can be emitted multiple times for the gestures, for example -when the gesture is cancelled by the user. As such, the application must -not make any irreversible changes in the handler, such as removing the page -from a forward stack. - -Instead, it should be done in the [signal@NavigationView::pushed] handler. - -### `popped(_:)` - -Emitted after @page has been popped from the navigation stack. - -See [method@NavigationView.pop]. - -When using [method@NavigationView.pop_to_page] or -[method@NavigationView.pop_to_tag], this signal is emitted for each of the -popped pages. - -### `pushed(_:)` - -Emitted after a page has been pushed to the navigation stack. - -See [method@NavigationView.push]. - -### `replaced(_:)` - -Emitted after the navigation stack has been replaced. - -See [method@NavigationView.replace]. diff --git a/Documentation/Reference/structs/Overlay.md b/Documentation/Reference/structs/Overlay.md deleted file mode 100644 index 6dae2b0..0000000 --- a/Documentation/Reference/structs/Overlay.md +++ /dev/null @@ -1,136 +0,0 @@ -**STRUCT** - -# `Overlay` - -`GtkOverlay` is a container which contains a single main child, on top -of which it can place “overlay” widgets. - -![An example GtkOverlay](overlay.png) - -The position of each overlay widget is determined by its -[property@Gtk.Widget:halign] and [property@Gtk.Widget:valign] -properties. E.g. a widget with both alignments set to %GTK_ALIGN_START -will be placed at the top left corner of the `GtkOverlay` container, -whereas an overlay with halign set to %GTK_ALIGN_CENTER and valign set -to %GTK_ALIGN_END will be placed a the bottom edge of the `GtkOverlay`, -horizontally centered. The position can be adjusted by setting the margin -properties of the child to non-zero values. - -More complicated placement of overlays is possible by connecting -to the [signal@Gtk.Overlay::get-child-position] signal. - -An overlay’s minimum and natural sizes are those of its main child. -The sizes of overlay children are not considered when measuring these -preferred sizes. - -# GtkOverlay as GtkBuildable - -The `GtkOverlay` implementation of the `GtkBuildable` interface -supports placing a child as an overlay by specifying “overlay” as -the “type” attribute of a `` element. - -# CSS nodes - -`GtkOverlay` has a single CSS node with the name “overlay”. Overlay children -whose alignments cause them to be positioned at an edge get the style classes -“.left”, “.right”, “.top”, and/or “.bottom” according to their position. - -## 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. - -### `child` - -The main child widget. - -### `getChildPosition` - -Emitted to determine the position and size of any overlay -child widgets. - -A handler for this signal should fill @allocation with -the desired position and size for @widget, relative to -the 'main' child of @overlay. - -The default handler for this signal uses the @widget's -halign and valign properties to determine the position -and gives the widget its natural size (except that an -alignment of %GTK_ALIGN_FILL will cause the overlay to -be full-width/height). If the main child is a -`GtkScrolledWindow`, the overlays are placed relative -to its contents. - -### `overlay` - -The body for the widget "overlay". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `Overlay`. - -### `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. - -### `child(_:)` - -The main child widget. - -### `getChildPosition(_:)` - -Emitted to determine the position and size of any overlay -child widgets. - -A handler for this signal should fill @allocation with -the desired position and size for @widget, relative to -the 'main' child of @overlay. - -The default handler for this signal uses the @widget's -halign and valign properties to determine the position -and gives the widget its natural size (except that an -alignment of %GTK_ALIGN_FILL will cause the overlay to -be full-width/height). If the main child is a -`GtkScrolledWindow`, the overlays are placed relative -to its contents. - -### `overlay(_:)` - -Set the body for "overlay". -- Parameter body: The body. -- Returns: The widget. diff --git a/Documentation/Reference/structs/OverlaySplitView.md b/Documentation/Reference/structs/OverlaySplitView.md deleted file mode 100644 index 677feef..0000000 --- a/Documentation/Reference/structs/OverlaySplitView.md +++ /dev/null @@ -1,285 +0,0 @@ -**STRUCT** - -# `OverlaySplitView` - -A widget presenting sidebar and content side by side or as an overlay. - -overlay-split-viewoverlay-split-view-collapsed - -`AdwOverlaySplitView` has two children: sidebar and content, and displays -them side by side. - -When [property@OverlaySplitView:collapsed] is set to `TRUE`, the sidebar is -instead shown as an overlay above the content widget. - -The sidebar can be hidden or shown using the -[property@OverlaySplitView:show-sidebar] property. - -Sidebar can be displayed before or after the content, this can be controlled -with the [property@OverlaySplitView:sidebar-position] property. - -Collapsing the split view automatically hides the sidebar widget, and -uncollapsing it shows the sidebar. If this behavior is not desired, the -[property@OverlaySplitView:pin-sidebar] property can be used to override it. - -`AdwOverlaySplitView` supports an edge swipe gesture for showing the sidebar, -and a swipe from the sidebar for hiding it. Gestures are only supported on -touchscreen, but not touchpad. Gestures can be controlled with the -[property@OverlaySplitView:enable-show-gesture] and -[property@OverlaySplitView:enable-hide-gesture] properties. - -See also [class@NavigationSplitView]. - -`AdwOverlaySplitView` is typically used together with an [class@Breakpoint] -setting the `collapsed` property to `TRUE` on small widths, as follows: - -```xml -360200800800max-width: 400spTrue -``` - -`AdwOverlaySplitView` is often used for implementing the -[utility pane](https://developer.gnome.org/hig/patterns/containers/utility-panes.html) -pattern. - -## Sizing - -When not collapsed, `AdwOverlaySplitView` changes the sidebar width -depending on its own width. - -If possible, it tries to allocate a fraction of the total width, controlled -with the [property@OverlaySplitView:sidebar-width-fraction] property. - -The sidebar also has minimum and maximum sizes, controlled with the -[property@OverlaySplitView:min-sidebar-width] and -[property@OverlaySplitView:max-sidebar-width] properties. - -The minimum and maximum sizes are using the length unit specified with the -[property@OverlaySplitView:sidebar-width-unit]. - -By default, sidebar is using 25% of the total width, with 180sp as the -minimum size and 280sp as the maximum size. - -When collapsed, the preferred width fraction is ignored and the sidebar uses -[property@OverlaySplitView:max-sidebar-width] when possible. - -## Header Bar Integration - -When used inside `AdwOverlaySplitView`, [class@HeaderBar] will automatically -hide the window buttons in the middle. - -## `AdwOverlaySplitView` as `GtkBuildable` - -The `AdwOverlaySplitView` implementation of the [iface@Gtk.Buildable] -interface supports setting the sidebar widget by specifying “sidebar” as the -“type” attribute of a `` element, Specifying “content” child type or -omitting it results in setting the content widget. - -## CSS nodes - -`AdwOverlaySplitView` has a single CSS node with the name -`overlay-split-view`. - -It contains two nodes with the name `widget`, containing the sidebar and -content children. - -When not collapsed, they have the `.sidebar-view` and `.content-view` style -classes respectively. - -``` -overlay-split-view -├── widget.sidebar-pane -│ ╰── [sidebar child] -╰── widget.content-pane -╰── [content child] -``` - -When collapsed, the one containing the sidebar child has the `.background` -style class and the other one has no style classes. - -``` -overlay-split-view -├── widget.background -│ ╰── [sidebar child] -╰── widget -╰── [content child] -``` - -## Accessibility - -`AdwOverlaySplitView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `collapsed` - -Whether the split view is collapsed. - -When collapsed, the sidebar widget is presented as an overlay above the -content widget, otherwise they are displayed side by side. - -### `content` - -The content widget. - -### `enableHideGesture` - -Whether the sidebar can be closed with a swipe gesture. - -Only touchscreen swipes are supported. - -### `enableShowGesture` - -Whether the sidebar can be opened with an edge swipe gesture. - -Only touchscreen swipes are supported. - -### `maxSidebarWidth` - -The maximum sidebar width. - -Maximum width is affected by -[property@OverlaySplitView:sidebar-width-unit]. - -The sidebar widget can still be allocated with larger width if its own -minimum width exceeds it. - -### `minSidebarWidth` - -The minimum sidebar width. - -Minimum width is affected by -[property@OverlaySplitView:sidebar-width-unit]. - -The sidebar widget can still be allocated with larger width if its own -minimum width exceeds it. - -### `pinSidebar` - -Whether the sidebar widget is pinned. - -By default, collapsing @self automatically hides the sidebar widget, and -uncollapsing it shows the sidebar. If set to `TRUE`, sidebar visibility -never changes on its own. - -### `showSidebar` - -Whether the sidebar widget is shown. - -### `sidebar` - -The sidebar widget. - -### `sidebarWidthFraction` - -The preferred sidebar width as a fraction of the total width. - -The preferred width is additionally limited by -[property@OverlaySplitView:min-sidebar-width] and -[property@OverlaySplitView:max-sidebar-width]. - -The sidebar widget can be allocated with larger width if its own minimum -width exceeds the preferred width. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `OverlaySplitView`. - -### `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. - -### `collapsed(_:)` - -Whether the split view is collapsed. - -When collapsed, the sidebar widget is presented as an overlay above the -content widget, otherwise they are displayed side by side. - -### `content(_:)` - -The content widget. - -### `enableHideGesture(_:)` - -Whether the sidebar can be closed with a swipe gesture. - -Only touchscreen swipes are supported. - -### `enableShowGesture(_:)` - -Whether the sidebar can be opened with an edge swipe gesture. - -Only touchscreen swipes are supported. - -### `maxSidebarWidth(_:)` - -The maximum sidebar width. - -Maximum width is affected by -[property@OverlaySplitView:sidebar-width-unit]. - -The sidebar widget can still be allocated with larger width if its own -minimum width exceeds it. - -### `minSidebarWidth(_:)` - -The minimum sidebar width. - -Minimum width is affected by -[property@OverlaySplitView:sidebar-width-unit]. - -The sidebar widget can still be allocated with larger width if its own -minimum width exceeds it. - -### `pinSidebar(_:)` - -Whether the sidebar widget is pinned. - -By default, collapsing @self automatically hides the sidebar widget, and -uncollapsing it shows the sidebar. If set to `TRUE`, sidebar visibility -never changes on its own. - -### `showSidebar(_:)` - -Whether the sidebar widget is shown. - -### `sidebar(_:)` - -The sidebar widget. - -### `sidebarWidthFraction(_:)` - -The preferred sidebar width as a fraction of the total width. - -The preferred width is additionally limited by -[property@OverlaySplitView:min-sidebar-width] and -[property@OverlaySplitView:max-sidebar-width]. - -The sidebar widget can be allocated with larger width if its own minimum -width exceeds the preferred width. diff --git a/Documentation/Reference/structs/PasswordEntryRow.md b/Documentation/Reference/structs/PasswordEntryRow.md deleted file mode 100644 index a91f8dc..0000000 --- a/Documentation/Reference/structs/PasswordEntryRow.md +++ /dev/null @@ -1,190 +0,0 @@ -**STRUCT** - -# `PasswordEntryRow` - -A [class@EntryRow] tailored for entering secrets. - -password-entry-row - -It does not show its contents in clear text, does not allow to copy it to the -clipboard, and shows a warning when Caps Lock is engaged. If the underlying -platform allows it, `AdwPasswordEntryRow` will also place the text in a -non-pageable memory area, to avoid it being written out to disk by the -operating system. - -It offer a way to reveal the contents in clear text. - -## CSS Nodes - -`AdwPasswordEntryRow` has a single CSS node with name `row` that carries -`.entry` and `.password` style classes. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `activatesDefault` - -Whether activating the embedded entry can activate the default widget. - -### `enableEmojiCompletion` - -Whether to suggest emoji replacements on the entry row. - -Emoji replacement is done with :-delimited names, like `:heart:`. - -### `showApplyButton` - -Whether to show the apply button. - -When set to `TRUE`, typing text in the entry will reveal an apply button. -Clicking it or pressing the Enter key will hide the button and -emit the [signal@EntryRow::apply] signal. - -This is useful if changing the entry contents can trigger an expensive -operation, e.g. network activity, to avoid triggering it after typing every -character. - -### `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`. - -### `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. - -### `apply` - -Emitted when the apply button is pressed. - -See [property@EntryRow:show-apply-button]. - -### `entryActivated` - -Emitted when the embedded entry is activated. - -### `suffix` - -The body for the widget "suffix". - -### `prefix` - -The body for the widget "prefix". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `PasswordEntryRow`. - -### `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. - -### `activatesDefault(_:)` - -Whether activating the embedded entry can activate the default widget. - -### `enableEmojiCompletion(_:)` - -Whether to suggest emoji replacements on the entry row. - -Emoji replacement is done with :-delimited names, like `:heart:`. - -### `showApplyButton(_:)` - -Whether to show the apply button. - -When set to `TRUE`, typing text in the entry will reveal an apply button. -Clicking it or pressing the Enter key will hide the button and -emit the [signal@EntryRow::apply] signal. - -This is useful if changing the entry contents can trigger an expensive -operation, e.g. network activity, to avoid triggering it after typing every -character. - -### `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`. - -### `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. - -### `apply(_:)` - -Emitted when the apply button is pressed. - -See [property@EntryRow:show-apply-button]. - -### `entryActivated(_:)` - -Emitted when the embedded entry is 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. diff --git a/Documentation/Reference/structs/Popover.md b/Documentation/Reference/structs/Popover.md deleted file mode 100644 index fc6637b..0000000 --- a/Documentation/Reference/structs/Popover.md +++ /dev/null @@ -1,184 +0,0 @@ -**STRUCT** - -# `Popover` - -`GtkPopover` is a bubble-like context popup. - -![An example GtkPopover](popover.png) - -It is primarily meant to provide context-dependent information -or options. Popovers are attached to a parent widget. By default, -they point to the whole widget area, although this behavior can be -changed with [method@Gtk.Popover.set_pointing_to]. - -The position of a popover relative to the widget it is attached to -can also be changed with [method@Gtk.Popover.set_position] - -By default, `GtkPopover` performs a grab, in order to ensure input -events get redirected to it while it is shown, and also so the popover -is dismissed in the expected situations (clicks outside the popover, -or the Escape key being pressed). If no such modal behavior is desired -on a popover, [method@Gtk.Popover.set_autohide] may be called on it to -tweak its behavior. - -## GtkPopover as menu replacement - -`GtkPopover` is often used to replace menus. The best was to do this -is to use the [class@Gtk.PopoverMenu] subclass which supports being -populated from a `GMenuModel` with [ctor@Gtk.PopoverMenu.new_from_model]. - -```xml -
horizontal-buttonsCutapp.cutedit-cut-symbolicCopyapp.copyedit-copy-symbolicPasteapp.pasteedit-paste-symbolic
-``` - -# CSS nodes - -``` -popover.background[.menu] -├── arrow -╰── contents -╰── -``` - -`GtkPopover` has a main node with name `popover`, an arrow with name `arrow`, -and another node for the content named `contents`. The `popover` node always -gets the `.background` style class. It also gets the `.menu` style class -if the popover is menu-like, e.g. is a [class@Gtk.PopoverMenu]. - -Particular uses of `GtkPopover`, such as touch selection popups or -magnifiers in `GtkEntry` or `GtkTextView` get style classes like -`.touch-selection` or `.magnifier` to differentiate from plain popovers. - -When styling a popover directly, the `popover` node should usually -not have any background. The visible part of the popover can have -a shadow. To specify it in CSS, set the box-shadow of the `contents` node. - -Note that, in order to accomplish appropriate arrow visuals, `GtkPopover` -uses custom drawing for the `arrow` node. This makes it possible for the -arrow to change its shape dynamically, but it also limits the possibilities -of styling it using CSS. In particular, the `arrow` gets drawn over the -`content` node's border and shadow, so they look like one shape, which -means that the border width of the `content` node and the `arrow` node should -be the same. The arrow also does not support any border shape other than -solid, no border-radius, only one border width (border-bottom-width is -used) and no box-shadow. - -## 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. - -### `autohide` - -Whether to dismiss the popover on outside clicks. - -### `cascadePopdown` - -Whether the popover pops down after a child popover. - -This is used to implement the expected behavior of submenus. - -### `child` - -The child widget. - -### `defaultWidget` - -The default widget inside the popover. - -### `hasArrow` - -Whether to draw an arrow. - -### `mnemonicsVisible` - -Whether mnemonics are currently visible in this popover. - -### `activateDefault` - -Emitted whend the user activates the default widget. - -This is a [keybinding signal](class.SignalAction.html). - -### `closed` - -Emitted when the popover is closed. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `Popover`. - -### `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. - -### `autohide(_:)` - -Whether to dismiss the popover on outside clicks. - -### `cascadePopdown(_:)` - -Whether the popover pops down after a child popover. - -This is used to implement the expected behavior of submenus. - -### `child(_:)` - -The child widget. - -### `defaultWidget(_:)` - -The default widget inside the popover. - -### `hasArrow(_:)` - -Whether to draw an arrow. - -### `mnemonicsVisible(_:)` - -Whether mnemonics are currently visible in this popover. - -### `activateDefault(_:)` - -Emitted whend the user activates the default widget. - -This is a [keybinding signal](class.SignalAction.html). - -### `closed(_:)` - -Emitted when the popover is closed. diff --git a/Documentation/Reference/structs/PreferencesGroup.md b/Documentation/Reference/structs/PreferencesGroup.md deleted file mode 100644 index 1723559..0000000 --- a/Documentation/Reference/structs/PreferencesGroup.md +++ /dev/null @@ -1,112 +0,0 @@ -**STRUCT** - -# `PreferencesGroup` - -A group of preference rows. - -preferences-group - -An `AdwPreferencesGroup` represents a group or tightly related preferences, -which in turn are represented by [class@PreferencesRow]. - -To summarize the role of the preferences it gathers, a group can have both a -title and a description. The title will be used by [class@PreferencesWindow] -to let the user look for a preference. - -## AdwPreferencesGroup as GtkBuildable - -The `AdwPreferencesGroup` implementation of the [iface@Gtk.Buildable] interface -supports adding [class@PreferencesRow]s to the list by omitting "type". If "type" -is omitted and the widget isn't a [class@PreferencesRow] the child is added to -a box below the list. - -When the "type" attribute of a child is `header-suffix`, the child -is set as the suffix on the end of the title and description. - -## CSS nodes - -`AdwPreferencesGroup` has a single CSS node with name `preferencesgroup`. - -## Accessibility - -`AdwPreferencesGroup` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `description` - -The description for this group of preferences. - -### `headerSuffix` - -The header suffix widget. - -Displayed above the list, next to the title and description. - -Suffixes are commonly used to show a button or a spinner for the whole -group. - -### `title` - -The title for this group of preferences. - -### `child` - -The body for the widget "child". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `PreferencesGroup`. - -### `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. - -### `description(_:)` - -The description for this group of preferences. - -### `headerSuffix(_:)` - -The header suffix widget. - -Displayed above the list, next to the title and description. - -Suffixes are commonly used to show a button or a spinner for the whole -group. - -### `title(_:)` - -The title for this group of preferences. - -### `child(_:)` - -Set the body for "child". -- Parameter body: The body. -- Returns: The widget. diff --git a/Documentation/Reference/structs/PreferencesPage.md b/Documentation/Reference/structs/PreferencesPage.md deleted file mode 100644 index 3dc4ac4..0000000 --- a/Documentation/Reference/structs/PreferencesPage.md +++ /dev/null @@ -1,104 +0,0 @@ -**STRUCT** - -# `PreferencesPage` - -A page from [class@PreferencesWindow]. - -preferences-page - -The `AdwPreferencesPage` widget gathers preferences groups into a single page -of a preferences window. - -## CSS nodes - -`AdwPreferencesPage` has a single CSS node with name `preferencespage`. - -## Accessibility - -`AdwPreferencesPage` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `description` - -The description to be displayed at the top of the page. - -### `iconName` - -The icon name for this page. - -### `name` - -The name of this page. - -### `title` - -The title for this page. - -### `useUnderline` - -Whether an embedded underline in the title indicates a mnemonic. - -### `child` - -The body for the widget "child". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `PreferencesPage`. - -### `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. - -### `description(_:)` - -The description to be displayed at the top of the page. - -### `iconName(_:)` - -The icon name for this page. - -### `name(_:)` - -The name of this page. - -### `title(_:)` - -The title for this page. - -### `useUnderline(_:)` - -Whether an embedded underline in the title indicates a mnemonic. - -### `child(_:)` - -Set the body for "child". -- Parameter body: The body. -- Returns: The widget. diff --git a/Documentation/Reference/structs/PreferencesRow.md b/Documentation/Reference/structs/PreferencesRow.md deleted file mode 100644 index 575db78..0000000 --- a/Documentation/Reference/structs/PreferencesRow.md +++ /dev/null @@ -1,99 +0,0 @@ -**STRUCT** - -# `PreferencesRow` - -A [class@Gtk.ListBoxRow] used to present preferences. - -The `AdwPreferencesRow` widget has a title that [class@PreferencesWindow] -will use to let the user look for a preference. It doesn't present the title -in any way and lets you present the preference as you please. - -[class@ActionRow] and its derivatives are convenient to use as preference -rows as they take care of presenting the preference's title while letting you -compose the inputs of the preference around it. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `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`. - -### `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. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `PreferencesRow`. - -### `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. - -### `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`. - -### `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. diff --git a/Documentation/Reference/structs/ProgressBar.md b/Documentation/Reference/structs/ProgressBar.md deleted file mode 100644 index 7658ea8..0000000 --- a/Documentation/Reference/structs/ProgressBar.md +++ /dev/null @@ -1,156 +0,0 @@ -**STRUCT** - -# `ProgressBar` - -`GtkProgressBar` is typically used to display the progress of a long -running operation. - -It provides a visual clue that processing is underway. `GtkProgressBar` -can be used in two different modes: percentage mode and activity mode. - -![An example GtkProgressBar](progressbar.png) - -When an application can determine how much work needs to take place -(e.g. read a fixed number of bytes from a file) and can monitor its -progress, it can use the `GtkProgressBar` in percentage mode and the -user sees a growing bar indicating the percentage of the work that -has been completed. In this mode, the application is required to call -[method@Gtk.ProgressBar.set_fraction] periodically to update the progress bar. - -When an application has no accurate way of knowing the amount of work -to do, it can use the `GtkProgressBar` in activity mode, which shows -activity by a block moving back and forth within the progress area. In -this mode, the application is required to call [method@Gtk.ProgressBar.pulse] -periodically to update the progress bar. - -There is quite a bit of flexibility provided to control the appearance -of the `GtkProgressBar`. Functions are provided to control the orientation -of the bar, optional text can be displayed along with the bar, and the -step size used in activity mode can be set. - -# CSS nodes - -``` -progressbar[.osd] -├── [text] -╰── trough[.empty][.full] -╰── progress[.pulse] -``` - -`GtkProgressBar` has a main CSS node with name progressbar and subnodes with -names text and trough, of which the latter has a subnode named progress. The -text subnode is only present if text is shown. The progress subnode has the -style class .pulse when in activity mode. It gets the style classes .left, -.right, .top or .bottom added when the progress 'touches' the corresponding -end of the GtkProgressBar. The .osd class on the progressbar node is for use -in overlays like the one Epiphany has for page loading progress. - -# Accessibility - -`GtkProgressBar` uses the %GTK_ACCESSIBLE_ROLE_PROGRESS_BAR 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. - -### `fraction` - -The fraction of total work that has been completed. - -### `inverted` - -Invert the direction in which the progress bar grows. - -### `pulseStep` - -The fraction of total progress to move the bounding block when pulsed. - -### `showText` - -Sets whether the progress bar will show a text in addition -to the bar itself. - -The shown text is either the value of the [property@Gtk.ProgressBar:text] -property or, if that is %NULL, the [property@Gtk.ProgressBar:fraction] -value, as a percentage. - -To make a progress bar that is styled and sized suitably for showing text -(even if the actual text is blank), set [property@Gtk.ProgressBar:show-text] -to %TRUE and [property@Gtk.ProgressBar:text] to the empty string (not %NULL). - -### `text` - -Text to be displayed in the progress bar. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `ProgressBar`. - -### `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. - -### `fraction(_:)` - -The fraction of total work that has been completed. - -### `inverted(_:)` - -Invert the direction in which the progress bar grows. - -### `pulseStep(_:)` - -The fraction of total progress to move the bounding block when pulsed. - -### `showText(_:)` - -Sets whether the progress bar will show a text in addition -to the bar itself. - -The shown text is either the value of the [property@Gtk.ProgressBar:text] -property or, if that is %NULL, the [property@Gtk.ProgressBar:fraction] -value, as a percentage. - -To make a progress bar that is styled and sized suitably for showing text -(even if the actual text is blank), set [property@Gtk.ProgressBar:show-text] -to %TRUE and [property@Gtk.ProgressBar:text] to the empty string (not %NULL). - -### `text(_:)` - -Text to be displayed in the progress bar. diff --git a/Documentation/Reference/structs/SceneStorage.ViewStorage.md b/Documentation/Reference/structs/SceneStorage.ViewStorage.md deleted file mode 100644 index 9788119..0000000 --- a/Documentation/Reference/structs/SceneStorage.ViewStorage.md +++ /dev/null @@ -1,8 +0,0 @@ -**STRUCT** - -# `SceneStorage.ViewStorage` - -## Properties -### `view` - -### `content` diff --git a/Documentation/Reference/structs/SceneStorage.WindowStorage.md b/Documentation/Reference/structs/SceneStorage.WindowStorage.md deleted file mode 100644 index 44cf00c..0000000 --- a/Documentation/Reference/structs/SceneStorage.WindowStorage.md +++ /dev/null @@ -1,8 +0,0 @@ -**STRUCT** - -# `SceneStorage.WindowStorage` - -## Properties -### `window` - -### `views` diff --git a/Documentation/Reference/structs/SceneStorage.md b/Documentation/Reference/structs/SceneStorage.md deleted file mode 100644 index 4b20a74..0000000 --- a/Documentation/Reference/structs/SceneStorage.md +++ /dev/null @@ -1,11 +0,0 @@ -**STRUCT** - -# `SceneStorage` - -## Properties -### `app` - -### `windows` - -## Methods -### `init()` diff --git a/Documentation/Reference/structs/ScrollView.md b/Documentation/Reference/structs/ScrollView.md deleted file mode 100644 index 24ed87f..0000000 --- a/Documentation/Reference/structs/ScrollView.md +++ /dev/null @@ -1,29 +0,0 @@ -**STRUCT** - -# `ScrollView` - -A GtkScrolledWindow equivalent. - -## Properties -### `content` - -The content. - -## Methods -### `init(content:)` - -Initialize a `ScrollView`. -- Parameter content: The view content. - -### `update(_:modifiers:)` - -Update a view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `container(modifiers:)` - -Get a view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. diff --git a/Documentation/Reference/structs/ScrolledWindow.md b/Documentation/Reference/structs/ScrolledWindow.md deleted file mode 100644 index a8c5ea5..0000000 --- a/Documentation/Reference/structs/ScrolledWindow.md +++ /dev/null @@ -1,330 +0,0 @@ -**STRUCT** - -# `ScrolledWindow` - -`GtkScrolledWindow` is a container that makes its child scrollable. - -It does so using either internally added scrollbars or externally -associated adjustments, and optionally draws a frame around the child. - -Widgets with native scrolling support, i.e. those whose classes implement -the [iface@Gtk.Scrollable] interface, are added directly. For other types -of widget, the class [class@Gtk.Viewport] acts as an adaptor, giving -scrollability to other widgets. [method@Gtk.ScrolledWindow.set_child] -intelligently accounts for whether or not the added child is a `GtkScrollable`. -If it isn’t, then it wraps the child in a `GtkViewport`. Therefore, you can -just add any child widget and not worry about the details. - -If [method@Gtk.ScrolledWindow.set_child] has added a `GtkViewport` for you, -it will be automatically removed when you unset the child. -Unless [property@Gtk.ScrolledWindow:hscrollbar-policy] and -[property@Gtk.ScrolledWindow:vscrollbar-policy] are %GTK_POLICY_NEVER or -%GTK_POLICY_EXTERNAL, `GtkScrolledWindow` adds internal `GtkScrollbar` widgets -around its child. The scroll position of the child, and if applicable the -scrollbars, is controlled by the [property@Gtk.ScrolledWindow:hadjustment] -and [property@Gtk.ScrolledWindow:vadjustment] that are associated with the -`GtkScrolledWindow`. See the docs on [class@Gtk.Scrollbar] for the details, -but note that the “step_increment” and “page_increment” fields are only -effective if the policy causes scrollbars to be present. - -If a `GtkScrolledWindow` doesn’t behave quite as you would like, or -doesn’t have exactly the right layout, it’s very possible to set up -your own scrolling with `GtkScrollbar` and for example a `GtkGrid`. - -# Touch support - -`GtkScrolledWindow` has built-in support for touch devices. When a -touchscreen is used, swiping will move the scrolled window, and will -expose 'kinetic' behavior. This can be turned off with the -[property@Gtk.ScrolledWindow:kinetic-scrolling] property if it is undesired. - -`GtkScrolledWindow` also displays visual 'overshoot' indication when -the content is pulled beyond the end, and this situation can be -captured with the [signal@Gtk.ScrolledWindow::edge-overshot] signal. - -If no mouse device is present, the scrollbars will overlaid as -narrow, auto-hiding indicators over the content. If traditional -scrollbars are desired although no mouse is present, this behaviour -can be turned off with the [property@Gtk.ScrolledWindow:overlay-scrolling] -property. - -# CSS nodes - -`GtkScrolledWindow` has a main CSS node with name scrolledwindow. -It gets a .frame style class added when [property@Gtk.ScrolledWindow:has-frame] -is %TRUE. - -It uses subnodes with names overshoot and undershoot to draw the overflow -and underflow indications. These nodes get the .left, .right, .top or .bottom -style class added depending on where the indication is drawn. - -`GtkScrolledWindow` also sets the positional style classes (.left, .right, -.top, .bottom) and style classes related to overlay scrolling -(.overlay-indicator, .dragging, .hovering) on its scrollbars. - -If both scrollbars are visible, the area where they meet is drawn -with a subnode named junction. - -# Accessibility - -Until GTK 4.10, `GtkScrolledWindow` used the `GTK_ACCESSIBLE_ROLE_GROUP` role. - -Starting from GTK 4.12, `GtkScrolledWindow` 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. - -### `child` - -The child widget. - -When setting this property, if the child widget does not implement -[iface@Gtk.Scrollable], the scrolled window will add the child to -a [class@Gtk.Viewport] and then set the viewport as the child. - -### `hasFrame` - -Whether to draw a frame around the contents. - -### `kineticScrolling` - -Whether kinetic scrolling is enabled or not. - -Kinetic scrolling only applies to devices with source %GDK_SOURCE_TOUCHSCREEN. - -### `maxContentHeight` - -The maximum content height of @scrolled_window. - -### `maxContentWidth` - -The maximum content width of @scrolled_window. - -### `minContentHeight` - -The minimum content height of @scrolled_window. - -### `minContentWidth` - -The minimum content width of @scrolled_window. - -### `overlayScrolling` - -Whether overlay scrolling is enabled or not. - -If it is, the scrollbars are only added as traditional widgets -when a mouse is present. Otherwise, they are overlaid on top of -the content, as narrow indicators. - -Note that overlay scrolling can also be globally disabled, with -the [property@Gtk.Settings:gtk-overlay-scrolling] setting. - -### `propagateNaturalHeight` - -Whether the natural height of the child should be calculated and propagated -through the scrolled window’s requested natural height. - -This is useful in cases where an attempt should be made to allocate exactly -enough space for the natural size of the child. - -### `propagateNaturalWidth` - -Whether the natural width of the child should be calculated and propagated -through the scrolled window’s requested natural width. - -This is useful in cases where an attempt should be made to allocate exactly -enough space for the natural size of the child. - -### `edgeOvershot` - -Emitted whenever user initiated scrolling makes the scrolled -window firmly surpass the limits defined by the adjustment -in that orientation. - -A similar behavior without edge resistance is provided by the -[signal@Gtk.ScrolledWindow::edge-reached] signal. - -Note: The @pos argument is LTR/RTL aware, so callers should be -aware too if intending to provide behavior on horizontal edges. - -### `edgeReached` - -Emitted whenever user-initiated scrolling makes the scrolled -window exactly reach the lower or upper limits defined by the -adjustment in that orientation. - -A similar behavior with edge resistance is provided by the -[signal@Gtk.ScrolledWindow::edge-overshot] signal. - -Note: The @pos argument is LTR/RTL aware, so callers should be -aware too if intending to provide behavior on horizontal edges. - -### `moveFocusOut` - -Emitted when focus is moved away from the scrolled window by a -keybinding. - -This is a [keybinding signal](class.SignalAction.html). - -The default bindings for this signal are -`Ctrl + Tab` to move forward and `Ctrl + Shift + Tab` to -move backward. - -### `scrollChild` - -Emitted when a keybinding that scrolls is pressed. - -This is a [keybinding signal](class.SignalAction.html). - -The horizontal or vertical adjustment is updated which triggers a -signal that the scrolled window’s child may listen to and scroll itself. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `ScrolledWindow`. - -### `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. - -### `child(_:)` - -The child widget. - -When setting this property, if the child widget does not implement -[iface@Gtk.Scrollable], the scrolled window will add the child to -a [class@Gtk.Viewport] and then set the viewport as the child. - -### `hasFrame(_:)` - -Whether to draw a frame around the contents. - -### `kineticScrolling(_:)` - -Whether kinetic scrolling is enabled or not. - -Kinetic scrolling only applies to devices with source %GDK_SOURCE_TOUCHSCREEN. - -### `maxContentHeight(_:)` - -The maximum content height of @scrolled_window. - -### `maxContentWidth(_:)` - -The maximum content width of @scrolled_window. - -### `minContentHeight(_:)` - -The minimum content height of @scrolled_window. - -### `minContentWidth(_:)` - -The minimum content width of @scrolled_window. - -### `overlayScrolling(_:)` - -Whether overlay scrolling is enabled or not. - -If it is, the scrollbars are only added as traditional widgets -when a mouse is present. Otherwise, they are overlaid on top of -the content, as narrow indicators. - -Note that overlay scrolling can also be globally disabled, with -the [property@Gtk.Settings:gtk-overlay-scrolling] setting. - -### `propagateNaturalHeight(_:)` - -Whether the natural height of the child should be calculated and propagated -through the scrolled window’s requested natural height. - -This is useful in cases where an attempt should be made to allocate exactly -enough space for the natural size of the child. - -### `propagateNaturalWidth(_:)` - -Whether the natural width of the child should be calculated and propagated -through the scrolled window’s requested natural width. - -This is useful in cases where an attempt should be made to allocate exactly -enough space for the natural size of the child. - -### `edgeOvershot(_:)` - -Emitted whenever user initiated scrolling makes the scrolled -window firmly surpass the limits defined by the adjustment -in that orientation. - -A similar behavior without edge resistance is provided by the -[signal@Gtk.ScrolledWindow::edge-reached] signal. - -Note: The @pos argument is LTR/RTL aware, so callers should be -aware too if intending to provide behavior on horizontal edges. - -### `edgeReached(_:)` - -Emitted whenever user-initiated scrolling makes the scrolled -window exactly reach the lower or upper limits defined by the -adjustment in that orientation. - -A similar behavior with edge resistance is provided by the -[signal@Gtk.ScrolledWindow::edge-overshot] signal. - -Note: The @pos argument is LTR/RTL aware, so callers should be -aware too if intending to provide behavior on horizontal edges. - -### `moveFocusOut(_:)` - -Emitted when focus is moved away from the scrolled window by a -keybinding. - -This is a [keybinding signal](class.SignalAction.html). - -The default bindings for this signal are -`Ctrl + Tab` to move forward and `Ctrl + Shift + Tab` to -move backward. - -### `scrollChild(_:)` - -Emitted when a keybinding that scrolls is pressed. - -This is a [keybinding signal](class.SignalAction.html). - -The horizontal or vertical adjustment is updated which triggers a -signal that the scrolled window’s child may listen to and scroll itself. diff --git a/Documentation/Reference/structs/SearchBar.md b/Documentation/Reference/structs/SearchBar.md deleted file mode 100644 index 3b7d8bf..0000000 --- a/Documentation/Reference/structs/SearchBar.md +++ /dev/null @@ -1,128 +0,0 @@ -**STRUCT** - -# `SearchBar` - -`GtkSearchBar` is a container made to have a search entry. - -![An example GtkSearchBar](search-bar.png) - -It can also contain additional widgets, such as drop-down menus, -or buttons. The search bar would appear when a search is started -through typing on the keyboard, or the application’s search mode -is toggled on. - -For keyboard presses to start a search, the search bar must be told -of a widget to capture key events from through -[method@Gtk.SearchBar.set_key_capture_widget]. This widget will -typically be the top-level window, or a parent container of the -search bar. Common shortcuts such as Ctrl+F should be handled as an -application action, or through the menu items. - -You will also need to tell the search bar about which entry you -are using as your search entry using [method@Gtk.SearchBar.connect_entry]. - -## Creating a search bar - -The following example shows you how to create a more complex search -entry. - -[A simple example](https://gitlab.gnome.org/GNOME/gtk/tree/main/examples/search-bar.c) - -# CSS nodes - -``` -searchbar -╰── revealer -╰── box -├── [child] -╰── [button.close] -``` - -`GtkSearchBar` has a main CSS node with name searchbar. It has a child -node with name revealer that contains a node with name box. The box node -contains both the CSS node of the child widget as well as an optional button -node which gets the .close style class applied. - -# Accessibility - -`GtkSearchBar` uses the %GTK_ACCESSIBLE_ROLE_SEARCH 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. - -### `child` - -The child widget. - -### `keyCaptureWidget` - -The key capture widget. - -### `searchModeEnabled` - -Whether the search mode is on and the search bar shown. - -### `showCloseButton` - -Whether to show the close button in the search bar. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `SearchBar`. - -### `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. - -### `child(_:)` - -The child widget. - -### `keyCaptureWidget(_:)` - -The key capture widget. - -### `searchModeEnabled(_:)` - -Whether the search mode is on and the search bar shown. - -### `showCloseButton(_:)` - -Whether to show the close button in the search bar. diff --git a/Documentation/Reference/structs/SearchEntry.md b/Documentation/Reference/structs/SearchEntry.md deleted file mode 100644 index 6c9ca38..0000000 --- a/Documentation/Reference/structs/SearchEntry.md +++ /dev/null @@ -1,358 +0,0 @@ -**STRUCT** - -# `SearchEntry` - -`GtkSearchEntry` is an entry widget that has been tailored for use -as a search entry. - -The main API for interacting with a `GtkSearchEntry` as entry -is the `GtkEditable` interface. - -![An example GtkSearchEntry](search-entry.png) - -It will show an inactive symbolic “find” icon when the search -entry is empty, and a symbolic “clear” icon when there is text. -Clicking on the “clear” icon will empty the search entry. - -To make filtering appear more reactive, it is a good idea to -not react to every change in the entry text immediately, but -only after a short delay. To support this, `GtkSearchEntry` -emits the [signal@Gtk.SearchEntry::search-changed] signal which -can be used instead of the [signal@Gtk.Editable::changed] signal. - -The [signal@Gtk.SearchEntry::previous-match], -[signal@Gtk.SearchEntry::next-match] and -[signal@Gtk.SearchEntry::stop-search] signals can be used to -implement moving between search results and ending the search. - -Often, `GtkSearchEntry` will be fed events by means of being -placed inside a [class@Gtk.SearchBar]. If that is not the case, -you can use [method@Gtk.SearchEntry.set_key_capture_widget] to -let it capture key input from another widget. - -`GtkSearchEntry` provides only minimal API and should be used with -the [iface@Gtk.Editable] API. - -## CSS Nodes - -``` -entry.search -╰── text -``` - -`GtkSearchEntry` has a single CSS node with name entry that carries -a `.search` style class, and the text node is a child of that. - -## Accessibility - -`GtkSearchEntry` uses the %GTK_ACCESSIBLE_ROLE_SEARCH_BOX 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. - -### `activatesDefault` - -Whether to activate the default widget when Enter is pressed. - -### `cursorPosition` - -The current position of the insertion cursor in chars. - -### `editable` - -Whether the entry contents can be edited. - -### `enableUndo` - -If undo/redo should be enabled for the editable. - -### `maxWidthChars` - -The desired maximum width of the entry, in characters. - -### `placeholderText` - -The text that will be displayed in the `GtkSearchEntry` -when it is empty and unfocused. - -### `searchDelay` - -The delay in milliseconds from last keypress to the search -changed signal. - -### `selectionBound` - -The position of the opposite end of the selection from the cursor in chars. - -### `text` - -The contents of the entry. - -### `widthChars` - -Number of characters to leave space for in the entry. - -### `xalign` - -The horizontal alignment, from 0 (left) to 1 (right). - -Reversed for RTL layouts. - -### `activate` - -Emitted when the entry is activated. - -The keybindings for this signal are all forms of the Enter key. - -### `changed` - -Emitted at the end of a single user-visible operation on the -contents. - -E.g., a paste operation that replaces the contents of the -selection will cause only one signal emission (even though it -is implemented by first deleting the selection, then inserting -the new content, and may cause multiple ::notify::text signals -to be emitted). - -### `deleteText` - -Emitted when text is deleted from the widget by the user. - -The default handler for this signal will normally be responsible for -deleting the text, so by connecting to this signal and then stopping -the signal with g_signal_stop_emission(), it is possible to modify the -range of deleted text, or prevent it from being deleted entirely. - -The @start_pos and @end_pos parameters are interpreted as for -[method@Gtk.Editable.delete_text]. - -### `insertText` - -Emitted when text is inserted into the widget by the user. - -The default handler for this signal will normally be responsible -for inserting the text, so by connecting to this signal and then -stopping the signal with g_signal_stop_emission(), it is possible -to modify the inserted text, or prevent it from being inserted entirely. - -### `nextMatch` - -Emitted when the user initiates a move to the next match -for the current search string. - -This is a [keybinding signal](class.SignalAction.html). - -Applications should connect to it, to implement moving -between matches. - -The default bindings for this signal is Ctrl-g. - -### `previousMatch` - -Emitted when the user initiates a move to the previous match -for the current search string. - -This is a [keybinding signal](class.SignalAction.html). - -Applications should connect to it, to implement moving -between matches. - -The default bindings for this signal is Ctrl-Shift-g. - -### `searchChanged` - -Emitted with a delay. The length of the delay can be -changed with the [property@Gtk.SearchEntry:search-delay] -property. - -### `searchStarted` - -Emitted when the user initiated a search on the entry. - -### `stopSearch` - -Emitted when the user stops a search via keyboard input. - -This is a [keybinding signal](class.SignalAction.html). - -Applications should connect to it, to implement hiding -the search entry in this case. - -The default bindings for this signal is Escape. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `SearchEntry`. - -### `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. - -### `activatesDefault(_:)` - -Whether to activate the default widget when Enter is pressed. - -### `cursorPosition(_:)` - -The current position of the insertion cursor in chars. - -### `editable(_:)` - -Whether the entry contents can be edited. - -### `enableUndo(_:)` - -If undo/redo should be enabled for the editable. - -### `maxWidthChars(_:)` - -The desired maximum width of the entry, in characters. - -### `placeholderText(_:)` - -The text that will be displayed in the `GtkSearchEntry` -when it is empty and unfocused. - -### `searchDelay(_:)` - -The delay in milliseconds from last keypress to the search -changed signal. - -### `selectionBound(_:)` - -The position of the opposite end of the selection from the cursor in chars. - -### `text(_:)` - -The contents of the entry. - -### `widthChars(_:)` - -Number of characters to leave space for in the entry. - -### `xalign(_:)` - -The horizontal alignment, from 0 (left) to 1 (right). - -Reversed for RTL layouts. - -### `activate(_:)` - -Emitted when the entry is activated. - -The keybindings for this signal are all forms of the Enter key. - -### `changed(_:)` - -Emitted at the end of a single user-visible operation on the -contents. - -E.g., a paste operation that replaces the contents of the -selection will cause only one signal emission (even though it -is implemented by first deleting the selection, then inserting -the new content, and may cause multiple ::notify::text signals -to be emitted). - -### `deleteText(_:)` - -Emitted when text is deleted from the widget by the user. - -The default handler for this signal will normally be responsible for -deleting the text, so by connecting to this signal and then stopping -the signal with g_signal_stop_emission(), it is possible to modify the -range of deleted text, or prevent it from being deleted entirely. - -The @start_pos and @end_pos parameters are interpreted as for -[method@Gtk.Editable.delete_text]. - -### `insertText(_:)` - -Emitted when text is inserted into the widget by the user. - -The default handler for this signal will normally be responsible -for inserting the text, so by connecting to this signal and then -stopping the signal with g_signal_stop_emission(), it is possible -to modify the inserted text, or prevent it from being inserted entirely. - -### `nextMatch(_:)` - -Emitted when the user initiates a move to the next match -for the current search string. - -This is a [keybinding signal](class.SignalAction.html). - -Applications should connect to it, to implement moving -between matches. - -The default bindings for this signal is Ctrl-g. - -### `previousMatch(_:)` - -Emitted when the user initiates a move to the previous match -for the current search string. - -This is a [keybinding signal](class.SignalAction.html). - -Applications should connect to it, to implement moving -between matches. - -The default bindings for this signal is Ctrl-Shift-g. - -### `searchChanged(_:)` - -Emitted with a delay. The length of the delay can be -changed with the [property@Gtk.SearchEntry:search-delay] -property. - -### `searchStarted(_:)` - -Emitted when the user initiated a search on the entry. - -### `stopSearch(_:)` - -Emitted when the user stops a search via keyboard input. - -This is a [keybinding signal](class.SignalAction.html). - -Applications should connect to it, to implement hiding -the search entry in this case. - -The default bindings for this signal is Escape. diff --git a/Documentation/Reference/structs/Signal.md b/Documentation/Reference/structs/Signal.md deleted file mode 100644 index c7e8aa3..0000000 --- a/Documentation/Reference/structs/Signal.md +++ /dev/null @@ -1,27 +0,0 @@ -**STRUCT** - -# `Signal` - -A type that signalizes an action. - -## Properties -### `boolean` - -An action is signalized by toggling a boolean to `true` and back to `false`. - -### `id` - -A signal has a unique identifier. - -### `update` - -Whether the action has caused an update. - -## Methods -### `init()` - -Initialize a signal. - -### `signal()` - -Activate a signal. diff --git a/Documentation/Reference/structs/SpinRow.md b/Documentation/Reference/structs/SpinRow.md deleted file mode 100644 index 79a3eab..0000000 --- a/Documentation/Reference/structs/SpinRow.md +++ /dev/null @@ -1,312 +0,0 @@ -**STRUCT** - -# `SpinRow` - -An [class@ActionRow] with an embedded spin button. - -spin-row - -Example of an `AdwSpinRow` UI definition: - -```xml -Spin Row010050101 -``` - -See [class@Gtk.SpinButton] for details. - -## CSS nodes - -`AdwSpinRow` has the same structure as [class@ActionRow], as well as the -`.spin` style class on the main node. - -## 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. - -### `climbRate` - -The acceleration rate when you hold down a button or key. - -### `digits` - -The number of decimal places to display. - -### `iconName` - -The icon name for this row. - -### `numeric` - -Whether non-numeric characters should be ignored. - -### `snapToTicks` - -Whether invalid values are snapped to the nearest step increment. - -### `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. - -### `value` - -The current value. - -### `wrap` - -Whether the spin row should wrap upon reaching its limits. - -### `activated` - -This signal is emitted after the row has been activated. - -### `input` - -Emitted to convert the user's input into a double value. - -The signal handler is expected to use [method@Gtk.Editable.get_text] to -retrieve the text of the spinbutton and set new_value to the new value. - -The default conversion uses [func@GLib.strtod]. - -See [signal@Gtk.SpinButton::input]. - -### `output` - -Emitted to tweak the formatting of the value for display. - -See [signal@Gtk.SpinButton::output]. - -### `wrapped` - -Emitted right after the spinbutton wraps. - -See [signal@Gtk.SpinButton::wrapped]. - -### `suffix` - -The body for the widget "suffix". - -### `prefix` - -The body for the widget "prefix". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init(climbRate:digits:)` - -Initialize `SpinRow`. - -### `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. - -### `climbRate(_:)` - -The acceleration rate when you hold down a button or key. - -### `digits(_:)` - -The number of decimal places to display. - -### `iconName(_:)` - -The icon name for this row. - -### `numeric(_:)` - -Whether non-numeric characters should be ignored. - -### `snapToTicks(_:)` - -Whether invalid values are snapped to the nearest step increment. - -### `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. - -### `value(_:)` - -The current value. - -### `wrap(_:)` - -Whether the spin row should wrap upon reaching its limits. - -### `activated(_:)` - -This signal is emitted after the row has been activated. - -### `input(_:)` - -Emitted to convert the user's input into a double value. - -The signal handler is expected to use [method@Gtk.Editable.get_text] to -retrieve the text of the spinbutton and set new_value to the new value. - -The default conversion uses [func@GLib.strtod]. - -See [signal@Gtk.SpinButton::input]. - -### `output(_:)` - -Emitted to tweak the formatting of the value for display. - -See [signal@Gtk.SpinButton::output]. - -### `wrapped(_:)` - -Emitted right after the spinbutton wraps. - -See [signal@Gtk.SpinButton::wrapped]. - -### `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. diff --git a/Documentation/Reference/structs/Spinner.md b/Documentation/Reference/structs/Spinner.md deleted file mode 100644 index ffaee28..0000000 --- a/Documentation/Reference/structs/Spinner.md +++ /dev/null @@ -1,75 +0,0 @@ -**STRUCT** - -# `Spinner` - -A `GtkSpinner` widget displays an icon-size spinning animation. - -It is often used as an alternative to a [class@Gtk.ProgressBar] -for displaying indefinite activity, instead of actual progress. - -![An example GtkSpinner](spinner.png) - -To start the animation, use [method@Gtk.Spinner.start], to stop it -use [method@Gtk.Spinner.stop]. - -# CSS nodes - -`GtkSpinner` has a single CSS node with the name spinner. -When the animation is active, the :checked pseudoclass is -added to this node. - -## 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. - -### `spinning` - -Whether the spinner is spinning - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `Spinner`. - -### `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. - -### `spinning(_:)` - -Whether the spinner is spinning diff --git a/Documentation/Reference/structs/SplitButton.md b/Documentation/Reference/structs/SplitButton.md deleted file mode 100644 index 09f3451..0000000 --- a/Documentation/Reference/structs/SplitButton.md +++ /dev/null @@ -1,204 +0,0 @@ -**STRUCT** - -# `SplitButton` - -A combined button and dropdown widget. - -split-button - -`AdwSplitButton` is typically used to present a set of actions in a menu, -but allow access to one of them with a single click. - -The API is very similar to [class@Gtk.Button] and [class@Gtk.MenuButton], see -their documentation for details. - -## CSS nodes - -``` -splitbutton[.image-button][.text-button] -├── button -│ ╰── ├── separator -╰── menubutton -╰── button.toggle -╰── arrow -``` - -`AdwSplitButton`'s CSS node is called `splitbutton`. It contains the css -nodes: `button`, `separator`, `menubutton`. See [class@Gtk.MenuButton] -documentation for the `menubutton` contents. - -The main CSS node will contain the `.image-button` or `.text-button` style -classes matching the button contents. The nested button nodes will never -contain them. - -## Accessibility - -`AdwSplitButton` 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] and -[property@Gtk.MenuButton:can-shrink]. - -### `child` - -The child widget. - -Setting the child widget will set [property@SplitButton:label] and -[property@SplitButton:icon-name] to `NULL`. - -### `dropdownTooltip` - -The tooltip of the dropdown button. - -The tooltip can be marked up with the Pango text markup language. - -### `iconName` - -The name of the icon used to automatically populate the button. - -Setting the icon name will set [property@SplitButton:label] and -[property@SplitButton:child] to `NULL`. - -### `label` - -The label for the button. - -Setting the label will set [property@SplitButton:icon-name] and -[property@SplitButton:child] to `NULL`. - -### `menuModel` - -The `GMenuModel` from which the popup will be created. - -If the menu model is `NULL`, the dropdown is disabled. - -A [class@Gtk.Popover] will be created from the menu model with -[ctor@Gtk.PopoverMenu.new_from_model]. Actions will be connected as -documented for this function. - -If [property@SplitButton:popover] is already set, it will be dissociated -from the button, and the property is set to `NULL`. - -### `useUnderline` - -Whether an underline in the text indicates a mnemonic. - -See [property@SplitButton:label]. - -### `activate` - -Emitted to animate press then release. - -This is an action signal. Applications should never connect to this signal, -but use the [signal@SplitButton::clicked] signal. - -### `clicked` - -Emitted when the button has been activated (pressed and released). - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `SplitButton`. - -### `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] and -[property@Gtk.MenuButton:can-shrink]. - -### `child(_:)` - -The child widget. - -Setting the child widget will set [property@SplitButton:label] and -[property@SplitButton:icon-name] to `NULL`. - -### `dropdownTooltip(_:)` - -The tooltip of the dropdown button. - -The tooltip can be marked up with the Pango text markup language. - -### `iconName(_:)` - -The name of the icon used to automatically populate the button. - -Setting the icon name will set [property@SplitButton:label] and -[property@SplitButton:child] to `NULL`. - -### `label(_:)` - -The label for the button. - -Setting the label will set [property@SplitButton:icon-name] and -[property@SplitButton:child] to `NULL`. - -### `menuModel(app:window:_:)` - -The `GMenuModel` from which the popup will be created. - -If the menu model is `NULL`, the dropdown is disabled. - -A [class@Gtk.Popover] will be created from the menu model with -[ctor@Gtk.PopoverMenu.new_from_model]. Actions will be connected as -documented for this function. - -If [property@SplitButton:popover] is already set, it will be dissociated -from the button, and the property is set to `NULL`. - -### `useUnderline(_:)` - -Whether an underline in the text indicates a mnemonic. - -See [property@SplitButton:label]. - -### `activate(_:)` - -Emitted to animate press then release. - -This is an action signal. Applications should never connect to this signal, -but use the [signal@SplitButton::clicked] signal. - -### `clicked(_:)` - -Emitted when the button has been activated (pressed and released). diff --git a/Documentation/Reference/structs/State.md b/Documentation/Reference/structs/State.md deleted file mode 100644 index 2e724e3..0000000 --- a/Documentation/Reference/structs/State.md +++ /dev/null @@ -1,67 +0,0 @@ -**STRUCT** - -# `State` - -A property wrapper for properties in a view that should be stored throughout view updates. - -## Properties -### `wrappedValue` - -Access the stored value. This updates the views when being changed. - -### `projectedValue` - -Get the value as a binding using the `$` prefix. - -### `rawValue` - -Get and set the value without updating the views. - -### `content` - -The stored value. - -### `forceUpdates` - -Whether to force update the views when the value changes. - -### `writeValue` - -The function for updating the value in the settings file. - -### `value` - -The value with an erased type. - -## Methods -### `init(wrappedValue:forceUpdates:)` - -Initialize a property representing a state in the view. -- Parameters: - - wrappedValue: The wrapped value. - - forceUpdates: Whether to force update all available views when the property gets modified. - -### `updateViews(force:)` - -Update all of the views. -- Parameter force: Whether to force all views to update. - -### `userDataDir()` - -The directory used for storing user data. -- Returns: The URL. - -### `copy(_:)` - -Copy a text to the clipboard. -- Parameter text: The text. - -### `dirPath()` - -Get the settings directory path. -- Returns: The path. - -### `filePath()` - -Get the settings file path. -- Returns: The path. diff --git a/Documentation/Reference/structs/StateWrapper.md b/Documentation/Reference/structs/StateWrapper.md deleted file mode 100644 index 49cd9c8..0000000 --- a/Documentation/Reference/structs/StateWrapper.md +++ /dev/null @@ -1,41 +0,0 @@ -**STRUCT** - -# `StateWrapper` - -A storage for `@State` properties. - -## Properties -### `content` - -The content. - -### `state` - -The state information (from properties with the `State` wrapper). - -## Methods -### `init(content:)` - -Initialize a `StateWrapper`. -- Parameter content: The view content. - -### `init(content:state:)` - -Initialize a `StateWrapper`. -- Parameters: - - content: The view content. - - state: The state information. - -### `update(_:modifiers:updateProperties:)` - -Update a view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - - updateProperties: Whether to update properties. - -### `container(modifiers:)` - -Get a view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. diff --git a/Documentation/Reference/structs/StatusPage.md b/Documentation/Reference/structs/StatusPage.md deleted file mode 100644 index d2072f2..0000000 --- a/Documentation/Reference/structs/StatusPage.md +++ /dev/null @@ -1,94 +0,0 @@ -**STRUCT** - -# `StatusPage` - -A page used for empty/error states and similar use-cases. - -status-page - -The `AdwStatusPage` widget can have an icon, a title, a description and a -custom widget which is displayed below them. - -## CSS nodes - -`AdwStatusPage` has a main CSS node with name `statuspage`. - -`AdwStatusPage` can use the -[`.compact`](style-classes.html#compact-status-page) style class for when it -needs to fit into a small space such a sidebar or a popover. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `child` - -The child widget. - -### `description` - -The description markup to be displayed below the title. - -### `iconName` - -The name of the icon to be used. - -Changing this will set [property@StatusPage:paintable] to `NULL`. - -### `title` - -The title to be displayed below the icon. - -It is not parsed as Pango markup. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `StatusPage`. - -### `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. - -### `description(_:)` - -The description markup to be displayed below the title. - -### `iconName(_:)` - -The name of the icon to be used. - -Changing this will set [property@StatusPage:paintable] to `NULL`. - -### `title(_:)` - -The title to be displayed below the icon. - -It is not parsed as Pango markup. diff --git a/Documentation/Reference/structs/Submenu.md b/Documentation/Reference/structs/Submenu.md deleted file mode 100644 index 19e302a..0000000 --- a/Documentation/Reference/structs/Submenu.md +++ /dev/null @@ -1,30 +0,0 @@ -**STRUCT** - -# `Submenu` - -A submenu widget. - -## Properties -### `label` - -The submenu's label. - -### `submenuContent` - -The content of the submenu. - -## Methods -### `init(_:content:)` - -Initialize a submenu. -- Parameters: - - label: The submenu's label. - - content: The content of the submenu. - -### `addMenuItem(menu:app:window:)` - -Add the submenu to a menu. -- Parameters: - - menu: The menu. - - app: The application containing the menu. - - window: The application window containing the menu. diff --git a/Documentation/Reference/structs/SwitchRow.md b/Documentation/Reference/structs/SwitchRow.md deleted file mode 100644 index 459686d..0000000 --- a/Documentation/Reference/structs/SwitchRow.md +++ /dev/null @@ -1,230 +0,0 @@ -**STRUCT** - -# `SwitchRow` - -A [class@Gtk.ListBoxRow] used to represent two states. - -switch-row - -The `AdwSwitchRow` widget contains a [class@Gtk.Switch] that allows the user -to select between two states: "on" or "off". When activated, the row will -invert its active state. - -The user can control the switch by activating the row or by dragging on the -switch handle. - -See [class@Gtk.Switch] for details. - -Example of an `AdwSwitchRow` UI definition: -```xml -Switch Row -``` - -The [property@SwitchRow:active] property should be connected to in order to -monitor changes to the active state. - -## 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. - -### `active` - -Whether the switch row is in the "on" or "off" position. - -### `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 `SwitchRow`. - -### `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. - -### `active(_:)` - -Whether the switch row is in the "on" or "off" position. - -### `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. diff --git a/Documentation/Reference/structs/Text.md b/Documentation/Reference/structs/Text.md deleted file mode 100644 index 7cfaf67..0000000 --- a/Documentation/Reference/structs/Text.md +++ /dev/null @@ -1,38 +0,0 @@ -**STRUCT** - -# `Text` - -A text widget. - -## Properties -### `text` - -The content. - -### `lineWrapping` - -Whether line wrapping is allowed. - -## Methods -### `init(_:)` - -Initialize a text widget. -- Parameter text: The content. - -### `update(_:modifiers:)` - -Update the view storage of the text widget. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `container(modifiers:)` - -Get the container of the text widget. -- Returns: The view storage. - -### `wrap(_:)` - -Line wrapping allows the text view to span multiple lines if the width is narrow. -- Parameter wrap: Whether to allow line wrapping. -- Returns: The text. diff --git a/Documentation/Reference/structs/ToastOverlay.md b/Documentation/Reference/structs/ToastOverlay.md deleted file mode 100644 index 2718809..0000000 --- a/Documentation/Reference/structs/ToastOverlay.md +++ /dev/null @@ -1,84 +0,0 @@ -**STRUCT** - -# `ToastOverlay` - -A widget showing toasts above its content. - -toast-overlay - -Much like [class@Gtk.Overlay], `AdwToastOverlay` is a container with a single -main child, on top of which it can display a [class@Toast], overlaid. -Toasts can be shown with [method@ToastOverlay.add_toast]. - -See [class@Toast] for details. - -## CSS nodes - -``` -toastoverlay -├── [child] -├── toast -┊ ├── widget -┊ │ ├── [label.heading] -│ ╰── [custom title] -├── [button] -╰── button.circular.flat -``` - -`AdwToastOverlay`'s CSS node is called `toastoverlay`. It contains the child, -as well as zero or more `toast` subnodes. - -Each of the `toast` nodes contains a `widget` subnode, optionally a `button` -subnode, and another `button` subnode with `.circular` and `.flat` style -classes. - -The `widget` subnode contains a `label` subnode with the `.heading` style -class, or a custom widget provided by the application. - -## Accessibility - -`AdwToastOverlay` uses the `GTK_ACCESSIBLE_ROLE_TAB_GROUP` role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `child` - -The child widget. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `ToastOverlay`. - -### `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. diff --git a/Documentation/Reference/structs/Toggle.md b/Documentation/Reference/structs/Toggle.md deleted file mode 100644 index dbe8984..0000000 --- a/Documentation/Reference/structs/Toggle.md +++ /dev/null @@ -1,66 +0,0 @@ -**STRUCT** - -# `Toggle` - -A toggle button widget. - -## Properties -### `label` - -The button's label. - -### `icon` - -The button's icon. - -### `isOn` - -Whether the toggle is on. - -### `isCheckButton` - -Whether to use GtkCheckButton instead of GtkToggleButton - -## 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. - -### `update(_:modifiers:)` - -Update a toggle button's view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `container(modifiers:)` - -Get a button's view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The button's view storage. - -### `updateState(toggle:)` - -Update the toggle's state. -- Parameter toggle: The toggle. - -### `updateState(toggle:)` - -Update the check button's state. -- Parameter toggle: The toggle. - -### `checkButton()` - -Use the check button style. -- Returns: The toggle. diff --git a/Documentation/Reference/structs/ToggleButton.md b/Documentation/Reference/structs/ToggleButton.md deleted file mode 100644 index d39b1cf..0000000 --- a/Documentation/Reference/structs/ToggleButton.md +++ /dev/null @@ -1,241 +0,0 @@ -**STRUCT** - -# `ToggleButton` - -A `GtkToggleButton` is a button which remains “pressed-in” when -clicked. - -Clicking again will cause the toggle button to return to its normal state. - -A toggle button is created by calling either [ctor@Gtk.ToggleButton.new] or -[ctor@Gtk.ToggleButton.new_with_label]. If using the former, it is advisable -to pack a widget, (such as a `GtkLabel` and/or a `GtkImage`), into the toggle -button’s container. (See [class@Gtk.Button] for more information). - -The state of a `GtkToggleButton` can be set specifically using -[method@Gtk.ToggleButton.set_active], and retrieved using -[method@Gtk.ToggleButton.get_active]. - -To simply switch the state of a toggle button, use -[method@Gtk.ToggleButton.toggled]. - -## Grouping - -Toggle 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. - -To add a `GtkToggleButton` to a group, use [method@Gtk.ToggleButton.set_group]. - -## CSS nodes - -`GtkToggleButton` has a single CSS node with name button. To differentiate -it from a plain `GtkButton`, it gets the `.toggle` style class. - -## Accessibility - -`GtkToggleButton` uses the %GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON role. - -## Creating two `GtkToggleButton` widgets. - -```c -static void -output_state (GtkToggleButton *source, -gpointer user_data) -{ -g_print ("Toggle button "%s" is active: %s", -gtk_button_get_label (GTK_BUTTON (source)), -gtk_toggle_button_get_active (source) ? "Yes" : "No"); -} - -static void -make_toggles (void) -{ -GtkWidget *window, *toggle1, *toggle2; -GtkWidget *box; -const char *text; - -window = gtk_window_new (); -box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); - -text = "Hi, I’m toggle button one"; -toggle1 = gtk_toggle_button_new_with_label (text); - -g_signal_connect (toggle1, "toggled", -G_CALLBACK (output_state), -NULL); -gtk_box_append (GTK_BOX (box), toggle1); - -text = "Hi, I’m toggle button two"; -toggle2 = gtk_toggle_button_new_with_label (text); -g_signal_connect (toggle2, "toggled", -G_CALLBACK (output_state), -NULL); -gtk_box_append (GTK_BOX (box), toggle2); - -gtk_window_set_child (GTK_WINDOW (window), box); -gtk_window_present (GTK_WINDOW (window)); -} -``` - -## 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 toggle button should be pressed in. - -### `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 - and Enter keys. - -### `clicked` - -Emitted when the button has been activated (pressed and released). - -### `toggled` - -Emitted whenever the `GtkToggleButton`'s state is changed. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `ToggleButton`. - -### `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 toggle button should be pressed in. - -### `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 - and Enter keys. - -### `clicked(_:)` - -Emitted when the button has been activated (pressed and released). - -### `toggled(_:)` - -Emitted whenever the `GtkToggleButton`'s state is changed. diff --git a/Documentation/Reference/structs/ToolbarView.md b/Documentation/Reference/structs/ToolbarView.md deleted file mode 100644 index c06dae5..0000000 --- a/Documentation/Reference/structs/ToolbarView.md +++ /dev/null @@ -1,258 +0,0 @@ -**STRUCT** - -# `ToolbarView` - -A widget containing a page, as well as top and/or bottom bars. - -toolbar-view - -`AdwToolbarView` has a single content widget and one or multiple top and -bottom bars, shown at the top and bottom sides respectively. - -Example of an `AdwToolbarView` UI definition: -```xml - -``` - -The following kinds of top and bottom bars are supported: - -- [class@HeaderBar] -- [class@TabBar] -- [class@ViewSwitcherBar] -- [class@Gtk.ActionBar] -- [class@Gtk.HeaderBar] -- [class@Gtk.PopoverMenuBar] -- [class@Gtk.SearchBar] -- Any [class@Gtk.Box] or a similar widget with the -[`.toolbar`](style-classes.html#toolbars) style class - -By default, top and bottom bars are flat and scrolling content has a subtle -undershoot shadow, same as when using the -[`.undershoot-top`](style-classes.html#undershot-indicators) and -[`.undershoot-bottom`](style-classes.html#undershot-indicators) style -classes. This works well in most cases, e.g. with [class@StatusPage] or -[class@PreferencesPage], where the background at the top and bottom parts of -the page is uniform. Additionally, windows with sidebars should always use -this style. - -[property@ToolbarView:top-bar-style] and -[property@ToolbarView:bottom-bar-style] properties can be used add an opaque -background and a persistent shadow to top and bottom bars, this can be useful -for content such as [utility panes](https://developer.gnome.org/hig/patterns/containers/utility-panes.html), -where some elements are adjacent to the top/bottom bars, or [class@TabView], -where each page can have a different background. - -toolbar-view-flat-1toolbar-view-flat-2toolbar-view-raised - -`AdwToolbarView` ensures the top and bottom bars have consistent backdrop -styles and vertical spacing. For comparison: - -toolbar-view-spacingtoolbar-view-spacing-box - -Any top and bottom bars can also be dragged to move the window, equivalent -to putting them into a [class@Gtk.WindowHandle]. - -Content is typically place between top and bottom bars, but can also extend -behind them. This is controlled with the -[property@ToolbarView:extend-content-to-top-edge] and -[property@ToolbarView:extend-content-to-bottom-edge] properties. - -Top and bottom bars can be hidden and revealed with an animation using the -[property@ToolbarView:reveal-top-bars] and -[property@ToolbarView:reveal-bottom-bars] properties. - -## `AdwToolbarView` as `GtkBuildable` - -The `AdwToolbarView` implementation of the [iface@Gtk.Buildable] interface -supports adding a top bar by specifying “top” as the “type” attribute of a -`` element, or adding a bottom bar by specifying “bottom”. - -## Accessibility - -`AdwToolbarView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `bottomBarHeight` - -The current bottom bar height. - -Bottom bar height does change depending on -[property@ToolbarView:reveal-bottom-bars], including during the transition. - -See [property@ToolbarView:top-bar-height]. - -### `content` - -The content widget. - -### `extendContentToBottomEdge` - -Whether the content widget can extend behind bottom bars. - -This can be used in combination with -[property@ToolbarView:reveal-bottom-bars] to show and hide toolbars in -fullscreen. - -See [property@ToolbarView:extend-content-to-top-edge]. - -### `extendContentToTopEdge` - -Whether the content widget can extend behind top bars. - -This can be used in combination with [property@ToolbarView:reveal-top-bars] -to show and hide toolbars in fullscreen. - -See [property@ToolbarView:extend-content-to-bottom-edge]. - -### `revealBottomBars` - -Whether bottom bars are visible. - -The transition will be animated. - -This can be used in combination with -[property@ToolbarView:extend-content-to-bottom-edge] to show and hide -toolbars in fullscreen. - -See [property@ToolbarView:reveal-top-bars]. - -### `revealTopBars` - -Whether top bars are revealed. - -The transition will be animated. - -This can be used in combination with -[property@ToolbarView:extend-content-to-top-edge] to show and hide toolbars -in fullscreen. - -See [property@ToolbarView:reveal-bottom-bars]. - -### `topBarHeight` - -The current top bar height. - -Top bar height does change depending [property@ToolbarView:reveal-top-bars], -including during the transition. - -See [property@ToolbarView:bottom-bar-height]. - -### `bottom` - -The body for the widget "bottom". - -### `top` - -The body for the widget "top". - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init()` - -Initialize `ToolbarView`. - -### `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. - -### `bottomBarHeight(_:)` - -The current bottom bar height. - -Bottom bar height does change depending on -[property@ToolbarView:reveal-bottom-bars], including during the transition. - -See [property@ToolbarView:top-bar-height]. - -### `content(_:)` - -The content widget. - -### `extendContentToBottomEdge(_:)` - -Whether the content widget can extend behind bottom bars. - -This can be used in combination with -[property@ToolbarView:reveal-bottom-bars] to show and hide toolbars in -fullscreen. - -See [property@ToolbarView:extend-content-to-top-edge]. - -### `extendContentToTopEdge(_:)` - -Whether the content widget can extend behind top bars. - -This can be used in combination with [property@ToolbarView:reveal-top-bars] -to show and hide toolbars in fullscreen. - -See [property@ToolbarView:extend-content-to-bottom-edge]. - -### `revealBottomBars(_:)` - -Whether bottom bars are visible. - -The transition will be animated. - -This can be used in combination with -[property@ToolbarView:extend-content-to-bottom-edge] to show and hide -toolbars in fullscreen. - -See [property@ToolbarView:reveal-top-bars]. - -### `revealTopBars(_:)` - -Whether top bars are revealed. - -The transition will be animated. - -This can be used in combination with -[property@ToolbarView:extend-content-to-top-edge] to show and hide toolbars -in fullscreen. - -See [property@ToolbarView:reveal-bottom-bars]. - -### `topBarHeight(_:)` - -The current top bar height. - -Top bar height does change depending [property@ToolbarView:reveal-top-bars], -including during the transition. - -See [property@ToolbarView:bottom-bar-height]. - -### `bottom(_:)` - -Set the body for "bottom". -- Parameter body: The body. -- Returns: The widget. - -### `top(_:)` - -Set the body for "top". -- Parameter body: The body. -- Returns: The widget. diff --git a/Documentation/Reference/structs/UpdateObserver.md b/Documentation/Reference/structs/UpdateObserver.md deleted file mode 100644 index 937b8c6..0000000 --- a/Documentation/Reference/structs/UpdateObserver.md +++ /dev/null @@ -1,28 +0,0 @@ -**STRUCT** - -# `UpdateObserver` - -A widget which executes a custom code when being updated. - -## Properties -### `onUpdate` - -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:)` - -Update the content. -- Parameters: - - storage: The content's storage. - - modifiers: Modify views before being updated. diff --git a/Documentation/Reference/structs/VStack.md b/Documentation/Reference/structs/VStack.md deleted file mode 100644 index fa604a3..0000000 --- a/Documentation/Reference/structs/VStack.md +++ /dev/null @@ -1,29 +0,0 @@ -**STRUCT** - -# `VStack` - -A GtkBox equivalent. - -## Properties -### `content` - -The content. - -## Methods -### `init(content:)` - -Initialize a `VStack`. -- Parameter content: The view content. - -### `update(_:modifiers:)` - -Update a view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - -### `container(modifiers:)` - -Get a view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. diff --git a/Documentation/Reference/structs/ViewStack.md b/Documentation/Reference/structs/ViewStack.md deleted file mode 100644 index 48f0249..0000000 --- a/Documentation/Reference/structs/ViewStack.md +++ /dev/null @@ -1,43 +0,0 @@ -**STRUCT** - -# `ViewStack` - -A widget holding multiple children but only displaying one. - -## Properties -### `content` - -The stack's active content. - -### `id` - -The stack's active identifier. - -## Methods -### `init(id:view:)` - -Initialize the stack. -- Parameters: - - id: The identifier of the current view. - - view: The current view. - -### `init(element:view:)` - -Initialize the stack. -- Parameters: - - element: The current identifiable element. - - view: The current view. - -### `container(modifiers:)` - -Get a stack's view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The stack's view storage. - -### `update(_:modifiers:updateProperties:)` - -Update a stack's view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - - updateProperties: Whether to update properties. diff --git a/Documentation/Reference/structs/ViewSwitcher.md b/Documentation/Reference/structs/ViewSwitcher.md deleted file mode 100644 index ca7a5e0..0000000 --- a/Documentation/Reference/structs/ViewSwitcher.md +++ /dev/null @@ -1,47 +0,0 @@ -**STRUCT** - -# `ViewSwitcher` - -A picker used for indicating multiple views. - -It normally controls a `ViewStack` (e.g. via `switch` statements). - -## Properties -### `selection` - -The selected element. - -### `wide` - -Whether the wide style is used, that means the icons and titles are on the same line. - -## Methods -### `init(selection:)` - -Initialize a view switcher. -- Parameter selection: The selected element. - -### `container(modifiers:)` - -Get a view switcher's view storage. -- Parameter modifiers: Modify views before being updated. -- Returns: The view storage. - -### `update(_:modifiers:updateProperties:)` - -Update a view switcher's view storage. -- Parameters: - - storage: The view storage. - - modifiers: Modify views before being updated. - - updateProperties: Whether to update properties. - -### `updateSwitcher(switcher:)` - -Update a view switcher's style and selection. -- Parameter switcher: The view switcher. - -### `wideDesign(_:)` - -Set whether to use the wide design. -- Parameter wide: Whether to use the wide design. -- Returns: The view switcher. diff --git a/Documentation/Reference/structs/Window.md b/Documentation/Reference/structs/Window.md deleted file mode 100644 index ef0fbce..0000000 --- a/Documentation/Reference/structs/Window.md +++ /dev/null @@ -1,194 +0,0 @@ -**STRUCT** - -# `Window` - -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. - -### `parentID` - -The identifier of the window's parent. - -### `shortcuts` - -The keyboard shortcuts. - -### `appShortcuts` - -The keyboard shortcuts on the app level. - -### `title` - -The window's title. - -### `resizable` - -Whether the window is resizable. - -### `deletable` - -Whether the window is deletable. - -### `signals` - -The signals for the importers and exporters. - -### `width` - -The binding for the window's width. - -### `height` - -The binding for the window's height. - -### `setDefaultSize` - -Whether to update the default size. - -## 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:force:)` - -Update a window storage's content. -- Parameters: - - storage: The storage to update. - - app: The GTUI app. - - force: Whether to force update all the views. - -### `getTemplate(content:)` - -Get the actual window template. -- Parameter content: The content view.s -- Returns: The window. - -### `setProperties(window:template:)` - -Set some general propreties of the window. -- Parameters: - - window: The window. - - template: The window template. - -### `updateSize(window:template:)` - -Update the window's size. -- Parameters: - - window: The window. - - template: The window template. - -### `overlay(windows:)` - -Add windows that overlay the last instance of this window if presented. -- Parameter windows: The windows. -- Returns: The new windows and this window. - -### `fileImporter(_:initialFolder:extensions:onOpen:onClose:)` - -Add an importer file dialog to the window. -- Parameters: - - signal: The signal for opening the dialog. - - initialFolder: The URL to the folder open when being opened. - - extensions: The accepted file extensions. - - folders: Whether folders are accepted. - - onOpen: Run this when a file for importing has been chosen. - - onClose: Run this when the user cancelled the action. - -### `fileExporter(_:initialFolder:initialName:onSave:onClose:)` - -Add an exporter file dialog to the window. -- Parameters: - - signal: The signal for opening the dialog. - - initialFolder: The URL to the folder open when being opened. - - initialName: The default file name. - - onSave: Run this when a path for exporting has been chosen. - - onClose: Run this when the user cancelled the action. - -### `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:template:)` - -Update the keyboard shortcuts. -- Parameters: window: The application window. - -### `closeShortcut()` - -Add the shortcut "w" which closes the window. -- Returns: The window. - -### `defaultSize(width:height:)` - -Set the window's default size. -- Parameters: - - width: The window's width. - - height: The window's height. -- Returns: The window. - -### `title(_:)` - -Set the window's title. -- Parameter title: The title. -- Returns: The window. - -### `resizable(_:)` - -Set whether the window is resizable. -- Parameter resizable: The resizability. -- Returns: The window. - -### `deletable(_:)` - -Set whether the window is deletable. -- Parameter resizable: The deletability. -- Returns: The window. - -### `size(width:height:)` - -Add a tooltip to the widget. -- Parameters: - - width: The window's actual width. - - height: The window's actual height. -- Returns: The window. diff --git a/Documentation/Reference/structs/WindowTitle.md b/Documentation/Reference/structs/WindowTitle.md deleted file mode 100644 index 8cf0acb..0000000 --- a/Documentation/Reference/structs/WindowTitle.md +++ /dev/null @@ -1,76 +0,0 @@ -**STRUCT** - -# `WindowTitle` - -A helper widget for setting a window's title and subtitle. - -window-title - -`AdwWindowTitle` shows a title and subtitle. It's intended to be used as the -title child of [class@Gtk.HeaderBar] or [class@HeaderBar]. - -## CSS nodes - -`AdwWindowTitle` has a single CSS node with name `windowtitle`. - -## Properties -### `updateFunctions` - -Additional update functions for type extensions. - -### `appearFunctions` - -Additional appear functions for type extensions. - -### `subtitle` - -The subtitle to display. - -The subtitle should give the user additional details. - -### `title` - -The title to display. - -The title typically identifies the current view or content item, and -generally does not use the application name. - -### `app` - -The application. - -### `window` - -The window. - -## Methods -### `init(subtitle:title:)` - -Initialize `WindowTitle`. - -### `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. - -### `subtitle(_:)` - -The subtitle to display. - -The subtitle should give the user additional details. - -### `title(_:)` - -The title to display. - -The title typically identifies the current view or content item, and -generally does not use the application name. diff --git a/Documentation/Reference/typealiases/Alignment.md b/Documentation/Reference/typealiases/Alignment.md deleted file mode 100644 index baecfc5..0000000 --- a/Documentation/Reference/typealiases/Alignment.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Alignment` - -The alignment for a widget. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/Body.md b/Documentation/Reference/typealiases/Body.md deleted file mode 100644 index 4c53786..0000000 --- a/Documentation/Reference/typealiases/Body.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Body` - -`Body` is an array of views. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/Edge.md b/Documentation/Reference/typealiases/Edge.md deleted file mode 100644 index eb74460..0000000 --- a/Documentation/Reference/typealiases/Edge.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Edge` - -The edges of a widget. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/FormSection.md b/Documentation/Reference/typealiases/FormSection.md deleted file mode 100644 index 63b6502..0000000 --- a/Documentation/Reference/typealiases/FormSection.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `FormSection` - -A section usually groups forms. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/GTUIApplicationWindow.md b/Documentation/Reference/typealiases/GTUIApplicationWindow.md deleted file mode 100644 index 19c4f00..0000000 --- a/Documentation/Reference/typealiases/GTUIApplicationWindow.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `GTUIApplicationWindow` - -A GTUI application window. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/GTUIWindow.md b/Documentation/Reference/typealiases/GTUIWindow.md deleted file mode 100644 index d80e760..0000000 --- a/Documentation/Reference/typealiases/GTUIWindow.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `GTUIWindow` - -A GTUI window. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/Icon.md b/Documentation/Reference/typealiases/Icon.md deleted file mode 100644 index 73a23a1..0000000 --- a/Documentation/Reference/typealiases/Icon.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Icon` - -An icon. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/List.md b/Documentation/Reference/typealiases/List.md deleted file mode 100644 index ab08b25..0000000 --- a/Documentation/Reference/typealiases/List.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `List` - -A list box widget. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/MenuBuilder.md b/Documentation/Reference/typealiases/MenuBuilder.md deleted file mode 100644 index 566c55e..0000000 --- a/Documentation/Reference/typealiases/MenuBuilder.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `MenuBuilder` - -A builder for the `MenuContent` \ No newline at end of file diff --git a/Documentation/Reference/typealiases/MenuContent.md b/Documentation/Reference/typealiases/MenuContent.md deleted file mode 100644 index 98f7574..0000000 --- a/Documentation/Reference/typealiases/MenuContent.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `MenuContent` - -`MenuContent` is an array of menu item groups. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/NavigationStack.md b/Documentation/Reference/typealiases/NavigationStack.md deleted file mode 100644 index 4e295f8..0000000 --- a/Documentation/Reference/typealiases/NavigationStack.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `NavigationStack` - -A stack controls a navigation view. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/Scene.md b/Documentation/Reference/typealiases/Scene.md deleted file mode 100644 index 9222559..0000000 --- a/Documentation/Reference/typealiases/Scene.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Scene` - -`Scene` is an array of windows. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/SceneBuilder.md b/Documentation/Reference/typealiases/SceneBuilder.md deleted file mode 100644 index e14eb27..0000000 --- a/Documentation/Reference/typealiases/SceneBuilder.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `SceneBuilder` - -A builder for the `Scene` \ No newline at end of file diff --git a/Documentation/Reference/typealiases/ScrollView.md b/Documentation/Reference/typealiases/ScrollView.md deleted file mode 100644 index ea4e3d0..0000000 --- a/Documentation/Reference/typealiases/ScrollView.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `ScrollView` - -A GtkScrolledWindow equivalent. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/Text.md b/Documentation/Reference/typealiases/Text.md deleted file mode 100644 index ba2f5b1..0000000 --- a/Documentation/Reference/typealiases/Text.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Text` - -A text widget. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/Toggle.md b/Documentation/Reference/typealiases/Toggle.md deleted file mode 100644 index c88b14a..0000000 --- a/Documentation/Reference/typealiases/Toggle.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Toggle` - -A toggle button widget. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/Transition.md b/Documentation/Reference/typealiases/Transition.md deleted file mode 100644 index 7a4493b..0000000 --- a/Documentation/Reference/typealiases/Transition.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `Transition` - -A transition for a stack. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/VStack.md b/Documentation/Reference/typealiases/VStack.md deleted file mode 100644 index 027f145..0000000 --- a/Documentation/Reference/typealiases/VStack.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `VStack` - -A GtkBox equivalent. \ No newline at end of file diff --git a/Documentation/Reference/typealiases/ViewBuilder.md b/Documentation/Reference/typealiases/ViewBuilder.md deleted file mode 100644 index 690bba7..0000000 --- a/Documentation/Reference/typealiases/ViewBuilder.md +++ /dev/null @@ -1,5 +0,0 @@ -**TYPEALIAS** - -# `ViewBuilder` - -A builder for the `Body`. \ No newline at end of file diff --git a/Icons/HelloWorld.png b/Icons/HelloWorld.png deleted file mode 100644 index 5352702..0000000 Binary files a/Icons/HelloWorld.png and /dev/null differ diff --git a/Icons/Screenshot 2024-03-29 at 21.17.17.png b/Icons/Screenshot 2024-03-29 at 21.17.17.png deleted file mode 100644 index 2570d8f..0000000 Binary files a/Icons/Screenshot 2024-03-29 at 21.17.17.png and /dev/null differ diff --git a/Icons/Screenshot.png b/Icons/Screenshot.png deleted file mode 100644 index 2dc277d..0000000 Binary files a/Icons/Screenshot.png and /dev/null differ diff --git a/Icons/TwoWindows.png b/Icons/TwoWindows.png deleted file mode 100644 index 14ee3d7..0000000 Binary files a/Icons/TwoWindows.png and /dev/null differ diff --git a/Makefile b/Makefile deleted file mode 100644 index ca072d0..0000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -docs: - @sourcedocs generate --min-acl private -r --spm-module Adwaita - -swiftlint: - @swiftlint --autocorrect diff --git a/README.md b/README.md index 9e74c84..f62e155 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,13 @@

- - User Manual + + Documentation · GitHub - · - - Contributor Docs -

_Adwaita_ is a framework for creating user interfaces for GNOME with an API similar to SwiftUI. @@ -107,24 +103,7 @@ brew install libadwaita I recommend using the [template repository](https://github.com/AparokshaUI/AdwaitaTemplate) as a starting point. -* [Getting Started][12] - -### Basics - -* [Hello World][13] -* [Creating Views][14] -* [Windows][15] -* [Keyboard Shortcuts][16] - -### Advanced - -* [Creating Widgets][17] -* [Publishing Apps](user-manual/Advanced/PublishingApps.md) - -### Information - -* [Widgets](user-manual/Information/Widgets.md) -* [Auto-Generated Widgets](user-manual/Information/AutoGeneratedWidgets.md) +Follow the [interactive tutorial](https://aparokshaui.github.io/adwaita-swift/tutorials/table-of-contents) or [read the docs](https://aparokshaui.github.io/adwaita-swift/documentation/adwaita) in order to get to know _Adwaita for Swift_. ## Thanks @@ -137,7 +116,6 @@ I recommend using the [template repository](https://github.com/AparokshaUI/Adwai - The auto-generation of widgets is based on [Swift Cross UI](https://github.com/stackotter/swift-cross-ui) - [SwiftLint][21] for checking whether code style conventions are violated - The programming language [Swift][22] -- [SourceDocs][23] used for generating the [docs][24] [1]: Tests/ [2]: #goals @@ -162,7 +140,6 @@ I recommend using the [template repository](https://github.com/AparokshaUI/Adwai [21]: https://github.com/realm/SwiftLint [22]: https://github.com/apple/swift [23]: https://github.com/SourceDocs/SourceDocs -[24]: Documentation/Reference/README.md [image-1]: Icons/Screenshot.png [image-2]: Icons/Demo.png diff --git a/SUMMARY.md b/SUMMARY.md deleted file mode 100644 index 44cc712..0000000 --- a/SUMMARY.md +++ /dev/null @@ -1,29 +0,0 @@ -# Table of contents - -* [Adwaita][1] -* [Getting Started][2] - -## Basics - -* [Hello World][3] -* [Creating Views][4] -* [Windows][5] -* [Keyboard Shortcuts][6] - -## Advanced - -* [Creating Widgets][7] -* [Publishing Apps](user-manual/Advanced/PublishingApps.md) - -## Information - -* [Widgets](user-manual/Information/Widgets.md) -* [Auto-Generated Widgets](user-manual/Information/AutoGeneratedWidgets.md) - -[1]: README.md -[2]: user-manual/GettingStarted.md -[3]: user-manual/Basics/HelloWorld.md -[4]: user-manual/Basics/CreatingViews.md -[5]: user-manual/Basics/Windows.md -[6]: user-manual/Basics/KeyboardShortcuts.md -[7]: user-manual/Advanced/CreatingWidgets.md diff --git a/Tests/Demo.swift b/Tests/Demo.swift index d486a95..7812ba8 100644 --- a/Tests/Demo.swift +++ b/Tests/Demo.swift @@ -131,7 +131,7 @@ struct Demo: App { developer: "david-swift", version: "Test", icon: .default(icon: .applicationXExecutable), - website: .init(string: "https://david-swift.gitbook.io/adwaita"), + website: .init(string: "https://aparokshaui.github.io/adwaita-swift/"), issues: .init(string: "https://github.com/AparokshaUI/adwaita-swift/issues") ) } diff --git a/user-manual/Advanced/CreatingWidgets.md b/user-manual/Advanced/CreatingWidgets.md deleted file mode 100644 index 2222df6..0000000 --- a/user-manual/Advanced/CreatingWidgets.md +++ /dev/null @@ -1,65 +0,0 @@ -# Creating Widgets - -Widgets are special views that do not provide a collection of other views as a content, -but have functions that are called when creating or updating the view. -Normally, a widget manages a GTK or Libadwaita widget using the C API. - -## Recreate the `Text` widget -In this tutorial, we will recreate the text widget. -A widget conforms to the `Widget` protocol: -```swift -struct CustomText: Widget { } -``` -You can add properties to the widget: -```swift -struct CustomText: Widget { - - var text: String - -} -``` -This widget can be called in a view body using `CustomText(text: "Hello, world!")`. -Now, add the two functions required by the protocol: -```swift -import CAdw - -struct CustomText: Widget { - - var text: String - - public func container(modifiers: [(View) -> View]) -> ViewStorage { } - public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) { } - -} -``` -Import CAdw which exposes the whole C Libadwaita and Gtk API to Swift. - -## The `container(modifiers:)` Function -This function initializes the widget when the widget appears for the first time. -It expects a `ViewStorage` as the return type. -In our case, this function is very simple: -```swift -func container(modifiers: [(View) -> View]) -> ViewStorage { - .init(gtk_label_new(text)?.opaque()) -} -``` - -## The `update(_:modifiers:updateProperties:)` Function -Whenever a state of the app changes, the `update(_:modifiers:updateProperties:)` function of the widget gets called. -You get the view storage that you have previously initialized as a parameter. -Update the storage to reflect the current state of the widget: -```swift -func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) { - if updateProperties { - gtk_label_set_label(storage.pointer, text) - } -} -``` - -## Containers -Some widgets act as containers that accept other widgets as children. -In that case, use the `ViewStorage`'s `content` property for storing their view storages. -In the `update(_:modifiers:updateProperties:)` function, update the children's storages. -An example showcasing how to implement containers is the [Box][1] (it is auto-generated). - -[1]: ../../Sources/Adwaita/View/Generated/Box.swift diff --git a/user-manual/Advanced/PublishingApps.md b/user-manual/Advanced/PublishingApps.md deleted file mode 100644 index 506779a..0000000 --- a/user-manual/Advanced/PublishingApps.md +++ /dev/null @@ -1,45 +0,0 @@ -# Publishing Apps - -Once you feel ready to publish your app to [Flathub](https://flathub.org/), or -to a [self-hosted repository](https://docs.flatpak.org/en/latest/hosting-a-repository.html), -you can follow this step-by-step guide. - -## Create a Flatpak Manifest -You have to create a Flatpak manifest, similar to the one [here](https://github.com/flathub/io.github.david_swift.Flashcards/blob/master/io.github.david_swift.Flashcards.json). -Find detailed information in the [Flatpak documentation](https://docs.flatpak.org/en/latest/manifests.html). -This is the only code that should be submitted to Flathub. -There will be a new repository created under `flathub/app-id` that hosts the manifest. - -### SDK Extension for Swift 5 -I recommend using the SDK Extension for building the app. -Add the following snippet. - -```json -"sdk-extensions": [ - "org.freedesktop.Sdk.Extension.swift5" -] -``` - -### Generate Sources for the Swift Package Manager -You cannot access the web while building the app. -Therefore, you need to add all the dependencies as modules to the manifest file. -This can be automated using the [Flatpak builder tool for SPM](https://github.com/flatpak/flatpak-builder-tools/tree/master/spm). - -## MetaInfo File -In the Flatpak Manifest file, under the build commands, you should add the [code to install the app's -MetaInfo file](https://github.com/flathub/io.github.david_swift.Flashcards/blob/c5c0421ffb5589641ddb44a269a6e7e07d430581/io.github.david_swift.Flashcards.json#L49). -The MetaInfo file is located in the app's main repository (not in the Flathub repository). -Take a look at the example [here](https://github.com/david-swift/Memorize/blob/main/data/io.github.david_swift.Flashcards.metainfo.xml). - -## Desktop Entry File -[This line](https://github.com/flathub/io.github.david_swift.Flashcards/blob/c5c0421ffb5589641ddb44a269a6e7e07d430581/io.github.david_swift.Flashcards.json#L50) in the example installs the Desktop Entry file. -It is located in the [main repository](https://github.com/david-swift/Memorize/blob/main/data/io.github.david_swift.Flashcards.desktop). - -## Check the Requirements -Before submitting an app to Flathub, make sure to check the [requirements](https://docs.flathub.org/docs/for-app-authors/requirements), -[MetaInfo guidelines](https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/), and [quality guidelines](https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/quality-guidelines). -Then, test and submit the app following the [submission instructions](https://docs.flathub.org/docs/for-app-authors/submission). - -## Get the Badges -Use the [Flathub badges](https://flathub.org/badges) to inform users about the simple installation option. -Even more assets are available [here](https://github.com/flathub-infra/assets). diff --git a/user-manual/Basics/CreatingViews.md b/user-manual/Basics/CreatingViews.md deleted file mode 100644 index f5f6ada..0000000 --- a/user-manual/Basics/CreatingViews.md +++ /dev/null @@ -1,156 +0,0 @@ -# Creating Views - -Views are the building blocks of your application. -A view can be as simple as the `Text` widget you have seen in the previous tutorial, or as complex as the whole content of a single window. - -## Add Views to a Window -You've already seen how to add views to a window: -```swift -import Adwaita - -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - // These are the views: - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - } - -} -``` - -In this example, the widgets `HeaderBar` and `Text` are used. -`padding` is a view modifier, a function that modifies a view, which adds some padding around the text. - -## Create Custom Views -While directly adding widgets into the `Window`'s body might work for simple "Hello World" apps, -it can get very messy very quickly. -You can create custom views by declaring types that conform to the `View` protocol: -```swift -// A custom view named "ContentView": -struct ContentView: View { - - var view: Body { - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - -} -``` - -## Properties -As every structure in Swift, custom views can have properties: -```swift -struct HelloView: View { - - // The property "text": - var text: String - var view: Body { - Text("Hello, \(text)!") - .padding() - } - -} -``` -This view can be called via `HelloView(text: "world")` in another view. - -## State -Whenever you want to modify a property that is stored in the view's structure from your view, -wrap the property with the `@State` property wrapper: -```swift -struct MyView: View { - - // This property can be modified form within the view: - @State private var text = "world" - var view: Body { - Text("Hello, \(text)!") - .padding() - Button("Change Text") { - text = Bool.random() ? "world" : "John" - } - .padding(10, .horizontal.add(.bottom)) - } - -} -``` -In this example, the text property is set whenever you press the "Change Text" button. - -## Change the State in Child Views -You can access state properties in child views in the same way as you would access any other property -if the child view cannot modify the state (`HelloView` is defined above): -```swift -struct MyView: View { - - @State private var text = "world" - var view: Body { - // "HelloView" can read the "text" property: - HelloView(text: text) - Button("Change Text") { - text = Bool.random() ? "world" : "John" - } - .padding(10, .horizontal.add(.bottom)) - } - -} -``` - -If the child view should be able to modify the state, use the `Binding` property wrapper in the child view -and pass the property with a dollar sign (`$`) to that view. -```swift -struct MyView: View { - - @State private var text = "world" - var view: Body { - HelloView(text: text) - // Pass the editable text property to the child view: - ChangeTextView(text: $text) - } - -} - -struct ChangeTextView: View { - - // Accept the editable text property: - @Binding var text: String - var view: Body { - Button("Change Text") { - // Binding properties can be used the same way as state properties: - text = Bool.random() ? "world" : "John" - } - .padding(10, .horizontal.add(.bottom)) - } - -} -``` - -If you have a more complex type and want to pass a property of the type as a binding, -you can just access the property on the binding. - -```swift -HelloView(text: $complexType.text) -``` - -Whenever you modify a state property (directly or indirectly through bindings), -the user interface gets automatically updated to reflect that change. - -## Save State Values Between App Launches -It's possible to automatically save a value that conforms to `Codable` whenever it changes to a file. -The value in the file is read when the view containing the state value appears for the first time (e.g. when the user launches the app). - -Use the following syntax, where `"text"` is a unique identifier. -```swift -@State("text") private var text = "world" -``` - -You can organize your content by specifying a custom folder path which will be appended to the XDG data home directory. -```swift -@State("text", folder: "io.github.david_swift.HelloWorld/my-view") private var text = "world" -``` diff --git a/user-manual/Basics/HelloWorld.md b/user-manual/Basics/HelloWorld.md deleted file mode 100644 index 95dee02..0000000 --- a/user-manual/Basics/HelloWorld.md +++ /dev/null @@ -1,89 +0,0 @@ -# Hello World - -![The "HelloWorld" app][image-1] - -This is a beginner tutorial. We will create a simple "Hello, world!" app using _Adwaita_. - -## Create the Swift Package -1. Open your terminal client and navigate to a directory you want to create the package in (e.g. `~/Documents/`). -2. Create a new folder for the package using `mkdir HelloWorld`. -3. Enter the newly created folder using `cd HelloWorld`. -4. Run `swift package init --type executable` for creating a new Swift package. -5. Open the Swift package. If you are using GNOME Builder, click on `Select a Folder…` in the view that appears after opening Builder and open the `HelloWorld` folder. - -## Add the Dependency -1. Open the `Package.swift` file. -2. Add the following line of code after `name: "HelloWorld",`: -```swift -dependencies: [.package(url: "https://github.com/AparokshaUI/Adwaita", from: "0.1.1")], -``` -3. Add the dependency to the executable target: -```swift -targets: [ - // Targets are the basic building blocks of a package, defining a module or a test suite. - // Targets can depend on other targets in this package and products from dependencies. - .executableTarget( - name: "HelloWorld", - dependencies: [.product(name: "Adwaita", package: "Adwaita")] - ), -] -``` - -4. On macOS you may need to set the platform version. Add the following after `name: "HelloWorld",`: - -```swift -platforms: [.macOS(.v10_15)], -``` - -## Create the App -1. Navigate to `Sources/main.swift`. On macOS, you may have to change the file name to something else, e.g. `HelloWorld.swift`. -2. An app that uses the _Adwaita_ framework has a structure that conforms to the `App` protocol. The `scene` property returns one or more windows which provide content for display. An `@main` attribute marks it as the entry point of the app. - Replace `print("Hello, world!")` by your first app: -```swift -import Adwaita - -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - Text("Hello, world!") - .padding() - } - } - -} -``` - -## Test the App -1. Run the executable Swift package (in GNOME Builder, press the play button, on the command line, use `swift run`). - You can see that one important component of a window in GNOME is missing: The header bar. - -## Add a Header Bar -1. If you add another view inside of the `Window`'s body, the views get aligned vertically: -```swift -import Adwaita - -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - // Add the header bar: - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - } - -} -``` -2. Run the app. - -[image-1]: ../../Icons/HelloWorld.png diff --git a/user-manual/Basics/KeyboardShortcuts.md b/user-manual/Basics/KeyboardShortcuts.md deleted file mode 100644 index c9fe87e..0000000 --- a/user-manual/Basics/KeyboardShortcuts.md +++ /dev/null @@ -1,114 +0,0 @@ -# Keyboard Shortcuts - -Keyboard shortcuts can be attached to individual windows or whole applications. - -## About Keyboard Shortcuts -Keyboard shortcuts are represented as a `String`. -You can add a single character by adding itself to the string, e.g. `"n"`. -The F keys are written as `"F1"`, `"F2"`, etc. -For character keys, write the lowercase name instead of the symbol, such as `"minus"` instead of `"-"`. - -Add modifiers to the shortcut using the following string modifiers: -- `.shift()` -- `.ctrl()` -- `.alt()` -- `.meta()` -- `.super()` -- `.hyper()` - -As an example, the following syntax represents the `Ctrl + N` shortcut: `"n".ctrl()`. - -## Add Shortcuts to a Window -Add a keyboard shortcut to an invividual window. It is only available in that window. -```swift -import Adwaita - -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - // Add the shortcut "Ctrl + W" for closing the window - .keyboardShortcut("w".ctrl()) { window in - window.close() - } - } - -} -``` - -## Add Shortcuts to an App -Add a keyboard to an app so that the shortcut is available in every top-level window. -```swift -import Adwaita - -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - // Add the shortcut "Ctrl + Q" for terminating the app - .appKeyboardShortcut("q".ctrl()) { app in - app.quit() - } - } - -} -``` - -## Create Shortcuts from a Menu -The most elegant way for adding keyboard shortcuts is in many cases adding them via menus. -Here is an example using a menu button: -```swift -struct TestView: View { - - var app: GTUIApp - - var view: Body { - Menu(icon: .default(icon: .openMenu), app: app) { - MenuButton("New Window", window: false) { - app.addWindow("main") - } - // Add a keyboard shortcut to the app. - .keyboardShortcut("n".ctrl()) - } - } - -} -``` -Add the keyboard shortcut to a single window by specifying the `window` parameter in the initializer of `Menu`, -and removing `window: false` in the initializer of `MenuButton`. - -## Create Shortcuts from a Button -It's possible to easily create a keyboard shortcut from a button. -Use `appKeyboardShortcut` instead of `keyboardShortcut` for shortcuts on an application level. -Note that the shortcut gets activated after presenting the view for the first time. -```swift -struct HelloView: View { - - var window: GTUIWindow - - var view: Body { - Button("New Item") { - print("New Item") - } - // Add a keyboard shortcut to the window "window". - .keyboardShortcut("n".ctrl().shift(), window: window) - } - -} -``` diff --git a/user-manual/Basics/Windows.md b/user-manual/Basics/Windows.md deleted file mode 100644 index 1546771..0000000 --- a/user-manual/Basics/Windows.md +++ /dev/null @@ -1,167 +0,0 @@ -# Windows - -![Multiple windows in an app built with _Adwaita_][image-1] - -Windows in _Adwaita_ are not actually single windows in the user interface, -but rather instructions on how to create one type of window. - -## The Simplest Case -In the "HelloWorld" app, we have created a single window app. -Whenever that window was closed using the "x" button, the app terminated. -We can add multiple windows to an app. -Whenever the last one disappears, the app terminates. -```swift -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - // Add a second window: - Window(id: "window-2") { _ in - HeaderBar.empty() - Text("Window 2") - .padding() - } - } - -} -``` - -## Showing Windows -Every app contains the property `app`. -You can use this property for running functions that affect the whole app, e.g. quitting the app. -Another use case is showing a window: -```swift -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - Window(id: "control") { _ in - HeaderBar.empty() - Button("Show Window") { - // Show the window with the identifier "content": - app.showWindow("content") - } - .padding() - } - } - -} -``` -"Showing" a window means creating an instance of the window type if there isn't one, -or focusing the window that already exists of that type. -It should be used for opening windows that cannot be presented more than once -and for moving a window that is already open into the foreground. - -## Adding Windows -You can call the `addWindow(_:parent:)` function instead of the `showWindow(_:)` -if you want to add and focus another instance of a window type: -```swift -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - Window(id: "control") { _ in - HeaderBar.empty() - Button("Add Window") { - // Add a new instance of the "content" window type - app.addWindow("content") - } - .padding() - } - } - -} -``` -It can be used to add an overlay window to a certain instance of a window type -by specifying the `parent` parameter, e.g. in the example above: -```swift -Window(id: "control") { window in - HeaderBar.empty() - Button("Add Child Window") { - // Add the new instance as a child window of this window - app.addWindow("content", parent: window) - } - .padding() -} -``` - -## Customizing the Initial Number of Windows -By default, every window type of the app's scene appears once when the app starts. -It's possible to customize how many windows are being presented at the app's startup: -```swift -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - // Open no window of the "content" type - Window(id: "content", open: 0) { _ in - HeaderBar.empty() - Text("Hello, world!") - .padding() - } - // Open two windows of the "control" type - Window(id: "control", open: 2) { _ in - HeaderBar.empty() - Button("Show Window") { - app.addWindow("content") - } - .padding() - } - } - -} -``` - -## Add Modal Windows -Modal windows are windows that attach to another window. -Currently, it makes only sense to attach modal windows to windows that don't exist more than once. -```swift -@main -struct HelloWorld: App { - - let id = "io.github.david_swift.HelloWorld" - var app: GTUIApp! - - var scene: Scene { - Window(id: "content") { _ in - // ... - } - // Add modal windows - .overlay { - Window(id: "overlay") { _ in - // ... - } - } - } - -} -``` - -[image-1]: ../../Icons/TwoWindows.png diff --git a/user-manual/GettingStarted.md b/user-manual/GettingStarted.md deleted file mode 100644 index 93be7a1..0000000 --- a/user-manual/GettingStarted.md +++ /dev/null @@ -1,27 +0,0 @@ -# Getting Started - -Before you can start using _Adwaita_, you’ll need to setup some dependencies. - -## macOS -1. Install [Homebrew][1]. -2. Install Libadwaita (and thereby GTK 4): -``` -brew install libadwaita -``` - -## Linux -Install `libadwaita-devel` or `libadwaita` (or something similar, based on the package manager) as well as `gtk4-devel`, `gtk4` or similar. - -## Development -Adwaita is an open source project. Visit the [GitHub repository][2] for bug reports, feature requests, pull requests and more information. - -## Template Repository -A template repository for Adwaita app projects is available [here][3]. - -## Demo Application -A demo application showcasing Adwaita's features is available [here][4] - -[1]: https://brew.sh -[2]: https://github.com/AparokshaUI/Adwaita -[3]: https://github.com/AparokshaUI/AdwaitaTemplate -[4]: ../Tests/ diff --git a/user-manual/Information/AutoGeneratedWidgets.md b/user-manual/Information/AutoGeneratedWidgets.md deleted file mode 100644 index 7471e56..0000000 --- a/user-manual/Information/AutoGeneratedWidgets.md +++ /dev/null @@ -1,90 +0,0 @@ -# Auto-Generated Widgets - -Visit the [Libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/) or [Gtk](https://docs.gtk.org/gtk4/index.html) docs -and find the widget you want to implement. - -There is an auto-generated interface available for many Libadwaita and Gtk widgets. -This page shows how to use them, using [AdwSplitButton](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/class.SplitButton.html) as an example. - -## The Initializer -The type name is the original type name without the prefix, in that case `SplitButton`. - -Most of the widgets enable initialization with an empty initializer. -Exceptions will cause a helpful error message when trying with an empty initializer. - -```swift -var view: Body { - SplitButton() -} -``` - -## Simple Properties -Properties with "simple" types, such as strings (and most other types), have -a Swift equivalent with the same name in camel case. -For example, you will find the properties `label` and `dropdown-tooltip` in the docs. -They can be used in the following way: - -```swift -var view: Body { - SplitButton() - .label("Hello") - .dropdownTooltip("World") -} -``` - -Properties that are booleans can be set implicitly to `true`: - -```swift -var view: Body { - SplitButton() - .label("Hello") - .canShrink() -} -``` - -## Signals -You can connect to signals using their names. - -```swift -var view: Body { - SplitButton() - .label("Hello") - .clicked { - print("Clicked") - } -} -``` - -## Views and Menu Models -Properties of the type `GtkWidget` can be used in the following way: -```swift - SplitButton() - .child { - ButtonContent() - .label("Hello") - .iconName("zoom-original-symbolic") - } -} -``` - -`GMenuModel` is treated similarly: -```swift -var view: Body { - SplitButton() - .label("Hello") - .menuModel(app: app) { - MenuButton("Test") { - print("Test") - } - MenuButton("World") { - print("World") - } - } -} -``` - -## Bindings -Some properties can be changed by a user action (e.g. toggles). -They expect a binding instead of a "normal" value. -Compilation error messages will be helpful in spotting those properties. - diff --git a/user-manual/Information/Widgets.md b/user-manual/Information/Widgets.md deleted file mode 100644 index 08c72c3..0000000 --- a/user-manual/Information/Widgets.md +++ /dev/null @@ -1,189 +0,0 @@ -# Widgets - -This is an overview of the available widgets and other components in _Adwaita_ that are not auto-generated or that are wrappers for easily accessing auto-generated widgets. -There are many more widgets available using auto-generation. Learn [how to use them.](AutoGeneratedWidgets.md) - -| Name | Description | Widget | -| -------------------- | ------------------------------------------------------------------- | ---------------------- | -| ViewStack | A widget that displays one of its child views based on an id. | GtkStack | -| VStack | A widget which arranges child widgets into a single column. | GtkBox | -| HStack | A widget which arranges child widgets into a single row. | GtkBox | -| Toggle | A button with two possible states, on and off. | GtkToggleButton | -| List | A widget which arranges child widgets vertically into rows. | GtkListBox | -| ForEach | Arrange dynamic widgets vertically or horizontally. | GtkBox | -| NavigationSplitView | A widget presenting sidebar and content side by side. | AdwNavigationSplitView | -| ScrollView | A container that makes its child scrollable. | GtkScrolledWindow | -| ViewSwitcher | A control for switching between different views. | AdwViewSwitcher | -| StateWrapper | A wrapper not affecting the UI which stores state information. | - | -| FormSection | A titled section, usually containing one or multiple forms. | AdwPreferencesGroup | -| Form | A static boxed list, usually containing one or multiple rows. | GtkListBox | - -### View Modifiers - -| Syntax | Description | -| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| `freeze(_:)` | Prevent a view from being updated. | -| `inspect(_:)` | Edit the underlying Gtk or Libadwaita widget. | -| `padding(_:_:)` | Add empty space around a view. | -| `hexpand(_:)` | Enable or disable the horizontal expansion of a view. | -| `vexpand(_:)` | Enable or disable the vertical expansion of a view. | -| `halign(_:)` | Set the horizontal alignment of a view. | -| `valign(_:)` | Set the vertical alignment of a view. | -| `frame(minWidth:minHeight:)` | Set the view’s minimum width or height. | -| `frame(maxWidth:)` | Set the view’s maximum width. | -| `frame(maxHeight:)` | Set the view’s maximum height. | -| `transition(_:)` | Assign a transition with the view that is used if it is a direct child of an EitherView. | -| `onUpdate(_:)` | Run a function every time a view gets updated. | -| `navigationTitle(_:)` | Add a title that is used if the view is a direct child of a NavigationView. | -| `style(_:)` | Add a style class to the view. | -| `onAppear(_:)` | Run when the view is rendered for the first time. | -| `inspectOnAppear(_:)` | Edit the underlying Gtk or Libadwaita class when the view is rendered for the first time. | -| `topToolbar(visible:_:)` | Add a native toolbar to the view. Normally, it contains a HeaderBar. | -| `bottomToolbar(visible:_:)` | Add a native bottom toolbar to the view. | -| `modifyContent(_:modify:)` | Replace all occurrences of a certain view type with another view. | -| `stopModifiers()` | Ignore all the `modifyContent(_:modify:)` modifiers from higher above in the view tree. | -| `toast(_:signal:)` | Show a toast on top of the view whenever the signal gets activated. | -| `toast(_:signal:button:handler:)` | Show a toast with a button on top of the view whenever the signal gets activated. | -| `overlay(_:)` | Overlay a view with another view. | -| `insensitive(_:)` | Make a view unable to detect actions. This is especially useful for overlays. | -| `onClick(handler:)` | Run a function when the user clicks on the widget. | -| `focused(_:)` | Set and observe whether a view is focused. | -| `focus(_:)` | Bind a signal that focuses the view. | -| `verticalCenter()` | Wrap a view in a `VStack` and center vertically. | -| `horizontalCenter()` | Wrap a view in an `HStack` and center horizontally. | -| `dialog(visible:title:content:)` | Add a dialog to the window containing the view. | - -### `Button` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `keyboardShortcut(_:window:)`| Create a keyboard shortcut for the window with the button's action. | -| `keyboardShortcut(_:app:)` | Create a keyboard shortcut for the application with the button's action. | - -### `HeaderBar` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `headerBarTitle(view:)` | Customize the title view in the header bar. | - -### `Text` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------------------- | -| `wrap(_:)` | Enable or disable line wrapping (expanding the text view to multiple lines if the width is narrow). | - -### `Toggle` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `checkButton()` | Use a check button design instead of a toggle. | - -### `List` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `sidebarStyle()` | Change the style of the list to match a sidebar. | - -### `OverlaySplitView` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `trailingSidebar(_:)` | Whether the sidebar is trailing to the content view. | - -### `Carousel` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `longSwipes(_:)` | Whether long swiping is enabled. | - -### `ViewSwitcher` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `wideDesign(_:)` | Whether the wide view switcher design is used. | - -### `Banner` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `button(_:handler)` | Show the banner's button and set its title and handler. | - -### `FormSection` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `description(_:)` | Set the section's description. | -| `suffix(_:)` | Set the section's suffix view. | - -### `ActionRow` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `subtitle(_:)` | Set the row's subtitle. | -| `prefix(_:)` | Set the row's prefix view. | -| `suffix(_:)` | Set the row's suffix view. | - -### `ComboRow` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `subtitle(_:)` | Set the row's subtitle. | -| `prefix(_:)` | Set the row's prefix view. | -| `suffix(_:)` | Set the row's suffix view. | - -### `EntryRow` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `onSubmit(_:)` | Add a submit button to the entry row. Run the provided closure when it gets pressed. | -| `prefix(_:)` | Set the row's prefix view. | -| `suffix(_:)` | Set the row's suffix view. | -| `secure()` | Use the secure design for password inputs etc. | - -### `SpinRow` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `subtitle(_:)` | Set the row's subtitle. | -| `prefix(_:)` | Set the row's prefix view. | -| `suffix(_:)` | Set the row's suffix view. | -| `step(_:)` | Set the increase/decrease rate of the buttons. | - -### `SwitchRow` Modifiers -| Syntax | Description | -| ---------------------------- | --------------------------------------------------------------------------------------- | -| `subtitle(_:)` | Set the row's subtitle. | -| `prefix(_:)` | Set the row's prefix view. | -| `suffix(_:)` | Set the row's suffix view. | - -### Window Types -| Name | Description | Widget | -| -------------------- | ----------------------------------------------------------------- | ---------------------- | -| Window | A simple application window. | AdwApplicationWindow | -| AboutWindow | A GNOME about window. | AdwAboutWindow | - -### Window Modifiers -| Syntax | Description | -| ------------------------------- | --------------------------------------------------------------------------------------- | -| `appKeyboardShortcut(_:action:)`| Create a keyboard shortcut available in the whole the application. | -| `quitShortcut()` | Create a keyboard shortcut for quitting the application with "Ctrl + q". | - -### `Window` Modifiers -| Syntax | Description | -| ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | -| `keyboardShortcut(_:action:)` | Create a keyboard shortcut available in one window. | -| `closeShortcut()` | Create a keyboard shortcut for closing the window with "Ctrl + w". | -| `overlay(windows:)` | Add windows that attach to a window of this type when being presented. | -| `fileImporter(_:initialFolder:extensions:folders:onOpen:onClose:)` | Add an import file dialog. | -| `fileExporter(_:initialFolder:initialName:onSave:onClose:)` | Add an export file dialog. | -| `defaultSize(width:height:)` | Set the window's initial size. | -| `title(_:)` | Set the window's title. | -| `resizable(_:)` | Set the window's resizability. | -| `deletable(_:)` | Set the window's deletability. | -| `maximized(_:)` | Get and set whether the window is maximized. | -| `size(width:height:)` | Get and set the window's width and height. | - -### `AboutWindow` Modifiers -| Syntax | Description | -| --------------- | --------------------------------------------------------------------------------------- | -| `icon(_:)` | Set the app icon. | -| `website(_:)` | Set the app's website. | -| `issues(_:)` | Set the app's bug tracker. | - -### Menu Widgets -| Name | Description | Widget | -| -------------------- | ----------------------------------------------------------------- | ---------------------- | -| MenuButton | A button in a menu. | GMenuItem | -| MenuSection | A collection of menu widgets grouped with lines. | GMenuItem | -| Submenu | A collection of menu widgets grouped by navigation. | GMenuItem | - -### `MenuButton` Modifiers -| Syntax | Description | -| ------------------------------- | --------------------------------------------------------------------------------------- | -| `keyboardShortcut(_:)` | Assign a keyboard shortcut to the button's action. |