]>
Commit | Line | Data |
---|---|---|
4b123bb9 HH |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: utils.i | |
3 | // Purpose: SWIG definitions of various utility classes | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 25-nov-1998 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 1998 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | ||
14 | %module lseditor | |
15 | ||
16 | %{ | |
17 | #include "helpers.h" | |
18 | #include "lseditorpl.h" | |
19 | %} | |
20 | ||
21 | //--------------------------------------------------------------------------- | |
22 | ||
23 | %include typemaps.i | |
24 | %include my_typemaps.i | |
25 | ||
26 | %extern wx.i | |
27 | %extern windows.i | |
28 | %extern windows2.i | |
29 | %extern windows3.i | |
30 | %extern frames.i | |
31 | %extern _defs.i | |
32 | %extern misc.i | |
33 | %extern gdi.i | |
34 | %extern controls.i | |
35 | %extern events.i | |
36 | ||
37 | ||
38 | %{ | |
39 | #ifdef SEPARATE | |
40 | wxString wxPyEmptyStr(""); | |
41 | #endif | |
42 | %} | |
43 | ||
44 | %pragma(python) code = "import wx" | |
45 | ||
46 | //--------------------------------------------------------------------------- | |
47 | ||
48 | class wxsLSEditorPlugin | |
49 | { | |
50 | public: | |
51 | wxsLSEditorPlugin(); | |
52 | ~wxsLSEditorPlugin(); | |
53 | ||
54 | void Create( wxWindow* parent, wxWindowID id ); | |
55 | ||
56 | virtual void OnOpen( const char* fname ); | |
57 | virtual void OnSave( const char* fname ); | |
58 | ||
59 | virtual void OnCopy(); | |
60 | virtual void OnCut(); | |
61 | virtual void OnPaste(); | |
62 | virtual void OnDelete(); | |
63 | ||
64 | void OnUndo(); | |
65 | void OnRedo(); | |
66 | ||
67 | void SelectAll(); | |
68 | void OnGotoLine( int lineNo, int column = 0 ); | |
69 | void OnGotoLine(); | |
70 | void OnProperties(); | |
71 | ||
72 | void OnFind(); | |
73 | void OnFindNext(); | |
74 | void OnFindPrevious(); | |
75 | void OnReplace(); | |
76 | ||
77 | virtual void OnToggleBookmark(); | |
78 | virtual void OnNextBookmark(); | |
79 | virtual void OnPreviousBookmark(); | |
80 | virtual void OnShowBookmarks(); | |
81 | ||
82 | virtual void SetCheckpoint(); | |
83 | virtual bool CheckpointModified(); | |
84 | ||
85 | // UI-updates | |
86 | ||
87 | bool CanCopy(); | |
88 | bool CanCut(); | |
89 | bool CanPaste(); | |
90 | bool CanUndo(); | |
91 | bool CanRedo(); | |
92 | ||
93 | // accesed by framework | |
94 | ||
95 | virtual string GetName(){ return "Alex's Language Sensitive Editor"; } | |
96 | ||
97 | virtual bool IsModified(); | |
98 | ||
99 | virtual wxWindow* GetWindow(); | |
100 | ||
101 | //virtual void GetAllText( char** ppBuf, size_t* length ); | |
102 | ||
103 | virtual void SetFileName( const char* fname ); | |
104 | ||
105 | virtual void HoldCursor( bool hold ); | |
106 | ||
107 | //virtual wxsPluginBase* Clone() { return new wxsLSEditorPlugin(); }; | |
108 | ||
109 | virtual string FindWordAtCursor(); | |
110 | ||
111 | virtual void GetCursorPos( int* line, int* column ); | |
112 | virtual void SetCursorPos( int line, int column ); | |
113 | ||
114 | virtual void GetPagePos( int* line, int* column ); | |
115 | ||
116 | virtual void GetText( int fromLine, int fromColumn, | |
117 | int tillLine, int tillColumn, | |
118 | char** ppBuf, size_t* length ); | |
119 | ||
120 | virtual void InsertText( int line, int column, | |
121 | char* text, size_t lenght ); | |
122 | ||
123 | virtual void DeleteText( int fromLine, int fromColumn, | |
124 | int tillLine, int tillColumn ); | |
125 | ||
126 | virtual void PositionToXY( int line, int column, int* x, int* y ); | |
127 | ||
128 | virtual void GetSelectionRange( int* fromLine, int* fromColumn, | |
129 | int* tillLine, int* tillColumn ); | |
130 | ||
131 | virtual wxSize GetCharacterSize(); | |
132 | ||
133 | virtual bool IsUnixText(); | |
134 | ||
135 | // some extras (just in case..) | |
136 | ||
137 | //wxTextEditorModel& GetModel(); | |
138 | //wxTextEditorView& GetView(); | |
139 | }; | |
140 | ||
141 | //--------------------------------------------------------------------------- | |
142 | ||
143 | %init %{ | |
144 | ||
145 | wxClassInfo::CleanUpClasses(); | |
146 | wxClassInfo::InitializeClasses(); | |
147 | ||
148 | %} | |
149 | ||
150 | //--------------------------------------------------------------------------- |