wxTopLevelWindow::GetClientSize() returns 0x0 when the window is minimized under wxGTK too now; documented this behaviour

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-02-11 00:27:26 +00:00
parent d43eb2a0d5
commit bb596005f5
3 changed files with 16 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ wxGTK:
- Implemented support for underlined fonts in wxStaticText - Implemented support for underlined fonts in wxStaticText
- wxTopLevelWindow::SetSizeHints size increments now work - wxTopLevelWindow::SetSizeHints size increments now work
- wxTopLevelWindow::GetSize() returns the size including the WM decorations - wxTopLevelWindow::GetSize() returns the size including the WM decorations
- wxTopLevelWindow::GetClientSize() returns 0x0 when the window is minimized
wxMSW: wxMSW:

View File

@@ -873,6 +873,9 @@ Returns the size of the window `client area' in pixels. The client area is the
area which may be drawn on by the programmer, excluding title bar, border, area which may be drawn on by the programmer, excluding title bar, border,
scrollbars, etc. scrollbars, etc.
Note that if this window is a top-level one and it is currently minimized, the
return size is empty (both width and height are $0$).
\wxheading{Parameters} \wxheading{Parameters}
\docparam{width}{Receives the client width in pixels.} \docparam{width}{Receives the client width in pixels.}

View File

@@ -972,6 +972,18 @@ void wxTopLevelWindowGTK::DoGetSize(int *width, int *height) const
void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
{ {
if ( IsIconized() )
{
// for consistency with wxMSW, client area is supposed to be empty for
// the iconized windows
if ( width )
*width = 0;
if ( height )
*height = 0;
return;
}
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
if (height) if (height)