Added ability to disable images in wxRTC for performance or image corruption reasons
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
32
include/wx/richtext/bitmaps/image_placeholder24x24.xpm
Normal file
32
include/wx/richtext/bitmaps/image_placeholder24x24.xpm
Normal file
@@ -0,0 +1,32 @@
|
||||
/* XPM */
|
||||
static char *image_placeholder24x24_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"24 24 2 1",
|
||||
" c #7E97A9",
|
||||
". c #EBEBFF",
|
||||
/* pixels */
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
" ...... ......",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... ",
|
||||
"...... ...... "
|
||||
};
|
@@ -2211,7 +2211,7 @@ public:
|
||||
*/
|
||||
wxRichTextDrawingContext(wxRichTextBuffer* buffer);
|
||||
|
||||
void Init() { m_buffer = NULL; m_enableVirtualAttributes = true; }
|
||||
void Init() { m_buffer = NULL; m_enableVirtualAttributes = true; m_enableImages = true; }
|
||||
|
||||
/**
|
||||
Does this object have virtual attributes?
|
||||
@@ -2269,8 +2269,21 @@ public:
|
||||
|
||||
bool GetVirtualAttributesEnabled() const { return m_enableVirtualAttributes; }
|
||||
|
||||
/**
|
||||
Enable or disable images
|
||||
*/
|
||||
|
||||
void EnableImages(bool b) { m_enableImages = b; }
|
||||
|
||||
/**
|
||||
Returns @true if images are enabled.
|
||||
*/
|
||||
|
||||
bool GetImagesEnabled() const { return m_enableImages; }
|
||||
|
||||
wxRichTextBuffer* m_buffer;
|
||||
bool m_enableVirtualAttributes;
|
||||
bool m_enableImages;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -4810,7 +4823,7 @@ public:
|
||||
/**
|
||||
Creates a cached image at the required size.
|
||||
*/
|
||||
virtual bool LoadImageCache(wxDC& dc, bool resetCache = false, const wxSize& parentSize = wxDefaultSize);
|
||||
virtual bool LoadImageCache(wxDC& dc, wxRichTextDrawingContext& context, bool resetCache = false, const wxSize& parentSize = wxDefaultSize);
|
||||
|
||||
/**
|
||||
Gets the original image size.
|
||||
|
@@ -2122,6 +2122,18 @@ public:
|
||||
*/
|
||||
wxPoint GetFirstVisiblePoint() const;
|
||||
|
||||
/**
|
||||
Enable or disable images
|
||||
*/
|
||||
|
||||
void EnableImages(bool b) { m_enableImages = b; }
|
||||
|
||||
/**
|
||||
Returns @true if images are enabled.
|
||||
*/
|
||||
|
||||
bool GetImagesEnabled() const { return m_enableImages; }
|
||||
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
Returns the content of the entire control as a string.
|
||||
@@ -2321,6 +2333,9 @@ protected:
|
||||
wxSize m_lastWindowSize;
|
||||
int m_setupScrollbarsCount;
|
||||
int m_setupScrollbarsCountInOnSize;
|
||||
|
||||
/// Whether images are enabled for this control
|
||||
bool m_enableImages;
|
||||
};
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
Reference in New Issue
Block a user