3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.dialog Class Reference

Public Member Functions

 __init__ (self)
 
dialog text (self, str id)
 pass the header text of the dialog
 
dialog caption (self, str id)
 pass the caption of the dialog
 
dialog width (self, int w)
 change the default width
 
dialog modal (self)
 dialog will be modal.
 
dialog noModal (self)
 dialog will be no modal.
 
dialog buttons (self, str list)
 pass the list of buttons for the dialog
 
dialog topRight (self)
 place the dialog at the top-right position of the viewport
 
dialog ok (self)
 add Ok button
 
dialog cancel (self)
 add Cancel button
 
dialog yes (self)
 add Yes button
 
dialog no (self)
 add No button
 
dialog warn (self)
 add Warning icon
 
dialog question (self)
 add Question icon
 
dialog undoWorks (self)
 allow undo (CTR-Z) act even in modal dialog
 
dialog transparentBackground (self)
 the background will not be faded
 
dialog dontShowAgainCheckbox (self)
 show the checkbox "Don't show again".
 
dialog params (self, any params)
 The important core feature.
 
dialog process (self, any callback)
 pass the function/lambda that will be called each frame.
 
dialog onPress (self, any press)
 pass the function/lambda that will be called when the button will be pressed.
 
int show (self)
 Show the dialog.
 
dialog widget (self, any w)
 

Static Public Member Functions

bool fadeDialogsBackground ()
 returns the reference to the global property - fade modal dialogs background (true) or not (false)
 

Constructor & Destructor Documentation

◆ __init__()

coat.dialog.__init__ ( self)

Member Function Documentation

◆ buttons()

dialog coat.dialog.buttons ( self,
str list )

pass the list of buttons for the dialog

Parameters
listlist of buttons. |, .+; may be used as separators between identifiers
Returns
itself

◆ cancel()

dialog coat.dialog.cancel ( self)

add Cancel button

Returns
itself

◆ caption()

dialog coat.dialog.caption ( self,
str id )

pass the caption of the dialog

Parameters
idid the caption or caption identifier that will be used to take the text from the language file. You may press F9 to localize it in UI.
Returns
the chain ref

◆ dontShowAgainCheckbox()

dialog coat.dialog.dontShowAgainCheckbox ( self)

show the checkbox "Don't show again".

If user checks if the dialog will net be shown next time and show() will return 0 immediately.

Returns
itself

◆ fadeDialogsBackground()

bool coat.dialog.fadeDialogsBackground ( )
static

returns the reference to the global property - fade modal dialogs background (true) or not (false)

Returns
the property reference

◆ modal()

dialog coat.dialog.modal ( self)

dialog will be modal.

Generally, it is modal by default. Execution will be paused at show() till the user will press any dialog button.

Returns
itself

◆ no()

dialog coat.dialog.no ( self)

add No button

Returns
itself

◆ noModal()

dialog coat.dialog.noModal ( self)

dialog will be no modal.

Execution will continue after you will call the show()

◆ ok()

dialog coat.dialog.ok ( self)

add Ok button

Returns
itself

◆ onPress()

dialog coat.dialog.onPress ( self,
any press )

pass the function/lambda that will be called when the button will be pressed.

The button index (starts from 1) will be passed to the function

Parameters
pressthe callback/lambda
Returns
itself

◆ params()

dialog coat.dialog.params ( self,
any params )

The important core feature.

Pass the object to display object parameters in UI. Look the dialog example to understand how to use it.

Parameters
paramsthe class reference
Returns
itself

◆ process()

dialog coat.dialog.process ( self,
any callback )

pass the function/lambda that will be called each frame.

Parameters
callbackthe callback/lambda called each frame within the dialog
Returns
itself

◆ question()

dialog coat.dialog.question ( self)

add Question icon

Returns
itself

◆ show()

int coat.dialog.show ( self)

Show the dialog.

This is usually the last command in the chain.

Returns
the button index. First button in the list has index 1

◆ text()

dialog coat.dialog.text ( self,
str id )

pass the header text of the dialog

Parameters
idthe text or text identifier that will be used to take the text from the language file. You may press F9 to localize it in UI.
Returns
the reference to pass multiple options at chain.

◆ topRight()

dialog coat.dialog.topRight ( self)

place the dialog at the top-right position of the viewport

Returns
itself

◆ transparentBackground()

dialog coat.dialog.transparentBackground ( self)

the background will not be faded

Returns
itself

◆ undoWorks()

dialog coat.dialog.undoWorks ( self)

allow undo (CTR-Z) act even in modal dialog

Returns
itself

◆ warn()

dialog coat.dialog.warn ( self)

add Warning icon

Returns
itself

◆ widget()

dialog coat.dialog.widget ( self,
any w )

◆ width()

dialog coat.dialog.width ( self,
int w )

change the default width

Parameters
wthe width will be scaled in correspondence with the font size, so you may pass absolute values like 500
Returns
itself

◆ yes()

dialog coat.dialog.yes ( self)

add Yes button

Returns
itself

The documentation for this class was generated from the following file: