X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e9bafca0f56de34638d4c3fef8cf74fe9351193..3030ae493df7500fd5da7555f141c0c8a690bd8a:/contrib/src/stc/stc.cpp diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index 1085b5346d..bc54bf966c 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -535,6 +535,11 @@ void wxStyledTextCtrl::MarkerAddSet(int line, int set) { SendMsg(2466, line, set); } +// Set the alpha used for a marker that is drawn in the text area, not the margin. +void wxStyledTextCtrl::MarkerSetAlpha(int markerNumber, int alpha) { + SendMsg(2476, markerNumber, alpha); +} + // Set a margin to be either numeric or symbolic. void wxStyledTextCtrl::SetMarginType(int margin, int marginType) { SendMsg(2240, margin, marginType); @@ -645,6 +650,16 @@ void wxStyledTextCtrl::SetSelBackground(bool useSetting, const wxColour& back) { SendMsg(2068, useSetting, wxColourAsLong(back)); } +// Get the alpha of the selection. +int wxStyledTextCtrl::GetSelAlpha() { + return SendMsg(2477, 0, 0); +} + +// Set the alpha of the selection. +void wxStyledTextCtrl::SetSelAlpha(int alpha) { + SendMsg(2478, alpha, 0); +} + // Set the foreground colour of the caret. void wxStyledTextCtrl::SetCaretForeground(const wxColour& fore) { SendMsg(2069, wxColourAsLong(fore), 0); @@ -771,13 +786,13 @@ void wxStyledTextCtrl::SetCaretLineVisible(bool show) { } // Get the colour of the background of the line containing the caret. -wxColour wxStyledTextCtrl::GetCaretLineBack() { +wxColour wxStyledTextCtrl::GetCaretLineBackground() { long c = SendMsg(2097, 0, 0); return wxColourFromLong(c); } // Set the colour of the background of the line containing the caret. -void wxStyledTextCtrl::SetCaretLineBack(const wxColour& back) { +void wxStyledTextCtrl::SetCaretLineBackground(const wxColour& back) { SendMsg(2098, wxColourAsLong(back), 0); } @@ -1445,6 +1460,11 @@ void wxStyledTextCtrl::CallTipSetForegroundHighlight(const wxColour& fore) { SendMsg(2207, wxColourAsLong(fore), 0); } +// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. +void wxStyledTextCtrl::CallTipUseStyle(int tabSize) { + SendMsg(2212, tabSize, 0); +} + // Find the display line of a document line taking hidden lines into account. int wxStyledTextCtrl::VisibleFromDocLine(int line) { return SendMsg(2220, line, 0); @@ -2481,6 +2501,16 @@ void wxStyledTextCtrl::SelectionDuplicate() { SendMsg(2469, 0, 0); } +// Set background alpha of the caret line. +void wxStyledTextCtrl::SetCaretLineBackAlpha(int alpha) { + SendMsg(2470, alpha, 0); +} + +// Get the background alpha of the caret line. +int wxStyledTextCtrl::GetCaretLineBackAlpha() { + return SendMsg(2471, 0, 0); +} + // Start notifying the container of all key presses and commands. void wxStyledTextCtrl::StartRecord() { SendMsg(3001, 0, 0); @@ -2523,7 +2553,7 @@ void wxStyledTextCtrl::SetLexerLanguage(const wxString& language) { // Retrieve a 'property' value previously set with SetProperty. wxString wxStyledTextCtrl::GetProperty(const wxString& key) { - int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), NULL); + int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), (long)NULL); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1); @@ -2537,7 +2567,7 @@ wxString wxStyledTextCtrl::GetProperty(const wxString& key) { // Retrieve a 'property' value previously set with SetProperty, // with '$()' variable replacement on returned buffer. wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) { - int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), NULL); + int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), (long)NULL); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1); @@ -3186,12 +3216,7 @@ static void SetEventText(wxStyledTextEvent& evt, const char* text, size_t length) { if(!text) return; - // The unicode conversion MUST have a null byte to terminate the - // string so move it into a buffer first and give it one. - wxMemoryBuffer buf(length+1); - buf.AppendData((void*)text, length); - buf.AppendByte(0); - evt.SetText(stc2wx(buf)); + evt.SetText(stc2wx(text, length)); }