// click it
virtual bool AcceptsFocusFromKeyboard() const { return AcceptsFocus(); }
- // NB: these methods really don't belong here but with the current
- // class hierarchy there is no other place for them :-(
-
- // get the default child of this parent, i.e. the one which is
- // activated by pressing <Enter>
- virtual wxWindow *GetDefaultItem() const { return NULL; }
-
- // set this child as default, return the old default
- virtual wxWindow *SetDefaultItem(wxWindow * WXUNUSED(child))
- { return NULL; }
-
- // set this child as temporary default
- virtual void SetTmpDefaultItem(wxWindow * WXUNUSED(win)) { }
-
// navigates in the specified direction by sending a wxNavigationKeyEvent
virtual bool Navigate(int flags = wxNavigationKeyEvent::IsForward);
{ return DoPopupMenu(menu, x, y); }
#endif // wxUSE_MENUS
+ // override this method to return true for controls having multiple pages
+ virtual bool HasMultiplePages() const { return false; }
+
+
// scrollbars
// ----------
// associate this help text with all windows with the same id as this
// one
void SetHelpTextForId(const wxString& text);
- // get the help string associated with this window (may be empty)
- wxString GetHelpText() const;
-#else
+ // get the help string associated with the given position in this window
+ //
+ // notice that pt may be invalid if event origin is keyboard or unknown
+ // and this method should return the global window help text then
+ virtual wxString GetHelpTextAtPoint(const wxPoint& pt,
+ wxHelpEvent::Origin origin) const;
+ // returns the position-independent help text
+ wxString GetHelpText() const
+ {
+ return GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Unknown);
+ }
+
+#else // !wxUSE_HELP
// silently ignore SetHelpText() calls
void SetHelpText(const wxString& WXUNUSED(text)) { }
void SetHelpTextForId(const wxString& WXUNUSED(text)) { }
wxAccessible* GetOrCreateAccessible() ;
#endif
+
+ // Set window transparency if the platform supports it
+ virtual bool SetTransparent(wxByte WXUNUSED(alpha)) { return false; }
+ virtual bool CanSetTransparent() { return false; }
+
+
// implementation
// --------------
// implements the window variants
virtual void DoSetWindowVariant( wxWindowVariant variant ) ;
+ // Must be called when mouse capture is lost to send
+ // wxMouseCaptureLostEvent to windows on capture stack.
+ static void NotifyCaptureLost();
+
private:
// contains the last id generated by NewControlId
static int ms_lastControlId;
// the stack of windows which have captured the mouse
static struct WXDLLEXPORT wxWindowNext *ms_winCaptureNext;
+ // the window that currently has mouse capture
+ static wxWindow *ms_winCaptureCurrent;
+ // indicates if execution is inside CaptureMouse/ReleaseMouse
+ static bool ms_winCaptureChanging;
DECLARE_ABSTRACT_CLASS(wxWindowBase)
DECLARE_NO_COPY_CLASS(wxWindowBase)
#endif // wxUniv
#include "wx/x11/window.h"
#elif defined(__WXMGL__)
- #ifdef __WXUNIVERSAL__
- #define wxWindowNative wxWindowMGL
- #else // !wxUniv
- #define wxWindowMGL wxWindow
- #endif // wxUniv
+ #define wxWindowNative wxWindowMGL
#include "wx/mgl/window.h"
+#elif defined(__WXDFB__)
+ #define wxWindowNative wxWindowDFB
+ #include "wx/dfb/window.h"
#elif defined(__WXMAC__)
#ifdef __WXUNIVERSAL__
#define wxWindowNative wxWindowMac