From f4e0c1aaee36d4509f1a506cf1463ff3512f37f1 Mon Sep 17 00:00:00 2001 From: New Pagodi Date: Sun, 17 Mar 2019 01:49:30 -0500 Subject: [PATCH] Regenerate wxSTC files after recent changes --- include/wx/stc/stc.h | 16 ++++++++++----- interface/wx/stc/stc.h | 22 ++++++++++++++++++-- src/stc/stc.cpp | 46 ++++++++++++++++-------------------------- 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 9348a023a8..f069dfe2fb 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -3090,7 +3090,7 @@ public: int MarkerPrevious(int lineStart, int markerMask); // Define a marker from a bitmap - void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); + void MarkerDefinePixmap(int markerNumber, const char* const* xpmData); // Add a set of markers to a line. void MarkerAddSet(int line, int markerSet); @@ -3441,7 +3441,7 @@ public: bool AutoCompGetDropRestOfWord() const; // Register an image for use in autocompletion lists. - void RegisterImage(int type, const wxBitmap& bmp); + void RegisterImage(int type, const char* const* xpmData); // Clear all the registered images. void ClearRegisteredImages(); @@ -3883,19 +3883,19 @@ public: // Set the display mode of visual flags for wrapped lines. void SetWrapVisualFlags(int wrapVisualFlags); - // Retrive the display mode of visual flags for wrapped lines. + // Retrieve the display mode of visual flags for wrapped lines. int GetWrapVisualFlags() const; // Set the location of visual flags for wrapped lines. void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation); - // Retrive the location of visual flags for wrapped lines. + // Retrieve the location of visual flags for wrapped lines. int GetWrapVisualFlagsLocation() const; // Set the start indent for wrapped lines. void SetWrapStartIndent(int indent); - // Retrive the start indent for wrapped lines. + // Retrieve the start indent for wrapped lines. int GetWrapStartIndent() const; // Sets how wrapped sublines are placed. Default is wxSTC_WRAPINDENT_FIXED. @@ -5181,6 +5181,12 @@ public: // Clear annotations from the given line. void AnnotationClearLine(int line); + // Define a marker from a bitmap. + void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); + + // Register an image for use in autocompletion lists. + void RegisterImage(int type, const wxBitmap& bmp); + // The following methods are nearly equivalent to their similarly named diff --git a/interface/wx/stc/stc.h b/interface/wx/stc/stc.h index 3c992fe511..21a3a4cac4 100644 --- a/interface/wx/stc/stc.h +++ b/interface/wx/stc/stc.h @@ -5360,6 +5360,8 @@ public: /** @member_group_name{Markers, Markers} + + @see MarkerDefineBitmap */ //@{ @@ -5437,8 +5439,10 @@ public: /** Define a marker from a bitmap + + @since 3.1.3 */ - void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); + void MarkerDefinePixmap(int markerNumber, const char* const* xpmData); /** Add a set of markers to a line. @@ -5644,6 +5648,8 @@ public: /** @member_group_name{Autocompletion, Autocompletion} + + @see RegisterImage(int, const wxBitmap&) */ //@{ @@ -5756,8 +5762,10 @@ public: /** Register an image for use in autocompletion lists. + + @since 3.1.3 */ - void RegisterImage(int type, const wxBitmap& bmp); + void RegisterImage(int type, const char* const* xpmData); /** Clear all the registered images. @@ -7405,6 +7413,16 @@ public: */ void AnnotationClearLine(int line); + /** + Define a marker with a wxBitmap. + */ + void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); + + /** + Register an image for use in autocompletion lists. + */ + void RegisterImage(int type, const wxBitmap& bmp); + //@} diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 61eea8dad3..b01802915c 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -662,19 +662,8 @@ int wxStyledTextCtrl::MarkerPrevious(int lineStart, int markerMask) } // Define a marker from a bitmap -void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp) { - // convert bmp to a xpm in a string - wxMemoryOutputStream strm; - wxImage img = bmp.ConvertToImage(); - if (img.HasAlpha()) - img.ConvertAlphaToMask(); - img.SaveFile(strm, wxBITMAP_TYPE_XPM); - size_t len = strm.GetSize(); - char* buff = new char[len+1]; - strm.CopyTo(buff, len); - buff[len] = 0; - SendMsg(SCI_MARKERDEFINEPIXMAP, markerNumber, (sptr_t)buff); - delete [] buff; +void wxStyledTextCtrl::MarkerDefinePixmap(int markerNumber, const char* const* xpmData) { + SendMsg(SCI_MARKERDEFINEPIXMAP, markerNumber, (sptr_t)xpmData); } // Add a set of markers to a line. @@ -1464,19 +1453,8 @@ bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() const } // Register an image for use in autocompletion lists. -void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) { - // convert bmp to a xpm in a string - wxMemoryOutputStream strm; - wxImage img = bmp.ConvertToImage(); - if (img.HasAlpha()) - img.ConvertAlphaToMask(); - img.SaveFile(strm, wxBITMAP_TYPE_XPM); - size_t len = strm.GetSize(); - char* buff = new char[len+1]; - strm.CopyTo(buff, len); - buff[len] = 0; - SendMsg(SCI_REGISTERIMAGE, type, (sptr_t)buff); - delete [] buff; +void wxStyledTextCtrl::RegisterImage(int type, const char* const* xpmData) { + SendMsg(SCI_REGISTERIMAGE, type, (sptr_t)xpmData); } // Clear all the registered images. @@ -2384,7 +2362,7 @@ void wxStyledTextCtrl::SetWrapVisualFlags(int wrapVisualFlags) SendMsg(SCI_SETWRAPVISUALFLAGS, wrapVisualFlags, 0); } -// Retrive the display mode of visual flags for wrapped lines. +// Retrieve the display mode of visual flags for wrapped lines. int wxStyledTextCtrl::GetWrapVisualFlags() const { return SendMsg(SCI_GETWRAPVISUALFLAGS, 0, 0); @@ -2396,7 +2374,7 @@ void wxStyledTextCtrl::SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation) SendMsg(SCI_SETWRAPVISUALFLAGSLOCATION, wrapVisualFlagsLocation, 0); } -// Retrive the location of visual flags for wrapped lines. +// Retrieve the location of visual flags for wrapped lines. int wxStyledTextCtrl::GetWrapVisualFlagsLocation() const { return SendMsg(SCI_GETWRAPVISUALFLAGSLOCATION, 0, 0); @@ -2408,7 +2386,7 @@ void wxStyledTextCtrl::SetWrapStartIndent(int indent) SendMsg(SCI_SETWRAPSTARTINDENT, indent, 0); } -// Retrive the start indent for wrapped lines. +// Retrieve the start indent for wrapped lines. int wxStyledTextCtrl::GetWrapStartIndent() const { return SendMsg(SCI_GETWRAPSTARTINDENT, 0, 0); @@ -5058,6 +5036,16 @@ void wxStyledTextCtrl::AnnotationClearLine(int line) { SendMsg(SCI_ANNOTATIONSETTEXT, line, (sptr_t)NULL); } +void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, + const wxBitmap& bmp) { + m_swx->DoMarkerDefineBitmap(markerNumber, bmp); +} + +void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) +{ + m_swx->DoRegisterImage(type, bmp); +} +