Compare commits

..

1 Commits

Author SHA1 Message Date
Bryan Petty
6bdab4dcd1 This commit was manufactured by cvs2svn to create tag 'WX_2_1_14'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_1_14@6885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-20 18:41:55 +00:00
43 changed files with 286 additions and 475 deletions

View File

@@ -98,11 +98,8 @@ wxSoundStreamWin::wxSoundStreamWin()
m_waiting_for = FALSE; m_waiting_for = FALSE;
if (!OpenDevice(wxSOUND_OUTPUT)) { if (!OpenDevice(wxSOUND_OUTPUT))
m_snderror = wxSOUND_NOERROR; //next call to OpenDevice won't do this return;
if (!OpenDevice(wxSOUND_INPUT))
return;
}
CloseDevice(); CloseDevice();
} }

View File

@@ -54,18 +54,12 @@ motif : setup.h
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1) $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [-.dialogs] set default [-.dialogs]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1) $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [-.drawing]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [-.image] set default [-.image]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1) $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [-.mdi]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [-.menu] set default [-.menu]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1) $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [-.minimal] set default [-.minimal]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1) $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [-.resource]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [--.utils.dialoged.src] set default [--.utils.dialoged.src]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1) $(MMS)$(MMSQUALIFIERS)/macro=(__WXMOTIF__=1)
set default [--] set default [--]

View File

@@ -1,4 +1,16 @@
include/wx/datetime.inl include/wx/wxchar.h
src/msw/treectrl.cpp include/wx/msw/setup.h
samples/treectrl/TreectrlVC.dsp samples/dnd/*.wxr
src/unix/fontutil.cpp
src/common/fontmap.cpp
src/msw/statbox.cpp
include/wx/msw/statbox.h
utils/ogl/samples/ogledit/palette.cpp
utils/ogl/samples/studio/shapes.cpp
utils/ogl/samples/studio/shapes.h
utils/ogl/samples/studio/studio.h
utils/dialoged/src/dialoged.cpp
utils/dialoged/src/dlghndlr.cpp
utils/dialoged/src/reseditr.cpp
utils/dialoged/src/dialoged.h

View File

@@ -89,7 +89,7 @@ zip32 -@ %dest\tiff.zip < %src\distrib\msw\tiff.rsp
rem Dialog Editor source and binary rem Dialog Editor source and binary
erase %dest\dialoged_source.zip erase %dest\dialoged_source.zip
zip32 -@ %dest\dialoged_source.zip < %src\distrib\msw\dialoged.rsp zip32 -@ %dest\dialoged_source.zip < %src\distrib\msw\dialoged.rsp
zip32 -j %dest\dialoged.zip %dest\dialoged_source.zip %src\bin\dialoged.exe %src\docs\winhelp\dialoged.hlp %src\docs\winhelp\dialoged.cnt zip32 -j %dest\dialoged.zip %dest\dialoged_source.zip %src\bin\dialoged.exe %src\bin\dialoged.hlp %src\bin\dialoged.cnt
erase %dest\dialoged_source.zip erase %dest\dialoged_source.zip
rem Misc. utils not in the main distribution rem Misc. utils not in the main distribution
@@ -143,7 +143,6 @@ erase /Y contrib\docs\winhelp\mmedia.*
erase /Y contrib\docs\winhelp\stc.* erase /Y contrib\docs\winhelp\stc.*
erase /Y contrib\docs\pdf\*.* erase /Y contrib\docs\pdf\*.*
deltree /Y contrib\docs\latex\ogl deltree /Y contrib\docs\latex\ogl
erase /Y src\mingegcs.bat
rem Now copy some binary files to 'bin' rem Now copy some binary files to 'bin'
if not isdir bin mkdir bin if not isdir bin mkdir bin

View File

@@ -51,7 +51,7 @@ translations as of wxWindows 2.2.
<tr> <tr>
<td valign=center>French (standard)</td> <td valign=center>French (standard)</td>
<td align=center valign=center><IMG SRC="icons/yes.gif" ALT="Done"></td> <td align=center valign=center><IMG SRC="icons/no.gif" ALT="Not yet"></td>
<td align=center valign=center><A HREF="mailto:Stephane.Junique@optics.kth.se">Stephane Junique</A>, <td align=center valign=center><A HREF="mailto:Stephane.Junique@optics.kth.se">Stephane Junique</A>,
<A HREF="mailto:lionel.allorge@lunerouge.com">Lionel Allorge</A> <A HREF="mailto:lionel.allorge@lunerouge.com">Lionel Allorge</A>
<A HREF="mailto:Gilles.Guyot@Krypton.be">Gilles Guyot</A> <A HREF="mailto:Gilles.Guyot@Krypton.be">Gilles Guyot</A>

View File

@@ -18,7 +18,7 @@ News
</tr> </tr>
</table> </table>
<H3><a name="release2_1_14">March 21st, 2000</H3><P> <H3><a name="release2_1_14">March 19th, 2000</H3><P>
<ul> <ul>
<li><a href="download.htm" target=wxmain>wxWindows 2.1.14</a> is now available for Windows, Motif and GTK. <li><a href="download.htm" target=wxmain>wxWindows 2.1.14</a> is now available for Windows, Motif and GTK.

View File

@@ -81,7 +81,7 @@ other flavours of BSD, ...
<tr> <tr>
<td bgcolor="#FFFFFF" align=center valign=center rowspan=3>Solaris</td> <td bgcolor="#FFFFFF" align=center valign=center rowspan=3>Solaris</td>
<td>wxMotif with Sun CC 4.2</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>VZ</td><td><tt>-mt</tt> should be added to <tt>CFLAGS</tt> for MT compilation</td> <td>wxMotif with Sun CC 4.2</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>VZ</td><td>Thread support must be disabled on system with not MT-safe X11</td>
<tr> <td>wxMotif with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td><br></td> <tr> <td>wxMotif with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
<tr> <td>wxGTK with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td><br></td> <tr> <td>wxGTK with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
</tr> </tr>

View File

@@ -19,16 +19,6 @@ managed by wxNotebook.
<wx/notebook.h> <wx/notebook.h>
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxNB\_FIXEDWIDTH}}{Make all tabs of equal width}
\twocolitem{\windowstyle{wxNB\_LEFT}}{Put the tabs on the left side of the notebook}
\twocolitem{\windowstyle{wxNB\_RIGHT}}{Put the tabs on the right side of the notebook}
\twocolitem{\windowstyle{wxNB\_BOTTOM}}{Put the tabs on the bottom of the notebook}
\end{twocollist}
\wxheading{Event handling} \wxheading{Event handling}
To process input from a notebook control, use the following event handler macros to direct input to member To process input from a notebook control, use the following event handler macros to direct input to member
@@ -72,9 +62,7 @@ Note that sometimes you can reduce flicker by passing the wxCLIP\_CHILDREN windo
\docparam{size}{The window size.} \docparam{size}{The window size.}
\docparam{style}{The window style. Its value is a bit list of zero or more of {\bf wxTC\_MULTILINE}, \docparam{style}{The window style. Its value is a bit list of zero or more of {\bf wxTC\_MULTILINE},
{\bf wxTC\_RIGHTJUSTIFY}, {\bf wxTC\_FIXEDWIDTH} and {\bf wxTC\_OWNERDRAW} {\bf wxTC\_RIGHTJUSTIFY}, {\bf wxTC\_FIXEDWIDTH} and {\bf wxTC\_OWNERDRAW}.}
possibly combined with one of {\bf wxNB\_LEFT}, {\bf wxNB\_RIGHT} or
{\bf wxNB\_BOTTOM}.}
\docparam{name}{The name of the control (used only under Motif).} \docparam{name}{The name of the control (used only under Motif).}

View File

@@ -60,17 +60,6 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument.
\helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp \helpref{wxTreeItemData}{wxtreeitemdata}, \helpref{wxTreeCtrl overview}{wxtreectrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxListCtrl}{wxlistctrl},\rtfsp
\helpref{wxImageList}{wximagelist}, \helpref{wxTreeEvent}{wxtreeevent} \helpref{wxImageList}{wximagelist}, \helpref{wxTreeEvent}{wxtreeevent}
\wxheading{Win32 notes}
wxTreeCtrl class uses the standard common treeview control under Win32
implemented in the system library {\tt comctl32.dll}. Some versions of this
library are known to have bugs with handling the tree control colours: the
usual symptom is that the expanded items leave black (or otherwise incorrectly
coloured) background behind them, especially for the controls using non
default background colour. The recommended solution is to upgrade the {\tt comctl32.dll}
to a newer version: see
\urlref{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}{http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp}.
\latexignore{\rtfignore{\wxheading{Members}}} \latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxTreeCtrl::wxTreeCtrl}\label{wxtreectrlconstr} \membersection{wxTreeCtrl::wxTreeCtrl}\label{wxtreectrlconstr}

View File

@@ -96,7 +96,7 @@ section.
\subsection{Unicode support in wxWindows} \subsection{Unicode support in wxWindows}
In wxWindows, the code fragment from above should be written instead: In wxWindows, the code fragment froim above should be written instead:
\begin{verbatim} \begin{verbatim}
wxChar ch = wxT('*'); wxChar ch = wxT('*');

View File

@@ -15,8 +15,8 @@ tree controls on Unix, they are emulated.
A detailed 1100-page reference manual is supplied in HTML, PDF and A detailed 1100-page reference manual is supplied in HTML, PDF and
Windows Help form: see the docs hierarchy. Windows Help form: see the docs hierarchy.
For a quick start, point your Web browser at docs/html/index.htm for a For a quick start, point your Web browser at docs/html/index.htm for a list of
list of important documents and samples. important documents and samples.
Changes in this release Changes in this release
----------------------- -----------------------
@@ -109,12 +109,11 @@ wxWindows for Windows distribution
As well as the core source, the Windows setup contains: As well as the core source, the Windows setup contains:
- Windows Help versions of the documentation (docs/winhelp); - Windows Help versions of the documentation (docs/winhelp);
- OGL 3 (Object Graphics Library, in contrib/src/ogl); - wxGLCanvas (OpenGL integration, in utils/glcanvas);
- OGL 3 (Object Graphics Library, in utils/ogl);
- wxTreeLayout (for tree drawing, in utils/wxtree);
- a Dialog Editor binary; - a Dialog Editor binary;
- a Tex2RTF binary; - the JPEG library.
- Life! sample binary;
- the JPEG library source;
- the TIFF library source.
setup.exe Setup file (Windows 95/98, NT) setup.exe Setup file (Windows 95/98, NT)
setup.* Other setup files setup.* Other setup files

View File

@@ -2,5 +2,4 @@ TN0001 How to add a new sample
TN0002 wxWindows translator guide TN0002 wxWindows translator guide
TN0003 Adding wxWindows class documentation TN0003 Adding wxWindows class documentation
Version: $Id$ Version: $Id$

View File

@@ -21,13 +21,7 @@
*****************************************************************************/ *****************************************************************************/
// needed to resolve the conflict between global T and macro parameter T // needed to resolve the conflict between global T and macro parameter T
// VC++ can't cope with string concatenation in Unicode mode
#if defined(wxUSE_UNICODE) && wxUSE_UNICODE
#define _WX_ERROR_REMOVE2(x) wxT("bad index in ::RemoveAt()")
#else
#define _WX_ERROR_REMOVE2(x) wxT("bad index in " #x "::RemoveAt()") #define _WX_ERROR_REMOVE2(x) wxT("bad index in " #x "::RemoveAt()")
#endif
// macro implements remaining (not inline) methods of template list // macro implements remaining (not inline) methods of template list
// (it's private to this file) // (it's private to this file)

