Boost.UI
User Interface Boost library
cpp11/stacktrace.cpp

Boost.Stacktrace usage example

// Copyright (c) 2017 Kolya Kosenko
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// Show stacktrace in event handler.
#include <boost/ui.hpp>
#include <boost/stacktrace.hpp>
namespace ui = boost::ui;
int ui_main()
{
ui::dialog dlg("Boost.Stacktrace + Boost.UI example");
ui::button(dlg, "Show &stacktrace")
.on_press([]
{
std::ostringstream info;
info << boost::stacktrace::stacktrace();
ui::info_dialog(info.str());
});
dlg.show_modal();
return 0;
}
int main(int argc, char* argv[])
{
return ui::entry(&ui_main, argc, argv);
}
boost::ui
Boost.UI library namespace.
Definition: window.hpp:20
boost::ui::info_dialog
BOOST_UI_DECL void info_dialog(const uistring &message, const uistring &title=ascii("Information"))
Display information in application-modal dialog.
boost::ui::entry
int entry(int(*ui_main)(int, char *[]), int argc, char *argv[])
UI application entry.
ui.hpp
Master Boost.UI file.