From 721b32e05823b7b7356f9a7a99f7d0af457dc5f3 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 26 Feb 1999 22:22:13 +0000 Subject: [PATCH] DoSetClientSize omissions fixed; some doc fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/ftp.tex | 7 +++++-- docs/latex/wx/http.tex | 8 +++++--- include/wx/motif/frame.h | 4 ++++ include/wx/msw/dialog.h | 2 +- include/wx/msw/frame.h | 6 +++++- src/msw/dialog.cpp | 2 +- src/msw/window.cpp | 4 +++- 7 files changed, 24 insertions(+), 9 deletions(-) diff --git a/docs/latex/wx/ftp.tex b/docs/latex/wx/ftp.tex index 039bb10cd1..99c7f490a8 100644 --- a/docs/latex/wx/ftp.tex +++ b/docs/latex/wx/ftp.tex @@ -85,6 +85,7 @@ Delete the file specified by \it{path}. Returns TRUE if successful. % ---------------------------------------------------------------------------- \membersection{wxFTP::SetUser} + \func{void}{SetUser}{\param{const wxString\&}{ user}} Sets the user name to be sent to the FTP server to be allowed to log in. @@ -100,6 +101,7 @@ For example, you can use: "ftp://a_user:a_password@a.host:service/a_directory/a_ to specify a user and a password. \membersection{wxFTP::SetPassword} + \func{void}{SetPassword}{\param{const wxString\&}{ passwd}} Sets the password to be sent to the FTP server to be allowed to log in. @@ -113,12 +115,12 @@ user name and the host name of the local machine from the system. \wxheading{Remark} This parameter can be included in a URL if you want to use the URL manager. -For example, you can use: "ftp://a_user:a_password@a.host:service/a_directory/a_ -file" +For example, you can use: "ftp://a\_user:a\_password@a.host:service/a_directory/a\_file" to specify a user and a password. % ---------------------------------------------------------------------------- \membersection{wxFTP::GetList} + \func{wxList *}{GetList}{\param{const wxString\&}{ wildcard}} The GetList function is quite low-level. It returns the list of the files in @@ -210,3 +212,4 @@ can send new commands without reconnecting. \wxheading{See also} \helpref{wxInputStream}{wxinputstream} + diff --git a/docs/latex/wx/http.tex b/docs/latex/wx/http.tex index 1171472e75..509f27b02b 100644 --- a/docs/latex/wx/http.tex +++ b/docs/latex/wx/http.tex @@ -17,12 +17,12 @@ % ---------------------------------------------------------------------------- % ---------------------------------------------------------------------------- -\membersection{wxHTTP::GetInputStream}\label{wxprotogetinput} +\membersection{wxHTTP::GetInputStream}\label{wxhttpgetinputstream} \func{wxInputStream *}{GetInputStream}{\param{const wxString\&}{ path}} -Creates a new input stream on the the specified path. You can use all but seek -functionnality of wxStream. Seek isn't available on all stream. For example, +Creates a new input stream on the the specified path. You can use all except the seek +functionality of wxStream. Seek isn't available on all streams. For example, http or ftp streams doesn't deal with it. Other functions like StreamSize and Tell aren't available for the moment for this sort of stream. You will be notified when the EOF is reached by an error. @@ -49,7 +49,9 @@ name is specified by \it{header} and the content by \it{h_data}. This is a low level function and it assumes that you know what you are doing. \membersection{wxHTTP::SetHeader} + \func{wxString}{GetHeader}{\param{const wxString\&}{ header}} Returns the data attached with a field whose name is specified by \it{header}. If the field doesn't exist, it will return an empty string and not a NULL string. + diff --git a/include/wx/motif/frame.h b/include/wx/motif/frame.h index 732b4917c3..4c9372f4d9 100644 --- a/include/wx/motif/frame.h +++ b/include/wx/motif/frame.h @@ -59,6 +59,10 @@ public: void GetSize(int *width, int *height) const ; void GetPosition(int *x, int *y) const ; + wxSize GetSize() const { return wxWindow::GetSize(); } + wxPoint GetPosition() const { return wxWindow::GetPosition(); } + wxSize GetClientSize() const { return wxWindow::GetClientSize(); } + void ClientToScreen(int *x, int *y) const; wxPoint ClientToScreen(const wxPoint& pt) const { return wxWindow::ClientToScreen(pt); } diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index e5bd76e8cb..c156d77e1c 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -62,7 +62,7 @@ public: virtual bool Destroy(); - virtual void SetClientSize(int width, int height); + virtual void DoSetClientSize(int width, int height); virtual void GetPosition(int *x, int *y) const; diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index ed28cd8448..a0e3ae67fc 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -60,8 +60,12 @@ public: void GetSize(int *width, int *height) const ; void GetPosition(int *x, int *y) const ; - virtual void ClientToScreen(int *x, int *y) const; + wxSize GetSize() const { return wxWindow::GetSize(); } + wxPoint GetPosition() const { return wxWindow::GetPosition(); } + wxSize GetClientSize() const { return wxWindow::GetClientSize(); } + wxRect GetClientRect() const { return wxWindow::GetClientRect(); } + virtual void ClientToScreen(int *x, int *y) const; virtual void ScreenToClient(int *x, int *y) const; void OnSize(wxSizeEvent& event); diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index e68427dbd2..49c48a65d2 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -248,7 +248,7 @@ bool wxDialog::IsIconized(void) const return FALSE; } -void wxDialog::SetClientSize(int width, int height) +void wxDialog::DoSetClientSize(int width, int height) { HWND hWnd = (HWND) GetHWND(); RECT rect; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index f993328a52..3709ab0149 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -711,7 +711,9 @@ void wxWindow::DoSetClientSize(int width, int height) { wxWindow *parent = GetParent(); HWND hWnd = (HWND) GetHWND(); - HWND hParentWnd = (HWND) (HWND) parent->GetHWND(); + HWND hParentWnd = (HWND) 0; + if (parent) + hParentWnd = (HWND) parent->GetHWND(); RECT rect; ::GetClientRect(hWnd, &rect); -- 2.45.2