//@{
/// find a substring
size_t find(const wxString& str, size_t nStart = 0) const;
+
+ // VC++ 1.5 can't cope with this syntax.
+#if ! (defined(_MSC_VER) && !defined(__WIN32__))
/// find first n characters of sz
size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const;
+#endif
/// find the first occurence of character ch after nStart
size_t find(char ch, size_t nStart = 0) const;
/// as find, but from the end
size_t rfind(const wxString& str, size_t nStart = npos) const;
/// as find, but from the end
+ // VC++ 1.5 can't cope with this syntax.
+#if ! (defined(_MSC_VER) && !defined(__WIN32__))
size_t rfind(const char* sz, size_t nStart = npos,
size_t n = npos) const;
/// as find, but from the end
size_t rfind(char ch, size_t nStart = npos) const;
+#endif
//@}
/**
#
# "%W% %G%"
#
-# Makefile : Builds minimal example (DOS).
+# Makefile : Builds grid test example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
!include $(WXDIR)\src\makemsc.env
-THISDIR = $(WXDIR)\samples\minimal
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
+THISDIR = $(WXDIR)\samples\test
!ifndef FINAL
FINAL=0
!endif
-INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
-!else
-CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
-!endif
-
HEADERS =
-SOURCES = minimal.$(SRCSUFF)
-OBJECTS = minimal.obj
+SOURCES = test.$(SRCSUFF)
+OBJECTS = test.obj
-all: minimal.exe
+all: test.exe
wx:
cd $(WXDIR)\src\msw
cd $(THISDIR)
-minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res
+test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res
link $(LINKFLAGS) @<<
-minimal.obj $(WXDIR)\src\msw\dummy.obj,
-minimal,
+test.obj $(WXDIR)\src\msw\dummy.obj,
+test,
NUL,
$(LIBS),
-minimal.def
+test.def
;
<<
- rc -30 -K minimal.res
+ rc -30 -K test.res
-minimal.obj: minimal.$(SRCSUFF)
+test.obj: test.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
-minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc
- rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
+test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc
+ rc -r /dFAFA_LIB /i$(WXDIR)\include test
clean:
-erase *.obj
#endif
#ifdef __WINDOWS__
+#ifdef __WIN95__
#include <wx/tbar95.h>
+#else
+#include <wx/tbarmsw.h>
+#endif
#endif
#include "mdi.h"
#ifdef __WINDOWS__
-BEGIN_EVENT_TABLE(TestRibbon, wxToolBar95)
+BEGIN_EVENT_TABLE(TestRibbon, wxToolBar)
EVT_PAINT(TestRibbon::OnPaint)
END_EVENT_TABLE()
TestRibbon::TestRibbon(wxFrame *frame, int x, int y, int w, int h,
long style, int direction, int RowsOrColumns):
- wxToolBar95(frame, -1, wxPoint(x, y), wxSize(w, h), style, direction, RowsOrColumns)
+ wxToolBar(frame, -1, wxPoint(x, y), wxSize(w, h), style, direction, RowsOrColumns)
{
wxBitmap* bitmaps[8];
int offX = 5;
int currentX = 5;
- AddTool(0, bitmaps[0], wxNullBitmap, FALSE, (float)currentX, -1, NULL, "New file");
+ AddTool(0, *bitmaps[0], wxNullBitmap, FALSE, currentX, -1, NULL, "New file");
currentX += width + 5;
- AddTool(1, bitmaps[1], wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Open file");
+ AddTool(1, *bitmaps[1], wxNullBitmap, FALSE, currentX, -1, NULL, "Open file");
currentX += width + 5;
- AddTool(2, bitmaps[2], wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Save file");
+ AddTool(2, *bitmaps[2], wxNullBitmap, FALSE, currentX, -1, NULL, "Save file");
currentX += width + 5;
AddSeparator();
- AddTool(3, bitmaps[3], wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Copy");
+ AddTool(3, *bitmaps[3], wxNullBitmap, FALSE, currentX, -1, NULL, "Copy");
currentX += width + 5;
- AddTool(4, bitmaps[4], wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Cut");
+ AddTool(4, *bitmaps[4], wxNullBitmap, FALSE, currentX, -1, NULL, "Cut");
currentX += width + 5;
- AddTool(5, bitmaps[5], wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Paste");
+ AddTool(5, *bitmaps[5], wxNullBitmap, FALSE, currentX, -1, NULL, "Paste");
currentX += width + 5;
AddSeparator();
- AddTool(6, bitmaps[6], wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Print");
+ AddTool(6, *bitmaps[6], wxNullBitmap, FALSE, currentX, -1, NULL, "Print");
currentX += width + 5;
AddSeparator();
- AddTool(7, bitmaps[7], wxNullBitmap, TRUE, currentX, -1, NULL, "Help");
+ AddTool(7, *bitmaps[7], wxNullBitmap, TRUE, currentX, -1, NULL, "Help");
CreateTools();
void TestRibbon::OnPaint(wxPaintEvent& event)
{
- wxToolBar95::OnPaint(event);
+ wxToolBar::OnPaint(event);
wxPaintDC dc(this);
int w, h;
GetSize(&w, &h);
- dc.SetPen(wxBLACK_PEN);
- dc.SetBrush(wxTRANSPARENT_BRUSH);
+ dc.SetPen(*wxBLACK_PEN);
+ dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.DrawLine(0, h-1, w, h-1);
}