long style,
const wxString& name)
{
+#ifdef __WXMAC__
+ style |= wxVSCROLL | wxHSCROLL;
+#endif
wxControl::Create(parent, id, pos, size,
- style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
+ style | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name);
#ifdef LINK_LEXERS
if (file.IsOpened())
{
wxString contents;
-#if wxUSE_UNICODE
- wxMemoryBuffer buffer;
-#else
- wxString buffer;
-#endif
off_t len = file.Length();
if (len > 0)
{
- void *bufptr = buffer.GetWriteBuf(len);
- success = (file.Read(bufptr, len) == len);
- buffer.UngetWriteBuf(len);
#if wxUSE_UNICODE
+ wxMemoryBuffer buffer(len);
+ success = (file.Read(buffer.GetData(), len) == len);
contents = wxString(buffer, *wxConvCurrent);
#else
+ wxString buffer;
+ success = (file.Read(wxStringBuffer(buffer, len), len) == len);
contents = buffer;
#endif
}
#endif
+void wxStyledTextCtrl::SetUseAntiAliasing(bool useAA) {
+ m_swx->SetUseAntiAliasing(useAA);
+}
+
+bool wxStyledTextCtrl::GetUseAntiAliasing() {
+ return m_swx->GetUseAntiAliasing();
+}
+
//----------------------------------------------------------------------
// Event handlers
}
-void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& WXUNUSED(evt)) {
+void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
m_swx->DoLoseFocus();
+ evt.Skip();
}
-void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& WXUNUSED(evt)) {
+void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) {
m_swx->DoGainFocus();
+ evt.Skip();
}
}
+void wxStyledTextCtrl::OnIdle(wxIdleEvent& evt) {
+ m_swx->DoOnIdle(evt);
+}
+
+
//----------------------------------------------------------------------
// Turn notifications from Scintilla into events