const widget_factory_t& default_asl_widget_factory() { static bool inited(false); static widget_factory_t default_factory_s; if (!inited) { name_t name_row("row"_name); name_t name_column("column"_name); name_t name_overlay("overlay"_name); name_t name_reveal("reveal"_name); name_t name_preset("preset"_name); name_t name_preview("preview"_name); name_t name_static_text("static_text"_name); name_t name_control_button("control_button"_name); default_factory_s.reg(name_column, &column_factory, true, column_layout_attributes()); default_factory_s.reg(name_overlay, &overlay_factory, true, overlay_layout_attributes()); default_factory_s.reg(name_row, &row_factory, true, row_layout_attributes()); default_factory_s.reg(name_button, &make_button); default_factory_s.reg(name_checkbox, &make_checkbox); default_factory_s.reg(name_control_button, &make_control_button); default_factory_s.reg(name_dialog, &make_window, true, window_layout_attributes()); default_factory_s.reg(name_display_number, &implementation::make_display_number); default_factory_s.reg(name_edit_number, &make_edit_number); default_factory_s.reg(name_edit_text, &implementation::make_edit_text); default_factory_s.reg(name_group, &make_group, true, group_layout_attributes()); #ifndef ADOBE_PLATFORM_NO_IMAGE default_factory_s.reg(name_image, &implementation::make_image_hack); #endif default_factory_s.reg(name_toggle, &make_toggle); default_factory_s.reg(name_label, &implementation::make_label_hack); #ifndef ADOBE_PLATFORM_NO_LINK default_factory_s.reg(name_link, &make_link, false, link_layout_attributes()); #endif default_factory_s.reg(name_optional, &make_optional_panel, true, optional_panel_layout_attributes()); default_factory_s.reg(name_panel, &make_panel, true, panel_layout_attributes()); default_factory_s.reg(name_popup, &make_popup); #ifndef ADOBE_PLATFORM_NO_PRESETS default_factory_s.reg(name_preset, &make_presets); #endif default_factory_s.reg(name_preview, &make_preview); default_factory_s.reg(name_progress_bar, &make_progress_bar); default_factory_s.reg(name_radio_button, &make_radio_button); default_factory_s.reg(name_reveal, &make_reveal); default_factory_s.reg(name_separator, &make_separator, false, separator_layout_attributes()); default_factory_s.reg(name_slider, &make_slider); default_factory_s.reg(name_static_text, &implementation::make_label_hack); default_factory_s.reg(name_tab_group, &make_tab_group, true, tab_group_layout_attributes()); inited = true; } return default_factory_s; }
std::string getPDALDebugInformation() { std::string headline("------------------------------------------------------------------------------------------"); std::ostringstream os; os << headline << std::endl; os << "PDAL debug information" << std::endl ; os << headline << std::endl << std::endl; os << "Version information" << std::endl; os << headline << std::endl; os << "(" << pdal::GetFullVersionString() << ")" << std::endl; os << std::endl; os << "Debug build status" << std::endl; os << headline << std::endl << std::endl; os << PDAL_BUILD_TYPE << std::endl<< std::endl; os << "Enabled libraries" << std::endl; os << headline << std::endl << std::endl; boost::uint32_t special_column(32); boost::uint32_t name_column(20); boost::uint32_t url_column(40); std::ostringstream thdr; for (unsigned i = 0; i < name_column-1; ++i) thdr << "="; thdr << " "; for (unsigned i = 0; i < url_column-1; ++i) thdr << "="; thdr << " "; for (unsigned i = 0; i < special_column-1; ++i) thdr << "="; thdr << " "; name_column--; unsigned step_back(3); os << thdr.str() << std::endl; os << std::setw(name_column-step_back) << "Name" << std::setw(url_column-step_back) << "URL" << std::setw(special_column-step_back) << "Version" << std::endl; os << thdr.str() << std::endl ; #ifdef PDAL_HAVE_CARIS os << std::left << std::setw(name_column) << "CARIS" << std::right << std::setw(url_column) << "http://www.caris.com/" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_GEOS os << std::left << std::setw(name_column) << "GEOS" << std::right << std::setw(url_column) << "http://trac.osgeo.org/geos" << std::setw(special_column) << GEOS_VERSION << std::endl; #endif #ifdef PDAL_HAVE_GDAL os << std::left << std::setw(name_column) << "GDAL" << std::right << std::setw(url_column) << "http://www.gdal.org" << std::setw(special_column) << GDALVersionInfo("RELEASE_NAME") << std::endl; #endif #ifdef PDAL_HAVE_HEXER std::ostringstream hexerver; hexerver << HEXER_VERSION_MAJOR << "." << HEXER_VERSION_MINOR << "." << HEXER_VERSION_PATCH; os << std::left << std::setw(name_column) << "Hexer" << std::right << std::setw(url_column) << "http://github.com/hobu/hexer/" << std::setw(special_column) << hexerver.str() << std::endl; #endif #ifdef PDAL_HAVE_LASZIP std::ostringstream laszipver; laszipver << LASZIP_VERSION_MAJOR << "." << LASZIP_VERSION_MINOR << "." << LASZIP_VERSION_REVISION; os << std::left << std::setw(name_column) << "LASzip" << std::right << std::setw(url_column) << "http://laszip.org" << std::setw(special_column) << laszipver.str() << std::endl; #endif #ifdef PDAL_HAVE_LIBXML2 os << std::left << std::setw(name_column) << "libxml" << std::right << std::setw(url_column) << "http://www.xmlsoft.org/" << std::setw(special_column) << LIBXML_DOTTED_VERSION << std::endl; #endif #ifdef PDAL_HAVE_LIBGEOTIFF os << std::left << std::setw(name_column) << "libgeotiff" << std::right << std::setw(url_column) << "http://trac.osgeo.org/geotiff/" << std::setw(special_column) << LIBGEOTIFF_VERSION << std::endl; #endif #ifdef PDAL_HAVE_MRSID os << std::left << std::setw(name_column) << "MrSID" << std::right << std::setw(url_column) << "http://www.lizardtech.com" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_MSGPACK os << std::left << std::setw(name_column) << "MessagePack" << std::right << std::setw(url_column) << "http://msgpack.org/" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_NITRO os << std::left << std::setw(name_column) << "Nitro" << std::right << std::setw(url_column) << "http://github.com/hobu/nitro/" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_ORACLE os << std::left << std::setw(name_column) << "Oracle" << std::right << std::setw(url_column) << "http://www.oracle.com/" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_P2G os << std::left << std::setw(name_column) << "Points2grid" << std::right << std::setw(url_column) << "http://github.com/CRREL/points2grid/" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_PYTHON os << std::left << std::setw(name_column) << "Python" << std::right << std::setw(url_column) << "http://www.python.org" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_SOCI os << std::left << std::setw(name_column) << "SOCI" << std::right << std::setw(url_column) << "http://soci.sourceforge.net/" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_SQLITE os << std::left << std::setw(name_column) << "SQLite" << std::right << std::setw(url_column) << "http://www.sqlite.org/" << std::setw(special_column) << "" << std::endl; #endif #ifdef PDAL_HAVE_POSTGRESQL os << std::left << std::setw(name_column) << "PostgreSQL" << std::right << std::setw(url_column) << "http://github.com/pramsey/pointcloud/" << std::setw(special_column) << "" << std::endl; #endif os << thdr.str() << std::endl; return os.str(); }