From a977709b11432e05af48e205cc02c0a0ad4ecf16 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 8 Apr 2002 10:50:14 +0000 Subject: [PATCH] Canvas: added some DECLARE_CLASS macros to stop it failing in class info initialisation Mmedia: compiles agin Plot: corrected VC++ project settings Simple toolbar: should draw a highlight again now Generic dir control: moved control ids to header for apps that need to get hold of the individual controls Scintilla: unconditionally compile Scintilla_LinkLexers() to correct link error in sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/canvas/canvas.h | 4 ++++ contrib/samples/canvas/simple/simple.cpp | 2 +- contrib/samples/canvas/test/test.cpp | 2 +- contrib/samples/mmedia/mmboard.cpp | 16 ++++++++-------- contrib/samples/plot/PlotVC.dsp | 4 ++-- contrib/src/canvas/canvas.cpp | 8 ++++++++ contrib/src/stc/scintilla/src/KeyWords.cxx | 2 +- docs/latex/wx/wx.hpj | 2 +- include/wx/generic/dirctrlg.h | 4 ++++ src/generic/dirctrlg.cpp | 3 --- src/generic/tbarsmpl.cpp | 6 ++++-- src/stc/scintilla/src/KeyWords.cxx | 2 +- 12 files changed, 35 insertions(+), 20 deletions(-) diff --git a/contrib/include/wx/canvas/canvas.h b/contrib/include/wx/canvas/canvas.h index 521c27ef86..37d900ded1 100644 --- a/contrib/include/wx/canvas/canvas.h +++ b/contrib/include/wx/canvas/canvas.h @@ -54,6 +54,7 @@ enum wxDRAG_MODE // alteration of a wxCanvasObject functionality class wxCanvasObject: public wxEvtHandler { + DECLARE_CLASS(wxCanvasObject) public: wxCanvasObject(); @@ -214,6 +215,7 @@ protected: // The group has a matrix to position/rotate/scale the group. class wxCanvasObjectGroup: public wxCanvasObject { + DECLARE_CLASS(wxCanvasObjectGroup) public: wxCanvasObjectGroup(double x, double y); virtual ~wxCanvasObjectGroup(); @@ -282,6 +284,7 @@ protected: // The position/matrix of the referenced Object is accumulated with the one here. class wxCanvasObjectRef: public wxCanvasObject { + DECLARE_CLASS(wxCanvasObjectRef) public: wxCanvasObjectRef(double x, double y,wxCanvasObject* obj); @@ -332,6 +335,7 @@ protected: // wxCanvasRect class wxCanvasRect: public wxCanvasObject { + DECLARE_CLASS(wxCanvasRect) public: wxCanvasRect( double x, double y, double w, double h , double radius=0 ); void SetBrush( const wxBrush& brush) { m_brush = brush; }; diff --git a/contrib/samples/canvas/simple/simple.cpp b/contrib/samples/canvas/simple/simple.cpp index 6bb5b8ac3e..46385b28f1 100644 --- a/contrib/samples/canvas/simple/simple.cpp +++ b/contrib/samples/canvas/simple/simple.cpp @@ -71,7 +71,7 @@ MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title, // Bunch of rects and images. wxBitmap bitmap( smile_xpm ); - wxImage image( bitmap ); + wxImage image( bitmap.ConvertToImage() ); m_smile1 = new wxCanvasImage( image, 0,70,32,32 ); root->Append( m_smile1 ); diff --git a/contrib/samples/canvas/test/test.cpp b/contrib/samples/canvas/test/test.cpp index 410a3780bd..ac52ef0f9f 100644 --- a/contrib/samples/canvas/test/test.cpp +++ b/contrib/samples/canvas/test/test.cpp @@ -235,7 +235,7 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, cons m_datatree->SetAdmin(&m_canvasadmin); wxBitmap bitmap( smile_xpm ); - wxImage image( bitmap ); + wxImage image( bitmap.ConvertToImage() ); // m_sm1 = new wxCanvasImage( image, 0,70,32,32 ); // m_datatree->Append( m_sm1 ); diff --git a/contrib/samples/mmedia/mmboard.cpp b/contrib/samples/mmedia/mmboard.cpp index b43c2e3011..a11274d13c 100644 --- a/contrib/samples/mmedia/mmboard.cpp +++ b/contrib/samples/mmedia/mmboard.cpp @@ -312,18 +312,18 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi // Bitmap button panel wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); - wxBitmap *play_bmp = new wxBitmap(play_back_xpm); - wxBitmap *stop_bmp = new wxBitmap(stop_back_xpm); - wxBitmap *eject_bmp = new wxBitmap(eject_xpm); - wxBitmap *pause_bmp = new wxBitmap(pause_xpm); + wxBitmap play_bmp(play_back_xpm); + wxBitmap stop_bmp(stop_back_xpm); + wxBitmap eject_bmp(eject_xpm); + wxBitmap pause_bmp(pause_xpm); - m_playButton = new wxBitmapButton(m_panel, MMBoard_PlayButton, *play_bmp); + m_playButton = new wxBitmapButton(m_panel, MMBoard_PlayButton, play_bmp); m_playButton->Enable(FALSE); - m_pauseButton = new wxBitmapButton(m_panel, MMBoard_PauseButton, *pause_bmp); + m_pauseButton = new wxBitmapButton(m_panel, MMBoard_PauseButton, pause_bmp); m_pauseButton->Enable(FALSE); - m_stopButton = new wxBitmapButton(m_panel, MMBoard_StopButton, *stop_bmp); + m_stopButton = new wxBitmapButton(m_panel, MMBoard_StopButton, stop_bmp); m_stopButton->Enable(FALSE); - m_ejectButton = new wxBitmapButton(m_panel, MMBoard_EjectButton, *eject_bmp); + m_ejectButton = new wxBitmapButton(m_panel, MMBoard_EjectButton, eject_bmp); m_ejectButton->Enable(FALSE); buttonSizer->Add(m_playButton, 0, wxALL, 2); diff --git a/contrib/samples/plot/PlotVC.dsp b/contrib/samples/plot/PlotVC.dsp index 758b8ddb10..39f842bcfd 100644 --- a/contrib/samples/plot/PlotVC.dsp +++ b/contrib/samples/plot/PlotVC.dsp @@ -45,7 +45,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswd" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 @@ -72,7 +72,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c # SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 diff --git a/contrib/src/canvas/canvas.cpp b/contrib/src/canvas/canvas.cpp index 3853269f96..0cedafc946 100644 --- a/contrib/src/canvas/canvas.cpp +++ b/contrib/src/canvas/canvas.cpp @@ -51,6 +51,8 @@ FT_Library g_freetypeLibrary; // wxCanvasObject //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasObject, wxEvtHandler) + wxCanvasObject::wxCanvasObject() { // the default event handler is just this object @@ -407,6 +409,8 @@ void wxCanvasObject::WriteSVG( wxTextOutputStream &stream ) // wxCanvasObjectGroup //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasObjectGroup, wxCanvasObject) + wxCanvasObjectGroup::wxCanvasObjectGroup(double x, double y) { lworld.Translate(x,y); @@ -716,6 +720,8 @@ int wxCanvasObjectGroup::IndexOf( wxCanvasObject* obj ) // wxCanvasObjectRef //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasObjectRef, wxCanvasObject) + wxCanvasObjectRef::wxCanvasObjectRef(double x, double y, wxCanvasObject* obj) : wxCanvasObject() { @@ -880,6 +886,8 @@ wxCanvasObject* wxCanvasObjectRef::IsHitWorld( double x, double y, double margin // wxCanvasRect //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasRect, wxCanvasObject) + wxCanvasRect::wxCanvasRect( double x, double y, double w, double h , double radius ) : wxCanvasObject() { diff --git a/contrib/src/stc/scintilla/src/KeyWords.cxx b/contrib/src/stc/scintilla/src/KeyWords.cxx index d1eddef5ff..804846e19e 100644 --- a/contrib/src/stc/scintilla/src/KeyWords.cxx +++ b/contrib/src/stc/scintilla/src/KeyWords.cxx @@ -97,7 +97,7 @@ static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[ LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); -#ifdef __vms +#if 1 // def __vms #define LINK_LEXERS #endif diff --git a/docs/latex/wx/wx.hpj b/docs/latex/wx/wx.hpj index 1430bcfb87..31ec7677b7 100644 --- a/docs/latex/wx/wx.hpj +++ b/docs/latex/wx/wx.hpj @@ -1,5 +1,5 @@ [OPTIONS] -BMROOT=c:\wx2dev\wxwind~1\docs/latex/wx ; Assume that bitmaps are where the source is +BMROOT=c:\wx2dev\wxWind~1\docs\latex\wx TITLE=wxWindows Manual CONTENTS=Contents COMPRESS=HIGH diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 467c04f7a4..4be293df3e 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -223,6 +223,10 @@ protected: #define wxDirCtrl wxGenericDirCtrl #endif +// Symbols for accessing individual controls +#define wxID_TREECTRL 7000 +#define wxID_FILTERLISTCTRL 7001 + #endif // wxUSE_DIRDLG #endif diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index dddbbad587..6084a44bd2 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -312,9 +312,6 @@ static const char * icon8_xpm[] = { " "}; -#define wxID_TREECTRL 7000 -#define wxID_FILTERLISTCTRL 7001 - #if defined(__DOS__) bool wxIsDriveAvailable(const wxString& dirName) diff --git a/src/generic/tbarsmpl.cpp b/src/generic/tbarsmpl.cpp index 543aff8fc5..522736e77f 100644 --- a/src/generic/tbarsmpl.cpp +++ b/src/generic/tbarsmpl.cpp @@ -514,9 +514,11 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase) wxPen white_pen(wxT("WHITE"), 1, wxSOLID); wxPen black_pen(wxT("BLACK"), 1, wxSOLID); - wxBitmap bitmap = tool->GetBitmap(); + wxBitmap bitmap = tool->GetNormalBitmap(); + if (!bitmap.Ok()) + return; - if ( bitmap.Ok() ) + if ( !tool->IsToggled() ) { #if wxUSE_PALETTE #ifndef __WXGTK__ diff --git a/src/stc/scintilla/src/KeyWords.cxx b/src/stc/scintilla/src/KeyWords.cxx index d1eddef5ff..804846e19e 100644 --- a/src/stc/scintilla/src/KeyWords.cxx +++ b/src/stc/scintilla/src/KeyWords.cxx @@ -97,7 +97,7 @@ static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[ LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); -#ifdef __vms +#if 1 // def __vms #define LINK_LEXERS #endif -- 2.45.2