Quark #

Modules #

Quark v1.4.0 Documentation

Contents

quark/nav #

Enum: NavStatus #

  • Init
  • Foreground
  • Background

Class: NavigationStatus #

Extends: ViewController Type parameters: P = {}, S = {}

0=init or exit,1=background,2=foreground

readonly navStatus: NavStatus

When the component leaves

intoLeave(animate: number)

When the component enters the background

intoBackground(animate: number)

When the component enters the foreground

intoForeground(animate: number)

Class: Navigation #

Extends: NavigationStatus Type parameters: P = {}, S = {}

readonly navStack: List<Navigation>

When initializing navigation, return a focus view

initFocus(): View | null

Called when a navigation component is created

registerNavigation(animate?: Uint, animate: any)

Called when a navigation component is unmounted

unregisterNavigation(animate?: Uint, animate: any)
  • When a navigation event occurs, the system will first send the event to the focus view, If the event can be successfully transmitted to root, The event will ultimately be sent to the top of the current navigation list stack
  • If false is returned here, it will continue to pass to the bottom of the navigation list stack, Until it returns true or reaches the bottom of the stack to exit the application
    navigationBack(): boolean

Called when the remote control presses OK

navigationEnter(focus: View)
  • Called when the remote control presses Up
  • The focus will not change in any way is returning null
    navigationTop(focus: View | null): View | null
  • Called when the remote control presses Down
  • The focus will not change in any way is returning null
    navigationDown(focus: View | null): View | null
  • Called when the remote control presses Left
  • The focus will not change in any way is returning null
    navigationLeft(focus: View | null): View | null
  • Called when the remote control presses Right
  • The focus will not change in any way is returning null
    navigationRight(focus: View | null): View | null

When pressing the menu button, it will be called up

navigationMenu()

Class: NavPageCollection #

Extends: Navigation Type parameters: P = {}, S = {}

enableAnimate: boolean
isCurrent(page: NavPage): boolean

Add a navigation page to the end and display

push(arg: VDom<NavPage>, animate?: boolean)

Remove pages from the end of the navigation

pop(animate?: boolean, count?: Uint)

Class: Navbar #

Extends: NavigationStatus Type parameters: P = {}, S = {}

hidden: boolean
visibleBackIcon: boolean
visibleBackText: boolean
backTextColor: types.ColorStrIn
titleTextColor: types.ColorStrIn
readonly page: NavPage

Set navbar back text

setBackText(value: string)

Set navbar title text

setTitleText(value: string)

Class: NavPage #

Extends: Navigation Type parameters: P = {}, S = {}

readonly prevPage: NavPage | null
readonly nextPage: NavPage | null
readonly collection: NavPageCollection
readonly isCurrent: boolean
readonly isFirstPage: boolean
backgroundColor: types.ColorStrIn
title: string
navbar: VDom<Navbar>
navbarHidden: boolean
includeNavbarPadding: boolean
readonly navbarHeight: number