Remove wxSTC methods for configuring autocomp popup

The wxSTC methods AutoCompSetColours and AutoCompUseListCtrl were added
in fe7b332b7b to allow some configuration
of the autocompletion popup window. Based on subsequent discussion, it
was decided that a better method of configuring the popup and getting
information about the configuration is needed. For now, simply remove
the current methods while the better solution is created.

In addition, since the configuration options are being removed, set the
popup to have the appearance of a list control since that was the
appearance before any configuration options were added.
This commit is contained in:
New Pagodi 2019-06-25 15:51:58 -05:00
parent 8a69ec7c4e
commit caaebf43bc
10 changed files with 1 additions and 185 deletions

View File

@ -5187,16 +5187,6 @@ public:
// Register an image for use in autocompletion lists.
void RegisterImage(int type, const wxBitmap& bmp);
// Set the colours used to display the items in an autocompletion list.
void AutoCompSetColours(const wxColour& background, const wxColour& text,
const wxColour& highlight,
const wxColour& highlightText);
// Use a wxListCtrl to display autocompletion lists.
void AutoCompUseListCtrl(bool useListCtrl = true,
const wxColour& currentBgColour = wxNullColour,
const wxColour& currentTextColour = wxNullColour);
// The following methods are nearly equivalent to their similarly named

View File

@ -7423,54 +7423,6 @@ public:
*/
void RegisterImage(int type, const wxBitmap& bmp);
/**
Set the colours used to display the items in an autocompletion list.
This method can be used if the default colours make the list hard to
read or if specific colours are desired for whatever reason.
@param background
The colour used for the background of the list.
@param text
The colour used for all text except for the selected item.
@param highlight
The colour used to highlight the selected item in the list.
@param highlightText
The colour used for the text of the selected item.
@remarks
To reset one or more of the colours to its default,
call this method with wxNullColour for the colour or colours
to be reset.
@since 3.1.3
*/
void AutoCompSetColours(const wxColour& background, const wxColour& text,
const wxColour& highlight,
const wxColour& highlightText);
/**
Use a wxListCtrl to display autocompletion and user lists.
By default lists will be displayed in a wxListBox. Use this method to
display them in a wxListCtrl instead. The primary difference is that
wxListCtrl has hot tracking to highlight the item under the mouse cursor.
@param useListCtrl
Set this to true to use a wxListCtrl and to false to use a
wxListBox.
@param currentBgColour
The colour used to highlight the item under the mouse cursor.
@param currentTextColour
The colour used for the text of the item under the mouse cursor.
@remarks
To reset one or more of the colours to its default,
call this method with wxNullColour for the colour or colours
to be reset.
@since 3.1.3
*/
void AutoCompUseListCtrl(bool useListCtrl = true,
const wxColour& currentBgColour = wxNullColour,
const wxColour& currentTextColour = wxNullColour);
//@}

View File

@ -2356,7 +2356,7 @@ wxSTCListBoxVisualData::wxSTCListBoxVisualData(int d):m_desiredVisibleRows(d),
m_useDefaultTextColour(true),
m_useDefaultHighlightBgColour(true),
m_useDefaultHighlightTextColour(true),
m_hasListCtrlAppearance(false),
m_hasListCtrlAppearance(true),
m_useDefaultCurrentBgColour(true),
m_useDefaultCurrentTextColour(true)
{
@ -3163,18 +3163,6 @@ void ListBoxImpl::SetDoubleClickAction(CallBackAction action, void *data) {
m_listBox->SetDoubleClickAction(action, data);
}
void ListBoxImpl::SetColours(const wxColour& background, const wxColour& text,
const wxColour& hiliBg, const wxColour& hiliText)
{
m_visualData->SetColours(background, text, hiliBg, hiliText);
}
void ListBoxImpl::UseListCtrlStyle(bool useListCtrl, const wxColour& currentBg,
const wxColour& currentText)
{
m_visualData->UseListCtrlStyle(useListCtrl, currentBg, currentText);
}
ListBox::ListBox() {
}

View File

@ -49,9 +49,6 @@ public:
virtual void ClearRegisteredImages() wxOVERRIDE;
virtual void SetDoubleClickAction(CallBackAction, void *) wxOVERRIDE;
virtual void SetList(const char* list, char separator, char typesep) wxOVERRIDE;
void SetColours(const wxColour&, const wxColour&,
const wxColour&, const wxColour&);
void UseListCtrlStyle(bool, const wxColour&, const wxColour&);
};

View File

