Index: src/sdk/scripting/bindings/scriptbindings.cpp
===================================================================
--- src/sdk/scripting/bindings/scriptbindings.cpp (revision 3557)
+++ src/sdk/scripting/bindings/scriptbindings.cpp (arbetskopia)
@@ -557,6 +557,56 @@
func(&cbEditor::AutoComplete, "AutoComplete").
func(&cbEditor::AddBreakpoint, "AddBreakpoint").
func(&cbEditor::RemoveBreakpoint, "RemoveBreakpoint").
+
+ // Exposing the wxScintilla API below
+ func(&cbEditor::BeginUndoAct, "BeginUndoAct").
+ func(&cbEditor::EndUndoAct, "EndUndoAct").
+ func(&cbEditor::Insert, "Insert").
+ func(&cbEditor::GetSelText, "GetSelText").
+ func(&cbEditor::GetLineText, "GetLineText").
+ func(&cbEditor::GetChar, "GetChar").
+ func(&cbEditor::GetCharRel, "GetCharRel").
+
+ func(&cbEditor::MatchBrace, "MatchBrace").
+ func(&cbEditor::GotoMatchBrace, "GotoMatchBrace").
+ func(&cbEditor::GetStyle, "GetStyle").
+
+ func(&cbEditor::GetCurLine, "GetCurLine").
+ func(&cbEditor::GetCurCol, "GetCurCol").
+ func(&cbEditor::GetCurPos, "GetCurPos").
+ func(&cbEditor::SetCurLine, "SetCurLine").
+ func(&cbEditor::SetCurCol, "SetCurCol").
+ func(&cbEditor::SetCurPos, "SetCurPos").
+
+ func(&cbEditor::SetSearchFlags, "SetSearchFlags").
+ func(&cbEditor::GetSearchFlags, "GetSearchFlags").
+ func(&cbEditor::SetTargetStart, "SetTargetStart").
+ func(&cbEditor::GetTargetStart, "GetTargetStart").
+ func(&cbEditor::SetTargetEnd, "SetTargetEnd").
+ func(&cbEditor::GetTargetEnd, "GetTargetEnd").
+ func(&cbEditor::ReplaceTarget, "ReplaceTarget").
+ func(&cbEditor::ReplaceTargetRE, "ReplaceTargetRE").
+ func(&cbEditor::SearchInTarget, "SearchInTarget").
+
+ func(&cbEditor::Find, "Find").
+ func(&cbEditor::GetLastFindLen, "GetLastFindLen").
+ func(&cbEditor::SearchAnchor, "SearchAnchor").
+ func(&cbEditor::SearchNext, "SearchNext").
+ func(&cbEditor::SearchPrev, "SearchPrev").
+
+ func(&cbEditor::GetLine, "GetLine").
+ func(&cbEditor::InsertText, "InsertText").
+ func(&cbEditor::GetCharAtPos, "GetCharAtPos").
+ func(&cbEditor::GotoPos, "GotoPos").
+ func(&cbEditor::SetAnchor, "SetAnchor").
+ func(&cbEditor::GetAnchor, "GetAnchor").
+ func(&cbEditor::GetStyleAt, "GetStyleAt").
+ func(&cbEditor::GetLength, "GetLength").
+ func(&cbEditor::PosFromLine, "PosFromLine").
+ func(&cbEditor::LineFromPos, "LineFromPos").
+ func(&cbEditor::ScrollToLine, "ScrollToLine").
+ func(&cbEditor::SendMsg, "SendMsg").
+
// these are not present in cbEditor; included to help scripts edit text
staticFuncVarArgs(&cbEditor_SetText, "SetText", "*").
staticFuncVarArgs(&cbEditor_GetText, "GetText", "*");
Index: src/sdk/cbeditor.h
===================================================================
--- src/sdk/cbeditor.h (revision 3557)
+++ src/sdk/cbeditor.h (arbetskopia)
@@ -296,6 +296,69 @@
/// Apply the editor defaults to any (possibly foreign) cbStyledTextCtrl.
static void ApplyStyles(cbStyledTextCtrl* control);
+
+
+ // Additional wxScintilla API, expose to Squirrel, Arne Steinarson, 2007-01-15
+
+ // This collection of functions are 'relative', they don't take position arguments
+ // but work mostly like the keyboard.
+ void BeginUndoAct();
+ void EndUndoAct();
+
+ void Insert(const wxString& text);
+
+ wxString GetSelText();
+ wxString GetLineText();
+
+ int GetChar();
+ int GetCharRel( int dcol ); // dcol is offset from current column
+
+ int MatchBrace();
+ int GotoMatchBrace();
+
+ int GetStyle();
+
+ // Functions that are not relative
+ int GetCurLine();
+ int GetCurCol();
+ int GetCurPos();
+ void SetCurLine( int line );
+ void SetCurCol( int col );
+ void SetCurPos( int pos );
+
+ // Functions for search/replace
+ void SetSearchFlags(int flags);
+ int GetSearchFlags();
+ void SetTargetStart(int pos);
+ int GetTargetStart();
+ void SetTargetEnd(int pos);
+ int GetTargetEnd();
+ int ReplaceTarget(const wxString &text);
+ int ReplaceTargetRE(const wxString &text);
+ int SearchInTarget(const wxString &text);
+
+ // Returns only
download for full patch...