Various small fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-01-31 13:58:17 +00:00
parent 03ab016d66
commit 0a240683ed
25 changed files with 65 additions and 70 deletions

View File

@@ -5,6 +5,8 @@ include/wx_cw.pch
include/wx_cw.pch++
include/wx_cw_d.pch
include/wx_cw_d.pch++
include/wx_x86++_d.mch
include/wx_x86_d.mch
samples/bombs/make_cw.mcp

View File

@@ -137,6 +137,13 @@ Metrowerks CodeWarrior compilation
Further project files for samples will be available in due
course.
NOTES:
(a) Unfortunately CodeWarrior support is broken in this
release. Stefan Csomor (csomor@advancedconcepts.ch) will rectify this shortly.
(b) You need CodeWarrior Pro 4 plus the patches to 4.1 from the
Metrowerks Web site.
Symantec C++ compilation
------------------------

View File

@@ -33,19 +33,9 @@ e.g. ',' instead of '.' for decimal points.
Supply correct ctl3d/odbc lib files for BC++, Watcom (corrupt?)
16-bit compilation: replace small icons in treectrl/listctrl
samples that also have a 32x32 icon, with icons with only one
image, using Borland Image Editor. WIN16 doesn't have a function
for specifying which image to use, so the larger one gets used
erroneously.
Implement new wxClipboard and DnD (Vadim)
Add headers to VC++ project files.
Implement Robert's wxClipboard.
Distribution naming?
wxToolTip
Implement wxToolTip
LOW PRIORITY (MEDIUM TERM)
--------------------------
@@ -97,8 +87,6 @@ Miscellaneous file/system function wrappers.
Bug database.
OpenGL integration: check that wxGLCanvas works cross-platform.
Menu bitmaps - document Vadim's enhancements.
wxCreateDynamicObject is apparently slow: ~ 2000 calls to strcmp. Need to

View File

@@ -109,8 +109,8 @@ public:
// Not all args will always be used by derived classes, but
// including them all in each class ensures compatibility.
// If appName is empty, uses wxApp name
wxConfigBase(const wxString& appName = "", const wxString& vendorName = "",
const wxString& localFilename = "", const wxString& globalFilename = "",
wxConfigBase(const wxString& appName = wxEmptyString, const wxString& vendorName = wxEmptyString,
const wxString& localFilename = wxEmptyString, const wxString& globalFilename = wxEmptyString,
long style = 0);
// empty but ensures that dtor of all derived classes is virtual
@@ -152,7 +152,7 @@ public:
virtual bool Read(const wxString& key, wxString *pStr) const = 0;
virtual bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
virtual wxString Read(const wxString& key, const wxString& defVal = "") const;
virtual wxString Read(const wxString& key, const wxString& defVal = wxEmptyString) const;
virtual bool Read(const wxString& key, long *pl) const = 0;
virtual bool Read(const wxString& key, long *pl, long defVal) const;

View File

@@ -104,8 +104,8 @@ WXDLLEXPORT char* wxExpandPath(char *dest, const char *path);
// and make (if under the home tree) relative to home
// [caller must copy-- volatile]
WXDLLEXPORT char* wxContractPath(const wxString& filename,
const wxString& envname = "",
const wxString& user = "");
const wxString& envname = wxEmptyString,
const wxString& user = wxEmptyString);
// Destructive removal of /./ and /../ stuff
WXDLLEXPORT char* wxRealPath(char *path);

View File

