X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/711c76db491087f9a81e86f40a50bda84ba44aa5..594f0f5bf1355fb8d58f403d3ebacc1c1767c429:/include/wx/window.h diff --git a/include/wx/window.h b/include/wx/window.h index fb8971a94c..9f43aa71c9 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -170,10 +170,14 @@ public: // window attributes // ----------------- + // NB: in future versions of wxWindows Set/GetTitle() will only work + // with the top level windows (such as dialogs and frames) and + // Set/GetLabel() only with the other ones (i.e. all controls). + // the title (or label, see below) of the window: the text which the // window shows - virtual void SetTitle( const wxString& title ) { m_title = title; } - virtual wxString GetTitle() const { return m_title; } + virtual void SetTitle( const wxString& WXUNUSED(title) ) {} + virtual wxString GetTitle() const { return wxEmptyString; } // label is just the same as the title (but for, e.g., buttons it // makes more sense to speak about labels) @@ -361,8 +365,8 @@ public: virtual void SetThemeEnabled(bool enableTheme) { m_themeEnabled = enableTheme; } virtual bool GetThemeEnabled() const { return m_themeEnabled; } - // focus handling - // -------------- + // focus and keyboard handling + // --------------------------- // set focus to this window virtual void SetFocus() = 0; @@ -378,6 +382,17 @@ public: // 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 + virtual wxWindow *GetDefaultItem() const { return NULL; } + + // set this child as default, return the old default + virtual wxWindow *SetDefaultItem(wxWindow * WXUNUSED(child)) + { return NULL; } + // parent/children relations // ------------------------- @@ -786,9 +801,6 @@ protected: // the window id - a number which uniquely identifies a window among // its siblings unless it is -1 wxWindowID m_windowId; - - // the window label - wxString m_title; // the parent window of this window (or NULL) and the list of the children // of this window @@ -964,6 +976,10 @@ protected: virtual void DoSetClientData( void *data ); virtual void *DoGetClientData() const; + // 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); + // what kind of data do we have? wxClientDataType m_clientDataType; @@ -1007,8 +1023,6 @@ private: #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