Get/SetTitle only for wxTopLevelWindow (wxMSW part).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-11-03 16:47:29 +00:00
parent 60fef9643d
commit faa49bfd39
9 changed files with 69 additions and 49 deletions

View File

@@ -70,7 +70,7 @@ public:
// prevent virtual function hiding
virtual void SetLabel(const wxString& label)
{ wxWindowBase::SetLabel(label); }
{ wxWindow::SetLabel(label); }
#endif // WXWIN_COMPATIBILITY_2_6
protected:

View File

@@ -46,6 +46,8 @@ public:
virtual ~wxTopLevelWindowMSW();
// implement base class pure virtuals
virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const;
virtual void Maximize(bool maximize = true);
virtual bool IsMaximized() const;
virtual void Iconize(bool iconize = true);
@@ -166,4 +168,3 @@ protected:
};
#endif // _WX_MSW_TOPLEVEL_H_

View File

@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/window.h
// Purpose: wxWindow class
// Purpose: wxWindowMSW class
// Author: Julian Smart
// Modified by: Vadim Zeitlin on 13.05.99: complete refont of message handling,
// elimination of Default(), ...
@@ -62,8 +62,8 @@ public:
const wxString& name = wxPanelNameStr);
// implement base class pure virtuals
virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const;
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel() const;
virtual void Raise();
virtual void Lower();
@@ -557,5 +557,4 @@ WX_DECLARE_HASH(wxWindowMSW, wxWindowList, wxWinHashTable);
extern wxWinHashTable *wxWinHandleHash;
#endif
// _WX_WINDOW_H_
#endif // _WX_WINDOW_H_

View File

@@ -154,13 +154,16 @@ public:
// return true if the frame is in fullscreen mode
virtual bool IsFullScreen() const = 0;
/*
for now we already have them in wxWindow, but this is wrong: these
methods really only make sense for wxTopLevelWindow!
#ifdef __WXMSW__
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow
// to wxTopLevelWindow so initially enabled in wxMSW only to observe results
// and continue on other platforms
// the title (or label, see below) of the window: the text which the
// window shows
virtual void SetTitle(const wxString& title) = 0;
virtual wxString GetTitle() const = 0;
*/
#endif
// Set the shape of the window to the given region.
// Returns true if the platform supports this feature (and the

View File

@@ -168,19 +168,24 @@ public:
// window attributes
// -----------------
// NB: in future versions of wxWidgets 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).
#ifndef __WXMSW__
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow
// to wxTopLevelWindow so initially enabled in wxMSW only to observe results
// and continue on other platforms
// 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 wxEmptyString; }
// label is just the same as the title (but for, e.g., buttons it
// makes more sense to speak about labels)
// label is just the same as the title (but for, e.g., buttons it
// makes more sense to speak about labels)
virtual void SetLabel(const wxString& label) { SetTitle(label); }
virtual wxString GetLabel() const { return GetTitle(); }
#else
// label is just the same as the title (but for, e.g., buttons it
// makes more sense to speak about labels)
virtual void SetLabel(const wxString& label) = 0;
virtual wxString GetLabel() const = 0;
#endif
// the window name is used for ressource setting in X, it is not the
// same as the window title/label
@@ -1536,6 +1541,4 @@ public:
#endif // wxUSE_ACCESSIBILITY
#endif
// _WX_WINDOW_H_BASE_
#endif // _WX_WINDOW_H_BASE_