nana/include/nana/gui/wvl.hpp
cnjinhao b827e0aa82 multiple display monitors support
Added a new class screen
2015-01-02 13:25:46 +08:00

48 lines
1.1 KiB
C++

/*
* Nana GUI Library Definition
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* @file: nana/gui/wvl.hpp
* @description:
* the header file contains the files required for running of Nana.GUI
*/
#ifndef NANA_GUI_WVL_HPP
#define NANA_GUI_WVL_HPP
#include "programming_interface.hpp"
#include "screen.hpp"
#include "widgets/form.hpp"
#include "drawing.hpp"
#include "msgbox.hpp"
#include "../exceptions.hpp"
namespace nana
{
template<typename Form, bool IsMakeVisible = true>
class form_loader
{
public:
template<typename... Args>
Form & operator()(Args &&... args) const
{
Form* res = detail::bedrock::instance().rt_manager.create_form<Form>(std::forward<Args>(args)...);
if (nullptr == res)
throw nana::bad_window("form_loader.operator(): failed to create a window");
if (IsMakeVisible) res->show();
return *res;
}
};
void exec();
}//end namespace nana
#endif