- Window window;
- Display *display;
-
- wxWindow* win = (wxWindow *)wxWidgetHashTable->Get((long)w);
- if (!win)
- return;
-
- switch(event -> type)
- {
- case Expose :
- {
- window = (Window) win -> GetXWindow();
- display = (Display *) win -> GetXDisplay();
-
- wxRect* rect = new wxRect(event->xexpose.x, event->xexpose.y,
- event->xexpose.width, event->xexpose.height);
- win->m_updateRects.Append((wxObject*) rect);
-
- if (event -> xexpose.count == 0)
- {
- wxPaintEvent event(win->GetId());
- event.SetEventObject(win);
- win->GetEventHandler()->ProcessEvent(event);
-
- win->ClearUpdateRects();
- }
- break;
- }
- default :
- {
- cout << "\n\nNew Event ! is = " << event -> type << "\n";
- break;
- }
- }
-}
-
-static void wxDialogBoxEventHandler (Widget wid,
- XtPointer WXUNUSED(client_data),
- XEvent* event,
- Boolean *continueToDispatch)
-{
- wxDialog *dialog = (wxDialog *)wxWidgetHashTable->Get((long)wid);
- if (dialog)
- {
- wxMouseEvent wxevent(wxEVT_NULL);
- if (wxTranslateMouseEvent(wxevent, dialog, wid, event))
- {
- wxevent.SetEventObject(dialog);
- wxevent.SetId(dialog->GetId());
- dialog->GetEventHandler()->ProcessEvent(wxevent);
- }
- else
- {
- // An attempt to implement OnCharHook by calling OnCharHook first;
- // if this returns TRUE, set continueToDispatch to False
- // (don't continue processing).
- // Otherwise set it to True and call OnChar.
- wxKeyEvent keyEvent(wxEVENT_TYPE_CHAR);
- if (wxTranslateKeyEvent(keyEvent, dialog, wid, event))
- {
- keyEvent.SetEventObject(dialog);
- keyEvent.SetId(dialog->GetId());
- keyEvent.SetEventType(wxEVT_CHAR_HOOK);
- if (dialog->GetEventHandler()->ProcessEvent(keyEvent))
- {
- *continueToDispatch = False;
- return;
- }
- else
- {
- keyEvent.SetEventType(wxEVT_CHAR);
- dialog->GetEventHandler()->ProcessEvent(keyEvent);
- }
- }
- }
- }
- *continueToDispatch = True;
-}
-
-static void wxUnmapBulletinBoard(Widget WXUNUSED(dialog), wxDialog *WXUNUSED(client), XtPointer WXUNUSED(call) )
-{
- /* This gets called when the dialog is being shown, which
- * defeats modal showing.
- client->m_modalShowing = FALSE ;
- client->m_isShown = FALSE;
- */
-}
-
-void wxDialog::ChangeFont(bool WXUNUSED(keepOriginalSize))
-{
- // TODO