@@ -314,10 +314,10 @@ class WXDLLEXPORT wxListLineData : public wxObject
public:
wxList m_items;
wxRectangle m_bound_all;
wxRectangle m_bound_label;
wxRectangle m_bound_icon;
wxRectangle m_bound_hilight;
wxRect m_bound_all;
wxRect m_bound_label;
wxRect m_bound_icon;
wxRect m_bound_hilight;
int m_mode;
bool m_hilighted;
wxBrush *m_hilightBrush;
@@ -342,15 +342,15 @@ class WXDLLEXPORT wxListLineData : public wxObject
void GetText( int index, wxString &s );
void SetText( int index, const wxString s );
int GetImage( int index );
void GetRect( wxRectangle &rect );
void GetRect( wxRect &rect );
void Hilight( bool on );
void ReverseHilight( void );
void DrawRubberBand( wxDC *dc, bool on );
void Draw( wxDC *dc );
bool IsInRect( int x, int y, const wxRectangle &rect );
bool IsInRect( int x, int y, const wxRect &rect );
bool IsHilighted( void );
void AssignRect( wxRectangle &dest, int x, int y, int width, int height );
void AssignRect( wxRectangle &dest, const wxRectangle &source );
void AssignRect( wxRect &dest, int x, int y, int width, int height );
void AssignRect( wxRect &dest, const wxRect &source );
};
//-----------------------------------------------------------------------------
@@ -503,7 +503,7 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
void SetItemState( long item, long state, long stateMask );
int GetItemState( long item, long stateMask );
int GetItemCount( void );
void GetItemRect( long index, wxRectangle &rect );
void GetItemRect( long index, wxRect &rect );
bool GetItemPosition(long item, wxPoint& pos);
int GetSelectedItemCount( void );
void SetMode( long mode );
@@ -568,7 +568,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
void SetItemText( long item, const wxString& str );
long GetItemData( long item ) const;
bool SetItemData( long item, long data );
bool GetItemRect( long item, wxRectangle& rect, int code = wxLIST_RECT_BOUNDS ) const;
bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
bool GetItemPosition( long item, wxPoint& pos ) const;
bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
int GetItemCount(void) const;

View File

@@ -281,6 +281,13 @@
#endif
#if defined(__WXMSW__) && !defined(__WIN32__)
#undef wxUSE_THREADS
#define wxUSE_THREADS 0
#endif
// Minimal setup e.g. for compiling small utilities
#define MINIMAL_WXWINDOWS_SETUP 0

View File

@@ -0,0 +1,7 @@
NAME Conftest
DESCRIPTION 'wxWindows Config Sample'
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 4048
STACKSIZE 16000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 318 B

View File

@@ -279,7 +279,7 @@ MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
// should correspond to TreeCtrlIcon_xxx enum
#if defined(__WXMSW__) && defined(__WIN16__)
// This is required in 16-bit Windows mode only because we can't load a specific (16x16)
// icon image, so it comes out blank (using the empty 32x32 icon).
// icon image, so it comes out stretched
m_imageListNormal->Add(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE));
m_imageListNormal->Add(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE));
#else

View File

