]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/stc/private.h
1 ////////////////////////////////////////////////////////////////////////////
2 // Name: wx/stc/private.h
3 // Purpose: Private declarations for wxSTC
7 // Copyright: (c) 2000 by Total Control Software
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_STC_PRIVATE_H_
12 #define _WX_STC_PRIVATE_H_
15 #include "wx/string.h"
17 //----------------------------------------------------------------------
18 // Utility functions used within wxSTC
22 extern wxString
stc2wx(const char* str
);
23 extern wxString
stc2wx(const char* str
, size_t len
);
24 extern wxCharBuffer
wx2stc(const wxString
& str
);
26 // This function takes both wxString and wxCharBuffer because it uses either
27 // one or the other of them depending on the build mode. In Unicode it uses the
28 // length of the already converted buffer to avoid doing the conversion again
29 // just to compute the length.
30 inline size_t wx2stclen(const wxString
& WXUNUSED(str
), const wxCharBuffer
& buf
)
32 return buf
.length() - 1;
37 inline wxString
stc2wx(const char* str
) {
40 inline wxString
stc2wx(const char* str
, size_t len
) {
41 return wxString(str
, len
);
43 inline const char* wx2stc(const wxString
& str
) {
47 // As explained above, the buffer argument is only used in Unicode build.
48 inline size_t wx2stclen(const wxString
& str
, const char* WXUNUSED(buf
))
55 #endif // _WX_STC_PRIVATE_H_