@ -1399,24 +1399,6 @@ void ScintillaWX::DoRegisterImage(int type, const wxBitmap& bmp) {
static_cast<ListBoxImpl*>(ac.lb)->RegisterImageHelper(type, bmp);
}
void ScintillaWX::SetListBoxColours(const wxColour& background,
const wxColour& text,
const wxColour& highlight,
const wxColour& highlightText)
{
static_cast<ListBoxImpl*>(ac.lb)->SetColours(background, text,
highlight, highlightText);
}
void ScintillaWX::UseListCtrlStyleForLists(bool useListCtrl,
const wxColour& currentBgColour,
const wxColour& currentTextColour)
{
static_cast<ListBoxImpl*>(ac.lb)->UseListCtrlStyle(useListCtrl,
currentBgColour,
currentTextColour);
}
sptr_t ScintillaWX::DirectFunction(
ScintillaWX* swx, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return swx->WndProc(iMessage, wParam, lParam);

View File

@ -201,9 +201,6 @@ public:
void SetPaintAbandoned(){paintState = paintAbandoned;}
void DoMarkerDefineBitmap(int markerNumber, const wxBitmap& bmp);
void DoRegisterImage(int type, const wxBitmap& bmp);
void SetListBoxColours(const wxColour&, const wxColour&,
const wxColour&, const wxColour&);
void UseListCtrlStyleForLists(bool, const wxColour&, const wxColour&);
private:
bool capturedMouse;

View File

@ -5046,22 +5046,6 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp)
m_swx->DoRegisterImage(type, bmp);
}
void wxStyledTextCtrl::AutoCompSetColours(const wxColour& background,
const wxColour& text,
const wxColour& highlight,
const wxColour& highlightText)
{
m_swx->SetListBoxColours(background, text, highlight, highlightText);
}
void wxStyledTextCtrl::AutoCompUseListCtrl(bool useListCtrl,
const wxColour& currentBgColour,
const wxColour& currentTextColour)
{
m_swx->UseListCtrlStyleForLists(useListCtrl, currentBgColour,
currentTextColour);
}

View File

@ -573,22 +573,6 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp)
m_swx->DoRegisterImage(type, bmp);
}
void wxStyledTextCtrl::AutoCompSetColours(const wxColour& background,
const wxColour& text,
const wxColour& highlight,
const wxColour& highlightText)
{
m_swx->SetListBoxColours(background, text, highlight, highlightText);
}
void wxStyledTextCtrl::AutoCompUseListCtrl(bool useListCtrl,
const wxColour& currentBgColour,
const wxColour& currentTextColour)
{
m_swx->UseListCtrlStyleForLists(useListCtrl, currentBgColour,
currentTextColour);
}

View File

@ -304,16 +304,6 @@ public:
// Register an image for use in autocompletion lists.
void RegisterImage(int type, const wxBitmap& bmp);
// Set the colours used to display the items in an autocompletion list.
void AutoCompSetColours(const wxColour& background, const wxColour& text,
const wxColour& highlight,
const wxColour& highlightText);
// Use a wxListCtrl to display autocompletion lists.
void AutoCompUseListCtrl(bool useListCtrl = true,
const wxColour& currentBgColour = wxNullColour,
const wxColour& currentTextColour = wxNullColour);
// The following methods are nearly equivalent to their similarly named

View File

@ -363,54 +363,6 @@ public:
*/
void RegisterImage(int type, const wxBitmap& bmp);
/**
Set the colours used to display the items in an autocompletion list.
This method can be used if the default colours make the list hard to
read or if specific colours are desired for whatever reason.
@param background
The colour used for the background of the list.
@param text
The colour used for all text except for the selected item.
@param highlight
The colour used to highlight the selected item in the list.
@param highlightText
The colour used for the text of the selected item.
@remarks
To reset one or more of the colours to its default,
call this method with wxNullColour for the colour or colours
to be reset.
@since 3.1.3
*/
void AutoCompSetColours(const wxColour& background, const wxColour& text,
const wxColour& highlight,
const wxColour& highlightText);
/**
Use a wxListCtrl to display autocompletion and user lists.
By default lists will be displayed in a wxListBox. Use this method to
display them in a wxListCtrl instead. The primary difference is that
wxListCtrl has hot tracking to highlight the item under the mouse cursor.
@param useListCtrl
Set this to true to use a wxListCtrl and to false to use a
wxListBox.
@param currentBgColour
The colour used to highlight the item under the mouse cursor.
@param currentTextColour
The colour used for the text of the item under the mouse cursor.
@remarks
To reset one or more of the colours to its default,
call this method with wxNullColour for the colour or colours
to be reset.
@since 3.1.3
*/
void AutoCompUseListCtrl(bool useListCtrl = true,
const wxColour& currentBgColour = wxNullColour,
const wxColour& currentTextColour = wxNullColour);
//@}