1 ////////////////////////////////////////////////////////////////////////////
3 // Purpose: A wxWindows implementation of Scintilla. This class is the
4 // one meant to be used directly by wx applications. It does not
5 // derive directly from the Scintilla classes, and in fact there
6 // is no mention of Scintilla classes at all in this header.
7 // This class delegates all method calls and events to the
8 // Scintilla objects and so forth. This allows the use of
9 // Scintilla without polluting the namespace with all the
10 // classes and itentifiers from Scintilla.
14 // Created: 13-Jan-2000
16 // Copyright: (c) 2000 by Total Control Software
17 // Licence: wxWindows license
18 /////////////////////////////////////////////////////////////////////////////
28 #ifdef WXMAKINGDLL_STC
29 #define WXDLLIMPEXP_STC WXEXPORT
30 #elif defined(WXUSINGDLL)
31 #define WXDLLIMPEXP_STC WXIMPORT
32 #else // not making nor using DLL
33 #define WXDLLIMPEXP_STC
37 // SWIG can't handle "#if" type of conditionals, only "#ifdef"
41 #if wxUSE_DRAG_AND_DROP
46 //----------------------------------------------------------------------
48 // Should a wxPopupWindow be used for the call tips and autocomplete windows?
49 #ifndef wxSTC_USE_POPUP
50 #define wxSTC_USE_POPUP 1
53 //----------------------------------------------------------------------
54 // BEGIN generated section. The following code is automatically generated
55 // by gen_iface.py. Do not edit this file. Edit stc.h.in instead
61 //-----------------------------------------
62 // Commands that can be bound to keystrokes
67 // END of generated section
68 //----------------------------------------------------------------------
70 class ScintillaWX
; // forward declare
72 struct SCNotification
;
75 extern WXDLLIMPEXP_STC
const wxChar
* wxSTCNameStr
;
76 class WXDLLIMPEXP_STC wxStyledTextCtrl
;
77 class WXDLLIMPEXP_STC wxStyledTextEvent
;
80 //----------------------------------------------------------------------
82 class WXDLLIMPEXP_STC wxStyledTextCtrl
: public wxControl
{
86 %%pythonAppend wxStyledTextCtrl
"self._setOORInfo(self)"
87 %%pythonAppend
wxStyledTextCtrl() ""
89 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
,
90 const wxPoint
& pos
= wxDefaultPosition
,
91 const wxSize
& size
= wxDefaultSize
, long style
= 0,
92 const wxString
& name
= wxPySTCNameStr
);
93 %%name
(PreStyledTextCtrl
) wxStyledTextCtrl();
96 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
,
97 const wxPoint
& pos
= wxDefaultPosition
,
98 const wxSize
& size
= wxDefaultSize
, long style
= 0,
99 const wxString
& name
= wxSTCNameStr
);
100 wxStyledTextCtrl() { m_swx
= NULL
; }
105 void Create(wxWindow
*parent
, wxWindowID id
,
106 const wxPoint
& pos
= wxDefaultPosition
,
107 const wxSize
& size
= wxDefaultSize
, long style
= 0,
108 const wxString
& name
= wxSTCNameStr
);
111 //----------------------------------------------------------------------
112 // BEGIN generated section. The following code is automatically generated
113 // by gen_iface.py. Do not edit this file. Edit stc.h.in instead
118 // END of generated section
119 //----------------------------------------------------------------------
123 // Returns the line number of the line with the caret.
124 int GetCurrentLine();
126 // Extract style settings from a spec-string which is composed of one or
127 // more of the following comma separated elements:
129 // bold turns on bold
130 // italic turns on italics
131 // fore:#RRGGBB sets the foreground colour
132 // back:#RRGGBB sets the background colour
133 // face:[facename] sets the font face name to use
134 // size:[num] sets the font size in points
135 // eol turns on eol filling
136 // underline turns on underlining
138 void StyleSetSpec(int styleNum
, const wxString
& spec
);
142 // Set style size, face, bold, italic, and underline attributes from
143 // a wxFont's attributes.
144 void StyleSetFont(int styleNum
, wxFont
& font
);
148 // Set all font style attributes at once.
149 void StyleSetFontAttr(int styleNum
, int size
,
150 const wxString
& faceName
,
151 bool bold
, bool italic
,
156 // Perform one of the operations defined by the wxSTC_CMD_* constants.
157 void CmdKeyExecute(int cmd
);
161 // Set the left and right margin in the edit area, measured in pixels.
162 void SetMargins(int left
, int right
);
165 // Retrieve the start and end positions of the current selection.
167 void GetSelection(int* OUTPUT
, int* OUTPUT
);
169 void GetSelection(int* startPos
, int* endPos
);
172 // Retrieve the point in the window where a position is displayed.
173 wxPoint
PointFromPosition(int pos
);
176 // Scroll enough to make the given line visible
177 void ScrollToLine(int line
);
180 // Scroll enough to make the given column visible
181 void ScrollToColumn(int column
);
184 // Send a message to Scintilla
185 long SendMsg(int msg
, long wp
=0, long lp
=0);
188 // Set the vertical scrollbar to use instead of the ont that's built-in.
189 void SetVScrollBar(wxScrollBar
* bar
) { m_vScrollBar
= bar
; }
192 // Set the horizontal scrollbar to use instead of the ont that's built-in.
193 void SetHScrollBar(wxScrollBar
* bar
) { m_hScrollBar
= bar
; }
195 // Can be used to prevent the EVT_CHAR handler from adding the char
196 bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed
; }
197 void SetLastKeydownProcessed(bool val
) { m_lastKeyDownConsumed
= val
; }
199 // Write the contents of the editor to filename
200 bool SaveFile(const wxString
& filename
);
202 // Load the contents of filename into the editor
203 bool LoadFile(const wxString
& filename
);
206 // Allow for simulating a DnD DragOver
207 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
209 // Allow for simulating a DnD DropText
210 bool DoDropText(long x
, long y
, const wxString
& data
);
215 //----------------------------------------------------------------------
221 void OnPaint(wxPaintEvent
& evt
);
222 void OnScrollWin(wxScrollWinEvent
& evt
);
223 void OnScroll(wxScrollEvent
& evt
);
224 void OnSize(wxSizeEvent
& evt
);
225 void OnMouseLeftDown(wxMouseEvent
& evt
);
226 void OnMouseMove(wxMouseEvent
& evt
);
227 void OnMouseLeftUp(wxMouseEvent
& evt
);
228 void OnMouseRightUp(wxMouseEvent
& evt
);
229 void OnMouseMiddleUp(wxMouseEvent
& evt
);
230 void OnContextMenu(wxContextMenuEvent
& evt
);
231 void OnMouseWheel(wxMouseEvent
& evt
);
232 void OnChar(wxKeyEvent
& evt
);
233 void OnKeyDown(wxKeyEvent
& evt
);
234 void OnLoseFocus(wxFocusEvent
& evt
);
235 void OnGainFocus(wxFocusEvent
& evt
);
236 void OnSysColourChanged(wxSysColourChangedEvent
& evt
);
237 void OnEraseBackground(wxEraseEvent
& evt
);
238 void OnMenu(wxCommandEvent
& evt
);
239 void OnListBox(wxCommandEvent
& evt
);
240 void OnIdle(wxIdleEvent
& evt
);
243 // Turn notifications from Scintilla into events
245 void NotifyParent(SCNotification
* scn
);
247 DECLARE_EVENT_TABLE()
248 DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl
)
253 wxStopWatch m_stopWatch
;
254 wxScrollBar
* m_vScrollBar
;
255 wxScrollBar
* m_hScrollBar
;
257 bool m_lastKeyDownConsumed
;
259 friend class ScintillaWX
;
260 friend class Platform
;
264 //----------------------------------------------------------------------
266 class WXDLLIMPEXP_STC wxStyledTextEvent
: public wxCommandEvent
{
268 wxStyledTextEvent(wxEventType commandType
=0, int id
=0);
270 wxStyledTextEvent(const wxStyledTextEvent
& event
);
272 ~wxStyledTextEvent() {}
274 void SetPosition(int pos
) { m_position
= pos
; }
275 void SetKey(int k
) { m_key
= k
; }
276 void SetModifiers(int m
) { m_modifiers
= m
; }
277 void SetModificationType(int t
) { m_modificationType
= t
; }
278 void SetText(const wxString
& t
) { m_text
= t
; }
279 void SetLength(int len
) { m_length
= len
; }
280 void SetLinesAdded(int num
) { m_linesAdded
= num
; }
281 void SetLine(int val
) { m_line
= val
; }
282 void SetFoldLevelNow(int val
) { m_foldLevelNow
= val
; }
283 void SetFoldLevelPrev(int val
) { m_foldLevelPrev
= val
; }
284 void SetMargin(int val
) { m_margin
= val
; }
285 void SetMessage(int val
) { m_message
= val
; }
286 void SetWParam(int val
) { m_wParam
= val
; }
287 void SetLParam(int val
) { m_lParam
= val
; }
288 void SetListType(int val
) { m_listType
= val
; }
289 void SetX(int val
) { m_x
= val
; }
290 void SetY(int val
) { m_y
= val
; }
291 void SetDragText(const wxString
& val
) { m_dragText
= val
; }
292 void SetDragAllowMove(bool val
) { m_dragAllowMove
= val
; }
294 void SetDragResult(wxDragResult val
) { m_dragResult
= val
; }
297 int GetPosition() const { return m_position
; }
298 int GetKey() const { return m_key
; }
299 int GetModifiers() const { return m_modifiers
; }
300 int GetModificationType() const { return m_modificationType
; }
301 wxString
GetText() const { return m_text
; }
302 int GetLength() const { return m_length
; }
303 int GetLinesAdded() const { return m_linesAdded
; }
304 int GetLine() const { return m_line
; }
305 int GetFoldLevelNow() const { return m_foldLevelNow
; }
306 int GetFoldLevelPrev() const { return m_foldLevelPrev
; }
307 int GetMargin() const { return m_margin
; }
308 int GetMessage() const { return m_message
; }
309 int GetWParam() const { return m_wParam
; }
310 int GetLParam() const { return m_lParam
; }
311 int GetListType() const { return m_listType
; }
312 int GetX() const { return m_x
; }
313 int GetY() const { return m_y
; }
314 wxString
GetDragText() { return m_dragText
; }
315 bool GetDragAllowMove() { return m_dragAllowMove
; }
317 wxDragResult
GetDragResult() { return m_dragResult
; }
320 bool GetShift() const;
321 bool GetControl() const;
324 virtual wxEvent
* Clone() const { return new wxStyledTextEvent(*this); }
328 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent
)
334 int m_modificationType
; // wxEVT_STC_MODIFIED
342 int m_margin
; // wxEVT_STC_MARGINCLICK
344 int m_message
; // wxEVT_STC_MACRORECORD
352 wxString m_dragText
; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
353 bool m_dragAllowMove
; // wxEVT_STC_START_DRAG
355 #if wxUSE_DRAG_AND_DROP
356 wxDragResult m_dragResult
; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
364 BEGIN_DECLARE_EVENT_TYPES()
365 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_CHANGE
, 1650)
366 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_STYLENEEDED
, 1651)
367 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_CHARADDED
, 1652)
368 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTREACHED
, 1653)
369 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTLEFT
, 1654)
370 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_ROMODIFYATTEMPT
, 1655)
371 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_KEY
, 1656)
372 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DOUBLECLICK
, 1657)
373 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_UPDATEUI
, 1658)
374 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_MODIFIED
, 1659)
375 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_MACRORECORD
, 1660)
376 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_MARGINCLICK
, 1661)
377 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_NEEDSHOWN
, 1662)
378 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_POSCHANGED
, 1663)
379 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_PAINTED
, 1664)
380 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_USERLISTSELECTION
, 1665)
381 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_URIDROPPED
, 1666)
382 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DWELLSTART
, 1667)
383 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DWELLEND
, 1668)
384 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_START_DRAG
, 1669)
385 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DRAG_OVER
, 1670)
386 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_DO_DROP
, 1671)
387 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_ZOOM
, 1672)
388 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_CLICK
, 1673)
389 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_DCLICK
, 1674)
390 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC
, wxEVT_STC_CALLTIP_CLICK
, 1675)
391 END_DECLARE_EVENT_TYPES()
395 wxEVT_STC_STYLENEEDED
,
397 wxEVT_STC_SAVEPOINTREACHED
,
398 wxEVT_STC_SAVEPOINTLEFT
,
399 wxEVT_STC_ROMODIFYATTEMPT
,
401 wxEVT_STC_DOUBLECLICK
,
404 wxEVT_STC_MACRORECORD
,
405 wxEVT_STC_MARGINCLICK
,
407 wxEVT_STC_POSCHANGED
,
409 wxEVT_STC_USERLISTSELECTION
,
410 wxEVT_STC_URIDROPPED
,
411 wxEVT_STC_DWELLSTART
,
413 wxEVT_STC_START_DRAG
,
417 wxEVT_STC_HOTSPOT_CLICK
,
418 wxEVT_STC_HOTSPOT_DCLICK
,
419 wxEVT_STC_CALLTIP_CLICK
426 typedef void (wxEvtHandler::*wxStyledTextEventFunction
)(wxStyledTextEvent
&);
428 #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
429 #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
430 #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
431 #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
432 #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
433 #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
434 #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
435 #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
436 #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
437 #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
438 #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
439 #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
440 #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
441 #define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
442 #define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
443 #define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
444 #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
445 #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
446 #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
447 #define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
448 #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
449 #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
450 #define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
451 #define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
452 #define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
453 #define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
457 //----------------------------------------------------------------------
458 // Utility functions used within wxSTC
462 inline wxString
stc2wx(const char* str
) {
464 return wxString(str
, wxConvUTF8
);
466 return wxString(str
);
471 wxString
stc2wx(const char* str
, size_t len
);
473 inline wxString
stc2wx(const char* str
, size_t len
) {
474 return wxString(str
, len
);
480 inline const wxWX2MBbuf
wx2stc(const wxString
& str
) {
481 return str
.mb_str(wxConvUTF8
);
484 inline const wxWX2MBbuf
wx2stc(const wxString
& str
) {
485 return str
.mbc_str();
492 //----------------------------------------------------------------------