X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fc25a89ac1e6c5208db24bfc0abc8666b791dc6..a333f34d91ae845d39ca8a833290e9a1c3d04749:/contrib/samples/ogl/ogledit/palette.cpp diff --git a/contrib/samples/ogl/ogledit/palette.cpp b/contrib/samples/ogl/ogledit/palette.cpp index 84348c5982..c57862a08e 100644 --- a/contrib/samples/ogl/ogledit/palette.cpp +++ b/contrib/samples/ogl/ogledit/palette.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -36,13 +36,11 @@ #include "palette.h" // Include pixmaps -#if defined(__WXGTK__) || defined(__WXMOTIF__) #include "bitmaps/arrow.xpm" #include "bitmaps/tool1.xpm" #include "bitmaps/tool2.xpm" #include "bitmaps/tool3.xpm" #include "bitmaps/tool4.xpm" -#endif /* * Object editor tool palette @@ -53,11 +51,7 @@ EditorToolPalette::EditorToolPalette(wxWindow* parent, const wxPoint& pos, const long style): TOOLPALETTECLASS(parent, -1, pos, size, style) { - currentlySelected = -1; - -#if 1 // ndef __WXGTK__ - SetMaxRowsCols(1000, 1); -#endif + currentlySelected = -1; } bool EditorToolPalette::OnLeftClick(int toolIndex, bool toggled) @@ -75,7 +69,7 @@ bool EditorToolPalette::OnLeftClick(int toolIndex, bool toggled) return TRUE; } -void EditorToolPalette::OnMouseEnter(int toolIndex) +void EditorToolPalette::OnMouseEnter(int WXUNUSED(toolIndex)) { } @@ -86,14 +80,15 @@ void EditorToolPalette::SetSize(int x, int y, int width, int height, int sizeFla EditorToolPalette *MyApp::CreatePalette(wxFrame *parent) { - // Load palette bitmaps -#ifdef __WXMSW__ - wxBitmap PaletteTool1("TOOL1"); - wxBitmap PaletteTool2("TOOL2"); - wxBitmap PaletteTool3("TOOL3"); - wxBitmap PaletteTool4("TOOL4"); - wxBitmap PaletteArrow("ARROWTOOL"); -#elif defined(__WXGTK__) || defined(__WXMOTIF__) + // Load palette bitmaps. MSW-specific bitmaps no + // longer needed. +#if 0 + wxBitmap PaletteTool1(_T("TOOL1")); + wxBitmap PaletteTool2(_T("TOOL2")); + wxBitmap PaletteTool3(_T("TOOL3")); + wxBitmap PaletteTool4(_T("TOOL4")); + wxBitmap PaletteArrow(_T("ARROWTOOL")); +#else wxBitmap PaletteTool1(tool1_xpm); wxBitmap PaletteTool2(tool2_xpm); wxBitmap PaletteTool3(tool3_xpm); @@ -101,16 +96,17 @@ EditorToolPalette *MyApp::CreatePalette(wxFrame *parent) wxBitmap PaletteArrow(arrow_xpm); #endif - EditorToolPalette *palette = new EditorToolPalette(parent, wxPoint(0, 0), wxSize(-1, -1), wxTB_HORIZONTAL); + EditorToolPalette *palette = new EditorToolPalette(parent, wxPoint(0, 0), wxSize(-1, -1), + wxTB_VERTICAL); palette->SetMargins(2, 2); palette->SetToolBitmapSize(wxSize(22, 22)); - palette->AddTool(PALETTE_ARROW, PaletteArrow, wxNullBitmap, TRUE, 0, -1, NULL, "Pointer"); - palette->AddTool(PALETTE_TOOL1, PaletteTool1, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 1"); - palette->AddTool(PALETTE_TOOL2, PaletteTool2, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 2"); - palette->AddTool(PALETTE_TOOL3, PaletteTool3, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 3"); - palette->AddTool(PALETTE_TOOL4, PaletteTool4, wxNullBitmap, TRUE, 0, -1, NULL, "Tool 4"); + palette->AddTool(PALETTE_ARROW, PaletteArrow, wxNullBitmap, TRUE, 0, -1, NULL, _T("Pointer")); + palette->AddTool(PALETTE_TOOL1, PaletteTool1, wxNullBitmap, TRUE, 0, -1, NULL, _T("Tool 1")); + palette->AddTool(PALETTE_TOOL2, PaletteTool2, wxNullBitmap, TRUE, 0, -1, NULL, _T("Tool 2")); + palette->AddTool(PALETTE_TOOL3, PaletteTool3, wxNullBitmap, TRUE, 0, -1, NULL, _T("Tool 3")); + palette->AddTool(PALETTE_TOOL4, PaletteTool4, wxNullBitmap, TRUE, 0, -1, NULL, _T("Tool 4")); palette->Realize();