WanaPlan

API Docs for: 2.7.0
Show:

ExitComponent

Module: Component
Parent Module: Wanaplan

Summary

This component is responsible to quit the application and redirect the user to an external URL.

Constructor

ExitComponent

Syntax

ExitComponent

(
  • core
)

Summary

Parameters:

  • core Core

    Wanaplan Core.

Methods

destroy

Inherited from BaseComponent2D

Syntax

destroy

()

Summary

Called when the component is destroyed. The menu item is removed.

disable

Inherited from BaseComponent2D:

Syntax

disable

()

Summary

Disables the component

doExit

Syntax

doExit

(
  • event
)

Summary

Exits the plan and redirects the user to the exit url (see api.exitUrl)

Parameters:

  • event Object

    The event object.

enable

Inherited from BaseComponent2D:

Syntax

enable

()

Summary

Enables the component

exit

Syntax

exit

(
  • event
)

Summary

Displays a confirm dialog and exits if the user clicks on exit button.

Parameters:

  • event Object

    The event object.

getTargeted

Inherited from BaseComponent2D:

Syntax

getTargeted

(
  • vector
)
Object

Summary

Finds out if the given position is over an element handled by the component

Parameters:

  • vector Vector

    A position, usually the cursor's one.

Returns:

Object:

The targeted element, or null if nothing is found.

initialize

Inherited from BaseComponent2D

Syntax

initialize

()

Summary

Initializes the component by adding a new entry in the top menu.

onContextChanged

Inherited from BaseComponent2D:

Syntax

onContextChanged

(
  • context
)

Summary

Method called when the context is switched (2D -> 3D or 3D -> 2D)

Parameters:

  • context String
    The new context

startListening

Inherited from BaseComponent2D:

Syntax

startListening

()

Summary

Calls all the event listeners.

stopListening

Inherited from BaseComponent2D:

Syntax

stopListening

()

Summary

Removes all the event listeners.

update

Inherited from BaseComponent2D:

Syntax

update

()

Summary

Generic update method, called on every frame

Properties

name

Inherited from BaseComponent2D:

Syntax

name

String

Summary

Component name

priority

Inherited from BaseComponent2D:

Syntax

priority

Number

Summary

Priority of the component in the "update" and "draw" routines

structure

Inherited from BaseComponent2D:

Syntax

structure

wnp.Structure

Summary

Structure file instance (shortcut to wanaplan.structure). This is the base object where the whole plan is saved

Events

wnp.menu.top.add

Inherited from BaseTopMenuComponent2D:

Syntax

wnp.menu.top.add

Summary

Fired to add a menu item into the top menu.

wnp.menu.top.delete

Inherited from BaseTopMenuComponent2D:

Syntax

wnp.menu.top.delete

Summary

Fired to delete a menu item from the top menu.

wnp.menu.top.sub.add

Inherited from BaseTopMenuComponent2D:

Syntax

wnp.menu.top.sub.add

Summary

Fired to add a menu item into the sub menu.

wnp.menu.top.sub.delete

Inherited from BaseTopMenuComponent2D:

Syntax

wnp.menu.top.sub.delete

Summary

Fired to delete a menu item from the sub menu.

wnp.request.exit

Syntax

wnp.request.exit

Summary

Fired to quit Wanaplan.

wnp.request.exited

Syntax

wnp.request.exited

Summary

Fired when quitting Wanaplan.