diff options
author | nyamatongwe <devnull@localhost> | 2013-04-19 20:33:00 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-04-19 20:33:00 +1000 |
commit | 6e6f60b74fd36e674a5f1aea465e9f11ec8e0fa9 (patch) | |
tree | 57876eff139b3a87f146d845cde8dbcf8876fe17 | |
parent | 8f19a8e14d8ddda4dab8a70e9c868e65aea199b0 (diff) | |
download | scintilla-mirror-6e6f60b74fd36e674a5f1aea465e9f11ec8e0fa9.tar.gz |
Remove unused methods.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 30 | ||||
-rw-r--r-- | src/Document.cxx | 36 | ||||
-rw-r--r-- | src/Document.h | 6 | ||||
-rw-r--r-- | src/PerLine.cxx | 15 | ||||
-rw-r--r-- | src/PerLine.h | 2 | ||||
-rw-r--r-- | src/RESearch.cxx | 52 | ||||
-rw-r--r-- | src/RESearch.h | 1 |
7 files changed, 0 insertions, 142 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 20c398b86..b0e2131c5 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -186,7 +186,6 @@ private: virtual bool PaintContains(PRectangle rc); void FullPaint(); virtual PRectangle GetClientRectangle(); - void SyncPaint(PRectangle rc); virtual void ScrollText(int linesToMove); virtual void SetVerticalScrollPos(); virtual void SetHorizontalScrollPos(); @@ -280,7 +279,6 @@ private: static void SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint time); static gint SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event); - static void DragBegin(GtkWidget *widget, GdkDragContext *context); gboolean DragMotionThis(GdkDragContext *context, gint x, gint y, guint dragtime); static gboolean DragMotion(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint dragtime); @@ -1109,30 +1107,6 @@ PRectangle ScintillaGTK::GetClientRectangle() { return rc; } -// Synchronously paint a rectangle of the window. -void ScintillaGTK::SyncPaint(PRectangle rc) { - paintState = painting; - rcPaint = rc; - PRectangle rcClient = GetClientRectangle(); - paintingAllText = rcPaint.Contains(rcClient); - if (PWindow(wText)) { - Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT); - if (sw) { - cairo_t *cr = gdk_cairo_create(PWindow(wText)); - sw->Init(cr, PWidget(wText)); - Paint(sw, rc); - sw->Release(); - delete sw; - cairo_destroy(cr); - } - } - if (paintState == paintAbandoned) { - // Painting area was insufficient to cover new styling or brace highlight positions - FullPaint(); - } - paintState = notPainting; -} - void ScintillaGTK::ScrollText(int linesToMove) { int diff = vs.lineHeight * -linesToMove; //Platform::DebugPrintf("ScintillaGTK::ScrollText %d %d %0d,%0d %0d,%0d\n", linesToMove, diff, @@ -2617,10 +2591,6 @@ gint ScintillaGTK::SelectionClear(GtkWidget *widget, GdkEventSelection *selectio return TRUE; } -void ScintillaGTK::DragBegin(GtkWidget *, GdkDragContext *) { - //Platform::DebugPrintf("DragBegin\n"); -} - gboolean ScintillaGTK::DragMotionThis(GdkDragContext *context, gint x, gint y, guint dragtime) { try { diff --git a/src/Document.cxx b/src/Document.cxx index 7eef844ee..d62dd64e0 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1050,11 +1050,6 @@ bool Document::InsertCString(int position, const char *s) { return InsertString(position, s, static_cast<int>(s ? strlen(s) : 0)); } -void Document::ChangeChar(int pos, char ch) { - DeleteChars(pos, 1); - InsertChar(pos, ch); -} - void Document::DelChar(int pos) { DeleteChars(pos, LenChar(pos)); } @@ -1667,25 +1662,6 @@ int Document::LinesTotal() const { return cb.Lines(); } -void Document::ChangeCase(Range r, bool makeUpperCase) { - for (int pos = r.start; pos < r.end;) { - int len = LenChar(pos); - if (len == 1) { - char ch = CharAt(pos); - if (makeUpperCase) { - if (IsLowerCase(ch)) { - ChangeChar(pos, static_cast<char>(MakeUpperCase(ch))); - } - } else { - if (IsUpperCase(ch)) { - ChangeChar(pos, static_cast<char>(MakeLowerCase(ch))); - } - } - } - pos += len; - } -} - void Document::SetDefaultCharClasses(bool includeWordClass) { charClass.SetDefaultCharClasses(includeWordClass); } @@ -1821,10 +1797,6 @@ void Document::MarginSetStyles(int line, const unsigned char *styles) { NotifyModified(DocModification(SC_MOD_CHANGEMARGIN, LineStart(line), 0, 0, 0, line)); } -int Document::MarginLength(int line) const { - return static_cast<LineAnnotation *>(perLineData[ldMargin])->Length(line); -} - void Document::MarginClearAll() { int maxEditorLine = LinesTotal(); for (int l=0; l<maxEditorLine; l++) @@ -1833,10 +1805,6 @@ void Document::MarginClearAll() { static_cast<LineAnnotation *>(perLineData[ldMargin])->ClearAll(); } -bool Document::AnnotationAny() const { - return static_cast<LineAnnotation *>(perLineData[ldAnnotation])->AnySet(); -} - StyledText Document::AnnotationStyledText(int line) { LineAnnotation *pla = static_cast<LineAnnotation *>(perLineData[ldAnnotation]); return StyledText(pla->Length(line), pla->Text(line), @@ -1866,10 +1834,6 @@ void Document::AnnotationSetStyles(int line, const unsigned char *styles) { } } -int Document::AnnotationLength(int line) const { - return static_cast<LineAnnotation *>(perLineData[ldAnnotation])->Length(line); -} - int Document::AnnotationLines(int line) const { return static_cast<LineAnnotation *>(perLineData[ldAnnotation])->Lines(line); } diff --git a/src/Document.h b/src/Document.h index 16804d3a1..76b584df2 100644 --- a/src/Document.h +++ b/src/Document.h @@ -323,7 +323,6 @@ public: bool InsertChar(int pos, char ch); bool InsertCString(int position, const char *s); - void ChangeChar(int pos, char ch); void DelChar(int pos); void DelCharBack(int pos); @@ -371,8 +370,6 @@ public: const char *SubstituteByPosition(const char *text, int *length); int LinesTotal() const; - void ChangeCase(Range r, bool makeUpperCase); - void SetDefaultCharClasses(bool includeWordClass); void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); int GetCharsOfClass(CharClassify::cc charClass, unsigned char *buffer); @@ -399,15 +396,12 @@ public: void MarginSetStyle(int line, int style); void MarginSetStyles(int line, const unsigned char *styles); void MarginSetText(int line, const char *text); - int MarginLength(int line) const; void MarginClearAll(); - bool AnnotationAny() const; StyledText AnnotationStyledText(int line); void AnnotationSetText(int line, const char *text); void AnnotationSetStyle(int line, int style); void AnnotationSetStyles(int line, const unsigned char *styles); - int AnnotationLength(int line) const; int AnnotationLines(int line) const; void AnnotationClearAll(); diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 8eceae2ab..cc46fb9a2 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -45,17 +45,6 @@ int MarkerHandleSet::Length() const { return c; } -int MarkerHandleSet::NumberFromHandle(int handle) const { - MarkerHandleNumber *mhn = root; - while (mhn) { - if (mhn->handle == handle) { - return mhn->number; - } - mhn = mhn->next; - } - return - 1; -} - int MarkerHandleSet::MarkValue() const { unsigned int m = 0; MarkerHandleNumber *mhn = root; @@ -391,10 +380,6 @@ void LineAnnotation::RemoveLine(int line) { } } -bool LineAnnotation::AnySet() const { - return annotations.Length() > 0; -} - bool LineAnnotation::MultipleStyles(int line) const { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) return reinterpret_cast<AnnotationHeader *>(annotations[line])->style == IndividualStyles; diff --git a/src/PerLine.h b/src/PerLine.h index 50ce1e551..646924ee0 100644 --- a/src/PerLine.h +++ b/src/PerLine.h @@ -32,7 +32,6 @@ public: MarkerHandleSet(); ~MarkerHandleSet(); int Length() const; - int NumberFromHandle(int handle) const; int MarkValue() const; ///< Bit set of marker numbers. bool Contains(int handle) const; bool InsertHandle(int handle, int markerNum); @@ -101,7 +100,6 @@ public: virtual void InsertLine(int line); virtual void RemoveLine(int line); - bool AnySet() const; bool MultipleStyles(int line) const; int Style(int line); const char *Text(int line) const; diff --git a/src/RESearch.cxx b/src/RESearch.cxx index 87f2a6985..bef24e57b 100644 --- a/src/RESearch.cxx +++ b/src/RESearch.cxx @@ -43,10 +43,6 @@ * * int RESearch::Execute(characterIndexer &ci, int lp, int endp) * - * RESearch::Substitute: substitute the matched portions in a new string. - * - * int RESearch::Substitute(CharacterIndexer &ci, char *src, char *dst) - * * re_fail: failure routine for RESearch::Execute. (no longer used) * * void re_fail(char *msg, char op) @@ -967,52 +963,4 @@ int RESearch::PMatch(CharacterIndexer &ci, int lp, int endp, char *ap) { return lp; } -/* - * RESearch::Substitute: - * substitute the matched portions of the src in dst. - * - * & substitute the entire matched pattern. - * - * \digit substitute a subpattern, with the given tag number. - * Tags are numbered from 1 to 9. If the particular - * tagged subpattern does not exist, null is substituted. - */ -int RESearch::Substitute(CharacterIndexer &ci, char *src, char *dst) { - unsigned char c; - int pin; - int bp; - int ep; - - if (!*src || !bopat[0]) - return 0; - - while ((c = *src++) != 0) { - switch (c) { - - case '&': - pin = 0; - break; - - case '\\': - c = *src++; - if (c >= '0' && c <= '9') { - pin = c - '0'; - break; - } - - default: - *dst++ = c; - continue; - } - - if ((bp = bopat[pin]) != 0 && (ep = eopat[pin]) != 0) { - while (ci.CharAt(bp) && bp < ep) - *dst++ = ci.CharAt(bp++); - if (bp < ep) - return 0; - } - } - *dst = '\0'; - return 1; -} diff --git a/src/RESearch.h b/src/RESearch.h index ef8c3e11b..5e1d34168 100644 --- a/src/RESearch.h +++ b/src/RESearch.h @@ -36,7 +36,6 @@ public: bool GrabMatches(CharacterIndexer &ci); const char *Compile(const char *pattern, int length, bool caseSensitive, bool posix); int Execute(CharacterIndexer &ci, int lp, int endp); - int Substitute(CharacterIndexer &ci, char *src, char *dst); enum { MAXTAG=10 }; enum { MAXNFA=2048 }; |