remove physical dependency between msgbox and filebox

This commit is contained in:
Jinhao 2015-03-11 03:45:22 +08:00
parent 0df28e13e1
commit a8573fe5ef
3 changed files with 6 additions and 9 deletions

View File

@ -14,10 +14,12 @@
#define NANA_GUI_MSGBOX_HPP #define NANA_GUI_MSGBOX_HPP
#include <sstream> #include <sstream>
#include <nana/gui/filebox.hpp>
namespace nana namespace nana
{ {
//Forward declaration of filebox for msgbox
class filebox;
/// Prefabricated modal dialog box (with text, icon and actions buttons) that inform and instruct the user. /// Prefabricated modal dialog box (with text, icon and actions buttons) that inform and instruct the user.
class msgbox class msgbox
{ {
@ -43,11 +45,8 @@ namespace nana
/// Construct that creates a message box with a specified title and default button. /// Construct that creates a message box with a specified title and default button.
msgbox(const nana::string&); msgbox(const nana::string&);
/// Construct that creates a message box with an owner window and a specified title.
msgbox(window, const nana::string&);
/// Construct that creates a message box with an owner windoow, a specified title and buttons. /// Construct that creates a message box with an owner windoow, a specified title and buttons.
msgbox(window, const nana::string&, button_t); msgbox(window, const nana::string&, button_t = ok);
/// Sets an icon for informing user. /// Sets an icon for informing user.
msgbox& icon(icon_t); msgbox& icon(icon_t);

View File

@ -11,6 +11,7 @@
*/ */
#include <nana/gui.hpp> #include <nana/gui.hpp>
#include <nana/gui/filebox.hpp>
#include <nana/filesystem/fs_utility.hpp> #include <nana/filesystem/fs_utility.hpp>
#if defined(NANA_WINDOWS) #if defined(NANA_WINDOWS)

View File

@ -21,6 +21,7 @@
#include <nana/gui/place.hpp> #include <nana/gui/place.hpp>
#include <nana/datetime.hpp> #include <nana/datetime.hpp>
#include <nana/internationalization.hpp> #include <nana/internationalization.hpp>
#include <nana/gui/filebox.hpp>
#include <functional> #include <functional>
#if defined(NANA_WINDOWS) #if defined(NANA_WINDOWS)
#include <windows.h> #include <windows.h>
@ -354,10 +355,6 @@ namespace nana
: wd_(nullptr), title_(title), button_(ok), icon_(icon_none) : wd_(nullptr), title_(title), button_(ok), icon_(icon_none)
{} {}
msgbox::msgbox(window wd, const nana::string& title)
: wd_(wd), title_(title), button_(ok), icon_(icon_none)
{}
msgbox::msgbox(window wd, const nana::string& title, button_t b) msgbox::msgbox(window wd, const nana::string& title, button_t b)
: wd_(wd), title_(title), button_(b), icon_(icon_none) : wd_(wd), title_(title), button_(b), icon_(icon_none)
{} {}