#endif
#ifdef __WINDOWS__
+#ifdef __WIN95__
#include <wx/tbar95.h>
+#else
+#include <wx/tbarmsw.h>
+#endif
#endif
#include "mdi.h"
dc.DrawSpline(50, 200, 50, 100, 200, 10);
dc.DrawLine(50, 230, 200, 230);
dc.DrawText("This is a test string", 50, 230);
+
+ wxPoint points[3];
+ points[0].x = 200; points[0].y = 300;
+ points[1].x = 100; points[1].y = 400;
+ points[2].x = 300; points[2].y = 400;
+
+ dc.DrawPolygon(3, points);
}
// This implements a tiny doodling program! Drag the mouse using
#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);
}