Skip to content

Interface

interactive

showToast

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

showToast(Object object)

Display Message Prompt Box

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
titlestringyesContent of the prompt
iconstring'success'noicon
imagestringnoCustom icon local path, image Has a higher priority than icon
durationnumber1500noPrompt delay time
maskbooleanfalsenoWhether to display transparent mask to prevent touch penetration
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

object.icon Legal value

valueIntroductions
successDisplay success icon, at this time title Text max display 7 Length of Chinese characters
loadingDisplay the load icon, at this time title Text max display 7 Length of Chinese characters
errorDisplays the failure icon, at which point title Text max display 7 Length of Chinese characters
noneDoes not display icons, at this time title Up to two lines of text, 1.9.0 and above support

sample code

javascript
ft.showToast({
  title: 'Success',
  icon: 'success',
  duration: 2000
})

Be careful

  • ft.showLoading and ft.showToast Can only display one at a time
  • ft.showToast Should ft.hideToast Paired use

showModal

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

showModal(Object object)

Display modal dialog box

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
titlestringnoTitle of Tip
contentstringnoContent of the prompt
showCancelbooleantruenoShow Cancel Button
cancelTextstringcancelnoCancel on text, up to 4 Character
cancelColorstring#000000noThe text color of the cancel on must be 16 Color strings in binary format
confirmTextstringdeterminenoConfirm on text, up 4 Character
confirmColorstring#初始值noConfirm on text color, must be 16 Color strings in binary format
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

object.success callback

parameter

Object res

attributetypeIntroductions
confirmbooleanfor true When the user clicks the OK on
cancelbooleanfor true Indicates that the user has clicked cancel for the Android The system distinguishes between clicking the mask to close or clicking the cancel on to close.)

sample code

javascript
ft.showModal({
  title: "Hint"?
  content: 'This is a modal pop-up. '
  success (res) {
    if (res.confirm) {
      console.log("User clicks OK.")
    } else if (res.cancel) {
      console.log('User clicks to cancel '-)
    }
  }
})

showLoading

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

showLoading(Object object)

display loading Cue box. Active call wx.hideLoading To close the prompt

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
titlestringyesContent of the prompt
maskbooleanfalsenoWhether to display transparent mask to prevent touch penetration
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

javascript
ft.showLoading({
  title: 'Loading',
})

setTimeout(function () {
  ft.hideLoading()
}, 2000)

Be careful

  • ft.showLoading and ft.showToast Can only display one at a time
  • ft.showLoading Should ft.hideLoading Paired use

showActionSheet

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

showActionSheet(Object object)

Display Action Menu

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
itemListArray.<string>yesAn array of text for ons whose maximum length is 6
itemColorstring#000000noButton text color
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

object.success callback

parameter

Object res

attributetypeIntroductions
tapIndexnumberNumber of ons the user clicks, from top to bottom, starting with 0

sample code

javascript
ft.showActionSheet({
  itemList: ['A', 'B', 'C'],
  success(res) {
    console.log(res.tapIndex)
  },
  fail(res) {
    console.log(res.errMsg)
  }
})

hideToast

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

hideToast(Object object)

Hide message prompt box

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

hideLoading

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

hideLoading(Object object)

hide loading Prompt box

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

enableAlertBeforeUnload

Base library support from 2.11.5, iOS version 2.35.1, Android version 2.35.1

enableAlertBeforeUnload(Object object)

Open the Mini Program page to return to the inquiry dialog

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
messagestringyesInterface calls the successful callback function
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

disableAlertBeforeUnload

Base library support from 2.11.5, iOS version 2.35.1, Android version 2.35.1

disableAlertBeforeUnload(Object object)

Close the Mini Program page and return to the query dialog

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

showNavigationBarLoading

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

showNavigationBarLoading(Object object)

Show navigation bar loading animation on current page

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

setNavigationBarTitle

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

setNavigationBarTitle(Object object)

Dynamically set the title of the current page

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
titlestringyesPage Title
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

javascript
ft.setNavigationBarTitle({
  title: 'Current page'
})

setNavigationBarColor

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

setNavigationBarColor(Object object)

Set the page navigation bar color

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
frontColorstringyesForeground color values, including the color of the on, title, and status bar, are supported only #ffffff and #000000
backgroundColorstringyesBackground color value, valid value is hexadecimal color
animationObjectnoAnimation effect
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

object.animation Structure

attributetypeDefault valuesRequiredIntroductions
durationnumber0noAnimation change time, unit ms
timingFuncstring'linear'noAnimation change mode

object.animation.timingFunc Legal value

