#include "wx/textctrl.h"
#ifndef WX_PRECOMP
+ #include "wx/app.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/utils.h"
#include "wx/strconv.h"
#include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo())
+#include "wx/evtloop.h"
#include <sys/types.h>
#include <sys/stat.h>
// which implicitly calls wxYield()) so we override GtkText::draw() and simply
// don't do anything if we're inside wxYield()
-extern bool wxIsInsideYield;
-
extern "C" {
typedef void (*GtkDrawCallback)(GtkWidget *widget, GdkRectangle *rect);
}
extern "C" {
static void wxgtk_text_draw( GtkWidget *widget, GdkRectangle *rect)
{
- if ( !wxIsInsideYield )
+ wxEventLoopBase* loop = wxEventLoopBase::GetActive();
+ if ( loop && !loop->IsYielding() )
{
wxCHECK_RET( gs_gtk_text_draw != wxgtk_text_draw,
_T("infinite recursion in wxgtk_text_draw aborted") );
m_modified = false;
SetUpdateFont(false);
m_text =
- m_vScrollbar = (GtkWidget *)NULL;
+ m_vScrollbar = NULL;
}
wxTextCtrl::~wxTextCtrl()
if (multi_line)
{
// create our control ...
- m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
+ m_text = gtk_text_new( NULL, NULL );
// ... and put into the upper left hand corner of the table
bool bHasHScrollbar = false;
}
}
-wxString wxTextCtrl::GetValue() const
+wxString wxTextCtrl::DoGetValue() const
{
wxCHECK_MSG( m_text != NULL, wxEmptyString, wxT("invalid text ctrl") );
if (cursor.Ok())
{
- GdkWindow *window = (GdkWindow*) NULL;
+ GdkWindow *window = NULL;
if (HasFlag(wxTE_MULTILINE))
window = GTK_TEXT(m_text)->text_area;
else
// freeze/thaw
// ----------------------------------------------------------------------------
-void wxTextCtrl::Freeze()
+void wxTextCtrl::DoFreeze()
{
if ( HasFlag(wxTE_MULTILINE) )
{
}
}
-void wxTextCtrl::Thaw()
+void wxTextCtrl::DoThaw()
{
if ( HasFlag(wxTE_MULTILINE) )
{