]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/modules/lseditor/lseditorpl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: nativeeditorpl.h
3 // Purpose: Language-sensative editor plugin for wxStudio
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleskandars Gluchovas
9 // Licence: GNU General Public License
10 /////////////////////////////////////////////////////////////////////////////
12 // This program is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation; either version 2 of the License, or
15 // (at your option) any later version.
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 /////////////////////////////////////////////////////////////////////////////
27 #ifndef __LSEDITORPL_G__
28 #define __LSEDITORPL_G__
32 class wxTextEditorModel
;
33 class wxTextEditorView
;
35 class wxsLSEditorPlugin
: public wxsSourceEditorPlugin
38 wxTextEditorModel
* mpModel
;
39 wxTextEditorView
* mpView
;
45 void Create( wxWindow
* parent
, wxWindowID id
);
47 virtual void OnOpen( const string
& fname
);
48 virtual void OnSave( const string
& fname
);
50 virtual void OnCopy();
52 virtual void OnPaste();
53 virtual void OnDelete();
59 void OnGotoLine( int lineNo
, int column
= 0 );
65 void OnFindPrevious();
68 virtual void OnToggleBookmark();
69 virtual void OnNextBookmark();
70 virtual void OnPreviousBookmark();
71 virtual void OnShowBookmarks();
73 virtual void SetCheckpoint();
74 virtual bool CheckpointModified();
84 // accesed by framework
86 virtual string
GetName(){ return "Alex's Language Sensitive Editor"; }
88 virtual bool IsModified();
90 virtual wxWindow
* GetWindow();
92 virtual void GetAllText( char** ppBuf
, size_t* length
);
94 virtual void SetFileName( const string
& fname
);
96 virtual void HoldCursor( bool hold
);
98 virtual wxsPluginBase
* Clone() { return new wxsLSEditorPlugin(); };
100 virtual string
FindWordAtCursor();
102 virtual void GetCursorPos( int* line
, int* column
);
103 virtual void SetCursorPos( int line
, int column
);
105 virtual void GetPagePos( int* line
, int* column
);
107 virtual void GetText( int fromLine
, int fromColumn
,
108 int tillLine
, int tillColumn
,
109 char** ppBuf
, size_t* length
);
111 virtual void InsertText( int line
, int column
,
112 char* text
, size_t lenght
);
114 virtual void DeleteText( int fromLine
, int fromColumn
,
115 int tillLine
, int tillColumn
);
117 virtual void PositionToXY( int line
, int column
, int* x
, int* y
);
119 virtual void GetSelectionRange( int* fromLine
, int* fromColumn
,
120 int* tillLine
, int* tillColumn
);
122 virtual wxSize
GetCharacterSize();
124 virtual bool IsUnixText();
126 // some extras (just in case..)
128 wxTextEditorModel
& GetModel();
129 wxTextEditorView
& GetView();