valueIntroductions
'linear'Animation moves at the same speed from start to finish
'easeIn'Animation begins at low speed
'easeOut'Animation ends at low speed
'easeInOut'Animation starts and ends at low speeds

sample code

javascript
ft.setNavigationBarColor({
  frontColor: '#ffffff',
  backgroundColor: '#ff0000',
  animation: {
    duration: 400,
    timingFunc: 'easeIn'
  }
})

hideNavigationBarLoading

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

hideNavigationBarLoading(Object object)

Hide navigation bar on current page Load animation

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

背景

setBackgroundTextStyle

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

ft.setBackgroundTextStyle(Object object)

Dynamically set drop-down background font, loading Style of Graph

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
textStylestringyesDrop Down Background Font, Loading The style of the diagram.
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

object.textStyle Legal value

valueIntroductions
darkdark style
lightlight style

sample code

javascript
ft.setBackgroundTextStyle({
  textStyle: 'dark' // Drop Down Background Font, Loading The style of the diagram is dark
})

setBackgroundColor

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

ft.setBackgroundColor(Object object)

Dynamically set the background color of the window

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
backgroundColorstringnoThe background color of the window must be hexadecimal color value
backgroundColorTopstringnoThe background color of the top window must be a hexadecimal color value, and only iOS Support
backgroundColorBottomstringnoThe background color of the bottom window must be a hexadecimal color value, and only iOS Support
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

javascript
ft.setBackgroundColor({
  backgroundColor: '#ffffff', // The background color of the window is white
})

ft.setBackgroundColor({
  backgroundColorTop: '#ffffff', // The background color of the top window is white
  backgroundColorBottom: '#ffffff', // The background color of the bottom window is white
})

Tab Bar

showTabBarRedDot

ft.showTabBarRedDot(Object object)

display tabBar The red dot in the upper right corner of an item

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
indexnumberyestabBar Which one of those? From the left.
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

showTabBar

ft.showTabBar(Object object)

display tabBar

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
animationbooleanfalsenoDo you need animation effects?
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

setTabBarStyle

ft.setTabBarStyle(Object object)

Dynamic settings tabBar Overall style

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
colorstringnotab Default color for text on HexColor
selectedColorstringnotab Color of text selected on the HexColor
backgroundColorstringnotab The background color of HexColor
borderStylestringnoThe color of the top border of the tab bar, Support only black/white
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

js
ft.setTabBarStyle({
  color: '#FF0000',
  selectedColor: '#00FF00',
  backgroundColor: '#0000FF',
  borderStyle: 'white'
})

setTabBarItem

ft.setTabBarItem(Object object)

Dynamic settings tabBar The content of an item,2.7.0 Temporary files and network files are supported

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
indexnumberyestabBar Which one of those? From the left.
textstringnotab Button text on the
iconPathstringnoPicture path, icon Size limit is 40kb, recommended size 81px * 81px, when postion for top This parameter is invalid when
selectedIconPathstringnoImage path when selected, icon Size limit is 40kb, recommended size 81px * 81px When postion for top This parameter is invalid when
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

js
ft.setTabBarItem({
  index: 0,
  text: 'text',
  iconPath: '/path/to/iconPath',
  selectedIconPath: '/path/to/selectedIconPath'
})

setTabBarBadge

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

for tabBar Add text to the top right corner of an item

attributetypeDefault valuesRequiredIntroductions
indexnumbernotabBar Which one of those? From the left.
textstringnoText displayed, exceeding 4 Characters are displayed as ...
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

javascript
ft.setTabBarBadge({
  index: 0,
  text: '1'
})

removeTabBarBadge

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

to remove tabBar Text in the upper-right corner of an item

attributetypeDefault valuesRequiredIntroductions
indexnumbernotabBar Which one of those? From the left.
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

hideTabBarRedDot

ft.hideTabBarRedDot(Object object)

hide tabBar The red dot in the upper right corner of an item

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
indexnumberyestabBar Which one of those? From the left.
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

hideTabBar

ft.hideTabBar(Object object)

hide tabBar

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
animationbooleanfalsenoDo you need animation effects?
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

Typeface

loadFontFace

ft.loadFontFace(Object object)

Load network font dynamically. The file address must be of the download type. File addresses only in the https format are supported on iOS

Caution.

  1. The contet-type returned by the font file is referenced to font, parsing will fail if the format is incorrect.
  2. the font link must be yeshttps (ios does not support http)
  3. cors support must be enabled for font linking *.
  4. Faild to load font can be ignored in the tooltip

parameter

Object object

