Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::inputbox Class Reference

Classes

class  boolean
 Shows a checkbox for boolean input. More...
 
class  date
 Date input. More...
 
class  integer
 Integer input. More...
 
class  path
 
class  real
 Floating-point number input. More...
 
class  text
 String input or an option from a dropdown list. More...
 

Public Member Functions

 inputbox (window owner,::std::string description,::std::string title=::std::string())
 
void image (::nana::paint::image image, bool is_left, const rectangle &valid_area={})
 shows images at left/right side of inputbox More...
 
void image_v (::nana::paint::image, bool is_top, const rectangle &valid_area={})
 shows images at top/bottom side of inputbox More...
 
template<typename... Args>
bool show (Args &&...args)
 
template<typename... Args>
bool show_modal (Args &&...args)
 
void verify (std::function< bool(window)> verifier)
 Sets a verifier to verify the user input, taking a handle to the inputbox. More...
 
void min_width_entry_field (unsigned pixels)
 

Detailed Description

Simple convenience dialog to get values from the user.

The input value can be a boolean, string, a number, an option from a dropdown list or a date.

Examples:
inputbox.cpp.

Constructor & Destructor Documentation

nana::inputbox::inputbox ( window  owner,
::std::string  description,
::std::string  title = ::std::string() 
)
Parameters
ownerA handle to an owner window (just a parent form or widget works)
descriptiontells users what the purpose for the input. It can be a formatted-text.
titleThe title for the inputbox.

Member Function Documentation

void nana::inputbox::image ( ::nana::paint::image  image,
bool  is_left,
const rectangle valid_area = {} 
)

shows images at left/right side of inputbox

Parameters
imageThe image
is_lefttrue to place the image at left side, false to the right side
valid_areaThe area of the image to be displayed
Examples:
inputbox.cpp.
void nana::inputbox::image_v ( ::nana::paint::image  img,
bool  is_top,
const rectangle valid_area = {} 
)

shows images at top/bottom side of inputbox

Parameters
imgThe image
is_toptrue to place the image at top side, false at bottom side
valid_areaThe area of the image to be displayed
Examples:
inputbox.cpp.
void nana::inputbox::min_width_entry_field ( unsigned  pixels)
    Sets the minimum width for the entry fields
Parameters
[in]pixelsnew minimum width

If not called, the default is 100 pixels

template<typename... Args>
bool nana::inputbox::show ( Args &&...  args)
inline

Shows the inputbox and wait for the user input.

This method shows the inputbox without preventing the user interacts with other windows.

Examples:
inputbox.cpp.
template<typename... Args>
bool nana::inputbox::show_modal ( Args &&...  args)
inline

Shows the inputbox and wait for the user input blocking other windows.

This method blocks the execution and prevents user interaction with other windows until the inputbox is closed.

void nana::inputbox::verify ( std::function< bool(window)>  verifier)

Sets a verifier to verify the user input, taking a handle to the inputbox.

Examples:
inputbox.cpp.