#include "wx/defs.h"
#include "wx/window.h"
#include "wx/dc.h"
+#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/layout.h"
case GDK_F12: key_code = WXK_F12; break;
default:
{
- if (event->length == 1)
- {
- key_code = toupper( (unsigned char)*event->string );
- }
- else if ((keysym & 0xFF) == keysym)
+ if (event->length == 1)
+ {
+ key_code = toupper( (unsigned char)*event->string );
+ }
+ else if ((keysym & 0xFF) == keysym)
{
guint upper = gdk_keyval_to_upper( (guint)keysym );
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
case GDK_F12: key_code = WXK_F12; break;
default:
{
- if (event->length == 1)
- {
- key_code = (unsigned char)*event->string;
- }
- else if ((keysym & 0xFF) == keysym)
+ if (event->length == 1)
+ {
+ key_code = (unsigned char)*event->string;
+ }
+ else if ((keysym & 0xFF) == keysym)
{
key_code = (guint)keysym;
}
wxEraseEvent eevent( win->GetId() );
eevent.SetEventObject( win );
+#if 1
win->GetEventHandler()->ProcessEvent(eevent);
+#else
+ if (!win->GetEventHandler()->ProcessEvent(eevent))
+ {
+ wxClientDC dc( win );
+ dc.SetBrush( wxBrush( win->GetBackgroundColour(), wxSOLID ) );
+ dc.SetPen( *wxTRANSPARENT_PEN );
+
+ wxRegionIterator upd( win->GetUpdateRegion() );
+ while (upd)
+ {
+ dc.DrawRectangle( upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
+ upd ++;
+ }
+ }
+#endif
wxPaintEvent event( win->GetId() );
event.SetEventObject( win );
wxEraseEvent eevent( win->GetId() );
eevent.SetEventObject( win );
+
+#if 1
win->GetEventHandler()->ProcessEvent(eevent);
+#else
+ if (!win->GetEventHandler()->ProcessEvent(eevent))
+ {
+ if (!win->GetEventHandler()->ProcessEvent(eevent))
+ {
+ wxClientDC dc( win );
+ dc.SetBrush( wxBrush( win->GetBackgroundColour(), wxSOLID ) );
+ dc.SetPen( *wxTRANSPARENT_PEN );
+
+ wxRegionIterator upd( win->GetUpdateRegion() );
+ while (upd)
+ {
+ dc.DrawRectangle( upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
+ upd ++;
+ }
+ }
+ }
+#endif
wxPaintEvent event( win->GetId() );
event.SetEventObject( win );
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") );
+/*
+ printf( "DoSetSize: name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height );
+*/
+
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
if (width) (*width) = m_width - dw;
if (height) (*height) = m_height - dh;
}
+
+/*
+ printf( "GetClientSize, name %s ", GetName().c_str() );
+ if (width) printf( " width = %d", (*width) );
+ if (height) printf( " height = %d", (*height) );
+ printf( "\n" );
+*/
}
void wxWindow::DoGetPosition( int *x, int *y ) const