- return TRUE;
-}
-
-void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
-{
- SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
- Refresh();
-}
-
-void wxDialog::Fit()
-{
- wxWindow::Fit();
-}
-
-// Handle a close event from the window manager
-static void wxCloseDialogCallback( Widget WXUNUSED(widget), XtPointer client_data,
- XmAnyCallbackStruct *WXUNUSED(cbs))
-{
- wxDialog *dialog = (wxDialog *)client_data;
- wxCloseEvent closeEvent(wxEVT_CLOSE_WINDOW, dialog->GetId());
- closeEvent.SetEventObject(dialog);
-
- // May delete the dialog (with delayed deletion)
- dialog->GetEventHandler()->ProcessEvent(closeEvent);
-}
-
-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(wxEVT_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
- {
- // For simplicity, OnKeyDown is the same as OnChar
- // TODO: filter modifier key presses from OnChar
- keyEvent.SetEventType(wxEVT_KEY_DOWN);
-
- // Only process OnChar if OnKeyDown didn't swallow it
- if (!dialog->GetEventHandler()->ProcessEvent (keyEvent))
- {
- 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;
- */