From 757a97e1e47318c55ae9ff99ec0d6b5d5bfdd927 Mon Sep 17 00:00:00 2001 From: Gammasoft Date: Tue, 25 Feb 2025 11:06:50 +0100 Subject: [PATCH] Add xtd::drawing::image::from_xbm_data and xtd::drawing::image::from_xpm_data methods --- .../xtd/drawing/native/wxwidgets/image.cpp | 11 +++ .../include/xtd/drawing/native/image.hpp | 13 +++- .../include/xtd/drawing/bitmap.hpp | 2 + src/xtd.drawing/include/xtd/drawing/image.hpp | 21 ++++- src/xtd.drawing/src/xtd/drawing/image.cpp | 46 ++++++++--- tools/xtdc-gui/src/main_form.cpp | 8 +- tools/xtdc-gui/src/main_form.hpp | 8 +- .../src/project_type_items_control.hpp | 78 +++++++++---------- 8 files changed, 124 insertions(+), 63 deletions(-) diff --git a/src/xtd.drawing.native.wxwidgets/src/xtd/drawing/native/wxwidgets/image.cpp b/src/xtd.drawing.native.wxwidgets/src/xtd/drawing/native/wxwidgets/image.cpp index 276d63632868..74e8ff7c38c3 100644 --- a/src/xtd.drawing.native.wxwidgets/src/xtd/drawing/native/wxwidgets/image.cpp +++ b/src/xtd.drawing.native.wxwidgets/src/xtd/drawing/native/wxwidgets/image.cpp @@ -280,6 +280,17 @@ intptr image::create(const char* const* bits, std::map& frame_re return reinterpret_cast(img); } +intptr image::create(const unsigned char* bits, int32 width, int32 height, std::map& frame_resolutions) { + toolkit::initialize(); // Must be first + auto img = new wxImage(wxBitmap((char*)bits, width, height).ConvertToImage()); + if (!img->IsOk()) { + delete img; + return invalid_handle; + } + frame_resolutions[get_frame_resolution(*img)] = 1; + return reinterpret_cast(img); +} + intptr image::create(int32 width, int32 height) { toolkit::initialize(); // Must be first wxImage* img = new wxImage(width, height); diff --git a/src/xtd.drawing.native/include/xtd/drawing/native/image.hpp b/src/xtd.drawing.native/include/xtd/drawing/native/image.hpp index 88ad67bb4803..b0a0cf9ab389 100644 --- a/src/xtd.drawing.native/include/xtd/drawing/native/image.hpp +++ b/src/xtd.drawing.native/include/xtd/drawing/native/image.hpp @@ -6,9 +6,9 @@ /// @endcond #include -#include #include #include +#include #include #include #include @@ -325,9 +325,18 @@ namespace xtd { /// @param bits The bits containing the image. /// @param frame_resolutions an std::map containing the frame dimention and the image count collection (see frame_dimension.h for more information). /// @return A new image handle. - /// @remarks This method is used for creating an imgae from an XPM (or XBM) image. + /// @remarks This method is used for creating an imgae from an XPM image. /// @warning Internal use only static intptr create(const char* const* bits, std::map& frame_resolutions); + /// @brief Creates an image from bits. + /// @param bits The bits containing the image. + /// @param width The width for the image. + /// @param height The height for the image. + /// @param frame_resolutions an std::map containing the frame dimention and the image count collection (see frame_dimension.h for more information). + /// @return A new image handle. + /// @remarks This method is used for creating an imgae from an XBM image. + /// @warning Internal use only + static intptr create(const unsigned char* bits, int32 width, int32 height, std::map& frame_resolutions); /// @brief Creates an empty image from size. /// @param width The width for the empty image. /// @param height The height for the empty image. diff --git a/src/xtd.drawing/include/xtd/drawing/bitmap.hpp b/src/xtd.drawing/include/xtd/drawing/bitmap.hpp index 9dc88a495f1f..86aa1df5d8e7 100644 --- a/src/xtd.drawing/include/xtd/drawing/bitmap.hpp +++ b/src/xtd.drawing/include/xtd/drawing/bitmap.hpp @@ -72,6 +72,8 @@ namespace xtd { explicit bitmap(std::istream& stream, bool use_icm); /// @brief Initializes a new instance of the bitmap class from the specified data xpm. /// @param bits The data xpm used to load the image. + /// @deprecated Replaced by xtd::drawing::image::from_xpm - Will be removed in version 0.4.0. + [[deprecated("Replaced by xtd::drawing::image::from_xpm - Will be removed in version 0.4.0.")]] explicit bitmap(const char* const* bits); /// @brief Initializes a new instance of the xtd::drawing::bitmap class with the specified size. /// @param width The width, in pixels, of the new bitmap. diff --git a/src/xtd.drawing/include/xtd/drawing/image.hpp b/src/xtd.drawing/include/xtd/drawing/image.hpp index 828a8b766279..1c14a00da6b8 100644 --- a/src/xtd.drawing/include/xtd/drawing/image.hpp +++ b/src/xtd.drawing/include/xtd/drawing/image.hpp @@ -297,11 +297,27 @@ namespace xtd { static image from_stream(std::istream& stream); /// @brief Creates an xtd::drawing::image from the specified data pointer. - /// @param data A pointer that contains the data for this xtd::drawing::image. + /// @param data A pointer that contains the data for the xtd::drawing::image. /// @return The xtd::drawing::image this method creates. - /// @remarks This method is used for creating a xtd::drawing::image from an XPM (or XBM) image. + /// @remarks This method is used for creating a xtd::drawing::image from an XPM image. + /// @deprecated Replaced by xtd::drawing::image::from_xpm - Will be removed in version 0.4.0. + [[deprecated("Replaced by xtd::drawing::image::from_xpm - Will be removed in version 0.4.0.")]] static image from_data(const char* const* bits); + /// @brief Creates an xtd::drawing::image from the specified data pointer, width and hieght. + /// @param data A pointer that contains the data for the xtd::drawing::image. + /// @param width The width for the xtd::drawing::image. + /// @param height The height for the xtd::drawing::image. + /// @return The xtd::drawing::image this method creates. + /// @remarks This method is used for creating a xtd::drawing::image from an XBM image. + static bitmap from_xbm_data(const unsigned char* bits, int32 width, int32 height); + + /// @brief Creates an xtd::drawing::image from the specified data pointer. + /// @param data A pointer that contains the data for the xtd::drawing::image. + /// @return The xtd::drawing::image this method creates. + /// @remarks This method is used for creating a xtd::drawing::image from an XPM image. + static bitmap from_xpm_data(const char* const* bits); + /// @brief Returns the color depth, in number of bits per pixel, of the specified pixel format. /// @param pixfmt The xtd::drawing::imaging::pixel_format member that specifies the format for which to find the size. /// @return The color depth of the specified pixel format. @@ -330,6 +346,7 @@ namespace xtd { explicit image(const xtd::string& filename, bool use_icm); explicit image(std::istream& stream); explicit image(std::istream& stream, bool use_icm); + [[deprecated("Replaced by xtd::drawing::image::from_xpm - Will be removed in version 0.4.0.")]] explicit image(const char* const* bits); image(int32 width, int32 height); image(int32 width, int32 height, float horizontal_resolution, float vertical_resolution); diff --git a/src/xtd.drawing/src/xtd/drawing/image.cpp b/src/xtd.drawing/src/xtd/drawing/image.cpp index 01332ab3acbc..947ce33fe4cd 100644 --- a/src/xtd.drawing/src/xtd/drawing/image.cpp +++ b/src/xtd.drawing/src/xtd/drawing/image.cpp @@ -125,17 +125,7 @@ image::image(std::istream& stream, bool use_icm) : data_(xtd::new_sptr()) } image::image(const char* const* bits) : data_(xtd::new_sptr()) { - auto frame_resolutions = std::map {}; - data_->handle = native::image::create(bits, frame_resolutions); - if (data_->handle == invalid_handle) throw_helper::throws(exception_case::argument); - data_->raw_format = imaging::image_format::memory_xpm(); - for (auto frame_resolution : frame_resolutions) { - if (frame_resolution.first == FD_PAGE) data_->frame_dimensions[imaging::frame_dimension::page().guid()] = frame_resolution.second; - else if (frame_resolution.first == FD_RESOLUTION) data_->frame_dimensions[imaging::frame_dimension::resolution().guid()] = frame_resolution.second; - else if (frame_resolution.first == FD_TIME) data_->frame_dimensions[imaging::frame_dimension::time().guid()] = frame_resolution.second; - else throw_helper::throws(exception_case::argument); - } - update_properties(); + *this = from_xpm_data(bits); } image::image(int32 width, int32 height) : data_(xtd::new_sptr()) { @@ -406,7 +396,7 @@ image image::from_stream(std::istream& stream) { // stream param can't be const } image image::from_data(const char* const* bits) { - return image {bits}; + return from_xpm_data(bits); } image image::from_hicon(intptr hicon) { @@ -417,6 +407,38 @@ image image::from_hicon(intptr hicon) { return result; } +bitmap image::from_xbm_data(const unsigned char* bits, int32 width, int32 height) { + auto img = image {}; + auto frame_resolutions = std::map {}; + img.data_->handle = native::image::create(bits, width, height, frame_resolutions); + if (img.data_->handle == invalid_handle) throw_helper::throws(exception_case::argument); + img.data_->raw_format = imaging::image_format::memory_xpm(); + for (auto frame_resolution : frame_resolutions) { + if (frame_resolution.first == FD_PAGE) img.data_->frame_dimensions[imaging::frame_dimension::page().guid()] = frame_resolution.second; + else if (frame_resolution.first == FD_RESOLUTION) img.data_->frame_dimensions[imaging::frame_dimension::resolution().guid()] = frame_resolution.second; + else if (frame_resolution.first == FD_TIME) img.data_->frame_dimensions[imaging::frame_dimension::time().guid()] = frame_resolution.second; + else throw_helper::throws(exception_case::argument); + } + img.update_properties(); + return bitmap {img}; +} + +bitmap image::from_xpm_data(const char* const* bits) { + auto img = image {}; + auto frame_resolutions = std::map {}; + img.data_->handle = native::image::create(bits, frame_resolutions); + if (img.data_->handle == invalid_handle) throw_helper::throws(exception_case::argument); + img.data_->raw_format = imaging::image_format::memory_xpm(); + for (auto frame_resolution : frame_resolutions) { + if (frame_resolution.first == FD_PAGE) img.data_->frame_dimensions[imaging::frame_dimension::page().guid()] = frame_resolution.second; + else if (frame_resolution.first == FD_RESOLUTION) img.data_->frame_dimensions[imaging::frame_dimension::resolution().guid()] = frame_resolution.second; + else if (frame_resolution.first == FD_TIME) img.data_->frame_dimensions[imaging::frame_dimension::time().guid()] = frame_resolution.second; + else throw_helper::throws(exception_case::argument); + } + img.update_properties(); + return bitmap {img}; +} + drawing::color image::get_pixel(int32 x, int32 y) const { if (x < 0 || x > width() || y < 0 || y > height()) throw_helper::throws(exception_case::argument); diff --git a/tools/xtdc-gui/src/main_form.cpp b/tools/xtdc-gui/src/main_form.cpp index 0143883435d8..8769fbc328a8 100644 --- a/tools/xtdc-gui/src/main_form.cpp +++ b/tools/xtdc-gui/src/main_form.cpp @@ -104,7 +104,7 @@ main_form::main_form() { startup_open_project_button_.parent(startup_panel_); startup_open_project_button_.image(images::from_name("document-open", drawing::size {48, 48})); - startup_open_project_button_.image(bitmap(xtd_open_icon)); + startup_open_project_button_.image(bitmap::from_xpm_data(xtd_open_icon)); startup_open_project_button_.image_align(content_alignment::middle_left); startup_open_project_button_.text("Open a project or solution"); startup_open_project_button_.location({startup_panel_.size().width - 400, 175}); @@ -115,7 +115,7 @@ main_form::main_form() { startup_run_project_button_.parent(startup_panel_); startup_run_project_button_.image(images::from_name("system-run", drawing::size {48, 48})); - startup_run_project_button_.image(bitmap(xtd_run_icon)); + startup_run_project_button_.image(bitmap::from_xpm_data(xtd_run_icon)); startup_run_project_button_.image_align(content_alignment::middle_left); startup_run_project_button_.text("Run a project"); startup_run_project_button_.location({startup_panel_.size().width - 400, 285}); @@ -126,7 +126,7 @@ main_form::main_form() { startup_new_project_button_.parent(startup_panel_); startup_new_project_button_.image(images::from_name("document-new", drawing::size {48, 48})); - startup_new_project_button_.image(bitmap(xtd_new_icon)); + startup_new_project_button_.image(bitmap::from_xpm_data(xtd_new_icon)); startup_new_project_button_.image_align(content_alignment::middle_left); startup_new_project_button_.text("Create a new project"); startup_new_project_button_.location({startup_panel_.size().width - 400, 395}); @@ -137,7 +137,7 @@ main_form::main_form() { startup_open_xtd_examples_button_.parent(startup_panel_); startup_open_xtd_examples_button_.image(images::from_name("xtd", drawing::size {48, 48})); - startup_open_xtd_examples_button_.image(bitmap(xtd_open_examples_icon)); + startup_open_xtd_examples_button_.image(bitmap::from_xpm_data(xtd_open_examples_icon)); startup_open_xtd_examples_button_.image_align(content_alignment::middle_left); startup_open_xtd_examples_button_.text("Open xtd examples"); startup_open_xtd_examples_button_.location({startup_panel_.size().width - 400, 505}); diff --git a/tools/xtdc-gui/src/main_form.hpp b/tools/xtdc-gui/src/main_form.hpp index 65ecf8e9ac85..c36859a480c4 100644 --- a/tools/xtdc-gui/src/main_form.hpp +++ b/tools/xtdc-gui/src/main_form.hpp @@ -131,10 +131,10 @@ namespace xtdc_gui { settings_form settings_form_; - xtd::forms::menu_item file_open_project_menu_item_ {"Open a project or solution", {*this, overload_<>(&main_form::open_project)}, xtd::drawing::bitmap(xtd::drawing::bitmap(xtd_open_examples_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_o}; - xtd::forms::menu_item file_run_project_menu_item_ {"Run a project", {*this, overload_<>(&main_form::run_project)}, xtd::drawing::bitmap(xtd::drawing::bitmap(xtd_run_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_r}; - xtd::forms::menu_item file_create_new_project_menu_item_ {"Create new project", {*this, overload_<>(&main_form::new_project)}, xtd::drawing::bitmap(xtd::drawing::bitmap(xtd_new_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_n}; - xtd::forms::menu_item file_open_xtd_examples_menu_item_ {"Open xtd examples", {*this, &main_form::open_xtd_examples}, xtd::drawing::bitmap(xtd::drawing::bitmap(xtd_open_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_e}; + xtd::forms::menu_item file_open_project_menu_item_ {"Open a project or solution", {*this, overload_<>(&main_form::open_project)}, xtd::drawing::bitmap(xtd::drawing::bitmap::from_xpm_data(xtd_open_examples_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_o}; + xtd::forms::menu_item file_run_project_menu_item_ {"Run a project", {*this, overload_<>(&main_form::run_project)}, xtd::drawing::bitmap(xtd::drawing::bitmap::from_xpm_data(xtd_run_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_r}; + xtd::forms::menu_item file_create_new_project_menu_item_ {"Create new project", {*this, overload_<>(&main_form::new_project)}, xtd::drawing::bitmap(xtd::drawing::bitmap::from_xpm_data(xtd_new_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_n}; + xtd::forms::menu_item file_open_xtd_examples_menu_item_ {"Open xtd examples", {*this, &main_form::open_xtd_examples}, xtd::drawing::bitmap(xtd::drawing::bitmap::from_xpm_data(xtd_open_icon), xtd::forms::menu_images::size()), xtd::forms::shortcut::ctrl_e}; xtd::forms::menu_item file_separator1_menu_item_ {"-"}; xtd::forms::menu_item file_settings_menu_item_ {xtd::drawing::texts::settings(), {*this, &main_form::settings}, xtd::forms::shortcut::f2}; xtd::forms::menu_item file_separator2_menu_item_ {"-"}; diff --git a/tools/xtdc-gui/src/project_type_items_control.hpp b/tools/xtdc-gui/src/project_type_items_control.hpp index 161286443abf..cc9b785722b0 100644 --- a/tools/xtdc-gui/src/project_type_items_control.hpp +++ b/tools/xtdc-gui/src/project_type_items_control.hpp @@ -35,45 +35,45 @@ namespace xtdc_gui { /// @brief Initializes a new instance of the project_type_item_control class. project_type_items_control() { std::vector project_type_items { - {xtd::drawing::bitmap(solution_icon), "Solution File", "A project for creating an empty solution file.", project_language::all & ~project_language::xtd & ~project_language::xtd_c, project_sdk::none, project_platform::all, project_type::solution_file}, - {xtd::drawing::bitmap(xtd_solution_icon), "xtd Solution File", "A project for creating an empty xtd solution file.", project_language::xtd, project_sdk::none, project_platform::all, project_type::solution_file}, - {xtd::drawing::bitmap(xtd_solution_icon), "xtd_c Solution File", "A project for creating an empty xtd_c solution file.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::solution_file}, - {xtd::drawing::bitmap(catch2_icon), "catch2 Unit Test project (c++)", "A project for creating a catch2 unit tests application.", project_language::cpp, project_sdk::catch2, project_platform::all, project_type::unit_tests_project}, - {xtd::drawing::bitmap(gtest_icon), "gtest Unit Test project (c++)", "A project for creating a gtest unit tests application.", project_language::cpp, project_sdk::gtest, project_platform::all, project_type::unit_tests_project}, - {xtd::drawing::bitmap(xtd_tunit_icon), "xtd Unit Test project (c++)", "A project for creating a xtd unit tests application.", project_language::xtd, project_sdk::none, project_platform::all, project_type::unit_tests_project}, - {xtd::drawing::bitmap(xtd_tunit_icon), "xtd_c Unit Test project (c)", "A project for creating a xtd unit tests application.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::unit_tests_project}, - {xtd::drawing::bitmap(staticlib_icon), "Static library (objective-c)", "A project for creating a objective-c static class library.", project_language::objectivec, project_sdk::none, project_platform::macos, project_type::static_library}, - {xtd::drawing::bitmap(staticlib_icon), "Static library (c#)", "A project for creating a c# static class library.", project_language::csharp, project_sdk::none, project_platform::windows, project_type::static_library}, - {xtd::drawing::bitmap(staticlib_icon), "Static library (c)", "A project for creating a c static library.", project_language::c, project_sdk::none, project_platform::all, project_type::static_library}, - {xtd::drawing::bitmap(staticlib_icon), "Static library (c++)", "A project for creating a c++ static class library.", project_language::cpp, project_sdk::none, project_platform::all, project_type::static_library}, - {xtd::drawing::bitmap(xtd_staticlib_icon), "xtd Static library (c++)", "A project for creating a xtd static class library.", project_language::xtd, project_sdk::none, project_platform::all, project_type::static_library}, - {xtd::drawing::bitmap(xtd_staticlib_icon), "xtd_c Static library (c)", "A project for creating a xtd_c static class library.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::static_library}, - {xtd::drawing::bitmap(sharedlib_icon), "Shared library (objective-c)", "A project for creating a objective-c shared class library.", project_language::objectivec, project_sdk::none, project_platform::macos, project_type::shared_library}, - {xtd::drawing::bitmap(sharedlib_icon), "Shared library (c#)", "A project for creating a c# shared class library.", project_language::csharp, project_sdk::none, project_platform::windows, project_type::shared_library}, - {xtd::drawing::bitmap(sharedlib_icon), "Shared library (c)", "A project for creating a c shared library.", project_language::c, project_sdk::none, project_platform::all, project_type::shared_library}, - {xtd::drawing::bitmap(sharedlib_icon), "Shared library (c++)", "A project for creating a c++ shared class library.", project_language::cpp, project_sdk::none, project_platform::all, project_type::shared_library}, - {xtd::drawing::bitmap(xtd_sharedlib_icon), "xtd Shared library (c++)", "A project for creating a xtd shared class library.", project_language::xtd, project_sdk::none, project_platform::all, project_type::shared_library}, - {xtd::drawing::bitmap(xtd_sharedlib_icon), "xtd_c Shared library (c)", "A project for creating a xtd_c shared class library.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::shared_library}, - {xtd::drawing::bitmap(console_icon), "Console Application (objective-c)", "A project for creating an objective-c command-line application.", project_language::objectivec, project_sdk::none, project_platform::macos, project_type::console}, - {xtd::drawing::bitmap(console_icon), "Console Application (c#)", "A project for creating a c# command-line application.", project_language::csharp, project_sdk::none, project_platform::windows, project_type::console}, - {xtd::drawing::bitmap(console_icon), "Console Application (c)", "A project for creating a c command-line application.", project_language::c, project_sdk::none, project_platform::all, project_type::console}, - {xtd::drawing::bitmap(console_icon), "Console Application (c++)", "A project for creating a c++ command-line application.", project_language::cpp, project_sdk::none, project_platform::all, project_type::console}, - {xtd::drawing::bitmap(xtd_console_icon), "xtd Console Application (c++)", "A project for creating a xtd command-line application.", project_language::xtd, project_sdk::none, project_platform::all, project_type::console}, - {xtd::drawing::bitmap(xtd_console_icon), "xtd_c Console Application (c)", "A project for creating a xtd_c command-line application.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::console}, - {xtd::drawing::bitmap(cocoa_icon), "Cocoa UI Application (objective-c)", "A project for creating a cocoa application with a graphic user\ninterface.", project_language::objectivec, project_sdk::cocoa, project_platform::macos, project_type::gui}, - {xtd::drawing::bitmap(gtk_icon), "Gtkmm GUI Application (c++)", "A project for creating a gtkmm application with a graphic user\ninterface.", project_language::cpp, project_sdk::gtkmm, project_platform::linux, project_type::gui}, - {xtd::drawing::bitmap(gtk_icon), "Gtk+4 GUI Application (c)", "A project for creating a gtk+4 application with a graphic user\ninterface.", project_language::c, project_sdk::gtk4, project_platform::linux, project_type::gui}, - {xtd::drawing::bitmap(gtk_icon), "Gtk+3 GUI Application (c)", "A project for creating a gtk+3 application with a graphic user\ninterface.", project_language::c, project_sdk::gtk3, project_platform::linux, project_type::gui}, - {xtd::drawing::bitmap(gtk_icon), "Gtk+2 GUI Application (c)", "A project for creating a gtk+2 application with a graphic user\ninterface.", project_language::c, project_sdk::gtk2, project_platform::linux, project_type::gui}, - {xtd::drawing::bitmap(wpf_icon), "WPF GUI Application (c#)", "A project for creating a WPF application with a graphic user\ninterface.", project_language::csharp, project_sdk::wpf, project_platform::windows, project_type::gui}, - {xtd::drawing::bitmap(winforms_icon), "Winforms GUI Application (c#)", "A project for creating a Winforms application with a graphic user\ninterface.", project_language::csharp, project_sdk::winforms, project_platform::windows, project_type::gui}, - {xtd::drawing::bitmap(win32_icon), "Win32 GUI Application (c)", "A project for creating a Win32 application with a graphic user\ninterface.", project_language::c, project_sdk::win32, project_platform::windows, project_type::gui}, - {xtd::drawing::bitmap(fltk_icon), "fltk GUI Application (c++)", "A project for creating a fltk application with a graphic user\ninterface.", project_language::cpp, project_sdk::fltk, project_platform::all, project_type::gui}, - {xtd::drawing::bitmap(qt_icon), "Qt6 GUI Application (c++)", "A project for creating a Qt6 application with a graphic user interface.", project_language::cpp, project_sdk::qt6, project_platform::all, project_type::gui}, - {xtd::drawing::bitmap(qt_icon), "Qt5 GUI Application (c++)", "A project for creating a Qt5 application with a graphic user interface.", project_language::cpp, project_sdk::qt5, project_platform::all, project_type::gui}, - {xtd::drawing::bitmap(wxwidgets_icon), "wxWidgets GUI Application (c++)", "A project for creating a wxWidgets application with a graphic user\ninterface.", project_language::cpp, project_sdk::wxwidgets, project_platform::all, project_type::gui}, - {xtd::drawing::bitmap(xtd_gui_icon), "xtd GUI Application (c++)", "A project for creating a xtd application with a graphic user interface.", project_language::xtd, project_sdk::none, project_platform::all, project_type::gui}, - {xtd::drawing::bitmap(xtd_gui_icon), "xtd_c GUI Application (c)", "A project for creating a xtd_c application with a graphic user interface.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(solution_icon), "Solution File", "A project for creating an empty solution file.", project_language::all & ~project_language::xtd & ~project_language::xtd_c, project_sdk::none, project_platform::all, project_type::solution_file}, + {xtd::drawing::bitmap::from_xpm_data(xtd_solution_icon), "xtd Solution File", "A project for creating an empty xtd solution file.", project_language::xtd, project_sdk::none, project_platform::all, project_type::solution_file}, + {xtd::drawing::bitmap::from_xpm_data(xtd_solution_icon), "xtd_c Solution File", "A project for creating an empty xtd_c solution file.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::solution_file}, + {xtd::drawing::bitmap::from_xpm_data(catch2_icon), "catch2 Unit Test project (c++)", "A project for creating a catch2 unit tests application.", project_language::cpp, project_sdk::catch2, project_platform::all, project_type::unit_tests_project}, + {xtd::drawing::bitmap::from_xpm_data(gtest_icon), "gtest Unit Test project (c++)", "A project for creating a gtest unit tests application.", project_language::cpp, project_sdk::gtest, project_platform::all, project_type::unit_tests_project}, + {xtd::drawing::bitmap::from_xpm_data(xtd_tunit_icon), "xtd Unit Test project (c++)", "A project for creating a xtd unit tests application.", project_language::xtd, project_sdk::none, project_platform::all, project_type::unit_tests_project}, + {xtd::drawing::bitmap::from_xpm_data(xtd_tunit_icon), "xtd_c Unit Test project (c)", "A project for creating a xtd unit tests application.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::unit_tests_project}, + {xtd::drawing::bitmap::from_xpm_data(staticlib_icon), "Static library (objective-c)", "A project for creating a objective-c static class library.", project_language::objectivec, project_sdk::none, project_platform::macos, project_type::static_library}, + {xtd::drawing::bitmap::from_xpm_data(staticlib_icon), "Static library (c#)", "A project for creating a c# static class library.", project_language::csharp, project_sdk::none, project_platform::windows, project_type::static_library}, + {xtd::drawing::bitmap::from_xpm_data(staticlib_icon), "Static library (c)", "A project for creating a c static library.", project_language::c, project_sdk::none, project_platform::all, project_type::static_library}, + {xtd::drawing::bitmap::from_xpm_data(staticlib_icon), "Static library (c++)", "A project for creating a c++ static class library.", project_language::cpp, project_sdk::none, project_platform::all, project_type::static_library}, + {xtd::drawing::bitmap::from_xpm_data(xtd_staticlib_icon), "xtd Static library (c++)", "A project for creating a xtd static class library.", project_language::xtd, project_sdk::none, project_platform::all, project_type::static_library}, + {xtd::drawing::bitmap::from_xpm_data(xtd_staticlib_icon), "xtd_c Static library (c)", "A project for creating a xtd_c static class library.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::static_library}, + {xtd::drawing::bitmap::from_xpm_data(sharedlib_icon), "Shared library (objective-c)", "A project for creating a objective-c shared class library.", project_language::objectivec, project_sdk::none, project_platform::macos, project_type::shared_library}, + {xtd::drawing::bitmap::from_xpm_data(sharedlib_icon), "Shared library (c#)", "A project for creating a c# shared class library.", project_language::csharp, project_sdk::none, project_platform::windows, project_type::shared_library}, + {xtd::drawing::bitmap::from_xpm_data(sharedlib_icon), "Shared library (c)", "A project for creating a c shared library.", project_language::c, project_sdk::none, project_platform::all, project_type::shared_library}, + {xtd::drawing::bitmap::from_xpm_data(sharedlib_icon), "Shared library (c++)", "A project for creating a c++ shared class library.", project_language::cpp, project_sdk::none, project_platform::all, project_type::shared_library}, + {xtd::drawing::bitmap::from_xpm_data(xtd_sharedlib_icon), "xtd Shared library (c++)", "A project for creating a xtd shared class library.", project_language::xtd, project_sdk::none, project_platform::all, project_type::shared_library}, + {xtd::drawing::bitmap::from_xpm_data(xtd_sharedlib_icon), "xtd_c Shared library (c)", "A project for creating a xtd_c shared class library.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::shared_library}, + {xtd::drawing::bitmap::from_xpm_data(console_icon), "Console Application (objective-c)", "A project for creating an objective-c command-line application.", project_language::objectivec, project_sdk::none, project_platform::macos, project_type::console}, + {xtd::drawing::bitmap::from_xpm_data(console_icon), "Console Application (c#)", "A project for creating a c# command-line application.", project_language::csharp, project_sdk::none, project_platform::windows, project_type::console}, + {xtd::drawing::bitmap::from_xpm_data(console_icon), "Console Application (c)", "A project for creating a c command-line application.", project_language::c, project_sdk::none, project_platform::all, project_type::console}, + {xtd::drawing::bitmap::from_xpm_data(console_icon), "Console Application (c++)", "A project for creating a c++ command-line application.", project_language::cpp, project_sdk::none, project_platform::all, project_type::console}, + {xtd::drawing::bitmap::from_xpm_data(xtd_console_icon), "xtd Console Application (c++)", "A project for creating a xtd command-line application.", project_language::xtd, project_sdk::none, project_platform::all, project_type::console}, + {xtd::drawing::bitmap::from_xpm_data(xtd_console_icon), "xtd_c Console Application (c)", "A project for creating a xtd_c command-line application.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::console}, + {xtd::drawing::bitmap::from_xpm_data(cocoa_icon), "Cocoa UI Application (objective-c)", "A project for creating a cocoa application with a graphic user\ninterface.", project_language::objectivec, project_sdk::cocoa, project_platform::macos, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(gtk_icon), "Gtkmm GUI Application (c++)", "A project for creating a gtkmm application with a graphic user\ninterface.", project_language::cpp, project_sdk::gtkmm, project_platform::linux, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(gtk_icon), "Gtk+4 GUI Application (c)", "A project for creating a gtk+4 application with a graphic user\ninterface.", project_language::c, project_sdk::gtk4, project_platform::linux, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(gtk_icon), "Gtk+3 GUI Application (c)", "A project for creating a gtk+3 application with a graphic user\ninterface.", project_language::c, project_sdk::gtk3, project_platform::linux, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(gtk_icon), "Gtk+2 GUI Application (c)", "A project for creating a gtk+2 application with a graphic user\ninterface.", project_language::c, project_sdk::gtk2, project_platform::linux, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(wpf_icon), "WPF GUI Application (c#)", "A project for creating a WPF application with a graphic user\ninterface.", project_language::csharp, project_sdk::wpf, project_platform::windows, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(winforms_icon), "Winforms GUI Application (c#)", "A project for creating a Winforms application with a graphic user\ninterface.", project_language::csharp, project_sdk::winforms, project_platform::windows, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(win32_icon), "Win32 GUI Application (c)", "A project for creating a Win32 application with a graphic user\ninterface.", project_language::c, project_sdk::win32, project_platform::windows, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(fltk_icon), "fltk GUI Application (c++)", "A project for creating a fltk application with a graphic user\ninterface.", project_language::cpp, project_sdk::fltk, project_platform::all, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(qt_icon), "Qt6 GUI Application (c++)", "A project for creating a Qt6 application with a graphic user interface.", project_language::cpp, project_sdk::qt6, project_platform::all, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(qt_icon), "Qt5 GUI Application (c++)", "A project for creating a Qt5 application with a graphic user interface.", project_language::cpp, project_sdk::qt5, project_platform::all, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(wxwidgets_icon), "wxWidgets GUI Application (c++)", "A project for creating a wxWidgets application with a graphic user\ninterface.", project_language::cpp, project_sdk::wxwidgets, project_platform::all, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(xtd_gui_icon), "xtd GUI Application (c++)", "A project for creating a xtd application with a graphic user interface.", project_language::xtd, project_sdk::none, project_platform::all, project_type::gui}, + {xtd::drawing::bitmap::from_xpm_data(xtd_gui_icon), "xtd_c GUI Application (c)", "A project for creating a xtd_c application with a graphic user interface.", project_language::xtd_c, project_sdk::none, project_platform::all, project_type::gui}, }; for (auto item : project_type_items) {