]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
Some manual updates; in MDI sample, child frames now have default size/position ...
[wxWidgets.git] / src / common / event.cpp
index f05273d3877bc3fe82c1f49d2fbd7d9741524954..428d8eb13a59cc74f207009a3bb59a4e77714c14 100644 (file)
@@ -56,6 +56,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxNavigationKeyEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxPaletteChangedEvent, wxEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxQueryNewPaletteEvent, wxEvent)
 
 const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; }
 
@@ -222,8 +224,8 @@ bool wxMouseEvent::ButtonIsDown(int but) const
 // Find the logical position of the event given the DC
 wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const
 {
-       wxPoint pt(dc.DeviceToLogicalX(m_x), dc.DeviceToLogicalY(m_y));
-       return pt;
+    wxPoint pt(dc.DeviceToLogicalX(m_x), dc.DeviceToLogicalY(m_y));
+    return pt;
 }
 
 
@@ -305,14 +307,14 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
     // chain of event handlers.
     if (IsKindOf(CLASSINFO(wxWindow)))
     {
-         wxWindow *win = (wxWindow *)this;
-
-         // Can only use the validator of the window which
-         // is receiving the event
-         if ( (win == event.GetEventObject()) &&
-             win->GetValidator() &&
-                 win->GetValidator()->ProcessEvent(event))
-               return TRUE;
+        wxWindow *win = (wxWindow *)this;
+
+      // Can only use the validator of the window which
+      // is receiving the event
+      if ( (win == event.GetEventObject()) &&
+          win->GetValidator() &&
+          win->GetValidator()->ProcessEvent(event))
+            return TRUE;
     }
 
     // Search upwards through the inheritance hierarchy
@@ -327,8 +329,8 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
   // Try going down the event handler chain
   if ( GetNextHandler() )
   {
-           if ( GetNextHandler()->ProcessEvent(event) )
-                       return TRUE;
+        if ( GetNextHandler()->ProcessEvent(event) )
+            return TRUE;
   }
 
   // Carry on up the parent-child hierarchy,
@@ -337,7 +339,7 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
   if (IsKindOf(CLASSINFO(wxWindow)) && event.IsKindOf(CLASSINFO(wxCommandEvent)))
   {
     wxWindow *win = (wxWindow *)this;
-       wxWindow *parent = win->GetParent();
+    wxWindow *parent = win->GetParent();
     if (parent && !parent->IsBeingDeleted())
       return win->GetParent()->GetEventHandler()->ProcessEvent(event);
   }
@@ -364,14 +366,14 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
           (table.entries[i].m_lastId != -1 &&
             (commandId >= table.entries[i].m_id && commandId <= table.entries[i].m_lastId))))
     {
-               event.Skip(FALSE);
+          event.Skip(FALSE);
                 event.m_callbackUserData = table.entries[i].m_callbackUserData;
-       
+    
         (this->*((wxEventFunction) (table.entries[i].m_fn)))(event);
 
-               if ( event.GetSkipped() )
-                       return FALSE;
-                 else
+        if ( event.GetSkipped() )
+            return FALSE;
+          else
             return TRUE;
     }
     i ++;
@@ -381,8 +383,8 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
 
 void wxEvtHandler::Connect( int id, int lastId,
                             int eventType,
-                           wxObjectEventFunction func,
-                           wxObject *userData )
+                    wxObjectEventFunction func,
+                    wxObject *userData )
 {
   wxEventTableEntry *entry = new wxEventTableEntry;
   entry->m_id = id;
@@ -418,14 +420,14 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event )
         (entry->m_lastId != -1 &&
         (commandId >= entry->m_id && commandId <= entry->m_lastId))))
        {
-         event.Skip(FALSE);
+      event.Skip(FALSE);
           event.m_callbackUserData = entry->m_callbackUserData;
-       
+    
           (this->*((wxEventFunction) (entry->m_fn)))(event);
 
-         if (event.GetSkipped()) 
-           return FALSE;
-         else
+      if (event.GetSkipped()) 
+        return FALSE;
+      else
             return TRUE;
        }
     };