Doc typos corrected, added wxDIALOG_UNIT_COMPATIBILITY test, made file open
error result in a message box (docview.cpp) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,9 +15,8 @@ docs/wine/COPYING.LIB
|
|||||||
distrib/msw/*.rsp
|
distrib/msw/*.rsp
|
||||||
distrib/msw/*.bat
|
distrib/msw/*.bat
|
||||||
|
|
||||||
tools/gettext/xgettext.exe
|
tools/gettext/*.exe
|
||||||
tools/gettext/msgfmt.exe
|
tools/gettext/*.sed
|
||||||
tools/gettext/msgunfmt.exe
|
|
||||||
|
|
||||||
src/makeb32.env
|
src/makeb32.env
|
||||||
src/makeprog.b32
|
src/makeprog.b32
|
||||||
|
@@ -95,7 +95,7 @@ is destroyed.
|
|||||||
|
|
||||||
\func{wxObject *}{Get}{\param{long}{ key}}
|
\func{wxObject *}{Get}{\param{long}{ key}}
|
||||||
|
|
||||||
\func{wxObject *}{Get}{\param{const wxString\& }{ key}}
|
\func{wxObject *}{Get}{\param{const char*}{ key}}
|
||||||
|
|
||||||
Gets data from the hash table, using an integer or string key (depending on which
|
Gets data from the hash table, using an integer or string key (depending on which
|
||||||
has table constructor was used).
|
has table constructor was used).
|
||||||
@@ -121,13 +121,12 @@ description for \helpref{wxNode}{wxnode}. The user will probably only wish to us
|
|||||||
|
|
||||||
\func{void}{Put}{\param{long}{ key}, \param{wxObject *}{object}}
|
\func{void}{Put}{\param{long}{ key}, \param{wxObject *}{object}}
|
||||||
|
|
||||||
\func{void}{Put}{\param{const wxString\& }{ key}, \param{wxObject *}{object}}
|
\func{void}{Put}{\param{const char*}{ key}, \param{wxObject *}{object}}
|
||||||
|
|
||||||
Inserts data into the hash table, using an integer or string key (depending on which
|
Inserts data into the hash table, using an integer or string key (depending on which
|
||||||
has table constructor was used). The key string is copied and stored by the hash
|
has table constructor was used). The key string is copied and stored by the hash
|
||||||
table implementation.
|
table implementation.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxList::GetCount}
|
\membersection{wxList::GetCount}
|
||||||
|
|
||||||
\constfunc{size\_t}{GetCount}{\void}
|
\constfunc{size\_t}{GetCount}{\void}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
\section{\class{wxStopWatch}}\label{wxstopwatch}
|
\section{\class{wxStopWatch}}\label{wxstopwatch}
|
||||||
|
|
||||||
The wxStopWatch class allow you to measure time intervalls.
|
The wxStopWatch class allow you to measure time intervals.
|
||||||
|
|
||||||
\wxheading{Include files}
|
\wxheading{Include files}
|
||||||
|
|
||||||
|
@@ -1349,8 +1349,22 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
|
|||||||
0,
|
0,
|
||||||
wxTheApp->GetTopWindow());
|
wxTheApp->GetTopWindow());
|
||||||
|
|
||||||
if (!pathTmp.IsEmpty() && wxFileExists(pathTmp))
|
if (!pathTmp.IsEmpty())
|
||||||
{
|
{
|
||||||
|
if (!wxFileExists(pathTmp))
|
||||||
|
{
|
||||||
|
wxString msgTitle;
|
||||||
|
if (!wxTheApp->GetAppName().IsEmpty())
|
||||||
|
msgTitle = wxTheApp->GetAppName();
|
||||||
|
else
|
||||||
|
msgTitle = wxString(_("File error"));
|
||||||
|
|
||||||
|
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK | wxICON_EXCLAMATION,
|
||||||
|
wxTheApp->GetTopWindow());
|
||||||
|
|
||||||
|
path = wxT("");
|
||||||
|
return (wxDocTemplate *) NULL;
|
||||||
|
}
|
||||||
m_lastDirectory = wxPathOnly(pathTmp);
|
m_lastDirectory = wxPathOnly(pathTmp);
|
||||||
|
|
||||||
path = pathTmp;
|
path = pathTmp;
|
||||||
|
@@ -1344,7 +1344,11 @@ int wxWindow::GetCharWidth() const
|
|||||||
{
|
{
|
||||||
// +1 is needed because Windows apparently adds it when calculating the
|
// +1 is needed because Windows apparently adds it when calculating the
|
||||||
// dialog units size in pixels
|
// dialog units size in pixels
|
||||||
|
#if wxDIALOG_UNIT_COMPATIBILITY
|
||||||
|
return wxGetTextMetrics(this).tmAveCharWidth ;
|
||||||
|
#else
|
||||||
return wxGetTextMetrics(this).tmAveCharWidth + 1;
|
return wxGetTextMetrics(this).tmAveCharWidth + 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::GetTextExtent(const wxString& string,
|
void wxWindow::GetTextExtent(const wxString& string,
|
||||||
@@ -4279,21 +4283,25 @@ static TEXTMETRIC wxGetTextMetrics(const wxWindow *win)
|
|||||||
HWND hwnd = GetHwndOf(win);
|
HWND hwnd = GetHwndOf(win);
|
||||||
HDC hdc = ::GetDC(hwnd);
|
HDC hdc = ::GetDC(hwnd);
|
||||||
|
|
||||||
|
#if !wxDIALOG_UNIT_COMPATIBILITY
|
||||||
// and select the current font into it
|
// and select the current font into it
|
||||||
HFONT hfont = GetHfontOf(win->GetFont());
|
HFONT hfont = GetHfontOf(win->GetFont());
|
||||||
if ( hfont )
|
if ( hfont )
|
||||||
{
|
{
|
||||||
hfont = (HFONT)::SelectObject(hdc, hfont);
|
hfont = (HFONT)::SelectObject(hdc, hfont);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// finally retrieve the text metrics from it
|
// finally retrieve the text metrics from it
|
||||||
GetTextMetrics(hdc, &tm);
|
GetTextMetrics(hdc, &tm);
|
||||||
|
|
||||||
|
#if !wxDIALOG_UNIT_COMPATIBILITY
|
||||||
// and clean up
|
// and clean up
|
||||||
if ( hfont )
|
if ( hfont )
|
||||||
{
|
{
|
||||||
(void)::SelectObject(hdc, hfont);
|
(void)::SelectObject(hdc, hfont);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
::ReleaseDC(hwnd, hdc);
|
::ReleaseDC(hwnd, hdc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user