attributetypeDefault valuesRequiredIntroductionsMinimum version
globalbooleanfalsenoWhether global effect2.10.0
familystringyesDefined font name
sourcestringyesFont resource address. Suggested formats are TTF and WOFF. WOFF2 is not compatible with lower versions of iOS
descObjectnoOptional font descriptor
scopesArraynoFont resource address. Suggested formats are TTF and WOFF. WOFF2 is not compatible with lower versions of iOS.
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

object.desc Structure

attributetypeDefault valuesRequiredIntroductions
stylestring'normal'noFont style. Values include normal, italic, and oblique
weightstring'normal'noFont weight. Values include normal, bold, 100, 200, ...900
variantstring'normal'noSet the font display text for small capital letters. Values include normal, small-caps, and inherit
Example

object.success callback

parameter

Object res

attributetypeIntroductions
statusstringLoading font results

object.fail callback

parameter

Object res

attributetypeIntroductions
statusstringLoading font results

object.complete callback

parameter

Object res

attributetypeIntroductions
statusstringLoading font results

sample code

js
ft.loadFontFace({
  family: 'Bitstream Vera Serif Bold',
  source: 'url("https://sungd.github.io/Pacifico.ttf")',
  success: console.log
})

Pull down to refresh

startPullDownRefresh

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

startPullDownRefresh(Object object)

Start a drop-down refresh. Trigger pull down refresh animation after the call, the effect is consistent with user manual pulldown refresh

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

javascript
ft.startPullDownRefresh()

stopPullDownRefresh

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

stopPullDownRefresh(Object object)

Stops the current page drop-down refresh

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

javascript
Page({
  onPullDownRefresh() {
    ft.stopPullDownRefresh()
  }
})

Roll

pageScrollTo

ft.pageScrollTo(Object object)

Scroll the page to the target location, support selection and scrolling distance positioning in two ways

parameter

Object object

attributetypeDefault valuesRequiredIntroductionsMinimum version
scrollTopnumbernoScroll to the target location on the page, unit px
durationnumber300noLength of scrolling animation, in units ms
selectorstringnoSelector2.7.3
offsetTopnumbernoOffset distance, to be used with the selector parameter, scrolls to the position where the selector adds the offset distance, in px3.0.8
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

selector grammar

Selectors are similar to CSS But only the following syntax is supported.

  • ID selector:#the-id
  • Class selector (you can specify more than one in a row):. a-class.another-class
  • Child element selector:. The-parent > .the-child
  • Descendant selector:. The-ancester .the-descendant
  • Descendant selector across custom components:. The-ancester >>> .the-descendant
  • Union of multiple selectors:#a-node, .some-other-nodes

sample code

js
ft.pageScrollTo({
  scrollTop: 0,
  duration: 300
})

ScrollViewContext

Base library support from 3.0.45

scroll-view enhanced instance

sample code

javascript
// get ScrollViewContext
ft.createSelectorQuery()
  .select('#scroll-view')
  .node()
  .exec((res) => {
    const scrollViewContext = res[0].node;
  })

ScrollViewContext properties

attributetypeIntroductions
scrollEnabledboolean

sample code

javascript
ft.createSelectorQuery()
  .select('#scroll-view')
  .node()
  .exec((res) => {
    const scrollViewContext = res[0].node;
    scrollViewContext.scrollEnabled = false
  })

ScrollViewContext method

scrollIntoView

scrollIntoView(String selector)

Scroll to the specified position

selector params

String selector

attributetypeDefault valuesRequiredIntroductionsMinimum version
selectorstringyeselement selector3.0.45

sample code

javascript
ft.createSelectorQuery()
  .select('#scroll-view')
  .node()
  .exec((res) => {
    const scrollViewContext = res[0].node;
    scrollViewContext.scrollIntoView('.some-class');
  })

scrollTo

scrollTo(Object object)

Scroll to the specified position

selector params

Object object

attributetypeDefault valuesRequiredIntroductionsMinimum version
topnumbernodistance from top3.0.45
leftnumbernodistance from left3.0.45
velocitynumbernoinitial speed(Not supported)3.0.45
durationnumber300noscroll animation duration3.0.45
animatedbooleanfalsenoenable scrolling animation3.0.45

sample code

javascript
ft.createSelectorQuery()
  .select('#scroll-view')
  .node()
  .exec((res) => {
    const scrollViewContext = res[0].node;
    scrollViewContext.scrollTo({
      top: 0,
      duration: 400,
      animated: false
    });
  })

animation

createAnimation

Animation ft.createAnimation(Object object)

