3DCoat  3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
coat::dialog Class Reference

the rich dialog. You may customize it, show your custom parameters and custom buttons. More...

#include <CoreAPI.h>

Public Member Functions

dialogtext (const char *id)
 pass the header text of the dialog More...
 
dialogcaption (const char *id)
 pass the caption of the dialog More...
 
dialogwidth (int w)
 change the default width More...
 
dialogmodal ()
 dialog will be modal. Generally, it is modal by default. Execution will be paused at show() till the user will press any dialog button. More...
 
dialognoModal ()
 dialog will be no modal. Execution will continue after you will call the show() More...
 
dialogbuttons (const char *list)
 pass the list of buttons for the dialog More...
 
dialogtopRight ()
 place the dialog at the top-right position of the viewport More...
 
dialogok ()
 add Ok button More...
 
dialogcancel ()
 add Cancel button More...
 
dialogyes ()
 add Yes button More...
 
dialogno ()
 add No buttin More...
 
dialogwarn ()
 add Warning icon More...
 
dialogquestion ()
 add Question icon More...
 
dialogundoWorks ()
 allow undo (CTR-Z) act even in modal dialog More...
 
dialogtransparentBackground ()
 the background will not be faded More...
 
dialogdontShowAgainCheckbox ()
 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. More...
 
dialogparams (BaseClass *params)
 The important core feature. BaseClass allows to create the custom controls in the dialog. Look the dialog example to understand how to use it. More...
 
dialogprocess (std::function< void()> process)
 pass the function/lambda that will be called each frame. But there is better way - override the ProcessInEditor for the BaseClass derived class and handle the processing there. More...
 
dialogonPress (std::function< void(int)> 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 More...
 
int show ()
 Show the dialog. This is usually the last command in the chain. More...
 

Detailed Description

the rich dialog. You may customize it, show your custom parameters and custom buttons.

Member Function Documentation

coat::dialog & coat::dialog::buttons ( const char *  list)

pass the list of buttons for the dialog

Parameters
listlist of buttons. |, .+; may be used as separators between identifiers
Returns
itself
coat::dialog & coat::dialog::cancel ( )

add Cancel button

Returns
itself
coat::dialog & coat::dialog::caption ( const char *  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
coat::dialog & coat::dialog::dontShowAgainCheckbox ( )

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
coat::dialog & coat::dialog::modal ( )

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
coat::dialog & coat::dialog::no ( )

add No buttin

Returns
itself
coat::dialog & coat::dialog::noModal ( )

dialog will be no modal. Execution will continue after you will call the show()

Returns
coat::dialog & coat::dialog::ok ( )

add Ok button

Returns
itself
coat::dialog & coat::dialog::onPress ( std::function< void(int)>  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
coat::dialog & coat::dialog::params ( BaseClass params)

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
coat::dialog & coat::dialog::process ( std::function< void()>  process)

pass the function/lambda that will be called each frame. But there is better way - override the ProcessInEditor for the BaseClass derived class and handle the processing there.

Parameters
processthe callback/lambda
Returns
itself
coat::dialog & coat::dialog::question ( )

add Question icon

Returns
itself
int coat::dialog::show ( )

Show the dialog. This is usually the last command in the chain.

Returns
the button index. First button in the list has index 1
coat::dialog & coat::dialog::text ( const char *  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.
coat::dialog & coat::dialog::topRight ( )

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

Returns
itself
coat::dialog & coat::dialog::transparentBackground ( )

the background will not be faded

Returns
itself
coat::dialog & coat::dialog::undoWorks ( )

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

Returns
itself
coat::dialog & coat::dialog::warn ( )

add Warning icon

Returns
itself
coat::dialog & coat::dialog::width ( 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
coat::dialog & coat::dialog::yes ( )

add Yes button

Returns
itself

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