3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
coat.dialog Class Reference

Public Member Functions

 __init__ (self)
 
dialog text (self, id=str)
 pass the header text of the dialog
 
dialog caption (self, id=str)
 pass the caption of the dialog
 
dialog width (self, w=int)
 change the default width
 
dialog modal (self)
 dialog will be modal.
 
dialog noModal (self)
 dialog will be no modal.
 
dialog buttons (self, list=str)
 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
 
bool fadeDialogsBackground ()
 returns the reference to the global property - fade modal dialogs background (true) or not (false)
 
dialog dontShowAgainCheckbox (self)
 show the checkbox "Don't show again".
 
dialog params (self, params=Any)
 The important core feature.
 
dialog params (self, params=Any)
 The important core feature.
 
dialog process (self, callback=Any)
 pass the function/lambda that will be called each frame.
 
dialog onPress (self, press=Any)
 pass the function/lambda that will be called when the button will be pressed.
 
int show (self)
 Show the dialog.
 
dialog widget (self, w=Any)
 Show the dialog.
 

Constructor & Destructor Documentation

◆ __init__()

coat.dialog.__init__ (   self)

Member Function Documentation

◆ buttons()

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

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,
  id = str 
)

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 ( )

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()

Returns

◆ ok()

dialog coat.dialog.ok (   self)

add Ok button

Returns
itself

◆ onPress()

dialog coat.dialog.onPress (   self,
  press = Any 
)

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() [1/2]

dialog coat.dialog.params (   self,
  params = Any 
)

The important core feature.

BaseClass allows to create the custom controls in the dialog. Look the dialog example to understand how to use it.

Parameters
paramsthe pointer to the class derived from the BaseClass
Returns
itself

◆ params() [2/2]

dialog coat.dialog.params (   self,
  params = Any 
)

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,
  callback = Any 
)

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,
  id = str 
)

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,
  w = Any 
)

Show the dialog.

This is usually the last command in the chain.

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

◆ width()

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

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: