fix some MinGW compiling errors

This commit is contained in:
Jinhao
2015-05-03 17:38:58 +08:00
parent 766b9a1e24
commit ad0dcc0bcf
3 changed files with 34 additions and 49 deletions

View File

@@ -449,7 +449,7 @@ namespace detail
{
(msgbox(modal_window, STR("An uncaptured std::exception during message pumping: ")).icon(msgbox::icon_information)
<<STR("\n in form: ") << API::window_caption(modal_window)
<<STR("\n exception : ") << e.what()
<<STR("\n exception : ") << e.what()
).show();
internal_scope_guard lock;
@@ -550,7 +550,7 @@ namespace detail
::ScreenToClient(reinterpret_cast<HWND>(wd->root), &point);
arg.upwards = (pmdec.mouse.button.wheel_delta >= 0);
arg.distance = std::abs(pmdec.mouse.button.wheel_delta);
arg.distance = static_cast<unsigned>(arg.upwards ? pmdec.mouse.button.wheel_delta : -pmdec.mouse.button.wheel_delta);
arg.pos.x = static_cast<int>(point.x) - wd->pos_root.x;
arg.pos.y = static_cast<int>(point.y) - wd->pos_root.y;
@@ -1641,7 +1641,7 @@ namespace detail
{
if (try_destroy)
native_interface::close_window(impl_->menu.window);
impl_->menu.window = impl_->menu.owner = nullptr;
impl_->menu.has_keyboard = false;
}
@@ -1687,7 +1687,7 @@ namespace detail
else if (::nana::category::flags::lite_widget == child->other.category)
map_through_widgets(child, drawable);
}
#endif
#endif
}
bool bedrock::emit(event_code evt_code, core_window_t* wd, const arg_mouse& arg, bool ask_update, thread_context* thrd)

View File

@@ -3,8 +3,8 @@
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* 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/msgbox.hpp
@@ -23,6 +23,7 @@
#include <nana/internationalization.hpp>
#include <nana/gui/filebox.hpp>
#include <functional>
#include <cstdlib> //include std::abs
#if defined(NANA_WINDOWS)
#include <windows.h>
#elif defined(NANA_X11)
@@ -489,7 +490,7 @@ namespace nana
close();
valid_input_ = true;
});
btn_cancel_.create(*this);
btn_cancel_.i18n(i18n_eval("Cancel"));
btn_cancel_.events().click.connect_unignorable([this]{
@@ -501,7 +502,7 @@ namespace nana
place_.bind(*this);
std::stringstream ss_content;
ss_content << "<margin=10 vert <desc weight=" << desc_extent.height << "><vert margin=[10]";
for (std::size_t i = 0; i < contents; ++i)
{
unsigned px = 27;
@@ -978,7 +979,7 @@ namespace nana
window inputbox::date::create(window parent, unsigned label_px)
{
auto today = ::nana::date().read();
auto impl = impl_.get();
impl->dock.create(parent);
@@ -1043,7 +1044,7 @@ namespace nana
auto day = impl->wdg_day.to_int();
impl->wdg_day.range(1, days, 1); //It resets the current value of wdg_day
if (day > days)
day = days;
@@ -1078,7 +1079,7 @@ namespace nana
: fbox(fb), label_text(std::move(labelstr))
{}
};
inputbox::path::path(::nana::string label, const filebox& fb)
: impl_(new implement(fb, std::move(label)))
{
@@ -1094,7 +1095,7 @@ namespace nana
return impl_->value;
}
//Implementation of abstract_content
const ::nana::string& inputbox::path::label() const
{