Revision control
Copy as Markdown
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
import Foundation
/// Defines the state for the address toolbar.
public struct AddressToolbarConfiguration {
/// View config for the `Location View` in the address toolbar
let locationViewConfiguration: LocationViewConfiguration
/// Navigation actions of the address toolbar
let navigationActions: [ToolbarElement]
/// Leading page actions of the address toolbar
let leadingPageActions: [ToolbarElement]
/// Trailing page actions of the address toolbar
let trailingPageActions: [ToolbarElement]
/// Browser actions of the address toolbar
let browserActions: [ToolbarElement]
/// The position of the toolbar border to be displayed
let borderPosition: AddressToolbarBorderPosition?
/// Whether toolbar change should be displayed animated
let shouldAnimate: Bool
public let uxConfiguration: AddressToolbarUXConfiguration
// We need this init as by default the init generated by the compiler for the struct will be internal and
// can therefor not be used outside of the ToolbarKit
public init(locationViewConfiguration: LocationViewConfiguration,
navigationActions: [ToolbarElement],
leadingPageActions: [ToolbarElement],
trailingPageActions: [ToolbarElement],
browserActions: [ToolbarElement],
borderPosition: AddressToolbarBorderPosition?,
uxConfiguration: AddressToolbarUXConfiguration,
shouldAnimate: Bool) {
self.locationViewConfiguration = locationViewConfiguration
self.navigationActions = navigationActions
self.leadingPageActions = leadingPageActions
self.trailingPageActions = trailingPageActions
self.browserActions = browserActions
self.borderPosition = borderPosition
self.shouldAnimate = shouldAnimate
self.uxConfiguration = uxConfiguration
}
}