git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37901
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// so we adjust the encoding before passing it to Scintilla. See also
// wxStyledTextCtrl::StyleSetCharacterSet
wxFontEncoding encoding = (wxFontEncoding)(characterSet-1);
// so we adjust the encoding before passing it to Scintilla. See also
// wxStyledTextCtrl::StyleSetCharacterSet
wxFontEncoding encoding = (wxFontEncoding)(characterSet-1);
wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding);
if (ea.GetCount())
encoding = ea[0];
wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding);
if (ea.GetCount())
encoding = ea[0];
-#if wxUSE_POPUPWIN //-----------------------------------
+#if wxUSE_POPUPWIN //-----------------------------------
// implement wxPopupWindow for the Mac!!)
//
// In the meantime, be careful to duplicate any changes as needed...
// implement wxPopupWindow for the Mac!!)
//
// In the meantime, be careful to duplicate any changes as needed...
-//
-
-// A popup window to place the wxSTCListBox upon
+//
+
+// A popup window to place the wxSTCListBox upon
class wxSTCListBoxWin : public wxPopupWindow
{
private:
class wxSTCListBoxWin : public wxPopupWindow
{
private:
CallBackAction doubleClickAction;
void* doubleClickActionData;
public:
CallBackAction doubleClickAction;
void* doubleClickActionData;
public:
- wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point location) :
+ wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
wxPopupWindow(parent, wxBORDER_NONE)
{
SetBackgroundColour(*wxBLACK); // for our simple border
wxPopupWindow(parent, wxBORDER_NONE)
{
SetBackgroundColour(*wxBLACK); // for our simple border
// "right" to the user. But since the wxPopupWindow or its children
// can't receive focus then we have to pull a fast one and temporarily
// parent the listctrl on the STC window and then call SetFocus and
// "right" to the user. But since the wxPopupWindow or its children
// can't receive focus then we have to pull a fast one and temporarily
// parent the listctrl on the STC window and then call SetFocus and
- // then reparent it back to the popup.
+ // then reparent it back to the popup.
lv->SetFocus();
lv->Reparent(this);
#ifdef __WXMSW__
lv->SetFocus();
lv->Reparent(this);
#ifdef __WXMSW__
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE()
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE()
#else // wxUSE_POPUPWIN -----------------------------------
#else // wxUSE_POPUPWIN -----------------------------------
void OnActivate(wxListEvent& WXUNUSED(event)) {
doubleClickAction(doubleClickActionData);
}
void OnActivate(wxListEvent& WXUNUSED(event)) {
doubleClickAction(doubleClickActionData);
}
long count = GETLB(id)->GetItemCount();
long itemID = GETLB(id)->InsertItem(count, wxEmptyString);
GETLB(id)->SetItem(itemID, 1, text);
long count = GETLB(id)->GetItemCount();
long itemID = GETLB(id)->InsertItem(count, wxEmptyString);
GETLB(id)->SetItem(itemID, 1, text);
- maxStrWidth = wxMax(maxStrWidth, text.Length());
+ maxStrWidth = wxMax(maxStrWidth, text.length());
if (type != -1) {
wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
long idx = imgTypeMap->Item(type);
if (type != -1) {
wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
long idx = imgTypeMap->Item(type);
void ListBoxImpl::SetList(const char* list, char separator, char typesep) {
GETLB(id)->Freeze();
void ListBoxImpl::SetList(const char* list, char separator, char typesep) {
GETLB(id)->Freeze();
wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator);
while ( tkzr.HasMoreTokens() ) {
wxString token = tkzr.GetNextToken();
wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator);
while ( tkzr.HasMoreTokens() ) {
wxString token = tkzr.GetNextToken();
// so we adjust the encoding before passing it to Scintilla. See also
// wxStyledTextCtrl::StyleSetCharacterSet
wxFontEncoding encoding = (wxFontEncoding)(characterSet-1);
// so we adjust the encoding before passing it to Scintilla. See also
// wxStyledTextCtrl::StyleSetCharacterSet
wxFontEncoding encoding = (wxFontEncoding)(characterSet-1);
wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding);
if (ea.GetCount())
encoding = ea[0];
wxFontEncodingArray ea = wxEncodingConverter::GetPlatformEquivalents(encoding);
if (ea.GetCount())
encoding = ea[0];
-#if wxUSE_POPUPWIN //-----------------------------------
+#if wxUSE_POPUPWIN //-----------------------------------
// implement wxPopupWindow for the Mac!!)
//
// In the meantime, be careful to duplicate any changes as needed...
// implement wxPopupWindow for the Mac!!)
//
// In the meantime, be careful to duplicate any changes as needed...
-//
-
-// A popup window to place the wxSTCListBox upon
+//
+
+// A popup window to place the wxSTCListBox upon
class wxSTCListBoxWin : public wxPopupWindow
{
private:
class wxSTCListBoxWin : public wxPopupWindow
{
private:
CallBackAction doubleClickAction;
void* doubleClickActionData;
public:
CallBackAction doubleClickAction;
void* doubleClickActionData;
public:
- wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point location) :
+ wxSTCListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) :
wxPopupWindow(parent, wxBORDER_NONE)
{
SetBackgroundColour(*wxBLACK); // for our simple border
wxPopupWindow(parent, wxBORDER_NONE)
{
SetBackgroundColour(*wxBLACK); // for our simple border
// "right" to the user. But since the wxPopupWindow or its children
// can't receive focus then we have to pull a fast one and temporarily
// parent the listctrl on the STC window and then call SetFocus and
// "right" to the user. But since the wxPopupWindow or its children
// can't receive focus then we have to pull a fast one and temporarily
// parent the listctrl on the STC window and then call SetFocus and
- // then reparent it back to the popup.
+ // then reparent it back to the popup.
lv->SetFocus();
lv->Reparent(this);
#ifdef __WXMSW__
lv->SetFocus();
lv->Reparent(this);
#ifdef __WXMSW__
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE()
EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSTCListBoxWin::OnActivate)
END_EVENT_TABLE()
#else // wxUSE_POPUPWIN -----------------------------------
#else // wxUSE_POPUPWIN -----------------------------------
void OnActivate(wxListEvent& WXUNUSED(event)) {
doubleClickAction(doubleClickActionData);
}
void OnActivate(wxListEvent& WXUNUSED(event)) {
doubleClickAction(doubleClickActionData);
}
long count = GETLB(id)->GetItemCount();
long itemID = GETLB(id)->InsertItem(count, wxEmptyString);
GETLB(id)->SetItem(itemID, 1, text);
long count = GETLB(id)->GetItemCount();
long itemID = GETLB(id)->InsertItem(count, wxEmptyString);
GETLB(id)->SetItem(itemID, 1, text);
- maxStrWidth = wxMax(maxStrWidth, text.Length());
+ maxStrWidth = wxMax(maxStrWidth, text.length());
if (type != -1) {
wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
long idx = imgTypeMap->Item(type);
if (type != -1) {
wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
long idx = imgTypeMap->Item(type);
void ListBoxImpl::SetList(const char* list, char separator, char typesep) {
GETLB(id)->Freeze();
void ListBoxImpl::SetList(const char* list, char separator, char typesep) {
GETLB(id)->Freeze();
wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator);
while ( tkzr.HasMoreTokens() ) {
wxString token = tkzr.GetNextToken();
wxStringTokenizer tkzr(stc2wx(list), (wxChar)separator);
while ( tkzr.HasMoreTokens() ) {
wxString token = tkzr.GetNextToken();