the rich dialog. You may customize it, show your custom parameters and custom buttons.
More...
#include <CoreAPI.h>
|
| dialog & | text (const char *id) |
| | pass the header text of the dialog
|
| |
| dialog & | caption (const char *id) |
| | pass the caption of the dialog
|
| |
| dialog & | width (int w) |
| | change the default width
|
| |
| 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.
|
| |
| dialog & | noModal () |
| | dialog will be no modal. Execution will continue after you will call the show()
|
| |
| dialog & | buttons (const char *list) |
| | pass the list of buttons for the dialog
|
| |
| dialog & | topRight () |
| | place the dialog at the top-right position of the viewport
|
| |
| dialog & | ok () |
| | add Ok button
|
| |
| dialog & | cancel () |
| | add Cancel button
|
| |
| dialog & | yes () |
| | add Yes button
|
| |
| dialog & | no () |
| | add No button
|
| |
| dialog & | warn () |
| | add Warning icon
|
| |
| dialog & | question () |
| | add Question icon
|
| |
| dialog & | undoWorks () |
| | allow undo (CTR-Z) act even in modal dialog
|
| |
| dialog & | transparentBackground () |
| | the background will not be faded
|
| |
| 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.
|
| |
| 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.
|
| |
| dialog & | params (pybind11::object params) |
| | The important core feature. Pass the object to display object parameters in UI. Look the dialog example to understand how to use it.
|
| |
| dialog & | process (pybind11::object callback) |
| | pass the function/lambda that will be called each frame.
|
| |
| 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.
|
| |
| 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
|
| |
|
dialog & | onPress (pybind11::object press) |
| |
| int | show () |
| | Show the dialog. This is usually the last command in the chain.
|
| |
|
dialog & | widget (BaseWidget *w) |
| |
|
| static bool & | fadeDialogsBackground () |
| | returns the reference to the global property - fade modal dialogs background (true) or not (false)
|
| |
the rich dialog. You may customize it, show your custom parameters and custom buttons.
- Examples
- Arrays.cpp, HelloWorld.cpp, HoneyComb.cpp, Strings.cpp, TreesGenerator.cpp, capsule.cpp, dialogs.cpp, ellipses.cpp, ffCube.cpp, ffCylinder.cpp, gear.cpp, meshes.cpp, meshes_surface_merge.cpp, metaballs.cpp, spheres.cpp, spiral.cpp, square_volume.cpp, thread.cpp, threadStud.cpp, and tube.cpp.
◆ buttons()
| dialog & coat::dialog::buttons |
( |
const char * | list | ) |
|
pass the list of buttons for the dialog
- Parameters
-
| list | list of buttons. |, .+; may be used as separators between identifiers |
- Returns
- itself
◆ cancel()
| dialog & coat::dialog::cancel |
( |
| ) |
|
add Cancel button
- Returns
- itself
- Examples
- HoneyComb.cpp, capsule.cpp, dialogs.cpp, ellipses.cpp, ffCube.cpp, ffCylinder.cpp, gear.cpp, meshes.cpp, meshes_surface_merge.cpp, metaballs.cpp, spheres.cpp, spiral.cpp, thread.cpp, threadStud.cpp, and tube.cpp.
◆ caption()
| dialog & coat::dialog::caption |
( |
const char * | id | ) |
|
◆ dontShowAgainCheckbox()
| 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
- Examples
- TreesGenerator.cpp.
◆ fadeDialogsBackground()
| static 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 |
( |
| ) |
|
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()
add No button
- Returns
- itself
◆ noModal()
| dialog & coat::dialog::noModal |
( |
| ) |
|
dialog will be no modal. Execution will continue after you will call the show()
- Returns
◆ ok()
add Ok button
- Returns
- itself
- Examples
- Arrays.cpp, HelloWorld.cpp, HoneyComb.cpp, Strings.cpp, TreesGenerator.cpp, capsule.cpp, dialogs.cpp, ellipses.cpp, ffCube.cpp, ffCylinder.cpp, gear.cpp, meshes.cpp, meshes_surface_merge.cpp, metaballs.cpp, spheres.cpp, spiral.cpp, square_volume.cpp, thread.cpp, threadStud.cpp, and tube.cpp.
◆ onPress()
| 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
-
- Returns
- itself
- Examples
- dialogs.cpp.
◆ params() [1/2]
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
-
| params | the pointer to the class derived from the BaseClass |
- Returns
- itself
- Examples
- HoneyComb.cpp, capsule.cpp, dialogs.cpp, ellipses.cpp, ffCube.cpp, ffCylinder.cpp, gear.cpp, meshes.cpp, meshes_surface_merge.cpp, metaballs.cpp, spheres.cpp, spiral.cpp, square_volume.cpp, thread.cpp, threadStud.cpp, and tube.cpp.
◆ params() [2/2]
| dialog & coat::dialog::params |
( |
pybind11::object | 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
-
| params | the class reference |
- Returns
- itself
◆ process() [1/2]
| dialog & coat::dialog::process |
( |
pybind11::object | callback | ) |
|
pass the function/lambda that will be called each frame.
- Parameters
-
| callback | the callback/lambda called each frame within the dialog |
- Returns
- itself
◆ process() [2/2]
| 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
-
| process | the callback/lambda |
- Returns
- itself
◆ question()
| dialog & coat::dialog::question |
( |
| ) |
|
add Question icon
- Returns
- itself
◆ show()
| 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
- Examples
- Arrays.cpp, HelloWorld.cpp, HoneyComb.cpp, Strings.cpp, TreesGenerator.cpp, capsule.cpp, ellipses.cpp, ffCube.cpp, ffCylinder.cpp, gear.cpp, meshes.cpp, meshes_surface_merge.cpp, metaballs.cpp, spheres.cpp, spiral.cpp, square_volume.cpp, thread.cpp, threadStud.cpp, and tube.cpp.
◆ text()
| dialog & coat::dialog::text |
( |
const char * | id | ) |
|
◆ topRight()
| dialog & coat::dialog::topRight |
( |
| ) |
|
place the dialog at the top-right position of the viewport
- Returns
- itself
◆ transparentBackground()
| dialog & coat::dialog::transparentBackground |
( |
| ) |
|
the background will not be faded
- Returns
- itself
◆ undoWorks()
| dialog & coat::dialog::undoWorks |
( |
| ) |
|
allow undo (CTR-Z) act even in modal dialog
- Returns
- itself
◆ warn()
| dialog & coat::dialog::warn |
( |
| ) |
|
add Warning icon
- Returns
- itself
◆ width()
| dialog & coat::dialog::width |
( |
int | w | ) |
|
change the default width
- Parameters
-
| w | the 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 |
( |
| ) |
|
add Yes button
- Returns
- itself
The documentation for this class was generated from the following file: