]> git.saurik.com Git - wxWidgets.git/commitdiff
MSW compilation fixes - widgets sample runs!
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Jun 2001 00:27:24 +0000 (00:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Jun 2001 00:27:24 +0000 (00:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

19 files changed:
distrib/msw/tmake/filelist.txt
include/wx/chkconf.h
include/wx/datetime.h
include/wx/generic/msgdlgg.h
include/wx/msgdlg.h
include/wx/msw/msgdlg.h
include/wx/msw/setup0.h
include/wx/scrolwin.h
samples/menu/menu.cpp
src/common/radiocmn.cpp [new file with mode: 0644]
src/generic/scrolwin.cpp
src/html/htmlcell.cpp
src/html/htmlwin.cpp
src/msw/font.cpp
src/msw/listctrl.cpp
src/msw/notebook.cpp
src/msw/ole/automtn.cpp
src/msw/radiobox.cpp
src/msw/window.cpp

index 96ee59195eb09f8225ba0d0a970ebe0933efd131..88425e87cce42f76de8f947445125ec7f947c421 100644 (file)
@@ -192,6 +192,7 @@ prntbase.cpp        C
 process.cpp    C       32,B
 protocol.cpp   C       S,B
 quantize.cpp   C
+radiocmn.cpp   C
 resource.cpp   C
 sckaddr.cpp    C       S,B
 sckfile.cpp    C       S,B
index 25497ebb13fad1fd50c0ba577a0c2b3d8e8b444d..834520a36bbab8f2a33278ce0a3f2c1d1c9031d6 100644 (file)
 #   endif
 #endif /* !defined(wxUSE_LISTCTRL) */
 
+#ifndef wxUSE_MSGDLG
+#   ifdef wxABORT_ON_CONFIG_ERROR
+#       error "wxUSE_MSGDLG must be defined."
+#   else
+#       define wxUSE_MSGDLG 0
+#   endif
+#endif /* !defined(wxUSE_MSGDLG) */
+
 #ifndef wxUSE_MDI_ARCHITECTURE
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_MDI_ARCHITECTURE must be defined."
 #           define wxUSE_FILEDLG 1
 #       endif
 #   endif
-#endif /* !wxUSE_FILEDLG */
+#endif /* wxUSE_FILEDLG */
 
 #if !wxUSE_FONTDLG
 #   if defined(wxUSE_FONTMAP)
 #   endif
 #endif /* !wxUSE_IMAGLIST */
 
+#if !wxUSE_MSGDLG
+#   ifdef wxABORT_ON_CONFIG_ERROR
+        /* FIXME: should compile without it, of course, but doesn't */
+#       error "wxMessageBox is always needed"
+#   else
+#       undef wxUSE_MSGDLG
+#       define wxUSE_MSGDLG 1
+#   endif
+#endif
+
 #if wxUSE_RADIOBTN
 #   if defined(__WXUNIVERSAL__) && !wxUSE_CHECKBOX
 #        ifdef wxABORT_ON_CONFIG_ERROR
index 14c36c2d2536f0128d8b60feaeab77ecbc4446ee..1dc31ef6d5495481c1742010868e9b82ab86eef3 100644 (file)
@@ -17,6 +17,8 @@
     #pragma interface "datetime.h"
 #endif
 
+#if wxUSE_DATETIME
+
 #include <time.h>
 #include <limits.h>             // for INT_MIN
 
@@ -1570,4 +1572,6 @@ inline WXDLLEXPORT void wxPrevWDay(wxDateTime::WeekDay& wd)
                                : (wxDateTime::WeekDay)(wd - 1);
 }
 
+#endif // wxUSE_DATETIME
+
 #endif // _WX_DATETIME_H
index 80e9d48827499e74c9a374aac89e7e31c2d94752..df43bc5293ec08d3367c9ab610f02bcb1fe29670 100644 (file)
@@ -45,15 +45,6 @@ private:
 
 #if !defined( __WXMSW__ ) && !defined( __WXMAC__) && !defined(__WXPM__)
 #define wxMessageDialog wxGenericMessageDialog
-
-int wxMessageBox( const wxString& message
-                 ,const wxString& caption = wxMessageBoxCaptionStr
-                 ,long  style = wxOK|wxCENTRE
-                 ,wxWindow *parent = (wxWindow *) NULL
-                 ,int x = -1
-                 ,int y = -1
-                );
-
 #endif
 
 #endif
index 573907b3c6f7c3084721ee706dcd29202cf79ed2..48d1a3c214d686684817822772c0114ca841a5ad 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _WX_MSGDLG_H_BASE_
 #define _WX_MSGDLG_H_BASE_
 
+#if wxUSE_MSGDLG
+
 #if defined(__WXMSW__)
 #include "wx/msw/msgdlg.h"
 #elif defined(__WXMOTIF__)
 #include "wx/generic/msgdlgg.h"
 #endif
 
+// ----------------------------------------------------------------------------
+// wxMessageBox: the simplest way to use wxMessageDialog
+// ----------------------------------------------------------------------------
+
+int WXDLLEXPORT wxMessageBox(const wxString& message,
+                            const wxString& caption = wxMessageBoxCaptionStr,
+                            long style = wxOK | wxCENTRE,
+                            wxWindow *parent = NULL,
+                            int x = -1, int y = -1);
+
+#endif // wxUSE_MSGDLG
+
 #endif
     // _WX_MSGDLG_H_BASE_
index 43093a234f9de8ecbe024aaac6be42447f92f385..eeccdf6c91b02fff763aff7a4f79fb27fe47cf28 100644 (file)
@@ -41,9 +41,5 @@ public:
 };
 
 
-int WXDLLEXPORT wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr,
-  long style = wxOK|wxCENTRE,
-  wxWindow *parent = NULL, int x = -1, int y = -1);
-
 #endif
     // _WX_MSGBOXDLG_H_
index 31fd6c1cf609030f2107b1a6862a17d6ebab1558..7a7ef8146a4d47f08804b72bebded8865a18b3cf 100644 (file)
 // i18n support: _() macro, wxLocale class. Requires wxTextFile.
 #define wxUSE_INTL          1
 
-// Set wxUSE_TIMEDATE to 1 to compile the wxDateTime and related classes which
+// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which
 // allow to manipulate dates, times and time intervals. wxDateTime replaces the
 // old wxTime and wxDate classes which are still provided for backwards
 // compatibility (and implemented in terms of wxDateTime).
 //
 // Requires: wxUSE_LONGLONG
 //
+// Default is 1
+//
 // Recommended setting: 1
-#define wxUSE_TIMEDATE      1
+#define wxUSE_DATETIME      1
+
+// wxUSE_TIMEDATE enables compilation of the old wxDate and wxTime classes (not
+// the same as wxDateTime!). These classes are obsolete and shouldn't be used
+// in new code
+//
+// Default is 0
+//
+// Recommended setting: 0 unless you have legacy code which uses these classes
+#define wxUSE_TIMEDATE 0
 
 // Set wxUSE_TIMER to 1 to compile wxTimer class
 //
 // Recommended setting: 1 (unless it really doesn't work)
 #define wxUSE_COMMON_DIALOGS 1
 
+// wxBusyInfo displays window with message when app is busy. Works in same way
+// as wxBusyCursor
+#define wxUSE_BUSYINFO      1
+
+// Use single/multiple choice dialogs.
+//
+// Default is 1
+//
+// Recommended setting: 1 (used in the library itself)
+#define wxUSE_CHOICEDLG     1
+
+// wxDirDlg class for getting a directory name from user
+#define wxUSE_DIRDLG 1
+
+// TODO: setting to choose the generic or native one
+
 // Use file open/save dialogs.
 //
 // Default is 1
 // Recommended setting: 1 (used in the library itself)
 #define wxUSE_FONTDLG       1
 
-// Use single/multiple choice dialogs.
+// Use wxMessageDialog and wxMessageBox.
 //
 // Default is 1
 //
 // Recommended setting: 1 (used in the library itself)
-#define wxUSE_CHOICEDLG     1
-
-// text entry dialog and wxGetTextFromUser function
-#define wxUSE_TEXTDLG 1
+#define wxUSE_MSGDLG        1
 
 // progress dialog class for lengthy operations
 #define wxUSE_PROGRESSDLG 1
 
-// wxBusyInfo displays window with message when app is busy. Works in same way
-// as wxBusyCursor
-#define wxUSE_BUSYINFO      1
-
-// wxDirDlg class for getting a directory name from user
-#define wxUSE_DIRDLG 1
-
 // support for startup tips (wxShowTip &c)
 #define wxUSE_STARTUP_TIPS 1
 
+// text entry dialog and wxGetTextFromUser function
+#define wxUSE_TEXTDLG 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
 // you need to modify setup.h and rebuild everything
 // ----------------------------------------------------------------------------
 
-#if wxUSE_TIMEDATE && !wxUSE_LONGLONG
+#if wxUSE_DATETIME && !wxUSE_LONGLONG
     #error wxDateTime requires wxLongLong
 #endif
 
index 154e7286c0360e5626d3b143d0eb979d90de6b5b..9464b6973d432c893f3684a0883bde895fd387b6 100644 (file)
@@ -112,7 +112,9 @@ public:
     void HandleOnChar(wxKeyEvent& event);
     void HandleOnMouseEnter(wxMouseEvent& event);
     void HandleOnMouseLeave(wxMouseEvent& event);
+#if wxUSE_MOUSEWHEEL
     void HandleOnMouseWheel(wxMouseEvent& event);
+#endif // wxUSE_MOUSEWHEEL
 
 protected:
     // get pointer to our scroll rect if we use it or NULL
@@ -158,6 +160,10 @@ protected:
 
     double                m_scaleX;
     double                m_scaleY;
+
+#if wxUSE_MOUSEWHEEL
+    int m_wheelRotation;
+#endif // wxUSE_MOUSEWHEEL
 };
 
 // ----------------------------------------------------------------------------
index 365e990140d582c6bdf90e7371ea975eec6c6460..58abd848dd2860b6b8dc20f90223a95a2821d508 100644 (file)
 #endif
 
 #ifndef WX_PRECOMP
-    #include <wx/wx.h>
+    #include <wx/app.h>
+    #include <wx/frame.h>
+    #include <wx/menu.h>
     #include <wx/log.h>
+    #include <wx/textctrl.h>
 #endif
 
 #if !wxUSE_MENUS
@@ -41,9 +44,6 @@
 
     WX_USE_THEME(win32);
     WX_USE_THEME(gtk);
-
-    // not implemented yet
-    #define wxMessageBox
 #endif // __WXUNIVERSAL__
 
 // ----------------------------------------------------------------------------
@@ -67,7 +67,10 @@ public:
 
     void LogMenuEvent(const wxCommandEvent& event);
 
+protected:
     void OnQuit(wxCommandEvent& event);
+    void OnClearLog(wxCommandEvent& event);
+
     void OnAbout(wxCommandEvent& event);
 
     void OnDummy(wxCommandEvent& event);
@@ -90,19 +93,29 @@ public:
     void OnGetLabelMenu(wxCommandEvent& event);
     void OnSetLabelMenu(wxCommandEvent& event);
 
-    void OnRightDown(wxMouseEvent& event);
+    void OnRightUp(wxMouseEvent& event);
 
     void OnUpdateCheckMenuItemUI(wxUpdateUIEvent& event);
 
+    void OnSize(wxSizeEvent& event);
+
 private:
     wxMenu *CreateDummyMenu(wxString *title);
 
     wxMenuItem *GetLastMenuItem() const;
 
-    wxMenu     *m_menu;
+    // the menu previously detached from the menubar (may be NULL)
+    wxMenu *m_menu;
 
+    // the count of dummy menus already created
     size_t m_countDummy;
 
+    // the control used for logging
+    wxTextCtrl *m_textctrl;
+
+    // the previous log target
+    wxLog *m_logOld;
+
     DECLARE_EVENT_TABLE()
 };
 
@@ -132,6 +145,7 @@ private:
 enum
 {
     Menu_File_Quit = 100,
+    Menu_File_ClearLog,
 
     Menu_MenuBar_Toggle = 200,
     Menu_MenuBar_Append,
@@ -172,7 +186,8 @@ enum
 // ----------------------------------------------------------------------------
 
 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
-    EVT_MENU(Menu_File_Quit, MyFrame::OnQuit)
+    EVT_MENU(Menu_File_Quit,     MyFrame::OnQuit)
+    EVT_MENU(Menu_File_ClearLog, MyFrame::OnClearLog)
 
     EVT_MENU(Menu_Help_About, MyFrame::OnAbout)
 
@@ -198,7 +213,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
 
     EVT_UPDATE_UI(Menu_Menu_Check, MyFrame::OnUpdateCheckMenuItemUI)
 
-    EVT_RIGHT_DOWN(MyFrame::OnRightDown)
+    EVT_RIGHT_UP(MyFrame::OnRightUp)
+
+    EVT_SIZE(MyFrame::OnSize)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(MyEvtHandler, wxEvtHandler)
@@ -225,7 +242,7 @@ bool MyApp::OnInit()
     frame->Show(TRUE);
 
 #if wxUSE_STATUSBAR
-    frame->SetStatusText("Hello, wxWindows");
+    frame->SetStatusText("Welcome to wxWindows menu sample");
 #endif // wxUSE_STATUSBAR
 
     SetTopWindow(frame);
@@ -244,19 +261,21 @@ MyFrame::MyFrame()
 {
     m_menu = NULL;
     m_countDummy = 0;
+    m_logOld = NULL;
 
 #if wxUSE_STATUSBAR
-    CreateStatusBar(2);
+    CreateStatusBar();
 #endif // wxUSE_STATUSBAR
 
     // create the menubar
     wxMenu *fileMenu = new wxMenu;
-    fileMenu->Append(Menu_File_Quit, "E&xit\tAlt-X", "Quit toolbar sample");
 
-    wxMenuItem *itemBitmap = new wxMenuItem(fileMenu, Menu_File_Quit,
-                                            "Quit with &bitmap\tAlt-Q");
-    itemBitmap->SetBitmap(wxBitmap(copy_xpm));
-    fileMenu->Append(itemBitmap);
+    wxMenuItem *item = new wxMenuItem(fileMenu, Menu_File_ClearLog,
+                                      "Clear &log\tCtrl-L");
+    item->SetBitmap(copy_xpm);
+    fileMenu->Append(item);
+    fileMenu->AppendSeparator();
+    fileMenu->Append(Menu_File_Quit, "E&xit\tAlt-X", "Quit menu sample");
 
     wxMenu *menubarMenu = new wxMenu;
     menubarMenu->Append(Menu_MenuBar_Append, "&Append menu\tCtrl-A",
@@ -320,6 +339,19 @@ MyFrame::MyFrame()
 
     // intercept all menu events and log them in this custom event handler
     PushEventHandler(new MyEvtHandler(this));
+
+    // create the log text window
+    m_textctrl = new wxTextCtrl(this, -1, _T(""),
+                                wxDefaultPosition, wxDefaultSize,
+                                wxTE_MULTILINE);
+    m_textctrl->SetEditable(FALSE);
+    m_logOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_textctrl));
+
+    wxLogMessage(_T("Brief explanations: the commands or the \"Menu\" menu\n")
+                 _T("append/insert/delete items to/from the last menu.\n")
+                 _T("The commands from \"Menubar\" menu work with the\n")
+                 _T("menubar itself.\n")
+                 _T("Right click the band below to test popup menus.\n"));
 }
 
 MyFrame::~MyFrame()
@@ -328,14 +360,17 @@ MyFrame::~MyFrame()
 
     // delete the event handler installed in ctor
     PopEventHandler(TRUE);
+
+    // restore old logger
+    delete wxLog::SetActiveTarget(m_logOld);
 }
 
 wxMenu *MyFrame::CreateDummyMenu(wxString *title)
 {
     wxMenu *menu = new wxMenu;
-    menu->Append(Menu_Dummy_First, "First item\tCtrl-F1");
+    menu->Append(Menu_Dummy_First, "&First item\tCtrl-F1");
     menu->AppendSeparator();
-    menu->Append(Menu_Dummy_Second, "Second item\tCtrl-F2", "", TRUE);
+    menu->Append(Menu_Dummy_Second, "&Second item\tCtrl-F2", "", TRUE);
 
     if ( title )
     {
@@ -366,8 +401,9 @@ wxMenuItem *MyFrame::GetLastMenuItem() const
 void MyFrame::LogMenuEvent(const wxCommandEvent& event)
 {
     int id = event.GetId();
-    if (!GetMenuBar()->FindItem(id))
+    if ( !GetMenuBar()->FindItem(id) )
         return;
+
     wxString msg = wxString::Format("Menu command %d", id);
     if ( GetMenuBar()->FindItem(id)->IsCheckable() )
     {
@@ -375,9 +411,7 @@ void MyFrame::LogMenuEvent(const wxCommandEvent& event)
                                 event.IsChecked() ? "" : "not ");
     }
 
-#if wxUSE_STATUSBAR
-    SetStatusText(msg, 1);
-#endif // wxUSE_STATUSBAR
+    wxLogMessage(msg);
 }
 
 // ----------------------------------------------------------------------------
@@ -389,11 +423,21 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
     Close(TRUE);
 }
 
+void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))
+{
+    m_textctrl->Clear();
+}
+
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
-    (void)wxMessageBox("wxWindows toolbar sample",
+#ifdef __WXUNIVERSAL__
+    // wxMessageBox not implemented yet
+    wxLogMessage("wxWindows menu sample\n© 1999-2001 Vadim Zeitlin");
+#else
+    (void)wxMessageBox("wxWindows menu sample\n© 1999-2001 Vadim Zeitlin",
                        "About wxWindows menu sample",
                        wxICON_INFORMATION);
+#endif
 }
 
 void MyFrame::OnDeleteMenu(wxCommandEvent& WXUNUSED(event))
@@ -442,15 +486,12 @@ void MyFrame::OnToggleMenu(wxCommandEvent& WXUNUSED(event))
     }
 }
 
-void MyFrame::OnEnableMenu(wxCommandEvent& WXUNUSED(event))
+void MyFrame::OnEnableMenu(wxCommandEvent& event)
 {
     wxMenuBar *mbar = GetMenuBar();
     size_t count = mbar->GetMenuCount();
 
-    static bool s_enabled = TRUE;
-
-    s_enabled = !s_enabled;
-    mbar->EnableTop(count - 1, s_enabled);
+    mbar->EnableTop(count - 1, event.IsChecked());
 }
 
 void MyFrame::OnGetLabelMenu(wxCommandEvent& WXUNUSED(event))
@@ -472,9 +513,7 @@ void MyFrame::OnSetLabelMenu(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnDummy(wxCommandEvent& event)
 {
-    wxString s;
-    s.Printf("Dummy item #%d", event.GetId() - Menu_Dummy_First + 1);
-    wxMessageBox(s, "Menu sample", wxICON_INFORMATION);
+    wxLogMessage("Dummy item #%d", event.GetId() - Menu_Dummy_First + 1);
 }
 
 void MyFrame::OnAppendMenuItem(wxCommandEvent& WXUNUSED(event))
@@ -483,7 +522,7 @@ void MyFrame::OnAppendMenuItem(wxCommandEvent& WXUNUSED(event))
     wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 1);
 
     menu->AppendSeparator();
-    menu->Append(Menu_Dummy_Third, "Third dummy item\tCtrl-F3",
+    menu->Append(Menu_Dummy_Third, "&Third dummy item\tCtrl-F3",
                  "Checkable item", TRUE);
 }
 
@@ -493,7 +532,7 @@ void MyFrame::OnAppendSubMenu(wxCommandEvent& WXUNUSED(event))
 
     wxMenu *menu = menubar->GetMenu(menubar->GetMenuCount() - 1);
 
-    menu->Append(Menu_Dummy_Last, "Dummy sub menu",
+    menu->Append(Menu_Dummy_Last, "&Dummy sub menu",
                  CreateDummyMenu(NULL), "Dummy sub menu help");
 }
 
@@ -645,15 +684,15 @@ void MyFrame::OnGetMenuItemInfo(wxCommandEvent& WXUNUSED(event))
     }
 }
 
-void MyFrame::OnRightDown(wxMouseEvent &event )
+void MyFrame::OnRightUp(wxMouseEvent &event)
 {
     wxMenu menu("Test popup");
 
     menu.Append(Menu_Help_About, "&About");
-    menu.Append(Menu_Popup_Submenu, "Submenu", CreateDummyMenu(NULL));
-    menu.Append(Menu_Popup_ToBeDeleted, "To be deleted");
-    menu.Append(Menu_Popup_ToBeChecked, "To be checked", "", TRUE);
-    menu.Append(Menu_Popup_ToBeGreyed, "To be greyed");
+    menu.Append(Menu_Popup_Submenu, "&Submenu", CreateDummyMenu(NULL));
+    menu.Append(Menu_Popup_ToBeDeleted, "To be &deleted");
+    menu.Append(Menu_Popup_ToBeChecked, "To be &checked", "", TRUE);
+    menu.Append(Menu_Popup_ToBeGreyed, "To be &greyed");
     menu.AppendSeparator();
     menu.Append(Menu_File_Quit, "E&xit");
 
@@ -661,12 +700,27 @@ void MyFrame::OnRightDown(wxMouseEvent &event )
     menu.Check(Menu_Popup_ToBeChecked, TRUE);
     menu.Enable(Menu_Popup_ToBeGreyed, FALSE);
 
-    PopupMenu( &menu, event.GetX(), event.GetY() );
+    PopupMenu(&menu, event.GetX(), event.GetY());
 
     // test for destroying items in popup menus
-#if 0
+#if 0 // doesn't work in wxGTK!
     menu.Destroy(Menu_Popup_Submenu);
 
     PopupMenu( &menu, event.GetX(), event.GetY() );
 #endif // 0
 }
+
+void MyFrame::OnSize(wxSizeEvent& event)
+{
+    // leave a band below for popup menu testing
+    wxSize size = GetClientSize();
+    m_textctrl->SetSize(0, 0, size.x, (3*size.y)/4);
+
+    // this is really ugly but we have to do it as we can't just call
+    // event.Skip() because wxFrameBase would make the text control fill the
+    // entire frame then
+#ifdef __WXUNIVERSAL__
+    PositionMenuBar();
+#endif // __WXUNIVERSAL__
+}
+
diff --git a/src/common/radiocmn.cpp b/src/common/radiocmn.cpp
new file mode 100644 (file)
index 0000000..2c91443
--- /dev/null
@@ -0,0 +1,138 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        src/common/radiocmn.cpp
+// Purpose:     wxRadioBox methods common to all ports
+// Author:      Vadim Zeitlin
+// Modified by:
+// Created:     03.06.01
+// RCS-ID:      $Id$
+// Copyright:   (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// License:     wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+    #pragma implementation "radioboxbase.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#if wxUSE_RADIOBOX
+
+#ifndef WX_PRECOMP
+    #include "wx/radiobox.h"
+#endif //WX_PRECOMP
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const
+{
+    int count = GetCount(),
+        numCols = GetColumnCount(),
+        numRows = GetRowCount();
+
+    bool horz = (style & wxRA_SPECIFY_COLS) != 0;
+
+    switch ( dir )
+    {
+        case wxUP:
+            if ( horz )
+            {
+                item -= numCols;
+            }
+            else // vertical layout
+            {
+                if ( !item-- )
+                    item = count - 1;
+            }
+            break;
+
+        case wxLEFT:
+            if ( horz )
+            {
+                if ( !item-- )
+                    item = count - 1;
+            }
+            else // vertical layout
+            {
+                item -= numRows;
+            }
+            break;
+
+        case wxDOWN:
+            if ( horz )
+            {
+                item += numCols;
+            }
+            else // vertical layout
+            {
+                if ( ++item == count )
+                    item = 0;
+            }
+            break;
+
+        case wxRIGHT:
+            if ( horz )
+            {
+                if ( ++item == count )
+                    item = 0;
+            }
+            else // vertical layout
+            {
+                item += numRows;
+            }
+            break;
+
+        default:
+            wxFAIL_MSG( _T("unexpected wxDirection value") );
+            return -1;
+    }
+
+    // ensure that the item is in range [0..count)
+    if ( item < 0 )
+    {
+        // first map the item to the one in the same column but in the last row
+        item += count;
+
+        // now there are 2 cases: either it is the first item of the last row
+        // in which case we need to wrap again and get to the last item or we
+        // can just go to the previous item
+        if ( item % (horz ? numCols : numRows) )
+            item--;
+        else
+            item = count - 1;
+    }
+    else if ( item >= count )
+    {
+        // same logic as above
+        item -= count;
+
+        // ... except that we need to check if this is not the last item, not
+        // the first one
+        if ( (item + 1) % (horz ? numCols : numRows) )
+            item++;
+        else
+            item = 0;
+    }
+
+    wxASSERT_MSG( item < count && item >= 0,
+                  _T("logic error in wxRadioBox::GetNextItem()") );
+
+    return item;
+}
+
+#endif // wxUSE_RADIOBOX
+
index 3a07c7886ed964ab7e3b3105b2c1679cd858ee99..991029613dd80ccd098c7a864381d17336fb9693 100644 (file)
@@ -174,42 +174,49 @@ bool wxScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
     // ProcessEvent() above
     event.Skip(FALSE);
 
-    switch ( event.GetEventType() )
-    {
-        case wxEVT_SCROLLWIN_TOP:
-        case wxEVT_SCROLLWIN_BOTTOM:
-        case wxEVT_SCROLLWIN_LINEUP:
-        case wxEVT_SCROLLWIN_LINEDOWN:
-        case wxEVT_SCROLLWIN_PAGEUP:
-        case wxEVT_SCROLLWIN_PAGEDOWN:
-        case wxEVT_SCROLLWIN_THUMBTRACK:
-        case wxEVT_SCROLLWIN_THUMBRELEASE:
-            m_scrollHelper->HandleOnScroll((wxScrollWinEvent &)event);
-            return !event.GetSkipped();
+    wxEventType evType = event.GetEventType();
 
-        case wxEVT_PAINT:
-            m_scrollHelper->HandleOnPaint((wxPaintEvent &)event);
-            return TRUE;
-
-        case wxEVT_SIZE:
-            m_scrollHelper->HandleOnSize((wxSizeEvent &)event);
-            return FALSE;
+    if ( evType == wxEVT_PAINT )
+    {
+        m_scrollHelper->HandleOnPaint((wxPaintEvent &)event);
+        return TRUE;
+    }
 
-        case wxEVT_CHAR:
-            m_scrollHelper->HandleOnChar((wxKeyEvent &)event);
+    if ( evType == wxEVT_SCROLLWIN_TOP ||
+         evType == wxEVT_SCROLLWIN_BOTTOM ||
+         evType == wxEVT_SCROLLWIN_LINEUP ||
+         evType == wxEVT_SCROLLWIN_LINEDOWN ||
+         evType == wxEVT_SCROLLWIN_PAGEUP ||
+         evType == wxEVT_SCROLLWIN_PAGEDOWN ||
+         evType == wxEVT_SCROLLWIN_THUMBTRACK ||
+         evType == wxEVT_SCROLLWIN_THUMBRELEASE )
+    {
+            m_scrollHelper->HandleOnScroll((wxScrollWinEvent &)event);
             return !event.GetSkipped();
+    }
 
-        case wxEVT_ENTER_WINDOW:
-            m_scrollHelper->HandleOnMouseEnter((wxMouseEvent &)event);
-            break;
-
-        case wxEVT_LEAVE_WINDOW:
-            m_scrollHelper->HandleOnMouseLeave((wxMouseEvent &)event);
-            break;
-
-        case wxEVT_MOUSEWHEEL:
-            m_scrollHelper->HandleOnMouseWheel((wxMouseEvent &)event);
-            break;
+    if ( evType == wxEVT_ENTER_WINDOW )
+    {
+        m_scrollHelper->HandleOnMouseEnter((wxMouseEvent &)event);
+    }
+    else if ( evType == wxEVT_LEAVE_WINDOW )
+    {
+        m_scrollHelper->HandleOnMouseLeave((wxMouseEvent &)event);
+    }
+#if wxUSE_MOUSEWHEEL
+    else if ( evType == wxEVT_MOUSEWHEEL )
+    {
+        m_scrollHelper->HandleOnMouseWheel((wxMouseEvent &)event);
+    }
+#endif // wxUSE_MOUSEWHEEL
+    else if ( evType == wxEVT_SIZE )
+    {
+        m_scrollHelper->HandleOnSize((wxSizeEvent &)event);
+    }
+    else if ( evType == wxEVT_CHAR )
+    {
+        m_scrollHelper->HandleOnChar((wxKeyEvent &)event);
+        return !event.GetSkipped();
     }
 
     return FALSE;
@@ -937,6 +944,8 @@ void wxScrollHelper::HandleOnMouseLeave(wxMouseEvent& event)
     }
 }
 
+#if wxUSE_MOUSEWHEEL
+
 void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event)
 {
     m_wheelRotation += event.GetWheelRotation();
@@ -953,6 +962,8 @@ void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event)
     }
 }
 
+#endif // wxUSE_MOUSEWHEEL
+
 // ----------------------------------------------------------------------------
 // wxGenericScrolledWindow implementation
 // ----------------------------------------------------------------------------
index daab625a4c30f0005bf7a76e7aa976cf4a684a1f..c907af3fe77a725e7b6dfc215176da631e50c70d 100644 (file)
@@ -784,7 +784,7 @@ void wxHtmlWidgetCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
         c = c->GetParent();
     }
 
-    ((wxScrolledWindow*)(m_Wnd->GetParent()))->ViewStart(&stx, &sty);
+    ((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
     m_Wnd->SetSize(absx - wxHTML_SCROLL_STEP * stx, absy  - wxHTML_SCROLL_STEP * sty, m_Width, m_Height);
 
     wxHtmlCell::Draw(dc, x, y, view_y1, view_y2);
@@ -804,7 +804,7 @@ void wxHtmlWidgetCell::DrawInvisible(wxDC& dc, int x, int y)
         c = c->GetParent();
     }
 
-    ((wxScrolledWindow*)(m_Wnd->GetParent()))->ViewStart(&stx, &sty);
+    ((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
     m_Wnd->SetSize(absx - wxHTML_SCROLL_STEP * stx, absy  - wxHTML_SCROLL_STEP * sty, m_Width, m_Height);
 
     wxHtmlCell::DrawInvisible(dc, x, y);
index d6b79d5cbda3a071a30d3360a45783f29d7a7622..9db304ff227e1b7d41951b8f0a2b501c2edaa1d9 100644 (file)
@@ -150,7 +150,7 @@ bool wxHtmlWindow::SetPage(const wxString& source)
         nodeG = (m_GlobalProcessors) ? m_GlobalProcessors->GetFirst() : NULL;
 
         // VS: there are two lists, global and local, both of them sorted by
-        //     priority. Since we have to go through _both_ lists with 
+        //     priority. Since we have to go through _both_ lists with
         //     decreasing priority, we "merge-sort" the lists on-line by
         //     processing that one of the two heads that has higher priority
         //     in every iteration
@@ -205,15 +205,15 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
     wxYield(); Refresh(FALSE);
 
     m_tmpCanDrawLocks++;
-    if (m_HistoryOn && (m_HistoryPos != -1)) 
+    if (m_HistoryOn && (m_HistoryPos != -1))
     {
         // store scroll position into history item:
         int x, y;
-        ViewStart(&x, &y);
+        GetViewStart(&x, &y);
         (*m_History)[m_HistoryPos].SetPos(y);
     }
 
-    if (location[0] == wxT('#')) 
+    if (location[0] == wxT('#'))
     {
         // local anchor:
         wxString anch = location.Mid(1) /*1 to end*/;
@@ -230,7 +230,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
     }
     else if (location.Find(wxT('#')) != wxNOT_FOUND &&
              (m_FS->GetPath() + location.BeforeFirst(wxT('#'))) == m_OpenedPage)
-       {
+    {
         wxString anch = location.AfterFirst(wxT('#'));
         m_tmpCanDrawLocks--;
         rt_val = ScrollToAnchor(anch);
@@ -242,7 +242,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
         needs_refresh = TRUE;
         // load&display it:
         if (m_RelatedStatusBar != -1)
-           {
+        {
             m_RelatedFrame->SetStatusText(_("Connecting..."), m_RelatedStatusBar);
             Refresh(FALSE);
         }
@@ -250,9 +250,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
         f = m_FS->OpenFile(location);
 
         if (f == NULL)
-           {
-            wxString err;
-
+        {
             wxLogError(_("Unable to open requested HTML document: %s"), location.c_str());
             m_tmpCanDrawLocks--;
 
@@ -261,12 +259,12 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
         }
 
         else
-       {
+        {
             wxNode *node;
             wxString src = wxEmptyString;
 
             if (m_RelatedStatusBar != -1)
-               {
+            {
                 wxString msg = _("Loading : ") + location;
                 m_RelatedFrame->SetStatusText(msg, m_RelatedStatusBar);
                 Refresh(FALSE);
@@ -274,17 +272,17 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
 
             node = m_Filters.GetFirst();
             while (node)
-               {
+            {
                 wxHtmlFilter *h = (wxHtmlFilter*) node->GetData();
                 if (h->CanRead(*f))
-                       {
+                {
                     src = h->ReadFile(*f);
                     break;
                 }
                 node = node->GetNext();
             }
             if (src == wxEmptyString)
-               {
+            {
                 if (m_DefaultFilter == NULL) m_DefaultFilter = GetDefaultFilter();
                 src = m_DefaultFilter->ReadFile(*f);
             }
@@ -293,7 +291,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
             rt_val = SetPage(src);
             m_OpenedPage = f->GetLocation();
             if (f->GetAnchor() != wxEmptyString)
-               {
+            {
                 wxYield();
                 ScrollToAnchor(f->GetAnchor());
             }
@@ -384,7 +382,7 @@ void wxHtmlWindow::CreateLayout()
         GetClientSize(&ClientWidth, &ClientHeight);
         m_Cell->Layout(ClientWidth);
         if (ClientHeight < m_Cell->GetHeight() + GetCharHeight())
-           {
+        {
             SetScrollbars(
                   wxHTML_SCROLL_STEP, wxHTML_SCROLL_STEP,
                   m_Cell->GetWidth() / wxHTML_SCROLL_STEP,
@@ -392,7 +390,7 @@ void wxHtmlWindow::CreateLayout()
                   /*cheat: top-level frag is always container*/);
         }
         else /* we fit into window, no need for scrollbars */
-           {
+        {
             SetScrollbars(wxHTML_SCROLL_STEP, 1, m_Cell->GetWidth() / wxHTML_SCROLL_STEP, 0); // disable...
             GetClientSize(&ClientWidth, &ClientHeight);
             m_Cell->Layout(ClientWidth); // ...and relayout
@@ -465,7 +463,7 @@ bool wxHtmlWindow::HistoryBack()
 
     // store scroll position into history item:
     int x, y;
-    ViewStart(&x, &y);
+    GetViewStart(&x, &y);
     (*m_History)[m_HistoryPos].SetPos(y);
 
     // go to previous position:
@@ -558,7 +556,7 @@ void wxHtmlWindow::AddProcessor(wxHtmlProcessor *processor)
         m_GlobalProcessors->DeleteContents(TRUE);
     }
     wxHtmlProcessorList::Node *node;
-    
+
     for (node = m_GlobalProcessors->GetFirst(); node; node = node->GetNext())
     {
         if (processor->GetPriority() > node->GetData()->GetPriority())
@@ -624,7 +622,7 @@ void wxHtmlWindow::OnDraw(wxDC& dc)
 #endif
 #endif
     dc.SetBackgroundMode(wxTRANSPARENT);
-    ViewStart(&x, &y);
+    GetViewStart(&x, &y);
 
     while (upd)
     {
@@ -656,7 +654,7 @@ void wxHtmlWindow::OnMouseEvent(wxMouseEvent& event)
         wxPoint pos;
         wxString lnk;
 
-        ViewStart(&sx, &sy); sx *= wxHTML_SCROLL_STEP; sy *= wxHTML_SCROLL_STEP;
+        GetViewStart(&sx, &sy); sx *= wxHTML_SCROLL_STEP; sy *= wxHTML_SCROLL_STEP;
         pos = event.GetPosition();
 
         if (m_Cell)
@@ -680,20 +678,20 @@ void wxHtmlWindow::OnIdle(wxIdleEvent& WXUNUSED(event))
         int x, y;
         wxHtmlLinkInfo *lnk;
 
-        ViewStart(&sx, &sy); sx *= wxHTML_SCROLL_STEP; sy *= wxHTML_SCROLL_STEP;
+        GetViewStart(&sx, &sy); sx *= wxHTML_SCROLL_STEP; sy *= wxHTML_SCROLL_STEP;
         wxGetMousePosition(&x, &y);
         ScreenToClient(&x, &y);
         lnk = m_Cell->GetLink(sx + x, sy + y);
 
         if (lnk != m_tmpLastLink)
-           {
+        {
             if (lnk == NULL)
-               {
+            {
                 SetCursor(*s_cur_arrow);
                 if (m_RelatedStatusBar != -1) m_RelatedFrame->SetStatusText(wxEmptyString, m_RelatedStatusBar);
             }
             else
-               {
+            {
                 SetCursor(*s_cur_hand);
                 if (m_RelatedStatusBar != -1)
                     m_RelatedFrame->SetStatusText(lnk->GetHref(), m_RelatedStatusBar);
index a2a73706edc3ebbec09d367ef5a995b7fd1cad8f..87ab343794f784b9d56849cb2e9d46cf0d412868 100644 (file)
@@ -645,115 +645,11 @@ wxFontEncoding wxFont::GetEncoding() const
     return M_FONTDATA->m_encoding;
 }
 
-// ----------------------------------------------------------------------------
-// wxNativeFontInfo
-// ----------------------------------------------------------------------------
-
-bool wxNativeFontInfo::FromString(const wxString& s)
-{
-    long l;
-
-    wxStringTokenizer tokenizer(s, _T(";"));
-
-    wxString token = tokenizer.GetNextToken();
-    //
-    //  Ignore the version for now
-    //
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfHeight = l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfWidth = l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfEscapement = l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfOrientation = l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfWeight = l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfItalic = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfUnderline = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfStrikeOut = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfCharSet = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfOutPrecision = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfClipPrecision = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfQuality = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&l) )
-        return FALSE;
-    lf.lfPitchAndFamily = (BYTE)l;
-
-    token = tokenizer.GetNextToken();
-    if(!token)
-        return FALSE;
-    wxStrcpy(lf.lfFaceName, token.c_str());
-
-    return TRUE;
-}
-
-wxString wxNativeFontInfo::ToString() const
+wxNativeFontInfo *wxFont::GetNativeFontInfo() const
 {
-    wxString s;
+    if( M_FONTDATA->m_nativeFontInfoOk )
+        return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo);
 
-    s.Printf(_T("%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%s"),
-             0, // version, in case we want to change the format later
-             lf.lfHeight,
-             lf.lfWidth,
-             lf.lfEscapement,
-             lf.lfOrientation,
-             lf.lfWeight,
-             lf.lfItalic,
-             lf.lfUnderline,
-             lf.lfStrikeOut,
-             lf.lfCharSet,
-             lf.lfOutPrecision,
-             lf.lfClipPrecision,
-             lf.lfQuality,
-             lf.lfPitchAndFamily,
-             lf.lfFaceName);
-
-    return s;
+    return 0;
 }
 
index 1d73b061d652a29b3b5aba4285845c1e35ce70b1..3bd2d2cfa833e709e4c8454725d8347cfef19505 100644 (file)
@@ -1992,7 +1992,8 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_
         }
         else
         {
-            lvItem.pszText = info.m_text;
+            // pszText is not const, hence the cast
+            lvItem.pszText = (wxChar *)info.m_text.c_str();
             if ( lvItem.pszText )
                 lvItem.cchTextMax = info.m_text.Length();
             else
index 3ff4dd87cef79f0f60b64abb8e4ae18cb791d9d5..dc4f4d5d4c176c0f592f1cb8f4ca608373f74c95 100644 (file)
@@ -196,7 +196,8 @@ bool wxNotebook::Create(wxWindow *parent,
 // dtor
 wxNotebook::~wxNotebook()
 {
-  if (m_bOwnsImageList) delete m_pImageList;
+  if (m_bOwnsImageList)
+      delete m_imageList;
 }
 
 // ----------------------------------------------------------------------------
index e08b49196d2c3e0a2120bdee0aa203c72c820236..7586cd9aae203e4e0515c13f50c35ab18b68a055 100644 (file)
@@ -85,9 +85,11 @@ static wxString ConvertStringFromOle(BSTR bStr);
 static int rgMonthDays[13] =
        {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
 
+#if wxUSE_TIMEDATE
 static BOOL OleDateFromTm(WORD wYear, WORD wMonth, WORD wDay,
        WORD wHour, WORD wMinute, WORD wSecond, DATE& dtDest);
 static BOOL TmFromOleDate(DATE dtSrc, struct tm& tmDest);
+#endif // wxUSE_TIMEDATE
 
 static void ClearVariant(VARIANTARG *pvarg) ;
 static void ReleaseVariant(VARIANTARG *pvarg) ;
index 7d41132ef3ec11b1d722216501796c594710af29..026f8a283080f7c3eb9a09d23fed2e0392272dd2 100644 (file)
@@ -905,14 +905,7 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
 
                 bool processed = TRUE;
 
-                bool horz = (radiobox->GetWindowStyle() & wxRA_SPECIFY_COLS) != 0;
-                int num = radiobox->Number(),
-                    rows = radiobox->GetNumVer(),
-                    cols = radiobox->GetNumHor();
-
-                int selOld = radiobox->GetSelection();
-                int selNew = selOld;
-
+                wxDirection dir;
                 switch ( wParam )
                 {
                     case VK_UP:
@@ -948,17 +941,6 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
                                   radiobox->GetWindowStyle()
                                  );
 
-                        int dim = horz ? cols : rows;
-                        if ( selNew % dim == 0 )
-                        {
-                            selNew -= dim - 1;
-                        }
-                        else
-                        {
-                            selNew++;
-                        }
-                    }
-
                     if ( selNew != selOld )
                     {
                         radiobox->SetSelection(selNew);
@@ -974,45 +956,45 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
 
 #ifdef __WIN32__
         case WM_HELP:
-        {
-            wxRadioBox *radiobox = (wxRadioBox *)
-                    ::GetWindowLong(hwnd, GWL_USERDATA);
+            {
+                wxRadioBox *radiobox = (wxRadioBox *)
+                        ::GetWindowLong(hwnd, GWL_USERDATA);
 
-            wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );
+                wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );
 
-            bool processed = TRUE;
+                bool processed = TRUE;
 
-            HELPINFO* info = (HELPINFO*) lParam;
-            // Don't yet process menu help events, just windows
-            if (info->iContextType == HELPINFO_WINDOW)
-            {
-                wxWindow* subjectOfHelp = radiobox;
-                bool eventProcessed = FALSE;
-                while (subjectOfHelp && !eventProcessed)
+                HELPINFO* info = (HELPINFO*) lParam;
+                // Don't yet process menu help events, just windows
+                if (info->iContextType == HELPINFO_WINDOW)
                 {
-                    wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), wxPoint(info->MousePos.x, info->MousePos.y) ) ; // info->iCtrlId);
-                    helpEvent.SetEventObject(radiobox);
-                    eventProcessed = radiobox->GetEventHandler()->ProcessEvent(helpEvent);
+                    wxWindow* subjectOfHelp = radiobox;
+                    bool eventProcessed = FALSE;
+                    while (subjectOfHelp && !eventProcessed)
+                    {
+                        wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), wxPoint(info->MousePos.x, info->MousePos.y) ) ; // info->iCtrlId);
+                        helpEvent.SetEventObject(radiobox);
+                        eventProcessed = radiobox->GetEventHandler()->ProcessEvent(helpEvent);
 
-                    // Go up the window hierarchy until the event is handled (or not)
-                    subjectOfHelp = subjectOfHelp->GetParent();
+                        // Go up the window hierarchy until the event is handled (or not)
+                        subjectOfHelp = subjectOfHelp->GetParent();
+                    }
+                    processed = eventProcessed;
                 }
-                processed = eventProcessed;
-            }
-            else if (info->iContextType == HELPINFO_MENUITEM)
-            {
-                wxHelpEvent helpEvent(wxEVT_HELP, info->iCtrlId) ;
-                helpEvent.SetEventObject(radiobox);
-                processed = radiobox->GetEventHandler()->ProcessEvent(helpEvent);
-            }
-            else processed = FALSE;
+                else if (info->iContextType == HELPINFO_MENUITEM)
+                {
+                    wxHelpEvent helpEvent(wxEVT_HELP, info->iCtrlId) ;
+                    helpEvent.SetEventObject(radiobox);
+                    processed = radiobox->GetEventHandler()->ProcessEvent(helpEvent);
+                }
+                else processed = FALSE;
 
-            if (processed)
-                return 0;
+                if (processed)
+                    return 0;
 
-            break;
-        }
-#endif
+                break;
+            }
+#endif // __WIN32__
     }
 
     return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn, hwnd, message, wParam, lParam);
index 31ef0ea340b6112eedfc706026c82520cce82e78..814fb2bf6e2c5fbad1a8fac52294a3608c96404b 100644 (file)
@@ -166,8 +166,6 @@ static bool IsMouseInWindow(HWND hwnd);
 // event tables
 // ---------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
-
 // in wxUniv/MSW this class is abstract because it doesn't have DoPopupMenu()
 // method
 #ifdef __WXUNIVERSAL__