From 75467841ee216aebe97b10bc9946c5dbaa3312d1 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 8 Aug 2015 11:48:21 +0200 Subject: [PATCH] Moved "edit" icon from wxEditableListBox to wxArtProvider. "Edit" icon definition used internally in wxEditableListBox is moved to wxDefaultArtProvider and exposed as wxART_EDIT. While there is no native version of this icon yet, it could be added in the future and in the meanwhile this commit will be useful to use only standard bitmaps in wxEditableListBox. --- art/edit.xpm | 22 ++++++++++++++++++++++ include/wx/artprov.h | 1 + interface/wx/artprov.h | 2 ++ src/common/artstd.cpp | 2 ++ 4 files changed, 27 insertions(+) create mode 100644 art/edit.xpm diff --git a/art/edit.xpm b/art/edit.xpm new file mode 100644 index 0000000000..83d684ab3b --- /dev/null +++ b/art/edit.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char* const edit_xpm[] = { +"16 16 3 1", +" c None", +". c #000000", +"+ c #00007F", +" ", +" ", +" .. .. ", +" . ", +" . ", +" ++++ . ++++ ", +" ++ . ++ ++", +" +++++ . ++++++", +" ++ ++ . ++ ", +" ++ ++ . ++ ++", +" +++++ . ++++ ", +" . ", +" . ", +" .. .. ", +" ", +" "}; diff --git a/include/wx/artprov.h b/include/wx/artprov.h index 14ba530417..29e0c71b26 100644 --- a/include/wx/artprov.h +++ b/include/wx/artprov.h @@ -113,6 +113,7 @@ typedef wxString wxArtID; #define wxART_FULL_SCREEN wxART_MAKE_ART_ID(wxART_FULL_SCREEN) +#define wxART_EDIT wxART_MAKE_ART_ID(wxART_EDIT) // ---------------------------------------------------------------------------- // wxArtProvider class diff --git a/interface/wx/artprov.h b/interface/wx/artprov.h index 8299b0dc1d..aff555eb29 100644 --- a/interface/wx/artprov.h +++ b/interface/wx/artprov.h @@ -89,6 +89,7 @@ wxArtID wxART_FIND; wxArtID wxART_FIND_AND_REPLACE; wxArtID wxART_FULL_SCREEN; +wxArtID wxART_EDIT; /** @@ -191,6 +192,7 @@ wxArtID wxART_FULL_SCREEN; @li @c wxART_FIND @li @c wxART_FIND_AND_REPLACE @li @c wxART_FULL_SCREEN (since 3.1.0) + @li @c wxART_EDIT (since 3.1.0) @li @c wxART_HARDDISK @li @c wxART_FLOPPY @li @c wxART_CDROM diff --git a/src/common/artstd.cpp b/src/common/artstd.cpp index e00702ef69..0f59d8cc5f 100644 --- a/src/common/artstd.cpp +++ b/src/common/artstd.cpp @@ -127,6 +127,7 @@ protected: #include "../../art/find.xpm" #include "../../art/findrepl.xpm" #include "../../art/fullscreen.xpm" +#include "../../art/edit.xpm" wxBitmap wxDefaultArtProvider_CreateBitmap(const wxArtID& id) { @@ -192,6 +193,7 @@ wxBitmap wxDefaultArtProvider_CreateBitmap(const wxArtID& id) ART(wxART_FIND_AND_REPLACE, findrepl) ART(wxART_FULL_SCREEN, fullscreen) ART(wxART_NEW, new) + ART(wxART_EDIT, edit) return wxNullBitmap;