## module:Messages()

display messages to the user in a nice UI

#### new module:Messages()
`modules/ui/Messages.js`, `line 92`

### Classes

#### ClosableMessage
`module:Messages~ClosableMessage`

#### ErrorMessage
`module:Messages~ErrorMessage`

#### LoadingMessage
`module:Messages~LoadingMessage`

#### Message
`module:Messages~Message`

#### WarningMessage
`module:Messages~WarningMessage`

### Members

#### $el :jQuery.element
`modules/ui/Messages.js`, `line 98`

  jQuery element that represents the message interface. This element contains all the currently displayed messages.

#### count :number
`modules/ui/Messages.js`, `line 104`

  number of currently displayed messages, has a specified setter and getter

#### count
`modules/ui/Messages.js`, `line 114`

  get the number of currently displayed messages

#### count
`modules/ui/Messages.js`, `line 125`

  Set the number of currently displayed messages. Should be called only through functions that add messages.

  If the message count is >= 1, the jQuery element for the UI is displayed, if the message count is <1, the UI is hidden.

### Methods

#### display()
`modules/ui/Messages.js`, `line 145`

  display the message box by removing the `hidden` class to the element

#### hide()
`modules/ui/Messages.js`, `line 138`

  hide the message box by adding a `hidden` class to the element

#### newErrorMessage(text) → {ErrorMessage}
`modules/ui/Messages.js`, `line 183`

  create a new error message and add it to the message box

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `text` | string | text of the message

  ##### Returns:

  ErrorMessage -

  the newly constructed ErrorMessage

#### newLoadingMessage(text) → {LoadingMessage}
`modules/ui/Messages.js`, `line 174`

  create a new loading message and add it to the message box

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `text` | string | text of the message

  ##### Returns:

  LoadingMessage -

  the newly constructed LoadingMessage

#### newMessage(text, constropt) → {Message}
`modules/ui/Messages.js`, `line 155`

  add a new message to the message box

  ##### Parameters:

  Name | Type | Attributes | Default | Description
  --- | --- | --- | --- | ---
  `text` | string |  |  | text of the message
  `constr` | Message | <optional> | Message | constructor of the message, must be a derivate of the Message class

  ##### Returns:

  Message -

  the newly constructed message (instance made by the specified constructor)

#### newWarningMessage(text) → {WarningMessage}
`modules/ui/Messages.js`, `line 192`

  create a new warning message and add it to the message box

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `text` | string | text of the message

  ##### Returns:

  WarningMessage -

  the newly constructed WarningMessage