#include "wx/accel.h"
#endif // wxUSE_ACCEL
+// when building wxUniv/Foo we don't want the code for native menu use to be
+// compiled in - it should only be used when building real wxFoo
+#ifdef __WXUNIVERSAL__
+ #define wxUSE_MENUS_NATIVE 0
+#else // __WXMSW__
+ #define wxUSE_MENUS_NATIVE wxUSE_MENUS
+#endif // __WXUNIVERSAL__/__WXMSW__
+
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
// the title (or label, see below) of the window: the text which the
// window shows
- virtual void SetTitle( const wxString & WXUNUSED(title) ) { }
- virtual wxString GetTitle() const { return ""; }
+ virtual void SetTitle( const wxString& title ) = 0;
+ virtual wxString GetTitle() const = 0;
// label is just the same as the title (but for, e.g., buttons it
// makes more sense to speak about labels)
// clear the window entirely
virtual void Clear() = 0;
+ // freeze the window: don't redraw it until it is thawed
+ virtual void Freeze() { }
+
+ // thaw the window: redraw it after it had been frozen
+ virtual void Thaw() { }
+
// adjust DC for drawing on this window
virtual void PrepareDC( wxDC & WXUNUSED(dc) ) { }
virtual void ScrollWindow( int dx, int dy,
const wxRect* rect = (wxRect *) NULL ) = 0;
+ // scrolls window by line/page: note that not all controls support this
+ //
+ // return TRUE if the position changed, FALSE otherwise
+ virtual bool ScrollLines(int WXUNUSED(lines)) { return FALSE; }
+ virtual bool ScrollPages(int WXUNUSED(pages)) { return FALSE; }
+
+ // convenient wrappers for ScrollLines/Pages
+ bool LineUp() { return ScrollLines(-1); }
+ bool LineDown() { return ScrollLines(1); }
+ bool PageUp() { return ScrollPages(-1); }
+ bool PageDown() { return ScrollPages(1); }
+
// context-sensitive help
// ----------------------
// the window id - a number which uniquely identifies a window among
// its siblings unless it is -1
wxWindowID m_windowId;
-
+
// the parent window of this window (or NULL) and the list of the children
// of this window
wxWindow *m_parent;
#define sm_classwxWindowGTK sm_classwxWindow
#endif // wxUniv
#include "wx/gtk/window.h"
+#elif defined(__WXMGL__)
+ #ifdef __WXUNIVERSAL__
+ #define wxWindowNative wxWindowMGL
+ #else // !wxUniv
+ #define wxWindowMGL wxWindow
+ #define sm_classwxWindowMGL sm_classwxWindow
+ #endif // wxUniv
+ #include "wx/mgl/window.h"
#elif defined(__WXQT__)
#include "wx/qt/window.h"
#elif defined(__WXMAC__)
+ #ifdef __WXUNIVERSAL__
+ #define wxWindowNative wxWindowMac
+ #else // !wxUniv
+ #define wxWindowMac wxWindow
+ #define sm_classwxWindowMac sm_classwxWindow
+ #endif // wxUniv
#include "wx/mac/window.h"
#elif defined(__WXPM__)
+ #ifdef __WXUNIVERSAL__
+ #define wxWindowNative wxWindowOS2
+ #else // !wxUniv
+ #define wxWindowOS2 wxWindow
+ #define sm_classwxWindowOS2 sm_classwxWindow
+ #endif // wxUniv/!wxUniv
#include "wx/os2/window.h"
#endif
// global functions
// ----------------------------------------------------------------------------
-WXDLLEXPORT extern wxWindow* wxGetActiveWindow();
-
// Find the wxWindow at the current mouse position, also returning the mouse
// position.
WXDLLEXPORT extern wxWindow* wxFindWindowAtPointer(wxPoint& pt);