windows emit wxCreateWindowEvent

generic controls use wxINVERT for rubberbands etc
  wxXOR maps to GdkXOR etc


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-05-25 13:36:09 +00:00
parent 92b87be518
commit 3c679789bd
11 changed files with 64 additions and 41 deletions

View File

@@ -973,19 +973,19 @@ void wxWindowDC::SetLogicalFunction( int function )
GdkFunction mode = GDK_COPY;
switch (function)
{
case wxXOR: mode = GDK_INVERT; break;
case wxINVERT: mode = GDK_XOR; break;
case wxXOR: mode = GDK_XOR; break;
case wxINVERT: mode = GDK_INVERT; break;
#if (GDK_MINOR_VERSION > 0)
case wxOR_REVERSE: mode = GDK_OR_REVERSE; break;
case wxAND_REVERSE: mode = GDK_AND_REVERSE; break;
case wxCLEAR: mode = GDK_CLEAR; break;
case wxSET: mode = GDK_SET; break;
case wxOR_INVERT: mode = GDK_OR_INVERT; break;
case wxAND: mode = GDK_AND; break;
case wxOR: mode = GDK_OR; break;
case wxEQUIV: mode = GDK_EQUIV; break;
case wxNAND: mode = GDK_NAND; break;
case wxAND_INVERT: mode = GDK_AND_INVERT; break;
case wxOR_REVERSE: mode = GDK_OR_REVERSE; break;
case wxAND_REVERSE: mode = GDK_AND_REVERSE; break;
case wxCLEAR: mode = GDK_CLEAR; break;
case wxSET: mode = GDK_SET; break;
case wxOR_INVERT: mode = GDK_OR_INVERT; break;
case wxAND: mode = GDK_AND; break;
case wxOR: mode = GDK_OR; break;
case wxEQUIV: mode = GDK_EQUIV; break;
case wxNAND: mode = GDK_NAND; break;
case wxAND_INVERT: mode = GDK_AND_INVERT; break;
/* ? wxSRC_INVERT GDK_AND_REVERSE, GDK_OR_REVERSE, GDK_OR_INVERT */
#endif
default: break;

View File

@@ -44,10 +44,11 @@ extern bool g_blockEventsOnDrag;
static void
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
{
if (g_isIdle) wxapp_install_idle_handler();
if (!win->m_hasVMT) return;
if (g_isIdle)
wxapp_install_idle_handler();
win->SetModified();
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() );
@@ -63,11 +64,12 @@ gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
static void
gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
{
if (g_isIdle) wxapp_install_idle_handler();
if (!win->m_hasVMT) return;
if (g_isIdle)
wxapp_install_idle_handler();
win->CalculateScrollbar();
if (!win->m_hasVMT) return;
}
//-----------------------------------------------------------------------------
@@ -273,7 +275,6 @@ void wxTextCtrl::CalculateScrollbar()
if (m_vScrollbarVisible)
{
gtk_widget_hide( m_vScrollbar );
m_vScrollbarVisible = FALSE;
}
}
@@ -282,7 +283,6 @@ void wxTextCtrl::CalculateScrollbar()
if (!m_vScrollbarVisible)
{
gtk_widget_show( m_vScrollbar );
m_vScrollbarVisible = TRUE;
}
}

View File

@@ -1541,6 +1541,10 @@ gtk_window_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
win->SetForegroundColour( win->GetForegroundColour() );
win->SetCursor( win->GetCursor() );
wxWindowCreateEvent event( win );
event.SetEventObject( win );
win->GetEventHandler()->ProcessEvent( event );
return FALSE;
}