hdc = (wxDC*)hdc_;
}
-void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID) {
+void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID) {
Release();
hdc = new wxMemoryDC();
hdcOwned = true;
return d;
}
-int SurfaceImpl::InternalLeading(Font &font) {
+int SurfaceImpl::InternalLeading(Font &WXUNUSED(font)) {
return 0;
}
return hdc->GetCharWidth();
}
-int SurfaceImpl::SetPalette(Palette *pal, bool inBackGround) {
+int SurfaceImpl::SetPalette(Palette *WXUNUSED(pal), bool WXUNUSED(inBackGround)) {
return 0;
}
unicodeMode=unicodeMode_;
}
-void SurfaceImpl::SetDBCSMode(int codePage) {
+void SurfaceImpl::SetDBCSMode(int WXUNUSED(codePage)) {
// dbcsMode = codePage == SC_CP_DBCS;
}
break;
case cursorHand:
cursorId = wxCURSOR_HAND;
+ break;
default:
cursorId = wxCURSOR_ARROW;
break;
// Helper classes for ListBox
-// This is a simple subclass of wxLIstView that just resets focus to the
+// This is a simple subclass of wxListView that just resets focus to the
// parent when it gets it.
class wxSTCListBox : public wxListView {
public:
event.Skip();
}
+ void OnKillFocus(wxFocusEvent& event) {
+ // Do nothing. Prevents base class from resetting the colors...
+ }
+
private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(wxSTCListBox, wxListView)
EVT_SET_FOCUS( wxSTCListBox::OnFocus)
+ EVT_KILL_FOCUS(wxSTCListBox::OnKillFocus)
END_EVENT_TABLE()
lv->SetCursor(wxCursor(wxCURSOR_ARROW));
lv->InsertColumn(0, wxEmptyString);
lv->InsertColumn(1, wxEmptyString);
+
+ // Eventhough we immediately reset the focus to the parent, this helps
+ // things to look right...
+ lv->SetFocus();
+
Hide();
}
+
+ // On OSX and (possibly others) there can still be pending
+ // messages/events for the list control when Scintilla wants to
+ // close it, so do a pending delete of it instead of destroying
+ // immediately.
+ bool Destroy() {
+ if ( !wxPendingDelete.Member(this) )
+ wxPendingDelete.Append(this);
+ return TRUE;
+ }
+
+
int IconWidth() {
wxImageList* il = lv->GetImageList(wxIMAGE_LIST_SMALL);
if (il != NULL) {
// wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of
// the max size in Append and calculate it here...
int maxw = maxStrWidth;
- int maxh = 0;
+ int maxh ;
// give it a default if there are no lines, and/or add a bit more
if (maxw == 0) maxw = 100;
}
-int ListBoxImpl::Find(const char *prefix) {
+int ListBoxImpl::Find(const char *WXUNUSED(prefix)) {
// No longer used
return -1;
}
//----------------------------------------------------------------------
-DynamicLibrary *DynamicLibrary::Load(const char *modulePath) {
+DynamicLibrary *DynamicLibrary::Load(const char *WXUNUSED(modulePath)) {
wxFAIL_MSG(wxT("Dynamic lexer loading not implemented yet"));
return NULL;
}
wxLogDebug(stc2wx(s));
}
-bool Platform::IsKeyDown(int key) {
+bool Platform::IsKeyDown(int WXUNUSED(key)) {
return false; // I don't think we'll need this.
}
}
-bool Platform::IsDBCSLeadByte(int codePage, char ch) {
+bool Platform::IsDBCSLeadByte(int WXUNUSED(codePage), char WXUNUSED(ch)) {
return false;
}
-int Platform::DBCSCharLength(int codePage, const char *s) {
+int Platform::DBCSCharLength(int WXUNUSED(codePage), const char *WXUNUSED(s)) {
return 1;
}