nana::form
Defined in header
class form;
The form widget represents a popup window. Overall it is a root widget(see Overview of widgets) which attaches the OS/Windowing system native window.
Public base classes
widget_object : public widget
Member typedefs
Member functions
Example
When you define an object of form widget, the UI element start immediately.
#include
int main()
{
using namespace nana;
form fm;
fm.show(); //It's OK, because UI was started when it constructed.
exec();
}
Create a modal form.
A modal form is to block the routine and only interacts with the specified form until the specified form is closed. Generally, a modal form is created during an event handler function, such as click a button and open a form to ask user for inputs.
int main()
{
using namespace nana;
form fm;
fm.events().click([&fm]{
form fm_modal(fm); //A owner is required for the modal form
fm_modal.modality(); //It shows the fm_modal and enters a routine for modal form.
std::cout<<"modal form was closed"<
See also
Overview of widgets, nested_form