-
Notifications
You must be signed in to change notification settings - Fork 1
OrionTabbedLocationViewController
This hold all of our OrionSearchTabFields
and connects them up by receiving their events
and forwarding them to each-other. As this is like a controlled proxy service however, raw events
are not completely forwarded, but translated into the events needed to allow all of the tabs to update
synchronously.
class OrionTabbedLocationViewController: NSViewController
NSViewController
, OrionSearchFieldControllerDelegate
, OrionWindowResizeDelegate
, WKNavigationDelegate
Creates a OrionTabbedLocationViewController
with a specified delegate to manage it
init(
_ delegate: OrionTabbedLocationViewControllerDelegate?,
_ mockup: Bool,
_ window: NSWindow? = nil
)
- delegate: The owner of this class that manages the current tabs webview
required init?(coder: NSCoder)
var tabCount: Int
A value determining if the view gets set up normally on creation or if only the UI properties are set and the delegation is not needed.
let mockup: Bool
Centralized tab collection
let stackView: NSStackView
The list of all the tabs open in the window
var tabs: [OrionSearchFieldController]
The tab with focused context. Will not be nil
var currentTab: OrionSearchFieldController?
The delegate responsible for using the current tabs webview
weak var delegate: OrionTabbedLocationViewControllerDelegate?
The content controller for all the tabs. Not recommended to share this among all of the webviews.
lazy var userContentController: OrionUserContentController
func tabWillClose(sender: OrionSearchFieldController)
func tabWantsForeground(tab: OrionSearchFieldController)
Calls OrionSearchField.updateProperties(tabCount:)
on all of the tab search fields
func updateAllTabs(_ sender: OrionSearchFieldController?, _ windowSize: NSSize? = nil)
- sender: Optional sender to directly control which tab has focus. If not supplied the focus is assumed to be the current tab.
- windowSize: Optional size to update the width of the tabs with. Defaults to nil.
A wrapper for all the tabs to update them without adding them all to the window resize observers
func windowWillResize(toSize: NSSize)
func webView(
_ webView: WKWebView,
decidePolicyFor navigationAction: WKNavigationAction,
decisionHandler: @escaping (WKNavigationActionPolicy) -> Void
)
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!)
func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!)
func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error)
Sets up the stackView and makes it stretch across the entire toolbar
func setupStackView(window: NSWindow?)
Creates and adds a new tab the stackView and gives it foreground context
func addTab()
Removes a tab and gives foreground context to the last tab in the tab array
func removeTab(tab: OrionSearchFieldController)
- tab: The tab to remove from the window
Generated at 2022-01-11T21:56:49-0800 using swift-doc 1.0.0-rc.1.
Types
- BrowserAction
- MozillaBrowserExtensionManifest
- OptionsUI
- OrionBrowserExtension
- OrionBrowserExtensionError
- OrionDelegate
- OrionExtensionManager
- OrionMenu
- OrionSearchField
- OrionSearchFieldController
- OrionTabStretcherView
- OrionTabbedLocationViewController
- OrionTopSitesAPI
- OrionUserContentController
- OrionWindowController
- OrionWindowType