// wxTextCtrl
//-----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
-
BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
EVT_CHAR(wxTextCtrl::OnChar)
m_text = NULL;
m_showPositionOnThaw = NULL;
- m_gdkHandCursor = NULL;
- m_gdkXTermCursor = NULL;
}
wxTextCtrl::~wxTextCtrl()
{
- if(m_gdkHandCursor)
- gdk_cursor_unref(m_gdkHandCursor);
- if(m_gdkXTermCursor)
- gdk_cursor_unref(m_gdkXTermCursor);
}
wxTextCtrl::wxTextCtrl( wxWindow *parent,
if (style & wxTE_AUTO_URL)
{
GtkTextIter start, end;
- m_gdkHandCursor = gdk_cursor_new(GDK_HAND2);
- m_gdkXTermCursor = gdk_cursor_new(GDK_XTERM);
// We create our wxUrl tag here for slight efficiency gain - we
// don't have to check for the tag existance in callbacks,
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
- if (from == -1 && to == -1)
- {
- from = 0;
- to = GetValue().length();
- }
-
if ( IsMultiLine() )
{
+ if (from == -1 && to == -1)
+ {
+ from = 0;
+ to = GetValue().length();
+ }
+
GtkTextIter fromi, toi;
gtk_text_buffer_get_iter_at_offset( m_buffer, &fromi, from );
gtk_text_buffer_get_iter_at_offset( m_buffer, &toi, to );
gint l = gtk_text_buffer_get_char_count( m_buffer );
wxCHECK_MSG( position >= 0 && position <= l, false,
- _T("invalid range in wxTextCtrl::GetStyle") );
+ wxT("invalid range in wxTextCtrl::GetStyle") );
GtkTextIter positioni;
gtk_text_buffer_get_iter_at_offset(m_buffer, &positioni, position);
gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(m_text), &end, x, y);
if (!gtk_text_iter_has_tag(&end, tag))
{
- gdk_window_set_cursor(gtk_text_view_get_window(GTK_TEXT_VIEW(m_text),
- GTK_TEXT_WINDOW_TEXT), m_gdkXTermCursor);
+ SetCursor(wxCursor(wxCURSOR_IBEAM));
return;
}
- gdk_window_set_cursor(gtk_text_view_get_window(GTK_TEXT_VIEW(m_text),
- GTK_TEXT_WINDOW_TEXT), m_gdkHandCursor);
+ SetCursor(wxCursor(wxCURSOR_HAND));
start = end;
if(!gtk_text_iter_begins_tag(&start, tag))