X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5048c832bb3c2f41ecd29ac079d74e39e304aec8..f794be6afe4e89ebd93ca5d78601e7a7ec44bb9f:/include/wx/window.h?ds=sidebyside diff --git a/include/wx/window.h b/include/wx/window.h index 959f775c70..d61eac27d8 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -219,6 +219,8 @@ public: return wxPoint(w, h); } + void SetPosition( const wxPoint& pt ) { Move( pt ) ; } + void GetSize( int *w, int *h ) const { DoGetSize(w, h); } wxSize GetSize() const { @@ -517,11 +519,16 @@ public: wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; } - // install and deinstall a system wide hotkey - virtual bool RegisterHotKey(int hotkeyId, int modifiers, int virtualKeyCode); +#endif // wxUSE_ACCEL + +#if wxUSE_HOTKEY + // hot keys (system wide accelerators) + // ----------------------------------- + + virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode); virtual bool UnregisterHotKey(int hotkeyId); +#endif // wxUSE_HOTKEY -#endif // wxUSE_ACCEL // dialog units translations // ------------------------- @@ -826,7 +833,17 @@ public: wxSizer *GetSizer() const { return m_windowSizer; } // Track if this window is a member of a sizer - void SetContainingSizer(wxSizer* sizer) { m_containingSizer = sizer; } + void SetContainingSizer(wxSizer* sizer) + { + // adding a window to a sizer twice is going to result in fatal and + // hard to debug problems later because when deleting the second + // associated wxSizerItem we're going to dereference a dangling + // pointer; so try to detect this as early as possible + wxASSERT_MSG( !sizer || m_containingSizer != sizer, + _T("Adding a window to the same sizer twice?") ); + + m_containingSizer = sizer; + } wxSizer *GetContainingSizer() const { return m_containingSizer; } // accessibility @@ -872,7 +889,7 @@ public: virtual void OnInternalIdle() {} // call internal idle recursively - void ProcessInternalIdle() ; +// void ProcessInternalIdle() ; // 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 @@ -1136,6 +1153,9 @@ private: #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__)