]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/window.h
toolbar support in all orientations
[wxWidgets.git] / include / wx / window.h
index 9218362735bf52068b2cfa78def8497e516bfbb9..0fd842426a90fd5a1031d0fb868006cb3b73d026 100644 (file)
@@ -525,12 +525,7 @@ public:
     // tells the item how much more space there is available in the opposite
     // direction (-1 if unknown).
     virtual bool
     // tells the item how much more space there is available in the opposite
     // direction (-1 if unknown).
     virtual bool
-    InformFirstDirection(int WXUNUSED(direction),
-                         int WXUNUSED(size),
-                         int WXUNUSED(availableOtherDir))
-    {
-        return false;
-    }
+    InformFirstDirection(int direction, int size, int availableOtherDir);
 
     // sends a size event to the window using its current size -- this has an
     // effect of refreshing the window layout
 
     // sends a size event to the window using its current size -- this has an
     // effect of refreshing the window layout
@@ -803,6 +798,13 @@ public:
     bool ProcessWindowEvent(wxEvent& event)
         { return GetEventHandler()->ProcessEvent(event); }
 
     bool ProcessWindowEvent(wxEvent& event)
         { return GetEventHandler()->ProcessEvent(event); }
 
+        // Call GetEventHandler()->ProcessEventLocally(): this should be used
+        // instead of calling ProcessEventLocally() directly on the window
+        // itself as this wouldn't take any pushed event handlers into account
+        // correctly
+    bool ProcessWindowEventLocally(wxEvent& event)
+        { return GetEventHandler()->ProcessEventLocally(event); }
+
         // Process an event by calling GetEventHandler()->ProcessEvent() and
         // handling any exceptions thrown by event handlers. It's mostly useful
         // when processing wx events when called from C code (e.g. in GTK+
         // Process an event by calling GetEventHandler()->ProcessEvent() and
         // handling any exceptions thrown by event handlers. It's mostly useful
         // when processing wx events when called from C code (e.g. in GTK+
@@ -830,6 +832,7 @@ protected:
     //       The same holds for all other wxEvtHandler functions.
 
     using wxEvtHandler::ProcessEvent;
     //       The same holds for all other wxEvtHandler functions.
 
     using wxEvtHandler::ProcessEvent;
+    using wxEvtHandler::ProcessEventLocally;
 #if wxUSE_THREADS
     using wxEvtHandler::ProcessThreadEvent;
 #endif
 #if wxUSE_THREADS
     using wxEvtHandler::ProcessThreadEvent;
 #endif
@@ -1139,7 +1142,8 @@ public:
 
     // simply return the id of the selected item or wxID_NONE without
     // generating any events
 
     // simply return the id of the selected item or wxID_NONE without
     // generating any events
-    int GetPopupMenuSelectionFromUser(wxMenu& menu, const wxPoint& pos)
+    int GetPopupMenuSelectionFromUser(wxMenu& menu,
+                                      const wxPoint& pos = wxDefaultPosition)
         { return DoGetPopupMenuSelectionFromUser(menu, pos.x, pos.y); }
     int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y)
         { return DoGetPopupMenuSelectionFromUser(menu, x, y); }
         { return DoGetPopupMenuSelectionFromUser(menu, pos.x, pos.y); }
     int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y)
         { return DoGetPopupMenuSelectionFromUser(menu, x, y); }
@@ -1361,10 +1365,11 @@ public:
 
         // virtual function for implementing internal idle
         // behaviour
 
         // virtual function for implementing internal idle
         // behaviour
-        virtual void OnInternalIdle() {}
+        virtual void OnInternalIdle();
 
 
-        // call internal idle recursively
-//        void ProcessInternalIdle() ;
+    // Send idle event to window and all subwindows
+    // Returns true if more idle time is requested.
+    virtual bool SendIdleEvents(wxIdleEvent& event);
 
         // get the handle of the window for the underlying window system: this
         // is only used for wxWin itself or for user code which wants to call
 
         // get the handle of the window for the underlying window system: this
         // is only used for wxWin itself or for user code which wants to call
@@ -1671,8 +1676,9 @@ protected:
     // of the left and the right border in the x component of the returned size
     // and the sum of the heights of the top and bottom borders in the y one
     //
     // of the left and the right border in the x component of the returned size
     // and the sum of the heights of the top and bottom borders in the y one
     //
-    // NB: this is currently only implemented by wxMSW and wxUniv so far and
-    //     simply asserts in the other ports
+    // NB: this is currently only implemented properly for wxMSW, wxGTK and
+    //     wxUniv and doesn't behave correctly in the presence of scrollbars in
+    //     the other ports
     virtual wxSize DoGetBorderSize() const;
 
     // move the window to the specified location and resize it: this is called
     virtual wxSize DoGetBorderSize() const;
 
     // move the window to the specified location and resize it: this is called