@@ -324,7 +324,7 @@ size_t wxFile::Write(const void *pBuf, size_t nCount)
bool wxFile::Flush()
{
if ( IsOpened() ) {
#if defined(_MSC_VER) || wxHAVE_FSYNC
#if (defined(_MSC_VER) && !defined(__MWERKS__)) || wxHAVE_FSYNC
if ( fsync(m_fd) == -1 )
{
wxLogSysError(_("can't flush file descriptor %d"), m_fd);

View File

@@ -443,7 +443,7 @@ void wxListLineData::GetLabelExtent( int &x, int &y, int &width, int &height )
height = m_bound_label.height;
}
void wxListLineData::GetRect( wxRectangle &rect )
void wxListLineData::GetRect( wxRect &rect )
{
AssignRect( rect, m_bound_all );
}
@@ -641,7 +641,7 @@ void wxListLineData::Draw( wxDC *dc )
DoDraw( dc, m_hilighted, m_hilighted );
}
bool wxListLineData::IsInRect( int x, int y, const wxRectangle &rect )
bool wxListLineData::IsInRect( int x, int y, const wxRect &rect )
{
return ((x >= rect.x) && (x <= rect.x+rect.width) &&
(y >= rect.y) && (y <= rect.y+rect.height));
@@ -652,7 +652,7 @@ bool wxListLineData::IsHilighted( void )
return m_hilighted;
}
void wxListLineData::AssignRect( wxRectangle &dest, int x, int y, int width, int height )
void wxListLineData::AssignRect( wxRect &dest, int x, int y, int width, int height )
{
dest.x = x;
dest.y = y;
@@ -660,7 +660,7 @@ void wxListLineData::AssignRect( wxRectangle &dest, int x, int y, int width, int
dest.height = height;
}
void wxListLineData::AssignRect( wxRectangle &dest, const wxRectangle &source )
void wxListLineData::AssignRect( wxRect &dest, const wxRect &source )
{
dest.x = source.x;
dest.y = source.y;
@@ -1029,7 +1029,7 @@ void wxListMainWindow::RefreshLine( wxListLineData *line )
wxClientDC dc(this);
PrepareDC( dc );
line->GetExtent( x, y, w, h );
wxRectangle rect(
wxRect rect(
dc.LogicalToDeviceX(x-3),
dc.LogicalToDeviceY(y-3),
dc.LogicalToDeviceXRel(w+6),
@@ -1826,7 +1826,7 @@ int wxListMainWindow::GetItemCount( void )
return m_lines.Number();
}
void wxListMainWindow::GetItemRect( long index, wxRectangle &rect )
void wxListMainWindow::GetItemRect( long index, wxRect &rect )
{
wxNode *node = m_lines.Nth( index );
if (node)
@@ -1848,7 +1848,7 @@ bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos)
wxNode *node = m_lines.Nth( item );
if (node)
{
wxRectangle rect;
wxRect rect;
wxListLineData *line = (wxListLineData*)node->Data();
line->GetRect( rect );
pos.x = rect.x;
@@ -2511,7 +2511,7 @@ bool wxListCtrl::SetItemData( long item, long data )
return TRUE;
}
bool wxListCtrl::GetItemRect( long item, wxRectangle &rect, int WXUNUSED(code) ) const
bool wxListCtrl::GetItemRect( long item, wxRect &rect, int WXUNUSED(code) ) const
{
m_mainWin->GetItemRect( item, rect );
return TRUE;

View File

@@ -985,9 +985,9 @@ bool wxPropertySheet::SetProperty(const wxString name, wxPropertyValue value)
wxProperty* prop = GetProperty(name);
if(prop){
prop->SetValue(value);
return true;
return TRUE;
}else{
return false;
return FALSE;
}
}
void wxPropertySheet::RemoveProperty(wxString name)
@@ -1002,7 +1002,7 @@ void wxPropertySheet::RemoveProperty(wxString name)
}
bool wxPropertySheet::HasProperty(wxString name)
{
return (GetProperty(name)?true:false);
return (GetProperty(name)?TRUE:FALSE);
}
// Clear all properties
void wxPropertySheet::Clear(void)

View File

@@ -570,7 +570,7 @@ wxTreeItemId wxTreeCtrl::GetLastChild(const wxTreeItemId& item) const
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
wxArrayTreeItems& children = item.m_pItem->GetChildren();
return children.IsEmpty() ? wxTreeItemId() : children.Last();
return (children.IsEmpty() ? wxTreeItemId() : wxTreeItemId(children.Last()));
}
wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const

Binary file not shown.

View File

@@ -16,13 +16,13 @@ nul
$(LIBS)
$(TARGET).def
!
rc -K $(TARGET).res
brc -K $(TARGET).res
.$(SRCSUFF).obj:
bcc $(CPPFLAGS) -c {$< }
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
brc -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
clean:
-erase *.obj

View File

@@ -52,8 +52,9 @@ MINDATA =
MAXDATA =
STACK = option stack=64k
EXTRALIBS = $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\xpm.lib &
$(WATLIBDIR)\odbc32.lib $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
$(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\uuid.lib
$(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
$(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib &
$(WATLIBDIR)\uuid.lib # $(WATLIBDIR)\odbc32.lib
IFLAGS = -i=$(WXINC) -i=$(%watcom)\h;$(%watcom)\h\nt # -i=$(WXDIR)\include\wx\msw\gnuwin32
RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include
RESFLAGS2 = -R $(name) /i$(WXDIR)\include

View File

@@ -355,7 +355,7 @@ bool wxIniConfig::Read(const wxString& szKey, long *pl) const
// is it really nMagic?
lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic2, m_strLocalFilename);
if ( lVal == nMagic ) {
if ( lVal == nMagic2 ) {
// the nMagic it returned was indeed read from the file
*pl = lVal;
return TRUE;

View File

@@ -77,7 +77,6 @@ GENERICOBJS= \
$(MSWDIR)\helpxlp.obj \
$(MSWDIR)\laywin.obj \
$(MSWDIR)\listctrl.obj \
$(MSWDIR)\msgdlgg.obj \
$(MSWDIR)\notebook.obj \
$(MSWDIR)\panelg.obj \
$(MSWDIR)\prop.obj \
@@ -91,6 +90,7 @@ GENERICOBJS= \
$(MSWDIR)\textdlgg.obj \
$(MSWDIR)\treectrl.obj
# $(MSWDIR)\msgdlgg.obj \
# $(MSWDIR)\printps.obj \
# $(MSWDIR)\prntdlgg.obj \
@@ -115,7 +115,6 @@ COMMONOBJS = \
$(MSWDIR)\memory.obj \
$(MSWDIR)\module.obj \
$(MSWDIR)\object.obj \
$(MSWDIR)\postscrp.obj \
$(MSWDIR)\prntbase.obj \
$(MSWDIR)\resource.obj \
$(MSWDIR)\resourc2.obj \
@@ -506,8 +505,6 @@ $(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
$(MSWDIR)\odbc.obj: $(COMMDIR)\odbc.$(SRCSUFF)
$(MSWDIR)\postscrp.obj: $(COMMDIR)\postscrp.$(SRCSUFF)
$(MSWDIR)\prntbase.obj: $(COMMDIR)\prntbase.$(SRCSUFF)
$(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF)
@@ -702,7 +699,7 @@ $(CFG): makefile.bcc
-Fs-
-Vf
-Ff=4
-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib
-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm
-I$(WXDIR)\include\wx\msw\gnuwin32
-L$(BCCDIR)\lib
-D__WXWIN__

View File

@@ -130,8 +130,6 @@ COMMONOBJS = \
$(COMMDIR)/extended.$(OBJSUFF) \
$(COMMDIR)/wincmn.$(OBJSUFF)
# $(COMMDIR)/postscrp.$(OBJSUFF) \
# NOTE: if the socket-related files fail with a syntax error in Sockets.h,
# remove the files (probably all GnuWin32 releases < b20). Cygwin b20 is OK,
# Mingw32 may still have problems.

View File

@@ -570,9 +570,6 @@ object.obj: $(COMMDIR)\object.cpp
odbc.obj: $(COMMDIR)\odbc.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\odbc.cpp /BINARY odbc.obj
postscrp.obj: $(COMMDIR)\postcrp.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\postcrp.cpp /BINARY postscrp.obj
prntbase.obj: $(COMMDIR)\prntbase.cpp
$(CCC) $(CPPFLAGS) $(IFLAGS) $(COMMDIR)\prntbase.cpp /BINARY prntbase.obj

View File

@@ -76,8 +76,7 @@ NONESSENTIALOBJS= \
$(GENDIR)\msgdlgg.obj \
$(GENDIR)\helpxlp.obj \
$(GENDIR)\colrdlgg.obj \
$(GENDIR)\fontdlgg.obj \
$(COMMDIR)\postscrp.obj
$(GENDIR)\fontdlgg.obj
COMMONOBJS = \
$(COMMDIR)\cmndata.obj \
@@ -882,11 +881,6 @@ $(COMMDIR)/odbc.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
$(COMMDIR)/postscrp.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
<<
$(COMMDIR)/prntbase.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@

View File

@@ -223,7 +223,7 @@ $(LIBTARGET) : $(OBJECTS)
# wlib /b /c /n /p=512 $^@ @tmp.lbc
clean: $(EXTRATARGETSCLEAN)
clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
-erase *.obj
-erase $(LIBTARGET)
-erase *.pch
@@ -582,9 +582,6 @@ object.obj: $(COMMDIR)\object.cpp
odbc.obj: $(COMMDIR)\odbc.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
postscrp.obj: $(COMMDIR)\postcrp.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
prntbase.obj: $(COMMDIR)\prntbase.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<

View File

@@ -40,7 +40,7 @@
#ifndef XPM_h
#define XPM_h
#if defined(_WINDOWS) || defined(__WXMSW__) || defined(WIN32)
#if (defined(_WINDOWS) || defined(__WXMSW__) || defined(WIN32)) && !defined(FOR_MSW)
#define FOR_MSW
#endif