Create an animation instance animationCall the methods of the instance to describe the animation. Finally, through the animation instance export Method to export animation data passed to the component animation Property

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
durationnumber400noAnimation duration, unit ms
timingFunctionstring'linear'noAnimation effect
delaynumber0noAnimation delay time, unit ms
transformOriginstring'50% 50% 0'no

timingFunction Legal value

valueIntroductionsMinimum version
'linear'Animation moves at the same speed from start to finish
'ease'Animation starts at low speed, then speeds up and slows down before ending
'ease-in'Animation begins at low speed
'ease-in-out'Animation starts and ends at low speeds
'ease-out'Animation ends at low speed
'step-start'The first frame of the animation jumps to the end state until the end
'step-end'The animation stays in the start state until the last frame jumps to the end state

Return value

Animation

Animation

Animation object

method

  • Array.<Object> Animation.export()
    ​ Export the animation queue.export Method clears up the previous animation after each call

  • Animation Animation.step(Object object)
    Indicates that a set of animations is complete. You can call any number of animation methods in a group of animations, all animations in one group will start at the same time, one group of animation will be completed before the next group animation

  • Animation Animation.matrix()
    with transform-function matrix

  • Animation Animation.matrix3d()
    with transform-function matrix3d

  • Animation Animation.rotate(number angle)
    Rotate one angle clockwise from the origin

  • Animation Animation.rotate3d(number x, number y, number z, number angle)
    from fixed The axis rotates one angle clockwise

  • Animation Animation.rotateX(number angle)
    from X The axis rotates one angle clockwise

  • Animation Animation.rotateY(number angle)
    from And The axis rotates one angle clockwise

  • Animation Animation.rotateZ(number angle)
    from With The axis rotates one angle clockwise

  • Animation Animation.scale(number sx, number sy)
    scaling

  • Animation Animation.scale3d(number sx, number sy, number sz)
    scaling

  • Animation Animation.scaleX(number scale)
    scaling X axis

  • Animation Animation.scaleY(number scale)
    scaling Y axis

  • Animation Animation.scaleZ(number scale)
    scaling Z axis

  • Animation Animation.skew(number ax, number ay)
    Yes X、Y Tilt the axis

  • Animation Animation.skewX(number angle)
    Yes X Tilt the axis

  • Animation Animation.skewY(number angle)
    Yes Y Tilt the axis

  • Animation Animation.translate(number tx, number ty)
    Translation transformation

  • Animation Animation.translate3d(number tx, number ty, number tz)
    Yes xyz Coordinate translation

  • Animation Animation.translateX(number translation)
    Yes X Axial translation

  • Animation Animation.translateY(number translation)
    Yes Y Axial translation

  • Animation Animation.translateZ(number translation)
    Yes Z Axial translation

  • Animation Animation.opacity(number value)
    Set Transparency

  • Animation Animation.backgroundColor(string value)
    Set the background color

  • Animation Animation.width(number|string value)
    Set the width

  • Animation Animation.height(number|string value)
    Set Height

  • Animation Animation.left(number|string value)
    Set up left value

  • Animation Animation.right(number|string value)
    Set up right value

  • Animation Animation.top(number|string value)
    Set up top value

  • Animation Animation.bottom(number|string value)
    Set up bottom value

Custom components

nextTick

ft.nextTick(function callback)

Deferring some operations to the next slice of time. (similar to setTimeout)

parameter

function callback

Introductions

Because the custom component setData and triggerEvent Such interfaces are synchronous operations, when these interfaces are called consecutively, they are executed in a synchronous process, so if the logic is not appropriate, it may lead to errors.

An extreme case: when the parent component s setData That raises the Trigger Event, which causes the parent component to proceed once more SetData, with passing wx:if Statement can cause strange errors by uninstalling subcomponents, so you can use this interface to defer execution to the next time slice for logic that does not need to be completed in a synchronous process

sample code

js
Component({
  doSth() {
    this.setData({ number: 1 }) // Execute directly in the current synchronization process

    ft.nextTick(() => {
      this.setData({ number: 3 }) // After the current synchronization process ends, the next time slice executes
    })

    this.setData({ number: 2 }) // Execute directly in the current synchronization process
  }
})

getMenuButtonBoundingClientRect

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

Gets layout location information for the menu on the capsule on in the upper right corner. Coordinate information takes the upper-left corner of the screen as the origin

attributetypeIntroductions
widthnumberwidth in px
heightnumberheight, in px
topnumberCoordinates of the upper bound, in px
rightnumberCoordinates of the right border, in px
bottomnumbercoordinates of the bottom border, in px
leftnumberCoordinates of the left border, in px