UnsavedChangesDialog improvements:

* support markup text and colored icons for cells

+ Extended BitmapTextRenderer for using of markup text
This commit is contained in:
YuSanka 2020-08-05 19:25:04 +02:00
parent 3cf2914a9e
commit 1674d2af29
7 changed files with 664 additions and 102 deletions

View file

@ -2,9 +2,10 @@
#define slic3r_GUI_ObjectDataViewModel_hpp_
#include <wx/dataview.h>
#include <vector>
#include "GUI_App.hpp"
namespace Slic3r {
enum class ModelVolumeType : int;
@ -83,9 +84,19 @@ public:
) :
wxDataViewCustomRenderer(wxT("DataViewBitmapText"), mode, align),
m_parent(parent)
{}
{
#ifdef SUPPORTS_MARKUP
m_markupText = nullptr;
#endif // SUPPORTS_MARKUP
}
#endif //ENABLE_NONCUSTOM_DATA_VIEW_RENDERING
~BitmapTextRenderer();
#ifdef SUPPORTS_MARKUP
void EnableMarkup(bool enable = true);
#endif // SUPPORTS_MARKUP
bool SetValue(const wxVariant& value);
bool GetValue(wxVariant& value) const;
#if ENABLE_NONCUSTOM_DATA_VIEW_RENDERING && wxUSE_ACCESSIBILITY
@ -114,6 +125,10 @@ private:
DataViewBitmapText m_value;
bool m_was_unusable_symbol{ false };
wxWindow* m_parent{ nullptr };
#ifdef SUPPORTS_MARKUP
class wxItemMarkupText* m_markupText;
#endif // SUPPORTS_MARKUP
};