Add wxStyledTextCtrl::AutoCompGetCurrentText()
Added support for SCI_AUTOCGETCURRENTTEXT API. Closes #16263.
This commit is contained in:
parent
f33da324c0
commit
1bcb30f6d7
@ -129,6 +129,7 @@ All (GUI):
|
||||
- Optimize font registration in PostScript code emitted by wxPostScriptDC.
|
||||
- Fix drawing filled arc with wxPostScriptDC::DrawArc().
|
||||
- Optimize PostScript code emitted by wxPostScriptDC to draw elliptic arcs.
|
||||
- Add wxStyledTextCtrl::AutoCompGetCurrentText() (NewPagodi).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@ -4498,6 +4498,9 @@ public:
|
||||
// Get currently selected item position in the auto-completion list
|
||||
int AutoCompGetCurrent() const;
|
||||
|
||||
// Get currently selected item text in the auto-completion list
|
||||
wxString AutoCompGetCurrentText() const;
|
||||
|
||||
// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
|
||||
void AutoCompSetCaseInsensitiveBehaviour(int behaviour);
|
||||
|
||||
|
@ -5757,6 +5757,13 @@ public:
|
||||
*/
|
||||
int AutoCompGetCurrent() const;
|
||||
|
||||
/**
|
||||
Get currently selected item text in the auto-completion list
|
||||
|
||||
@since 3.1.1
|
||||
*/
|
||||
wxString AutoCompGetCurrentText() const;
|
||||
|
||||
/**
|
||||
Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
|
||||
|
||||
|
@ -85,6 +85,7 @@ docsMap = {
|
||||
'AutoCGetCaseInsensitiveBehaviour':'Autocompletion',
|
||||
'AutoCGetChooseSingle':'Autocompletion',
|
||||
'AutoCGetCurrent':'Autocompletion',
|
||||
'AutoCGetCurrentText':'Autocompletion',
|
||||
'AutoCGetDropRestOfWord':'Autocompletion',
|
||||
'AutoCGetIgnoreCase':'Autocompletion',
|
||||
'AutoCGetMaxHeight':'Autocompletion',
|
||||
@ -806,6 +807,8 @@ docSubstitutions = {
|
||||
'TextWidth':{'NUL terminated text argument.':''},
|
||||
'GetCurLine':{'Result is NUL-terminated.':'',
|
||||
'Returns the index of the caret on the line.':''},
|
||||
'AutoCGetCurrentText':{'Result is NUL-terminated.':'',
|
||||
'Returns the length of the item text':''},
|
||||
'StartStyling':
|
||||
{'The unused parameter is no longer used and should be set to 0.':''},
|
||||
|
||||
@ -1330,6 +1333,7 @@ sinceAnnotations= {
|
||||
'VCHomeDisplay':'3.1.0',
|
||||
'VCHomeDisplayExtend':'3.1.0',
|
||||
|
||||
'AutoCGetCurrentText':'3.1.1',
|
||||
'FoldDisplayTextSetStyle':'3.1.1',
|
||||
'GetDirectFunction':'3.1.1',
|
||||
'GetDirectPointer':'3.1.1',
|
||||
|
@ -522,7 +522,23 @@ methodOverrideMap = {
|
||||
'AutoCGetTypeSeparator' : ('AutoCompGetTypeSeparator', 0, 0),
|
||||
'AutoCSetTypeSeparator' : ('AutoCompSetTypeSeparator', 0, 0),
|
||||
'AutoCGetCurrent' : ('AutoCompGetCurrent', 0, 0),
|
||||
'AutoCGetCurrentText' : (None, 0, 0),
|
||||
|
||||
'AutoCGetCurrentText' :
|
||||
('AutoCompGetCurrentText',
|
||||
'wxString %s() const;',
|
||||
|
||||
'''wxString %s() const {
|
||||
const int msg = %s;
|
||||
long len = SendMsg(msg, 0, 0);
|
||||
|
||||
wxMemoryBuffer mbuf(len+1);
|
||||
char* buf = (char*)mbuf.GetWriteBuf(len+1);
|
||||
SendMsg(msg, 0, (sptr_t)buf);
|
||||
mbuf.UngetWriteBuf(len);
|
||||
mbuf.AppendByte(0);
|
||||
return stc2wx(buf);'''
|
||||
),
|
||||
|
||||
'AutoCSetMaxWidth' : ('AutoCompSetMaxWidth', 0, 0),
|
||||
'AutoCGetMaxWidth' : ('AutoCompGetMaxWidth', 0, 0),
|
||||
'AutoCSetMaxHeight' : ('AutoCompSetMaxHeight', 0, 0),
|
||||
|
@ -3618,6 +3618,19 @@ int wxStyledTextCtrl::AutoCompGetCurrent() const
|
||||
return SendMsg(SCI_AUTOCGETCURRENT, 0, 0);
|
||||
}
|
||||
|
||||
// Get currently selected item text in the auto-completion list
|
||||
wxString wxStyledTextCtrl::AutoCompGetCurrentText() const {
|
||||
const int msg = SCI_AUTOCGETCURRENTTEXT;
|
||||
long len = SendMsg(msg, 0, 0);
|
||||
|
||||
wxMemoryBuffer mbuf(len+1);
|
||||
char* buf = (char*)mbuf.GetWriteBuf(len+1);
|
||||
SendMsg(msg, 0, (sptr_t)buf);
|
||||
mbuf.UngetWriteBuf(len);
|
||||
mbuf.AppendByte(0);
|
||||
return stc2wx(buf);
|
||||
}
|
||||
|
||||
// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
|
||||
void wxStyledTextCtrl::AutoCompSetCaseInsensitiveBehaviour(int behaviour)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user