#include <sys/stat.h>
#include <ctype.h>
+#include "gdk/gdk.h"
+#include "gtk/gtk.h"
+#include "gdk/gdkkeysyms.h"
+
+//-----------------------------------------------------------------------------
+// data
+//-----------------------------------------------------------------------------
+
+extern bool g_blockEventsOnDrag;
+
//-----------------------------------------------------------------------------
// "changed"
//-----------------------------------------------------------------------------
win->CalculateScrollbar();
}
-
//-----------------------------------------------------------------------------
// wxTextCtrl
//-----------------------------------------------------------------------------
EVT_CHAR(wxTextCtrl::OnChar)
END_EVENT_TABLE()
+#ifndef NO_TEXT_WINDOW_STREAM
wxTextCtrl::wxTextCtrl() : streambuf()
{
if (allocate()) setp(base(),ebuf());
m_modified = FALSE;
}
+#else
+wxTextCtrl::wxTextCtrl()
+{
+ m_modified = FALSE;
+}
+#endif
+#ifndef NO_TEXT_WINDOW_STREAM
wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value,
const wxPoint &pos, const wxSize &size,
int style, const wxValidator& validator, const wxString &name ) : streambuf()
m_modified = FALSE;
Create( parent, id, value, pos, size, style, validator, name );
}
+#else
+wxTextCtrl::wxTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value,
+ const wxPoint &pos, const wxSize &size,
+ int style, const wxValidator& validator, const wxString &name )
+{
+ m_modified = FALSE;
+ Create( parent, id, value, pos, size, style, validator, name );
+}
+#endif
bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
const wxPoint &pos, const wxSize &size,
int style, const wxValidator& validator, const wxString &name )
{
m_needParent = TRUE;
+ m_acceptsFocus = TRUE;
PreCreation( parent, id, pos, size, style, name );
}
// we want to be notified about text changes
- gtk_signal_connect(GTK_OBJECT(m_text), "changed",
- GTK_SIGNAL_FUNC(gtk_text_changed_callback),
- (gpointer)this);
+ gtk_signal_connect( GTK_OBJECT(m_text), "changed",
+ GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)this);
if (!value.IsNull())
{
event.SetEventObject(this);
if (GetEventHandler()->ProcessEvent(event)) return;
}
- else if (key_event.KeyCode() == WXK_TAB)
- {
- wxNavigationKeyEvent event;
- event.SetDirection( key_event.m_shiftDown );
- event.SetWindowChange(FALSE);
- event.SetEventObject(this);
- if (GetEventHandler()->ProcessEvent(event)) return;
- }
key_event.Skip();
}
+#ifndef NO_TEXT_WINDOW_STREAM
int wxTextCtrl::overflow( int WXUNUSED(c) )
{
int len = pptr() - pbase();
WriteText(buf);
return *this;
}
+#endif
GtkWidget* wxTextCtrl::GetConnectWidget()
{