View File

@@ -40,19 +40,19 @@
const long wxDateTime::TIME_T_FACTOR = 1000l; const long wxDateTime::TIME_T_FACTOR = 1000l;
#endif // wxDEFINE_TIME_CONSTANTS #endif // wxDEFINE_TIME_CONSTANTS
WXDLLEXPORT bool wxDateTime::IsInStdRange() const bool wxDateTime::IsInStdRange() const
{ {
return m_time >= 0l && (m_time / TIME_T_FACTOR) < LONG_MAX; return m_time >= 0l && (m_time / TIME_T_FACTOR) < LONG_MAX;
} }
/* static */ /* static */
WXDLLEXPORT wxDateTime wxDateTime::Now() wxDateTime wxDateTime::Now()
{ {
return wxDateTime(*GetTmNow()); return wxDateTime(*GetTmNow());
} }
/* static */ /* static */
WXDLLEXPORT wxDateTime wxDateTime::Today() wxDateTime wxDateTime::Today()
{ {
struct tm *tm = GetTmNow(); struct tm *tm = GetTmNow();
tm->tm_hour = tm->tm_hour =
@@ -63,7 +63,7 @@ WXDLLEXPORT wxDateTime wxDateTime::Today()
} }
#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
WXDLLEXPORT wxDateTime& wxDateTime::Set(time_t timet) wxDateTime& wxDateTime::Set(time_t timet)
{ {
// assign first to avoid long multiplication overflow! // assign first to avoid long multiplication overflow!
m_time = timet; m_time = timet;
@@ -73,42 +73,42 @@ WXDLLEXPORT wxDateTime& wxDateTime::Set(time_t timet)
} }
#endif #endif
WXDLLEXPORT wxDateTime& wxDateTime::SetToCurrent() wxDateTime& wxDateTime::SetToCurrent()
{ {
*this = Now(); *this = Now();
return *this; return *this;
} }
#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
WXDLLEXPORT wxDateTime::wxDateTime(time_t timet) wxDateTime::wxDateTime(time_t timet)
{ {
Set(timet); Set(timet);
} }
#endif #endif
WXDLLEXPORT wxDateTime::wxDateTime(const struct tm& tm) wxDateTime::wxDateTime(const struct tm& tm)
{ {
Set(tm); Set(tm);
} }
WXDLLEXPORT wxDateTime::wxDateTime(const Tm& tm) wxDateTime::wxDateTime(const Tm& tm)
{ {
Set(tm); Set(tm);
} }
WXDLLEXPORT wxDateTime::wxDateTime(double jdn) wxDateTime::wxDateTime(double jdn)
{ {
Set(jdn); Set(jdn);
} }
WXDLLEXPORT wxDateTime& wxDateTime::Set(const Tm& tm) wxDateTime& wxDateTime::Set(const Tm& tm)
{ {
wxASSERT_MSG( tm.IsValid(), _T("invalid broken down date/time") ); wxASSERT_MSG( tm.IsValid(), _T("invalid broken down date/time") );
return Set(tm.mday, (Month)tm.mon, tm.year, tm.hour, tm.min, tm.sec); return Set(tm.mday, (Month)tm.mon, tm.year, tm.hour, tm.min, tm.sec);
} }
WXDLLEXPORT wxDateTime::wxDateTime(wxDateTime_t hour, wxDateTime::wxDateTime(wxDateTime_t hour,
wxDateTime_t minute, wxDateTime_t minute,
wxDateTime_t second, wxDateTime_t second,
wxDateTime_t millisec) wxDateTime_t millisec)
@@ -116,7 +116,7 @@ WXDLLEXPORT wxDateTime::wxDateTime(wxDateTime_t hour,
Set(hour, minute, second, millisec); Set(hour, minute, second, millisec);
} }
WXDLLEXPORT wxDateTime::wxDateTime(wxDateTime_t day, wxDateTime::wxDateTime(wxDateTime_t day,
Month month, Month month,
int year, int year,
wxDateTime_t hour, wxDateTime_t hour,
@@ -131,14 +131,14 @@ WXDLLEXPORT wxDateTime::wxDateTime(wxDateTime_t day,
// wxDateTime accessors // wxDateTime accessors
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT wxLongLong wxDateTime::GetValue() const wxLongLong wxDateTime::GetValue() const
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
return m_time; return m_time;
} }
WXDLLEXPORT time_t wxDateTime::GetTicks() const time_t wxDateTime::GetTicks() const
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
if ( !IsInStdRange() ) if ( !IsInStdRange() )
@@ -149,29 +149,29 @@ WXDLLEXPORT time_t wxDateTime::GetTicks() const
return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo()); return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo());
} }
WXDLLEXPORT bool wxDateTime::SetToLastWeekDay(WeekDay weekday, bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
Month month, Month month,
int year) int year)
{ {
return SetToWeekDay(weekday, -1, month, year); return SetToWeekDay(weekday, -1, month, year);
} }
WXDLLEXPORT wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday) const wxDateTime wxDateTime::GetWeekDayInSameWeek(WeekDay weekday) const
{ {
MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) ); MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) );
} }
WXDLLEXPORT wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const
{ {
MODIFY_AND_RETURN( SetToNextWeekDay(weekday) ); MODIFY_AND_RETURN( SetToNextWeekDay(weekday) );
} }
WXDLLEXPORT wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const
{ {
MODIFY_AND_RETURN( SetToPrevWeekDay(weekday) ); MODIFY_AND_RETURN( SetToPrevWeekDay(weekday) );
} }
WXDLLEXPORT wxDateTime wxDateTime::GetWeekDay(WeekDay weekday, wxDateTime wxDateTime::GetWeekDay(WeekDay weekday,
int n, int n,
Month month, Month month,
int year) const int year) const
@@ -181,7 +181,7 @@ WXDLLEXPORT wxDateTime wxDateTime::GetWeekDay(WeekDay weekday,
return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxInvalidDateTime; return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxInvalidDateTime;
} }
WXDLLEXPORT wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday, wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday,
Month month, Month month,
int year) int year)
{ {
@@ -190,19 +190,19 @@ WXDLLEXPORT wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday,
return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxInvalidDateTime; return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxInvalidDateTime;
} }
WXDLLEXPORT wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek, WeekDay weekday) const wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek, WeekDay weekday) const
{ {
wxDateTime dt(*this); wxDateTime dt(*this);
return dt.SetToTheWeek(numWeek, weekday) ? dt : wxInvalidDateTime; return dt.SetToTheWeek(numWeek, weekday) ? dt : wxInvalidDateTime;
} }
WXDLLEXPORT wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const
{ {
MODIFY_AND_RETURN( SetToLastMonthDay(month, year) ); MODIFY_AND_RETURN( SetToLastMonthDay(month, year) );
} }
WXDLLEXPORT wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
{ {
MODIFY_AND_RETURN( SetToYearDay(yday) ); MODIFY_AND_RETURN( SetToYearDay(yday) );
} }
@@ -211,46 +211,46 @@ WXDLLEXPORT wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
// wxDateTime comparison // wxDateTime comparison
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const
{ {
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return m_time == datetime.m_time; return m_time == datetime.m_time;
} }
WXDLLEXPORT bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const
{ {
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return m_time < datetime.m_time; return m_time < datetime.m_time;
} }
WXDLLEXPORT bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const
{ {
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return m_time > datetime.m_time; return m_time > datetime.m_time;
} }
WXDLLEXPORT bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1, bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1,
const wxDateTime& t2) const const wxDateTime& t2) const
{ {
// no need for assert, will be checked by the functions we call // no need for assert, will be checked by the functions we call
return IsLaterThan(t1) && IsEarlierThan(t2); return IsLaterThan(t1) && IsEarlierThan(t2);
} }
WXDLLEXPORT bool wxDateTime::IsBetween(const wxDateTime& t1, const wxDateTime& t2) const bool wxDateTime::IsBetween(const wxDateTime& t1, const wxDateTime& t2) const
{ {
// no need for assert, will be checked by the functions we call // no need for assert, will be checked by the functions we call
return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2); return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2);
} }
WXDLLEXPORT bool wxDateTime::IsSameDate(const wxDateTime& dt) const bool wxDateTime::IsSameDate(const wxDateTime& dt) const
{ {
return (m_time - dt.m_time).Abs() < MILLISECONDS_PER_DAY; return (m_time - dt.m_time).Abs() < MILLISECONDS_PER_DAY;
} }
WXDLLEXPORT bool wxDateTime::IsSameTime(const wxDateTime& dt) const bool wxDateTime::IsSameTime(const wxDateTime& dt) const
{ {
// notice that we can't do something like this: // notice that we can't do something like this:
// //
@@ -266,7 +266,7 @@ WXDLLEXPORT bool wxDateTime::IsSameTime(const wxDateTime& dt) const
tm1.msec == tm2.msec; tm1.msec == tm2.msec;
} }
WXDLLEXPORT bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const
{ {
return IsBetween(dt.Substract(ts), dt.Add(ts)); return IsBetween(dt.Substract(ts), dt.Add(ts));
} }
@@ -275,14 +275,14 @@ WXDLLEXPORT bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan&
// wxDateTime arithmetics // wxDateTime arithmetics
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
return wxDateTime(m_time + diff.GetValue()); return wxDateTime(m_time + diff.GetValue());
} }
WXDLLEXPORT wxDateTime& wxDateTime::Add(const wxTimeSpan& diff) wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
@@ -291,19 +291,19 @@ WXDLLEXPORT wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
return *this; return *this;
} }
WXDLLEXPORT wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff) wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff)
{ {
return Add(diff); return Add(diff);
} }
WXDLLEXPORT wxDateTime wxDateTime::Substract(const wxTimeSpan& diff) const wxDateTime wxDateTime::Substract(const wxTimeSpan& diff) const
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
return wxDateTime(m_time - diff.GetValue()); return wxDateTime(m_time - diff.GetValue());
} }
WXDLLEXPORT wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff) wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff)
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
@@ -312,39 +312,39 @@ WXDLLEXPORT wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff)
return *this; return *this;
} }
WXDLLEXPORT wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff) wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff)
{ {
return Substract(diff); return Substract(diff);
} }
WXDLLEXPORT wxTimeSpan wxDateTime::Substract(const wxDateTime& datetime) const wxTimeSpan wxDateTime::Substract(const wxDateTime& datetime) const
{ {
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
return wxTimeSpan(datetime.GetValue() - GetValue()); return wxTimeSpan(datetime.GetValue() - GetValue());
} }
WXDLLEXPORT wxDateTime wxDateTime::Add(const wxDateSpan& diff) const wxDateTime wxDateTime::Add(const wxDateSpan& diff) const
{ {
return wxDateTime(*this).Add(diff); return wxDateTime(*this).Add(diff);
} }
WXDLLEXPORT wxDateTime& wxDateTime::Substract(const wxDateSpan& diff) wxDateTime& wxDateTime::Substract(const wxDateSpan& diff)
{ {
return Add(diff.Negate()); return Add(diff.Negate());
} }
WXDLLEXPORT wxDateTime wxDateTime::Substract(const wxDateSpan& diff) const wxDateTime wxDateTime::Substract(const wxDateSpan& diff) const
{ {
return wxDateTime(*this).Substract(diff); return wxDateTime(*this).Substract(diff);
} }
WXDLLEXPORT wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff) wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff)
{ {
return Substract(diff); return Substract(diff);
} }
WXDLLEXPORT wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff) wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
{ {
return Add(diff); return Add(diff);
} }
@@ -353,7 +353,7 @@ WXDLLEXPORT wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
// wxDateTime and timezones // wxDateTime and timezones
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz,
bool noDST) const bool noDST) const
{ {
MODIFY_AND_RETURN( MakeTimezone(tz, noDST) ); MODIFY_AND_RETURN( MakeTimezone(tz, noDST) );
@@ -363,7 +363,7 @@ WXDLLEXPORT wxDateTime wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz,
// wxTimeSpan construction // wxTimeSpan construction
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT wxTimeSpan::wxTimeSpan(long hours, long minutes, long seconds, long milliseconds) wxTimeSpan::wxTimeSpan(long hours, long minutes, long seconds, long milliseconds)
{ {
// assign first to avoid precision loss // assign first to avoid precision loss
m_diff = hours; m_diff = hours;
@@ -379,27 +379,27 @@ WXDLLEXPORT wxTimeSpan::wxTimeSpan(long hours, long minutes, long seconds, long
// wxTimeSpan accessors // wxTimeSpan accessors
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT wxLongLong wxTimeSpan::GetSeconds() const wxLongLong wxTimeSpan::GetSeconds() const
{ {
return m_diff / 1000l; return m_diff / 1000l;
} }
WXDLLEXPORT int wxTimeSpan::GetMinutes() const int wxTimeSpan::GetMinutes() const
{ {
return (GetSeconds() / 60l).GetLo(); return (GetSeconds() / 60l).GetLo();
} }
WXDLLEXPORT int wxTimeSpan::GetHours() const int wxTimeSpan::GetHours() const
{ {
return GetMinutes() / 60; return GetMinutes() / 60;
} }
WXDLLEXPORT int wxTimeSpan::GetDays() const int wxTimeSpan::GetDays() const
{ {
return GetHours() / 24; return GetHours() / 24;
} }
WXDLLEXPORT int wxTimeSpan::GetWeeks() const int wxTimeSpan::GetWeeks() const
{ {
return GetDays() / 7; return GetDays() / 7;
} }
@@ -408,53 +408,53 @@ WXDLLEXPORT int wxTimeSpan::GetWeeks() const
// wxTimeSpan arithmetics // wxTimeSpan arithmetics
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const
{ {
return wxTimeSpan(m_diff + diff.GetValue()); return wxTimeSpan(m_diff + diff.GetValue());
} }
WXDLLEXPORT wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff) wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff)
{ {
m_diff += diff.GetValue(); m_diff += diff.GetValue();
return *this; return *this;
} }
WXDLLEXPORT wxTimeSpan wxTimeSpan::Substract(const wxTimeSpan& diff) const wxTimeSpan wxTimeSpan::Substract(const wxTimeSpan& diff) const
{ {
return wxTimeSpan(m_diff - diff.GetValue()); return wxTimeSpan(m_diff - diff.GetValue());
} }
WXDLLEXPORT wxTimeSpan& wxTimeSpan::Substract(const wxTimeSpan& diff) wxTimeSpan& wxTimeSpan::Substract(const wxTimeSpan& diff)
{ {
m_diff -= diff.GetValue(); m_diff -= diff.GetValue();
return *this; return *this;
} }
WXDLLEXPORT wxTimeSpan& wxTimeSpan::Multiply(int n) wxTimeSpan& wxTimeSpan::Multiply(int n)
{ {
m_diff *= (long)n; m_diff *= (long)n;
return *this; return *this;
} }
WXDLLEXPORT wxTimeSpan wxTimeSpan::Multiply(int n) const wxTimeSpan wxTimeSpan::Multiply(int n) const
{ {
return wxTimeSpan(m_diff * (long)n); return wxTimeSpan(m_diff * (long)n);
} }
WXDLLEXPORT wxTimeSpan wxTimeSpan::Abs() const wxTimeSpan wxTimeSpan::Abs() const
{ {
return wxTimeSpan(GetValue().Abs()); return wxTimeSpan(GetValue().Abs());
} }
WXDLLEXPORT bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const
{ {
return GetValue() == ts.GetValue(); return GetValue() == ts.GetValue();
} }
WXDLLEXPORT bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
{ {
return GetValue().Abs() > ts.GetValue().Abs(); return GetValue().Abs() > ts.GetValue().Abs();
} }
@@ -463,7 +463,7 @@ WXDLLEXPORT bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
// wxDateSpan // wxDateSpan
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WXDLLEXPORT wxDateSpan& wxDateSpan&
wxDateSpan::operator+=(const wxDateSpan& other) wxDateSpan::operator+=(const wxDateSpan& other)
{ {
m_years += other.m_years; m_years += other.m_years;
@@ -474,7 +474,7 @@ wxDateSpan::operator+=(const wxDateSpan& other)
return *this; return *this;
} }
WXDLLEXPORT wxDateSpan& wxDateSpan::Multiply(int factor) wxDateSpan& wxDateSpan::Multiply(int factor)
{ {
m_years *= factor; m_years *= factor;
m_months *= factor; m_months *= factor;
@@ -484,17 +484,17 @@ WXDLLEXPORT wxDateSpan& wxDateSpan::Multiply(int factor)
return *this; return *this;
} }
WXDLLEXPORT wxDateSpan wxDateSpan::Multiply(int factor) const wxDateSpan wxDateSpan::Multiply(int factor) const
{ {
return wxDateSpan(*this).Multiply(factor); return wxDateSpan(*this).Multiply(factor);
} }
WXDLLEXPORT wxDateSpan wxDateSpan::Negate() const wxDateSpan wxDateSpan::Negate() const
{ {
return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days); return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days);
} }
WXDLLEXPORT wxDateSpan& wxDateSpan::Neg() wxDateSpan& wxDateSpan::Neg()
{ {
m_years = -m_years; m_years = -m_years;
m_months = -m_months; m_months = -m_months;

View File

@@ -70,7 +70,7 @@
There are no instances of this class, it simply serves as a There are no instances of this class, it simply serves as a
namespace for its static member functions. namespace for its static member functions.
*/ */
class WXDLLEXPORT wxDllLoader class wxDllLoader
{ {
public: public:
/** This function loads a shared library into memory, with libname /** This function loads a shared library into memory, with libname
@@ -103,7 +103,7 @@ private:
// wxLibrary // wxLibrary
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxLibrary : public wxObject class wxLibrary : public wxObject
{ {
public: public:
wxHashTable classTable; wxHashTable classTable;
@@ -130,7 +130,7 @@ protected:
// wxLibraries // wxLibraries
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLEXPORT wxLibraries class wxLibraries
{ {
public: public:
wxLibraries(); wxLibraries();

View File

@@ -120,8 +120,8 @@ private:
#if WXWIN_COMPATIBILITY #if WXWIN_COMPATIBILITY
inline void wxControl::Callback(const wxFunction f) { m_callback = f; }; inline void wxControl::Callback(const wxFunction f) { m_callback = f; };
inline wxFont& wxControl::GetLabelFont() const { return (wxFont &)GetFont(); } inline wxFont& wxControl::GetLabelFont() const { return GetFont(); }
inline wxFont& wxControl::GetButtonFont() const { return (wxFont &)GetFont(); } inline wxFont& wxControl::GetButtonFont() const { return GetFont(); }
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); } inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); } inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
#endif // WXWIN_COMPATIBILITY #endif // WXWIN_COMPATIBILITY

View File

@@ -202,33 +202,6 @@ private:
WXHWND m_hWndToolTip; WXHWND m_hWndToolTip;
#endif // tooltips #endif // tooltips
//
// The main handle of a frame window, that used for message processing
// is the client handle under PM. But we still need the frame handle
// as well
//
WXHWND m_hFrame;
//
// Handles to child windows of the Frame that we don't have child objects for
//
WXHWND m_hTitleBar;
WXHWND m_hHScroll;
WXHWND m_hVScroll;
//
// Swp structures for various client data
// DW: Better off in attached RefData?
//
SWP m_vSwp;
SWP m_vSwpClient;
SWP m_vSwpTitleBar;
SWP m_vSwpMenuBar;
SWP m_vSwpHScroll;
SWP m_vSwpVScroll;
SWP m_vSwpStatusBar;
SWP m_vSwpToolBar;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxFrame) DECLARE_DYNAMIC_CLASS(wxFrame)
}; };

12
modules
View File

@@ -105,5 +105,15 @@ wxOS2 -a wxWindows wxWindows/docs !wxWindows/docs/latex !wxWindows/docs/motif \
wxWindows/lib wxWindows/samples wxWindows/misc !wxWindows/misc/implib \ wxWindows/lib wxWindows/samples wxWindows/misc !wxWindows/misc/implib \
wxWindows/testconf wxWindows/testconf
wxPython -a wxWindows wxWindows/utils wxWindows/utils/wxPython \
!wxWindows/docs \
!wxWindows/distrib !wxWindows/include !wxWindows/lib !wxWindows/locale \
!wxWindows/misc !wxWindows/samples !wxWindows/src !wxWindows/tests \
!wxWindows/user !wxWindows/utils/HelpGen !wxWindows/utils/HelpHTML \
!wxWindows/utils/dialoged !wxWindows/utils/framelayout \
!wxWindows/utils/nplugin !wxWindows/utils/projgen !wxWindows/utils/serialize \
!wxWindows/utils/tex2rtf !wxWindows/utils/wxMMedia2 \
!wxWindows/utils/wxOLE !wxWindows/utils/wxtree
wxStudio wxStudio

View File

@@ -1,47 +0,0 @@
#*****************************************************************************
# *
# Make file for VMS *
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
# Date : 10 November 1999 *
# *
#*****************************************************************************
.first
define wx [--.include.wx]
.ifdef __WXMOTIF__
CXX_DEFINE = /define=(__WXMOTIF__=1)
.else
.ifdef __WXGTK__
CXX_DEFINE = /define=(__WXGTK__=1)
.else
CXX_DEFINE =
.endif
.endif
CXXFLAGS=/list/show=all
.suffixes : .cpp
.cpp.obj :
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
all :
.ifdef __WXMOTIF__
$(MMS)$(MMSQUALIFIERS) drawing.exe
.else
.ifdef __WXGTK__
$(MMS)$(MMSQUALIFIERS) drawing_gtk.exe
.endif
.endif
.ifdef __WXMOTIF__
drawing.exe : drawing.obj
cxxlink drawing,[--.lib]vms/opt
.else
.ifdef __WXGTK__
drawing_gtk.exe : drawing.obj
cxxlink/exec=drawing_gtk.exe drawing,[--.lib]vms_gtk/opt
.endif
.endif
drawing.obj : drawing.cpp

View File

@@ -1,47 +0,0 @@
#*****************************************************************************
# *
# Make file for VMS *
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
# Date : 10 November 1999 *
# *
#*****************************************************************************
.first
define wx [--.include.wx]
.ifdef __WXMOTIF__
CXX_DEFINE = /define=(__WXMOTIF__=1)
.else
.ifdef __WXGTK__
CXX_DEFINE = /define=(__WXGTK__=1)
.else
CXX_DEFINE =
.endif
.endif
CXXFLAGS=/list/show=all
.suffixes : .cpp
.cpp.obj :
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
all :
.ifdef __WXMOTIF__
$(MMS)$(MMSQUALIFIERS) mdi.exe
.else
.ifdef __WXGTK__
$(MMS)$(MMSQUALIFIERS) mdi_gtk.exe
.endif
.endif
.ifdef __WXMOTIF__
mdi.exe : mdi.obj
cxxlink mdi,[--.lib]vms/opt
.else
.ifdef __WXGTK__
mdi_gtk.exe : mdi.obj
cxxlink/exec=mdi_gtk.exe mdi,[--.lib]vms_gtk/opt
.endif
.endif
mdi.obj : mdi.cpp

View File

@@ -1,47 +0,0 @@
#*****************************************************************************
# *
# Make file for VMS *
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
# Date : 10 November 1999 *
# *
#*****************************************************************************
.first
define wx [--.include.wx]
.ifdef __WXMOTIF__
CXX_DEFINE = /define=(__WXMOTIF__=1)
.else
.ifdef __WXGTK__
CXX_DEFINE = /define=(__WXGTK__=1)
.else
CXX_DEFINE =
.endif
.endif
CXXFLAGS=/list/show=all
.suffixes : .cpp
.cpp.obj :
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
all :
.ifdef __WXMOTIF__
$(MMS)$(MMSQUALIFIERS) resource.exe
.else
.ifdef __WXGTK__
$(MMS)$(MMSQUALIFIERS) resource_gtk.exe
.endif
.endif
.ifdef __WXMOTIF__
resource.exe : resource.obj
cxxlink resource,[--.lib]vms/opt
.else
.ifdef __WXGTK__
resource_gtk.exe : resource.obj
cxxlink/exec=resource_gtk.exe resource,[--.lib]vms_gtk/opt
.endif
.endif
resource.obj : resource.cpp

View File

@@ -348,12 +348,14 @@ void wxCmdLineParser::AddParam(const wxString& desc,
wxCmdLineParam& param = m_data->m_paramDesc.Last(); wxCmdLineParam& param = m_data->m_paramDesc.Last();
wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_MULTIPLE), wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_MULTIPLE),
_T("all parameters after the one with wxCMD_LINE_PARAM_MULTIPLE style will be ignored") ); _T("all parameters after the one with "
"wxCMD_LINE_PARAM_MULTIPLE style will be ignored") );
if ( !(flags & wxCMD_LINE_PARAM_OPTIONAL) ) if ( !(flags & wxCMD_LINE_PARAM_OPTIONAL) )
{ {
wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_OPTIONAL), wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_OPTIONAL),
_T("a required parameter can't follow an optional one") ); _T("a required parameter can't follow an "
"optional one") );
} }
} }
#endif // Debug #endif // Debug
@@ -587,7 +589,8 @@ int wxCmdLineParser::Parse()
if ( *p++ != _T('=') ) if ( *p++ != _T('=') )
{ {
wxLogError(_("Option '%s' requires a value, '=' expected."), name.c_str()); wxLogError(_("Option '%s' requires a value, '=' "
"expected."), name.c_str());
ok = FALSE; ok = FALSE;
} }
@@ -646,7 +649,9 @@ int wxCmdLineParser::Parse()
} }
else else
{ {
wxLogError(_("'%s' is not a correct numeric value for option '%s'."), wxLogError(_("'%s' is not a correct "
"numeric value for option "
"'%s'."),
value.c_str(), name.c_str()); value.c_str(), name.c_str());
ok = FALSE; ok = FALSE;
@@ -660,7 +665,8 @@ int wxCmdLineParser::Parse()
const wxChar *res = dt.ParseDate(value); const wxChar *res = dt.ParseDate(value);
if ( !res || *res ) if ( !res || *res )
{ {
wxLogError(_("Option '%s': '%s' cannot be converted to a date."), wxLogError(_("Option '%s': '%s' cannot "
"be converted to a date."),
name.c_str(), value.c_str()); name.c_str(), value.c_str());
ok = FALSE; ok = FALSE;
@@ -693,7 +699,9 @@ int wxCmdLineParser::Parse()
else else
{ {
wxASSERT_MSG( currentParam == countParam - 1, wxASSERT_MSG( currentParam == countParam - 1,
_T("all parameters after the one with wxCMD_LINE_PARAM_MULTIPLE style are ignored") ); _T("all parameters after the one with "
"wxCMD_LINE_PARAM_MULTIPLE style "
"are ignored") );
// remember that we did have this last repeatable parameter // remember that we did have this last repeatable parameter
hadRepeatableParam = TRUE; hadRepeatableParam = TRUE;

View File

@@ -1435,7 +1435,8 @@ void wxPageSetupDialogData::SetPaperSize(wxPaperSize id)
void wxPageSetupDialogData::CalculateIdFromPaperSize() void wxPageSetupDialogData::CalculateIdFromPaperSize()
{ {
wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); wxT("wxThePrintPaperDatabase should not be NULL. "
"Do not create global print dialog data objects.") );
wxSize sz = GetPaperSize(); wxSize sz = GetPaperSize();
@@ -1450,7 +1451,8 @@ void wxPageSetupDialogData::CalculateIdFromPaperSize()
void wxPageSetupDialogData::CalculatePaperSizeFromId() void wxPageSetupDialogData::CalculatePaperSizeFromId()
{ {
wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); wxT("wxThePrintPaperDatabase should not be NULL. "
"Do not create global print dialog data objects.") );
wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId()); wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId());

View File

@@ -339,7 +339,8 @@ wxString wxExpandEnvVars(const wxString& str)
// check the closing bracket // check the closing bracket
if ( bracket != Bracket_None ) { if ( bracket != Bracket_None ) {
if ( m == str.Len() || str[m] != (char)bracket ) { if ( m == str.Len() || str[m] != (char)bracket ) {
wxLogWarning(_("Environment variables expansion failed: missing '%c' at position %d in '%s'."), wxLogWarning(_("Environment variables expansion failed: "
"missing '%c' at position %d in '%s'."),
(char)bracket, m + 1, str.c_str()); (char)bracket, m + 1, str.c_str());
} }
else { else {

View File

@@ -155,7 +155,7 @@ int wxColFor::Format(int Nation,int dbDataType,SWORD sqlDataType,short columnSiz
i_Nation = Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US i_Nation = Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
i_dbDataType = dbDataType; i_dbDataType = dbDataType;
i_sqlDataType = sqlDataType; i_sqlDataType = sqlDataType;
s_Field.Printf(wxT("%s%d"),s_Menge[1].c_str(),i_Menge[1]); // OK for VARCHAR, INTEGER and FLOAT s_Field.Printf("%s%d",s_Menge[1].c_str(),i_Menge[1]); // OK for VARCHAR, INTEGER and FLOAT
if (i_dbDataType == 0) // Filter unsupported dbDataTypes if (i_dbDataType == 0) // Filter unsupported dbDataTypes
{ {
if ((i_sqlDataType == SQL_VARCHAR) || (i_sqlDataType == SQL_LONGVARCHAR)) if ((i_sqlDataType == SQL_VARCHAR) || (i_sqlDataType == SQL_LONGVARCHAR))
@@ -185,8 +185,8 @@ int wxColFor::Format(int Nation,int dbDataType,SWORD sqlDataType,short columnSiz
if (decimalDigits == 0) if (decimalDigits == 0)
decimalDigits = 2; decimalDigits = 2;
Temp0 = "%"; Temp0 = "%";
Temp0.Printf(wxT("%s%d.%d"),Temp0.c_str(),columnSize,decimalDigits); Temp0.Printf("%s%d.%d",Temp0.c_str(),columnSize,decimalDigits);
s_Field.Printf(wxT("%sf"),Temp0.c_str()); // s_Field.Printf("%sf",Temp0.c_str()); //
break; break;
case DB_DATA_TYPE_DATE: case DB_DATA_TYPE_DATE:
if (i_Nation == 0) // timestamp YYYY-MM-DD HH:MM:SS.SSS (tested for SYBASE) if (i_Nation == 0) // timestamp YYYY-MM-DD HH:MM:SS.SSS (tested for SYBASE)
@@ -211,7 +211,7 @@ int wxColFor::Format(int Nation,int dbDataType,SWORD sqlDataType,short columnSiz
} }
break; break;
default: default:
s_Field.Printf(wxT("-E-> unknown Format(%d)-sql(%d)"),dbDataType,sqlDataType); // s_Field.Printf("-E-> unknown Format(%d)-sql(%d)",dbDataType,sqlDataType); //
break; break;
}; };
return TRUE; return TRUE;
@@ -227,32 +227,32 @@ wxDB::wxDB(HENV &aHenv, bool FwdOnlyCursors)
sqlLogState = sqlLogOFF; // By default, logging is turned off sqlLogState = sqlLogOFF; // By default, logging is turned off
nTables = 0; nTables = 0;
wxStrcpy(sqlState,wxT("")); wxStrcpy(sqlState,"");
wxStrcpy(errorMsg,wxT("")); wxStrcpy(errorMsg,"");
nativeError = cbErrorMsg = 0; nativeError = cbErrorMsg = 0;
for (i = 0; i < DB_MAX_ERROR_HISTORY; i++) for (i = 0; i < DB_MAX_ERROR_HISTORY; i++)
wxStrcpy(errorList[i], wxT("")); wxStrcpy(errorList[i], "");
// Init typeInf structures // Init typeInf structures
wxStrcpy(typeInfVarchar.TypeName,wxT("")); wxStrcpy(typeInfVarchar.TypeName,"");
typeInfVarchar.FsqlType = 0; typeInfVarchar.FsqlType = 0;
typeInfVarchar.Precision = 0; typeInfVarchar.Precision = 0;
typeInfVarchar.CaseSensitive = 0; typeInfVarchar.CaseSensitive = 0;
typeInfVarchar.MaximumScale = 0; typeInfVarchar.MaximumScale = 0;
wxStrcpy(typeInfInteger.TypeName,wxT("")); wxStrcpy(typeInfInteger.TypeName,"");
typeInfInteger.FsqlType = 0; typeInfInteger.FsqlType = 0;
typeInfInteger.Precision = 0; typeInfInteger.Precision = 0;
typeInfInteger.CaseSensitive = 0; typeInfInteger.CaseSensitive = 0;
typeInfInteger.MaximumScale = 0; typeInfInteger.MaximumScale = 0;
wxStrcpy(typeInfFloat.TypeName,wxT("")); wxStrcpy(typeInfFloat.TypeName,"");
typeInfFloat.FsqlType = 0; typeInfFloat.FsqlType = 0;
typeInfFloat.Precision = 0; typeInfFloat.Precision = 0;
typeInfFloat.CaseSensitive = 0; typeInfFloat.CaseSensitive = 0;
typeInfFloat.MaximumScale = 0; typeInfFloat.MaximumScale = 0;
wxStrcpy(typeInfDate.TypeName,wxT("")); wxStrcpy(typeInfDate.TypeName,"");
typeInfDate.FsqlType = 0; typeInfDate.FsqlType = 0;
typeInfDate.Precision = 0; typeInfDate.Precision = 0;
typeInfDate.CaseSensitive = 0; typeInfDate.CaseSensitive = 0;
@@ -896,8 +896,8 @@ void wxDB::Close(void)
tiu = (wxTablesInUse *)pNode->Data(); tiu = (wxTablesInUse *)pNode->Data();
if (tiu->pDb == this) if (tiu->pDb == this)
{ {
s.sprintf(wxT("(%-20s) tableID:[%6lu] pDb:[%p]"), tiu->tableName,tiu->tableID,tiu->pDb); s.sprintf("(%-20s) tableID:[%6lu] pDb:[%p]", tiu->tableName,tiu->tableID,tiu->pDb);
s2.sprintf(wxT("Orphaned found using pDb:[%p]"),this); s2.sprintf("Orphaned found using pDb:[%p]",this);
wxLogDebug (s.c_str(),s2.c_str()); wxLogDebug (s.c_str(),s2.c_str());
} }
pNode = pNode->Next(); pNode = pNode->Next();

View File

@@ -208,7 +208,8 @@ wxFontMapper::~wxFontMapper()
void wxFontMapper::SetConfigPath(const wxString& prefix) void wxFontMapper::SetConfigPath(const wxString& prefix)
{ {
wxCHECK_RET( !prefix.IsEmpty() && prefix[0] == wxCONFIG_PATH_SEPARATOR, wxCHECK_RET( !prefix.IsEmpty() && prefix[0] == wxCONFIG_PATH_SEPARATOR,
wxT("an absolute path should be given to wxFontMapper::SetConfigPath()") ); wxT("an absolute path should be given to "
"wxFontMapper::SetConfigPath()") );
m_configRootPath = prefix; m_configRootPath = prefix;
} }

View File

@@ -298,7 +298,7 @@ static wxString GetFullSearchPath(const wxChar *lang)
// then take the current directory // then take the current directory
// FIXME it should be the directory of the executable // FIXME it should be the directory of the executable
searchPath << GetAllMsgCatalogSubdirs(wxT("."), lang); searchPath << GetAllMsgCatalogSubdirs(wxT("."), lang) << wxPATH_SEP;
// and finally add some standard ones // and finally add some standard ones
searchPath searchPath

View File

@@ -118,10 +118,6 @@ wxString wxTextFile::Translate(const wxString& text, wxTextFileType type)
if ( chLast == _T('\r') ) { if ( chLast == _T('\r') ) {
// Mac line termination // Mac line termination
result += eol; result += eol;
// reset chLast to avoid inserting another eol before the
// next character
chLast = 0;
} }
// add to the current line // add to the current line

View File

@@ -12,7 +12,6 @@
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "joystick.h" #pragma implementation "joystick.h"
#endif #endif
#if wxUSE_JOYSTICK
#include <linux/joystick.h> #include <linux/joystick.h>
#include <sys/types.h> #include <sys/types.h>
@@ -355,5 +354,4 @@ bool wxJoystick::ReleaseCapture(void)
m_polling = 0; m_polling = 0;
return TRUE; return TRUE;
} }
#endif

View File

@@ -2554,17 +2554,6 @@ GSList* G_SLIST_FIND (GSList *list,
data); data);
} }
void GTK_WINDOW_SET_GEOMETRY_HINTS (GtkWindow *window,
GtkWidget *geometry_widget,
GdkGeometry *geometry,
GdkWindowHints geom_mask)
{
gtk_window_set_geometry_hints (window,
geometry_widget,
geometry,
geom_mask);
}
#undef GDK_THREADS_ENTER #undef GDK_THREADS_ENTER
void GDK_THREADS_ENTER (void) void GDK_THREADS_ENTER (void)
{ {

View File

@@ -12,7 +12,6 @@
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "joystick.h" #pragma implementation "joystick.h"
#endif #endif
#if wxUSE_JOYSTICK
#include <linux/joystick.h> #include <linux/joystick.h>
#include <sys/types.h> #include <sys/types.h>
@@ -355,5 +354,4 @@ bool wxJoystick::ReleaseCapture(void)
m_polling = 0; m_polling = 0;
return TRUE; return TRUE;
} }
#endif

View File

@@ -2554,17 +2554,6 @@ GSList* G_SLIST_FIND (GSList *list,
data); data);
} }
void GTK_WINDOW_SET_GEOMETRY_HINTS (GtkWindow *window,
GtkWidget *geometry_widget,
GdkGeometry *geometry,
GdkWindowHints geom_mask)
{
gtk_window_set_geometry_hints (window,
geometry_widget,
geometry,
geom_mask);
}
#undef GDK_THREADS_ENTER #undef GDK_THREADS_ENTER
void GDK_THREADS_ENTER (void) void GDK_THREADS_ENTER (void)
{ {

View File

@@ -125,9 +125,6 @@ WXLIBNAME=$(NEW_WXLIBNAME)
!if "$(FINAL)" == "1" !if "$(FINAL)" == "1"
D=Release D=Release
!else !else
guilibsdll=msvcrtd.lib oldnames.lib kernel32.lib \
ws2_32.lib mswsock.lib advapi32.lib user32.lib \
gdi32.lib comdlg32.lib winspool.lib
D=Debug D=Debug
LIBEXT=d LIBEXT=d
WXLIBNAME=$(WXLIBNAME)$(LIBEXT) WXLIBNAME=$(WXLIBNAME)$(LIBEXT)

View File

@@ -143,7 +143,7 @@ bool wxControl::ProcessCommand(wxCommandEvent& event)
#if WXWIN_COMPATIBILITY #if WXWIN_COMPATIBILITY
if ( m_callback ) if ( m_callback )
{ {
(void)(*m_callback)(*this, event); (void)(*m_callback)(this, event);
return TRUE; return TRUE;
} }

View File

@@ -27,8 +27,6 @@ LIBTARGET=$(WXLIB)
DUMMYOBJ=$D\dummy.obj DUMMYOBJ=$D\dummy.obj
!endif !endif
USE_GLCANVAS=1
# Please set these according to the settings in setup.h, so we can include # Please set these according to the settings in setup.h, so we can include
# the appropriate libraries in wx.lib # the appropriate libraries in wx.lib

View File

@@ -545,16 +545,7 @@ bool wxTreeCtrl::Create(wxWindow *parent,
if ( !MSWCreateControl(WC_TREEVIEW, wstyle) ) if ( !MSWCreateControl(WC_TREEVIEW, wstyle) )
return FALSE; return FALSE;
#if 0
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
#else
// This works around a bug in the Windows tree control whereby for some versions
// of comctrl32, setting any colour actually draws the background in black.
// This will initialise the background to the system colour.
::SendMessage(GetHwnd(), TVM_SETBKCOLOR, 0,-1);
wxWindow::SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
#endif
SetForegroundColour(wxWindow::GetParent()->GetForegroundColour()); SetForegroundColour(wxWindow::GetParent()->GetForegroundColour());
// VZ: this is some experimental code which may be used to get the // VZ: this is some experimental code which may be used to get the

View File

@@ -555,7 +555,7 @@ bool wxApp::DoMessage()
{ {
BOOL bRc = ::WinGetMsg(vHabmain, &svCurrentMsg, HWND(NULL), 0, 0); BOOL bRc = ::WinGetMsg(vHabmain, &svCurrentMsg, HWND(NULL), 0, 0);
wxUsleep(1000); wxUsleep(10000);
if (bRc == 0) if (bRc == 0)
{ {
// got WM_QUIT // got WM_QUIT
@@ -658,7 +658,7 @@ int wxApp::MainLoop()
#endif // wxUSE_THREADS #endif // wxUSE_THREADS
while (!Pending() && ProcessIdle()) while (!Pending() && ProcessIdle())
{ {
// wxUsleep(10000); wxUsleep(10000);
} }
DoMessage(); DoMessage();
} }

View File

@@ -90,18 +90,6 @@ void wxFrame::Init()
m_nFsToolBarHeight = 0; m_nFsToolBarHeight = 0;
m_bFsIsMaximized = FALSE; m_bFsIsMaximized = FALSE;
m_bFsIsShowing = FALSE; m_bFsIsShowing = FALSE;
//
// Initialize SWP's
//
memset(&m_vSwp, 0, sizeof(SWP));
memset(&m_vSwpClient, 0, sizeof(SWP));
memset(&m_vSwpTitleBar, 0, sizeof(SWP));
memset(&m_vSwpMenuBar, 0, sizeof(SWP));
memset(&m_vSwpHScroll, 0, sizeof(SWP));
memset(&m_vSwpVScroll, 0, sizeof(SWP));
memset(&m_vSwpStatusBar, 0, sizeof(SWP));
memset(&m_vSwpToolBar, 0, sizeof(SWP));
} // end of wxFrame::Init } // end of wxFrame::Init
bool wxFrame::Create( bool wxFrame::Create(
@@ -172,7 +160,7 @@ wxFrame::~wxFrame()
if (wxTheApp->GetExitOnFrameDelete()) if (wxTheApp->GetExitOnFrameDelete())
{ {
::WinPostMsg(m_hFrame, WM_QUIT, 0, 0); ::WinPostMsg(GetHwnd(), WM_QUIT, 0, 0);
} }
} }
wxModelessWindows.DeleteObject(this); wxModelessWindows.DeleteObject(this);
@@ -214,12 +202,14 @@ void wxFrame::DoGetClientSize(
// top-left thus the += instead of the -= // top-left thus the += instead of the -=
// //
RECTL vRect; RECTL vRect;
HWND hWndClient;
// //
// PM has no GetClientRect that inherantly knows about the client window // PM has no GetClientRect that inherantly knows about the client window
// We have to explicitly go fetch it! // We have to explicitly go fetch it!
// //
::WinQueryWindowRect(GetHwnd(), &vRect); hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinQueryWindowRect(hWndClient, &vRect);
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
if ( GetStatusBar() ) if ( GetStatusBar() )
@@ -255,12 +245,14 @@ void wxFrame::DoSetClientSize(
) )
{ {
HWND hWnd = GetHwnd(); HWND hWnd = GetHwnd();
HWND hWndClient;
RECTL vRect; RECTL vRect;
RECTL vRect2; RECTL vRect2;
::WinQueryWindowRect(GetHwnd(), &vRect); hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinQueryWindowRect(hWndClient, &vRect);
::WinQueryWindowRect(m_hFrame, &vRect2); ::WinQueryWindowRect(hWnd, &vRect2);
// //
// Find the difference between the entire window (title bar and all) // Find the difference between the entire window (title bar and all)
@@ -292,7 +284,7 @@ void wxFrame::DoSetClientSize(
vPointl.x = vRect2.xLeft; vPointl.x = vRect2.xLeft;
vPoint.y = vRect2.yTop; vPoint.y = vRect2.yTop;
::WinSetWindowPos( m_hFrame ::WinSetWindowPos( hWnd
,HWND_TOP ,HWND_TOP
,vPointl.x ,vPointl.x
,vPointl.y ,vPointl.y
@@ -317,7 +309,7 @@ void wxFrame::DoGetSize(
{ {
RECTL vRect; RECTL vRect;
::WinQueryWindowRect(m_hFrame, &vRect); ::WinQueryWindowRect(GetHwnd(), &vRect);
*pWidth = vRect.xRight - vRect.xLeft; *pWidth = vRect.xRight - vRect.xLeft;
*pHeight = vRect.yTop - vRect.yBottom; *pHeight = vRect.yTop - vRect.yBottom;
} // end of wxFrame::DoGetSize } // end of wxFrame::DoGetSize
@@ -330,7 +322,7 @@ void wxFrame::DoGetPosition(
RECTL vRect; RECTL vRect;
POINTL vPoint; POINTL vPoint;
::WinQueryWindowRect(m_hFrame, &vRect); ::WinQueryWindowRect(GetHwnd(), &vRect);
vPoint.x = vRect.xLeft; vPoint.x = vRect.xLeft;
// //
@@ -356,7 +348,8 @@ void wxFrame::DoShowWindow(
// //
// Reset the window position // Reset the window position
// //
WinQueryWindowPos(m_hFrame, &vSwp); hClient = WinWindowFromID(GetHwnd(), FID_CLIENT);
WinQueryWindowPos(GetHwnd(), &vSwp);
WinSetWindowPos( GetHwnd() WinSetWindowPos( GetHwnd()
,HWND_TOP ,HWND_TOP
,vSwp.x ,vSwp.x
@@ -365,8 +358,8 @@ void wxFrame::DoShowWindow(
,vSwp.cy ,vSwp.cy
,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE
); );
::WinShowWindow(m_hFrame, (BOOL)bShowCmd);
::WinShowWindow(GetHwnd(), (BOOL)bShowCmd); ::WinShowWindow(GetHwnd(), (BOOL)bShowCmd);
::WinShowWindow(hClient, (BOOL)bShowCmd);
} // end of wxFrame::DoShowWindow } // end of wxFrame::DoShowWindow
bool wxFrame::Show( bool wxFrame::Show(
@@ -381,9 +374,9 @@ bool wxFrame::Show(
{ {
wxActivateEvent vEvent(wxEVT_ACTIVATE, TRUE, m_windowId); wxActivateEvent vEvent(wxEVT_ACTIVATE, TRUE, m_windowId);
::WinQueryWindowPos(m_hFrame, &vSwp); ::WinQueryWindowPos(GetHwnd(), &vSwp);
m_bIconized = vSwp.fl & SWP_MINIMIZE; m_bIconized = vSwp.fl & SWP_MINIMIZE;
::WinEnableWindow(m_hFrame, TRUE); ::WinEnableWindow(GetHwnd(), TRUE);
vEvent.SetEventObject(this); vEvent.SetEventObject(this);
GetEventHandler()->ProcessEvent(vEvent); GetEventHandler()->ProcessEvent(vEvent);
} }
@@ -451,7 +444,7 @@ bool wxFrame::IsMaximized() const
SWP vSwp; SWP vSwp;
bool bIconic; bool bIconic;
::WinQueryWindowPos(m_hFrame, &vSwp); ::WinQueryWindowPos(GetHwnd(), &vSwp);
return (vSwp.fl & SWP_MAXIMIZE); return (vSwp.fl & SWP_MAXIMIZE);
} // end of wxFrame::IsMaximized } // end of wxFrame::IsMaximized
@@ -463,12 +456,12 @@ void wxFrame::SetIcon(
if ((m_icon.GetHICON()) != NULLHANDLE) if ((m_icon.GetHICON()) != NULLHANDLE)
{ {
::WinSendMsg( m_hFrame ::WinSendMsg( GetHwnd()
,WM_SETICON ,WM_SETICON
,(MPARAM)((HPOINTER)m_icon.GetHICON()) ,(MPARAM)((HPOINTER)m_icon.GetHICON())
,NULL ,NULL
); );
::WinSendMsg( m_hFrame ::WinSendMsg( GetHwnd()
,WM_UPDATEFRAME ,WM_UPDATEFRAME
,(MPARAM)FCF_ICON ,(MPARAM)FCF_ICON
,(MPARAM)0 ,(MPARAM)0
@@ -508,7 +501,8 @@ void wxFrame::PositionStatusBar()
HWND hWndClient; HWND hWndClient;
RECTL vRect; RECTL vRect;
::WinQueryWindowRect(GetHwnd(), &vRect); hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinQueryWindowRect(hWndClient, &vRect);
nWidth = vRect.xRight - vRect.xLeft; nWidth = vRect.xRight - vRect.xLeft;
nHeight = vRect.yTop - vRect.yBottom; nHeight = vRect.yTop - vRect.yBottom;
@@ -585,14 +579,14 @@ void wxFrame::SetMenuBar(
// //
// Set the parent and owner of the menubar to be the frame // Set the parent and owner of the menubar to be the frame
// //
if (!::WinSetParent(m_hMenu, m_hFrame, FALSE)) if (!::WinSetParent(m_hMenu, GetHwnd(), FALSE))
{ {
vError = ::WinGetLastError(vHabmain); vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError); sError = wxPMErrorToStr(vError);
wxLogError("Error setting parent for submenu. Error: %s\n", sError); wxLogError("Error setting parent for submenu. Error: %s\n", sError);
} }
if (!::WinSetOwner(m_hMenu, m_hFrame)) if (!::WinSetOwner(m_hMenu, GetHwnd()))
{ {
vError = ::WinGetLastError(vHabmain); vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError); sError = wxPMErrorToStr(vError);
@@ -606,16 +600,17 @@ void wxFrame::SetMenuBar(
// //
// Now resize the client to fit the new frame // Now resize the client to fit the new frame
// //
WinQueryWindowPos(m_hFrame, &vSwp); WinQueryWindowPos(GetHwnd(), &vSwp);
hTitlebar = WinWindowFromID(m_hFrame, FID_TITLEBAR); hClient = WinWindowFromID(GetHwnd(), FID_CLIENT);
hTitlebar = WinWindowFromID(GetHwnd(), FID_TITLEBAR);
WinQueryWindowPos(hTitlebar, &vSwpTitlebar); WinQueryWindowPos(hTitlebar, &vSwpTitlebar);
hHScroll = WinWindowFromID(m_hFrame, FID_HORZSCROLL); hHScroll = WinWindowFromID(GetHwnd(), FID_HORZSCROLL);
WinQueryWindowPos(hHScroll, &vSwpHScroll); WinQueryWindowPos(hHScroll, &vSwpHScroll);
hVScroll = WinWindowFromID(m_hFrame, FID_VERTSCROLL); hVScroll = WinWindowFromID(GetHwnd(), FID_VERTSCROLL);
WinQueryWindowPos(hVScroll, &vSwpVScroll); WinQueryWindowPos(hVScroll, &vSwpVScroll);
hMenuBar = WinWindowFromID(m_hFrame, FID_MENU); hMenuBar = WinWindowFromID(GetHwnd(), FID_MENU);
WinQueryWindowPos(hMenuBar, &vSwpMenu); WinQueryWindowPos(hMenuBar, &vSwpMenu);
WinSetWindowPos( GetHwnd() WinSetWindowPos( hClient
,HWND_TOP ,HWND_TOP
,SV_CXSIZEBORDER/2 ,SV_CXSIZEBORDER/2
,(SV_CYSIZEBORDER/2) + vSwpHScroll.cy/2 ,(SV_CYSIZEBORDER/2) + vSwpHScroll.cy/2
@@ -627,7 +622,7 @@ void wxFrame::SetMenuBar(
void wxFrame::InternalSetMenuBar() void wxFrame::InternalSetMenuBar()
{ {
WinSendMsg((HWND)m_hFrame, WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0); WinSendMsg((HWND)GetHwnd(), WM_UPDATEFRAME, (MPARAM)FCF_MENU, (MPARAM)0);
} // end of wxFrame::InternalSetMenuBar } // end of wxFrame::InternalSetMenuBar
// //
@@ -804,9 +799,10 @@ bool wxFrame::OS2Create(
HWND hTitlebar = NULLHANDLE; HWND hTitlebar = NULLHANDLE;
HWND hHScroll = NULLHANDLE; HWND hHScroll = NULLHANDLE;
HWND hVScroll = NULLHANDLE; HWND hVScroll = NULLHANDLE;
SWP vSwp[10]; SWP vSwp;
RECTL vRect[10]; SWP vSwpTitlebar;
USHORT uCtlCount; SWP vSwpVScroll;
SWP vSwpHScroll;
m_hDefaultIcon = (WXHICON) (wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON : wxDEFAULT_FRAME_ICON); m_hDefaultIcon = (WXHICON) (wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON : wxDEFAULT_FRAME_ICON);
@@ -875,43 +871,66 @@ bool wxFrame::OS2Create(
// //
// Create the frame window // Create the frame window
// //
if ((m_hFrame = ::WinCreateWindow( hParent // Frame is parent if (!wxWindow::OS2Create( hParent
,WC_FRAME // standard frame class ,WC_FRAME
,(PSZ)zTitle // Window title ,zTitle
,0 // No styles ,ulStyleFlags
,0, 0, 0, 0 // Window position ,(long)nX
,NULLHANDLE // Owner ,(long)nY
,HWND_TOP // Sibling ,(long)nWidth
,(ULONG)nId // ID ,(long)nHeight
,(PVOID)&vFrameCtlData // Creation data
,NULL // Window Pres Params
)) == 0L)
{
return FALSE;
}
if (!wxWindow::OS2Create( m_hFrame
,wxFrameClassName
,NULL
,0L
,0L
,0L
,0L
,0L
,NULLHANDLE ,NULLHANDLE
,HWND_TOP ,HWND_TOP
,(unsigned long)FID_CLIENT ,(long)nId
,NULL ,(void*)&vFrameCtlData
,NULL ,NULL
)) ))
{ {
return FALSE; return FALSE;
} }
hFrame = GetHwnd();
//
// Since under PM the controling window proc is associated with the client window handle
// not the frame's we have to perform the hook here in order to associated the client handle,
// not the frame's with the window object !
//
wxWndHook = this;
//
// Create the client window. We must call the API from here rather than
// the static base class create because we need a separate handle
//
if ((hClient = ::WinCreateWindow( hFrame // Frame is parent
,wxFrameClassName
,NULL // Window title
,0 // No styles
,0, 0, 0, 0 // Window position
,NULLHANDLE // Owner
,HWND_TOP // Sibling
,FID_CLIENT // standard client ID
,NULL // Creation data
,NULL // Window Pres Params
)) == 0L)
{
return FALSE;
}
wxWndHook = NULL;
//
// Send anything to initialize the frame
//
::WinSendMsg( hFrame
,WM_UPDATEFRAME
,(MPARAM)FCF_TASKLIST
,(MPARAM)0
);
// //
// Now size everything. If adding a menu the client will need to be resized. // Now size everything. If adding a menu the client will need to be resized.
// //
if (!::WinSetWindowPos( m_hFrame if (!::WinSetWindowPos( hFrame
,HWND_TOP ,HWND_TOP
,nX ,nX
,nY ,nY
@@ -921,28 +940,20 @@ bool wxFrame::OS2Create(
)) ))
return FALSE; return FALSE;
uCtlCount = SHORT1FROMMP(::WinSendMsg(m_hFrame, WM_FORMATFRAME, (MPARAM)vSwp, (MPARAM)vRect)); WinQueryWindowPos(GetHwnd(), &vSwp);
for (int i = 0; i < uCtlCount; i++) hClient = WinWindowFromID(GetHwnd(), FID_CLIENT);
{ hTitlebar = WinWindowFromID(GetHwnd(), FID_TITLEBAR);
if (vSwp[i].hwnd == m_hFrame) WinQueryWindowPos(hTitlebar, &vSwpTitlebar);
memcpy(&m_vSwp, &vSwp[i], sizeof(SWP)); hHScroll = WinWindowFromID(GetHwnd(), FID_HORZSCROLL);
else if (vSwp[i].hwnd == m_hVScroll) WinQueryWindowPos(hHScroll, &vSwpHScroll);
memcpy(&m_vSwpVScroll, &vSwp[i], sizeof(SWP)); hVScroll = WinWindowFromID(GetHwnd(), FID_VERTSCROLL);
else if (vSwp[i].hwnd == m_hHScroll) WinQueryWindowPos(hVScroll, &vSwpVScroll);
memcpy(&m_vSwpVScroll, &vSwp[i], sizeof(SWP));
else if (vSwp[i].hwnd == m_hTitleBar)
memcpy(&m_vSwpTitleBar, &vSwp[i], sizeof(SWP));
}
//
// Now set the size of the client
//
WinSetWindowPos( hClient WinSetWindowPos( hClient
,HWND_TOP ,HWND_TOP
,SV_CXSIZEBORDER/2 ,SV_CXSIZEBORDER/2
,(SV_CYSIZEBORDER/2) + m_vSwpHScroll.cy/2 ,(SV_CYSIZEBORDER/2) + vSwpHScroll.cy/2
,m_vSwp.cx - ((SV_CXSIZEBORDER + 1) + m_vSwpVScroll.cx) ,vSwp.cx - ((SV_CXSIZEBORDER + 1) + vSwpVScroll.cx)
,m_vSwp.cy - ((SV_CYSIZEBORDER + 1) + m_vSwpTitleBar.cy + m_vSwpHScroll.cy/2) ,vSwp.cy - ((SV_CYSIZEBORDER + 1) + vSwpTitlebar.cy + vSwpHScroll.cy/2)
,SWP_SIZE | SWP_MOVE ,SWP_SIZE | SWP_MOVE
); );
@@ -1045,7 +1056,8 @@ void wxFrame::PositionToolBar()
HWND hWndClient; HWND hWndClient;
RECTL vRect; RECTL vRect;
::WinQueryWindowRect(GetHwnd(), &vRect); hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinQueryWindowRect(hWndClient, &vRect);
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
if (GetStatusBar()) if (GetStatusBar())
@@ -1150,7 +1162,7 @@ bool wxFrame::HandlePaint()
{ {
RECTL vRect; RECTL vRect;
if (::WinQueryUpdateRect(m_hFrame, &vRect)) if (::WinQueryUpdateRect(GetHwnd(), &vRect))
{ {
if (m_bIconized) if (m_bIconized)
{ {
@@ -1160,7 +1172,7 @@ bool wxFrame::HandlePaint()
HPOINTER hIcon; HPOINTER hIcon;
if (m_icon.Ok()) if (m_icon.Ok())
hIcon = (HPOINTER)::WinSendMsg(m_hFrame, WM_QUERYICON, 0L, 0L); hIcon = (HPOINTER)::WinSendMsg(GetHwnd(), WM_QUERYICON, 0L, 0L);
else else
hIcon = (HPOINTER)m_hDefaultIcon; hIcon = (HPOINTER)m_hDefaultIcon;
@@ -1169,7 +1181,7 @@ bool wxFrame::HandlePaint()
// is being processed // is being processed
// //
RECTL vRect2; RECTL vRect2;
HPS hPs = ::WinBeginPaint(m_hFrame, NULLHANDLE, &vRect2); HPS hPs = ::WinBeginPaint(GetHwnd(), NULLHANDLE, &vRect2);
// //
// Erase background before painting or we get white background // Erase background before painting or we get white background
@@ -1181,7 +1193,8 @@ bool wxFrame::HandlePaint()
HWND hWndClient; HWND hWndClient;
RECTL vRect3; RECTL vRect3;
::WinQueryWindowRect(GetHwnd(), &vRect3); hWndClient = ::WinWindowFromID(GetHwnd(), FID_CLIENT);
::WinQueryWindowRect(hWndClient, &vRect3);
static const int nIconWidth = 32; static const int nIconWidth = 32;
static const int nIconHeight = 32; static const int nIconHeight = 32;
@@ -1420,21 +1433,12 @@ MRESULT wxFrame::OS2WindowProc(
bProcessed = HandlePaint(); bProcessed = HandlePaint();
break; break;
case WM_ERASEBACKGROUND:
//
// Return TRUE to request PM to paint the window background
// in SYSCLR_WINDOW.
//
bProcessed = TRUE;
mRc = (MRESULT)(TRUE);
break;
case CM_QUERYDRAGIMAGE: case CM_QUERYDRAGIMAGE:
{ {
HPOINTER hIcon; HPOINTER hIcon;
if (m_icon.Ok()) if (m_icon.Ok())
hIcon = (HPOINTER)::WinSendMsg(m_hFrame, WM_QUERYICON, 0L, 0L); hIcon = (HPOINTER)::WinSendMsg(GetHwnd(), WM_QUERYICON, 0L, 0L);
else else
hIcon = (HPOINTER)m_hDefaultIcon; hIcon = (HPOINTER)m_hDefaultIcon;
mRc = (MRESULT)hIcon; mRc = (MRESULT)hIcon;

View File

@@ -80,10 +80,19 @@ int _System soclose(int);
/* Global initialisers */ /* Global initialisers */
#if !defined(__VISAGECPP__)
int GSocket_Init() int GSocket_Init()
{ {
return 1; return 1;
} }
#else
bool GSocket_Init()
{
return 1;
}
#endif
void GSocket_Cleanup() void GSocket_Cleanup()
{ {

View File

@@ -324,6 +324,7 @@ bool wxMenu::DoInsertOrAppend(
// //
// Menu is just a normal string (passed in data parameter) // Menu is just a normal string (passed in data parameter)
// //
wxSetShortCutKey((wxChar*)pItem->GetText().c_str());
vItem.afStyle |= MIS_TEXT; vItem.afStyle |= MIS_TEXT;
pData = (char*)pItem->GetText().c_str(); pData = (char*)pItem->GetText().c_str();
} }
@@ -912,6 +913,8 @@ bool wxMenuBar::Append(
wxCHECK_MSG(hSubmenu, FALSE, wxT("can't append invalid menu to menubar")); wxCHECK_MSG(hSubmenu, FALSE, wxT("can't append invalid menu to menubar"));
wxSetShortCutKey((wxChar*)rTitle.c_str());
wxString Title = TextToLabel(rTitle); wxString Title = TextToLabel(rTitle);
if (!wxMenuBarBase::Append(pMenu, Title)) if (!wxMenuBarBase::Append(pMenu, Title))
return FALSE; return FALSE;
@@ -1071,4 +1074,23 @@ wxMenuItem* wxMenuBar::FindItem(
return pItem; return pItem;
} // end of wxMenuBar::FindItem } // end of wxMenuBar::FindItem
//
// wxWindows' default shortcut identifier is WIN32's "&" but
// OS2's is "~" so we have to change this and must watch for the
// sequence, "&&" converting only the first one
//
void wxSetShortCutKey(
wxChar* zText
)
{
for (int i = 0; zText[i] != '\0'; i++)
{
if (zText[i] == '&')
{
zText[i] = '~';
if (zText[i+1] == '&')
i++;
}
}
}

View File

@@ -2357,7 +2357,7 @@ bool wxWindow::OS2Create(
(ULONG)zClass == (ULONG)WC_COMBOBOX || (ULONG)zClass == (ULONG)WC_COMBOBOX ||
(ULONG)zClass == (ULONG)WC_CONTAINER || (ULONG)zClass == (ULONG)WC_CONTAINER ||
(ULONG)zClass == (ULONG)WC_ENTRYFIELD || (ULONG)zClass == (ULONG)WC_ENTRYFIELD ||
(ULONG)zClass == (ULONG)WC_FRAME || (ULONG)zClass == (ULONG)WC_FRAME ||
(ULONG)zClass == (ULONG)WC_LISTBOX || (ULONG)zClass == (ULONG)WC_LISTBOX ||
(ULONG)zClass == (ULONG)WC_MENU || (ULONG)zClass == (ULONG)WC_MENU ||
(ULONG)zClass == (ULONG)WC_NOTEBOOK || (ULONG)zClass == (ULONG)WC_NOTEBOOK ||
@@ -2796,9 +2796,6 @@ void wxWindow::OnSysColourChanged(
bool wxWindow::HandlePaint() bool wxWindow::HandlePaint()
{ {
HRGN hRgn = NULLHANDLE; HRGN hRgn = NULLHANDLE;
wxPaintEvent vEvent;
HPS hPS;
RECTL vRect;
if (::WinQueryUpdateRegion(GetHwnd(), hRgn) == RGN_NULL) if (::WinQueryUpdateRegion(GetHwnd(), hRgn) == RGN_NULL)
{ {
@@ -2807,9 +2804,7 @@ bool wxWindow::HandlePaint()
} }
m_updateRegion = wxRegion(hRgn); m_updateRegion = wxRegion(hRgn);
hPS = WinBeginPaint(GetHwnd(), 0L, &vRect); wxPaintEvent vEvent;
WinFillRect(hPS, &vRect, SYSCLR_WINDOW);
WinEndPaint(hPS);
vEvent.SetEventObject(this); vEvent.SetEventObject(this);
return (GetEventHandler()->ProcessEvent(vEvent)); return (GetEventHandler()->ProcessEvent(vEvent));

View File

@@ -293,7 +293,7 @@ void MyApp::GenerateSamples(const wxString& dir)
GenerateSample("TextVC", "text", dir + wxString("/samples/text"), wxStringList("text.cpp", 0)); GenerateSample("TextVC", "text", dir + wxString("/samples/text"), wxStringList("text.cpp", 0));
GenerateSample("ThreadVC", "thread", dir + wxString("/samples/thread"), wxStringList("thread.cpp", 0)); GenerateSample("ThreadVC", "thread", dir + wxString("/samples/thread"), wxStringList("thread.cpp", 0));
GenerateSample("ToolbarVC", "toolbar", dir + wxString("/samples/toolbar"), wxStringList("toolbar.cpp", 0)); GenerateSample("ToolbarVC", "toolbar", dir + wxString("/samples/toolbar"), wxStringList("toolbar.cpp", 0));
GenerateSample("TreectrlVC", "treectrl", dir + wxString("/samples/treectrl"), wxStringList("treectrl.cpp", "treectrl.h", 0)); GenerateSample("TreectrlVC", "treectrl", dir + wxString("/samples/treectrl"), wxStringList("treectrl.cpp", "treetest.h", 0));
GenerateSample("TypetestVC", "typetest", dir + wxString("/samples/typetest"), wxStringList("typetest.cpp", "typetest.h", 0)); GenerateSample("TypetestVC", "typetest", dir + wxString("/samples/typetest"), wxStringList("typetest.cpp", "typetest.h", 0));
GenerateSample("ValidateVC", "validate", dir + wxString("/samples/validate"), wxStringList("validate.cpp", "validate.h", 0)); GenerateSample("ValidateVC", "validate", dir + wxString("/samples/validate"), wxStringList("validate.cpp", "validate.h", 0));
GenerateSample("ClientVC", "client", dir + wxString("/samples/sockets"), wxStringList("client.cpp", 0)); GenerateSample("ClientVC", "client", dir + wxString("/samples/sockets"), wxStringList("client.cpp", 0));

View File

@@ -70,7 +70,7 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING.LIB INSTALL.txt LICENCE.txt README.txt SYMBOLS.txt TODO.txt %doc COPYING.LIB INSTALL.txt LICENCE.txt README.txt SYMBOLS.txt TODO.txt
%dir %{pref}/share/wx %dir %{pref}/share/wx
%{pref}/share/wx/* %{pref}/share/wx/*
%attr(755, -, -) %{pref}/lib/libwx_gtk.* %attr(755, -, -) %{pref}/lib/libwx_gtk*
%files devel %files devel
%defattr (644, root, root, 755) %defattr (644, root, root, 755)