// creating the window
// -------------------
- // default ctor
- wxWindowBase() { InitBase(); }
+ // default ctor, initializes everything which can be initialized before
+ // Create()
+ wxWindowBase();
// pseudo ctor (can't be virtual, called from ctor)
bool CreateBase(wxWindowBase *parent,
int m_maxVirtualWidth;
int m_maxVirtualHeight;
- // common part of all ctors: it is not virtual because it is called from
- // ctor
- void InitBase();
-
// override this to change the default (i.e. used when no style is
// specified) border for the window class
virtual wxBorder GetDefaultBorder() const;
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) = 0;
#endif // wxUSE_MENUS
- // Makes an adjustment to the window position (for example, a frame that has
- // a toolbar that it manages itself).
- virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) const;
+ // Makes an adjustment to the window position to make it relative to the
+ // parents client area, e.g. if the parent is a frame with a toolbar, its
+ // (0, 0) is just below the toolbar
+ virtual void AdjustForParentClientOrigin(int& x, int& y,
+ int sizeFlags = 0) const;
private:
#define wxWindowNative wxWindowMSW
#else // !wxUniv
#define wxWindowMSW wxWindow
- #define sm_classwxWindowMSW sm_classwxWindow
- #define sm_constructorPropertiesCountwxWindowMSW sm_constructorPropertiesCountwxWindow
- #define sm_constructorPropertieswxWindowMSW sm_constructorPropertieswxWindow
- #define sm_constructorwxWindowMSW sm_constructorwxWindow
#endif // wxUniv/!wxUniv
#include "wx/msw/window.h"
#elif defined(__WXMOTIF__)
#define wxWindowNative wxWindowGTK
#else // !wxUniv
#define wxWindowGTK wxWindow
- #define sm_classwxWindowGTK sm_classwxWindow
#endif // wxUniv
#include "wx/gtk/window.h"
#elif defined(__WXX11__)
#define wxWindowNative wxWindowX11
#else // !wxUniv
#define wxWindowX11 wxWindow
- #define sm_classwxWindowX11 sm_classwxWindow
#endif // wxUniv
#include "wx/x11/window.h"
#elif defined(__WXMGL__)
#define wxWindowNative wxWindowMGL
#else // !wxUniv
#define wxWindowMGL wxWindow
- #define sm_classwxWindowMGL sm_classwxWindow
#endif // wxUniv
#include "wx/mgl/window.h"
#elif defined(__WXMAC__)
#define wxWindowNative wxWindowMac
#else // !wxUniv
#define wxWindowMac wxWindow
- #define sm_classwxWindowMac sm_classwxWindow
#endif // wxUniv
#include "wx/mac/window.h"
#elif defined(__WXCOCOA__)
#define wxWindowNative wxWindowCocoa
#else // !wxUniv
#define wxWindowCocoa wxWindow
- #define sm_classwxWindowCocoa sm_classwxWindow
#endif // wxUniv
#include "wx/cocoa/window.h"
#elif defined(__WXPM__)
#define wxWindowNative wxWindowOS2
#else // !wxUniv
#define wxWindowOS2 wxWindow
- #define sm_classwxWindowOS2 sm_classwxWindow
#endif // wxUniv/!wxUniv
#include "wx/os2/window.h"
#endif