ModalDialog.ModalDialog

ModalDialog.ModalDialog — A generic object that displays a modal dialog

Functions

_init ()
open ()
close ()
popModal ()
pushModal ()

Properties

ModalDialog.State state  
St.BoxLayout contentLayout  

Object Hierarchy

    Object
    ╰── BaseDialog.BaseDialog
        ╰── ModalDialog.ModalDialog
  

Description

The ModalDialog object is a generic popup dialog in Cinnamon. It can either be created directly and then manipulated afterwards, or used as a base class for more sophisticated modal dialog.

For simple usage such as displaying a message, or asking for confirmation, the ConfirmDialog and NotifyDialog classes may be used instead.

Functions

_init ()


_init (JSON   params);

Parameters

params

parameters for the modal dialog. Options include cinnamonReactive, which determines whether the modal dialog should block Cinnamon input, and styleClass, which is the style class the modal dialog should use.

 

open ()


open (int   timestamp);

Opens and displays the modal dialog.

Parameters

timestamp

(optional) timestamp optionally used to associate the call with a specific user initiated event

 

close ()


close (int   timestamp);

Closes the modal dialog.

Parameters

timestamp

(optional) timestamp optionally used to associate the call with a specific user initiated event

 

popModal ()


popModal (int   timestamp);

Drop modal status without closing the dialog; this makes the dialog insensitive as well, so it needs to be followed shortly by either a close() or a pushModal()

Parameters

timestamp

(optional) timestamp optionally used to associate the call with a specific user initiated event

 

pushModal ()


pushModal (int                   timestamp,
           Cinnamon.ActionMode   mode);

Pushes the modal to the modal stack so that it grabs the required inputs.

Parameters

timestamp

(optional) timestamp optionally used to associate the call with a specific user initiated event

 

mode

(optional) action mode, defaults to SYSTEM_MODAL

 

Property Details

The “state” property

  “state”                    ModalDialog.State

The state of the modal dialog, which may be ModalDialog.State.OPENED, CLOSED, OPENING or CLOSING.


The “contentLayout” property

  “contentLayout”            St.BoxLayout

The box containing the contents of the modal dialog (excluding the buttons)