]> git.saurik.com Git - wxWidgets.git/commitdiff
post wxUniv merge fixes
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 29 Jun 2001 16:19:53 +0000 (16:19 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 29 Jun 2001 16:19:53 +0000 (16:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

30 files changed:
include/wx/filefn.h
include/wx/generic/spinctlg.h
include/wx/mac/menu.h
include/wx/mac/notebook.h
include/wx/mac/radiobox.h
include/wx/mac/setup.h
src/mac/app.cpp
src/mac/bitmap.cpp
src/mac/carbon/app.cpp
src/mac/carbon/bitmap.cpp
src/mac/carbon/icon.cpp
src/mac/carbon/menu.cpp
src/mac/carbon/notebmac.cpp
src/mac/carbon/radiobox.cpp
src/mac/carbon/spinbutt.cpp
src/mac/carbon/spinctrl.cpp
src/mac/carbon/statbmp.cpp
src/mac/carbon/stattext.cpp
src/mac/carbon/textctrl.cpp
src/mac/carbon/window.cpp
src/mac/icon.cpp
src/mac/menu.cpp
src/mac/notebmac.cpp
src/mac/radiobox.cpp
src/mac/spinbutt.cpp
src/mac/spinctrl.cpp
src/mac/statbmp.cpp
src/mac/stattext.cpp
src/mac/textctrl.cpp
src/mac/window.cpp

index 85931defeb5716fd82705f9ac1dec5961fe2c1e4..1ffa54f8369da1cb7a5167e69639535e05c0d448 100644 (file)
@@ -170,12 +170,10 @@ WXDLLEXPORT void wxUnix2DosFilename(wxChar *s);
 #if defined(__WXMAC__) && !defined(__UNIX__)
   WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ;
   WXDLLEXPORT void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) ;
 #if defined(__WXMAC__) && !defined(__UNIX__)
   WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ;
   WXDLLEXPORT void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) ;
- /*
   WXDLLEXPORT wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) ;
   WXDLLEXPORT void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) ;
   WXDLLEXPORT wxString wxMac2UnixFilename( const char *s) ;
   WXDLLEXPORT wxString wxUnix2MacFilename( const char *s);
   WXDLLEXPORT wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) ;
   WXDLLEXPORT void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) ;
   WXDLLEXPORT wxString wxMac2UnixFilename( const char *s) ;
   WXDLLEXPORT wxString wxUnix2MacFilename( const char *s);
-*/
 #endif
 
 // Strip the extension, in situ
 #endif
 
 // Strip the extension, in situ
index d1b84a732889e91703a74488810dc1611012ccda..3c24bf33845e88de7f990248cbb6a4d31d04545b 100644 (file)
@@ -20,7 +20,7 @@
 // without tons of #ifdefs.
 // ----------------------------------------------------------------------------
 
 // without tons of #ifdefs.
 // ----------------------------------------------------------------------------
 
-#if wxUSE_SPINBTN
+#if wxUSE_SPINBTN && !defined(__WXMAC__)
 
 #ifdef __GNUG__
     #pragma interface "spinctlg.h"
 
 #ifdef __GNUG__
     #pragma interface "spinctlg.h"
index 98b840a56fd6e399c03be8b41b72c56be8cf89b4..39b0f0a918806ac0bbbf89e2332d6bb03bfa0bba 100644 (file)
@@ -74,9 +74,6 @@ public:
         // get the menu handle
     WXHMENU GetHMenu() const { return m_hMenu; }
 
         // get the menu handle
     WXHMENU GetHMenu() const { return m_hMenu; }
 
-    // attach/detach menu to/from wxMenuBar
-    void Attach(wxMenuBar *menubar);
-    void Detach();
        short MacGetMenuId() { return m_macMenuId ; }
 #if wxUSE_ACCEL
     // called by wxMenuBar to build its accel table from the accels of all menus
        short MacGetMenuId() { return m_macMenuId ; }
 #if wxUSE_ACCEL
     // called by wxMenuBar to build its accel table from the accels of all menus
@@ -192,8 +189,6 @@ protected:
 
     wxArrayString m_titles;
 
 
     wxArrayString m_titles;
 
-    wxFrame      *m_menuBarFrame;
-
 #if wxUSE_ACCEL
     // the accelerator table for all accelerators in all our menus
     wxAcceleratorTable m_accelTable;
 #if wxUSE_ACCEL
     // the accelerator table for all accelerators in all our menus
     wxAcceleratorTable m_accelTable;
index 713b3f60585a602f7037293b4b0ccafc638dd857..283a0166b866fca0041e05c99534a1044a059b68 100644 (file)
@@ -37,7 +37,7 @@ class WXDLLEXPORT wxWindow;
 // @@@ this class should really derive from wxTabCtrl, but the interface is not
 //     exactly the same, so I can't do it right now and instead we reimplement
 //     part of wxTabCtrl here
 // @@@ this class should really derive from wxTabCtrl, but the interface is not
 //     exactly the same, so I can't do it right now and instead we reimplement
 //     part of wxTabCtrl here
-class wxNotebook : public wxControl
+class wxNotebook : public wxNotebookBase
 {
 public:
   // ctors
 {
 public:
   // ctors
@@ -63,15 +63,10 @@ public:
 
   // accessors
   // ---------
 
   // accessors
   // ---------
-    // get number of pages in the dialog
-  int GetPageCount() const;
-
     // set the currently selected page, return the index of the previously
     // selected one (or -1 on error)
     // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
   int SetSelection(int nPage);
     // set the currently selected page, return the index of the previously
     // selected one (or -1 on error)
     // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
   int SetSelection(int nPage);
-    // cycle thru the tabs
-  void AdvanceSelection(bool bForward = TRUE);
     // get the currently selected page
   int GetSelection() const { return m_nSelection; }
 
     // get the currently selected page
   int GetSelection() const { return m_nSelection; }
 
@@ -79,53 +74,44 @@ public:
   bool SetPageText(int nPage, const wxString& strText);
   wxString GetPageText(int nPage) const;
 
   bool SetPageText(int nPage, const wxString& strText);
   wxString GetPageText(int nPage) const;
 
-  // image list stuff: each page may have an image associated with it. All
-  // the images belong to an image list, so you have to
-  // 1) create an image list
-  // 2) associate it with the notebook
-  // 3) set for each page it's image
-    // associate image list with a control
-  void SetImageList(wxImageList* imageList);
-    // get pointer (may be NULL) to the associated image list
-  wxImageList* GetImageList() const { return m_pImageList; }
-
     // sets/returns item's image index in the current image list
   int  GetPageImage(int nPage) const;
   bool SetPageImage(int nPage, int nImage);
 
     // sets/returns item's image index in the current image list
   int  GetPageImage(int nPage) const;
   bool SetPageImage(int nPage, int nImage);
 
-    // currently it's always 1 because wxGTK doesn't support multi-row
-    // tab controls
-  int GetRowCount() const;
-
   // control the appearance of the notebook pages
     // set the size (the same for all pages)
   void SetPageSize(const wxSize& size);
     // set the padding between tabs (in pixels)
   void SetPadding(const wxSize& padding);
   // control the appearance of the notebook pages
     // set the size (the same for all pages)
   void SetPageSize(const wxSize& size);
     // set the padding between tabs (in pixels)
   void SetPadding(const wxSize& padding);
+    // sets the size of the tabs (assumes all tabs are the same size)
+  void SetTabSize(const wxSize& sz);
+
+/*
+    // get number of pages in the dialog
+  int GetPageCount() const;
+
+    // cycle thru the tabs
+  void AdvanceSelection(bool bForward = TRUE);
 
 
+
+    // currently it's always 1 because wxGTK doesn't support multi-row
+    // tab controls
+  int GetRowCount() const;
+*/
   // operations
   // ----------
   // operations
   // ----------
-    // remove one page from the notebook
-  bool DeletePage(int nPage);
-    // remove one page from the notebook, without deleting
-  bool RemovePage(int nPage);
     // remove all pages
   bool DeleteAllPages();
     // remove all pages
   bool DeleteAllPages();
-    // adds a new page to the notebook (it will be deleted ny the notebook,
-    // don't delete it yourself). If bSelect, this page becomes active.
-  bool AddPage(wxNotebookPage *pPage,
-               const wxString& strText,
-               bool bSelect = FALSE,
-               int imageId = -1);
     // the same as AddPage(), but adds it at the specified position
   bool InsertPage(int nPage,
                   wxNotebookPage *pPage,
                   const wxString& strText,
                   bool bSelect = FALSE,
                   int imageId = -1);
     // the same as AddPage(), but adds it at the specified position
   bool InsertPage(int nPage,
                   wxNotebookPage *pPage,
                   const wxString& strText,
                   bool bSelect = FALSE,
                   int imageId = -1);
+/*
     // get the panel which represents the given page
   wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; }
     // get the panel which represents the given page
   wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; }
-
+*/
   // callbacks
   // ---------
   void OnSize(wxSizeEvent& event);
   // callbacks
   // ---------
   void OnSize(wxSizeEvent& event);
@@ -133,13 +119,21 @@ public:
   void OnSetFocus(wxFocusEvent& event);
   void OnNavigationKey(wxNavigationKeyEvent& event);
   
   void OnSetFocus(wxFocusEvent& event);
   void OnNavigationKey(wxNavigationKeyEvent& event);
   
-  // base class virtuals
-  // -------------------
-  virtual void Command(wxCommandEvent& event);
+
+    // implementation
+    // --------------
+
+#if wxUSE_CONSTRAINTS
   virtual void SetConstraintSizes(bool recurse = TRUE);
   virtual bool DoPhase(int nPhase);
 
   virtual void SetConstraintSizes(bool recurse = TRUE);
   virtual bool DoPhase(int nPhase);
 
+#endif
+
+  // base class virtuals
+  // -------------------
+  virtual void Command(wxCommandEvent& event);
 protected:
 protected:
+    virtual wxNotebookPage *DoRemovePage(int page) ;
        virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ;
   // common part of all ctors
   void Init();
        virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ;
   // common part of all ctors
   void Init();
@@ -148,8 +142,8 @@ protected:
   void ChangePage(int nOldSel, int nSel); // change pages
   void MacSetupTabs();
 
   void ChangePage(int nOldSel, int nSel); // change pages
   void MacSetupTabs();
 
-  wxImageList  *m_pImageList; // we can have an associated image list
-  wxArrayPages  m_aPages;     // array of pages
+//  wxImageList  *m_pImageList; // we can have an associated image list
+//  wxArrayPages  m_aPages;     // array of pages
 
   int m_nSelection;           // the current selection (-1 if none)
 
 
   int m_nSelection;           // the current selection (-1 if none)
 
index 514ef7f849136332cfd5aa8fd876b3005aa4140b..665635334b94fa45a3c7f55152f984f4b604a46f 100644 (file)
@@ -43,21 +43,25 @@ public:
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
 
 // Specific functions (in wxWindows2 reference)
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
 
 // Specific functions (in wxWindows2 reference)
+       virtual void SetSelection(int item);
+       virtual int GetSelection() const;
+       
+       inline virtual int GetCount() const { return m_noItems; } ;
+
+       virtual wxString GetString(int item) const;
+       virtual void SetString(int item, const wxString& label) ;
+       
+       virtual void Enable(int item, bool enable);
+       virtual void Show(int item, bool show) ;
+
+    virtual int GetColumnCount() const ;
+    virtual int GetRowCount() const ;
+
+
        bool Enable(bool enable);
        bool Enable(bool enable);
-       void Enable(int item, bool enable);
-       int FindString(const wxString& s) const;
        wxString GetLabel() const;
        wxString GetLabel() const;
-       wxString GetLabel(int item) const;
-       int GetSelection() const;
-       wxString GetString(int item) const;
-       virtual wxString GetStringSelection() const;
-       inline virtual int GetCount() const { return m_noItems; } ;
        void SetLabel(const wxString& label) ;
        void SetLabel(const wxString& label) ;
-       void SetLabel(int item, const wxString& label) ;
-       void SetSelection(int item);
-       virtual bool SetStringSelection(const wxString& s);
        bool Show(bool show);
        bool Show(bool show);
-       void Show(int item, bool show) ;
 
 // Other external functions 
        void Command(wxCommandEvent& event);
 
 // Other external functions 
        void Command(wxCommandEvent& event);
@@ -79,8 +83,6 @@ protected:
        virtual void DoSetSize(int x, int y,
                            int width, int height,
                            int sizeFlags = wxSIZE_AUTO);
        virtual void DoSetSize(int x, int y,
                            int width, int height,
                            int sizeFlags = wxSIZE_AUTO);
-       int GetNumHor() const;
-       int GetNumVer() const;
 
     DECLARE_EVENT_TABLE()
 };
 
     DECLARE_EVENT_TABLE()
 };
index a618ed3f8924874be71ecc26467ab77514cbbc6d..a3bca25ad47f41583a103a2393a85ba15bb9a6ff 100644 (file)
 #define wxUSE_STATTEXT     1    // wxStaticText
 #define wxUSE_STATBMP      1    // wxStaticBitmap
 #define wxUSE_TEXTCTRL     1    // wxTextCtrl
 #define wxUSE_STATTEXT     1    // wxStaticText
 #define wxUSE_STATBMP      1    // wxStaticBitmap
 #define wxUSE_TEXTCTRL     1    // wxTextCtrl
-#define wxUSE_TOGGLEBTN    1    // requires wxButton
+#define wxUSE_TOGGLEBTN    0    // requires wxButton
 #define wxUSE_TREECTRL     1    // wxTreeCtrl
 
 // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR
 #define wxUSE_TREECTRL     1    // wxTreeCtrl
 
 // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR
 // common dialogs
 // ----------------------------------------------------------------------------
 
 // common dialogs
 // ----------------------------------------------------------------------------
 
-// Define 1 to use generic dialogs in Windows, even though they duplicate
-// native common dialog (e.g. wxColourDialog). This is mainly useful for
-// testing.
-//
-// Default is 0
-//
-// Recommended setting: 0
-#define wxUSE_GENERIC_DIALOGS_IN_MSW 0
-
 // On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
 // file selector, printer dialog). Switching this off also switches off the
 // printing architecture and interactive wxPrinterDC.
 // On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
 // file selector, printer dialog). Switching this off also switches off the
 // printing architecture and interactive wxPrinterDC.
 #define wxUSE_SPLINES     1
                                 // 0 for no splines
 
 #define wxUSE_SPLINES     1
                                 // 0 for no splines
 
-#define wxUSE_XPM_IN_MSW   1
-                                // 0 for no XPM support in wxBitmap.
-                                // Default is 1, as XPM is now fully
-                                // supported this makes easier the issue
-                                // of portable icons and bitmaps.
-
-#define wxUSE_IMAGE_LOADING_IN_MSW        1
-                                // Use dynamic DIB loading/saving code in utils/dib under MSW.
-#define wxUSE_RESOURCE_LOADING_IN_MSW     1
-                                // Use dynamic icon/cursor loading/saving code
-                                // under MSW.
 #define wxUSE_WX_RESOURCES        1
                                 // Use .wxr resource mechanism (requires PrologIO library)
 
 #define wxUSE_WX_RESOURCES        1
                                 // Use .wxr resource mechanism (requires PrologIO library)
 
 // Set to 1 to use font metric files in GetTextExtent
 #define wxUSE_AFM_FOR_POSTSCRIPT 0
 
 // Set to 1 to use font metric files in GetTextExtent
 #define wxUSE_AFM_FOR_POSTSCRIPT 0
 
-// Set to 0 to disable PostScript print/preview architecture code under Windows
-// (just use Windows printing).
-#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
-
 // ----------------------------------------------------------------------------
 // database classes
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // database classes
 // ----------------------------------------------------------------------------
index 55df1bd41e8670deeb788b72fb471905123f081a..d03b4244fd6607c5c19e6235f412dab3ee07ed2a 100644 (file)
@@ -900,11 +900,13 @@ bool wxYield()
 #endif
     EventRecord event ;
 
 #endif
     EventRecord event ;
 
-       long sleepTime = 0 ; //::GetCaretTime();
+       long sleepTime = 1 ; //::GetCaretTime();
 
        while ( !wxTheApp->IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, wxApp::s_macCursorRgn))
        {
        wxTheApp->MacHandleOneEvent( &event );
 
        while ( !wxTheApp->IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, wxApp::s_macCursorRgn))
        {
        wxTheApp->MacHandleOneEvent( &event );
+           if ( event.what != kHighLevelEvent )
+                   SetRectRgn( wxApp::s_macCursorRgn , event.where.h , event.where.v ,  event.where.h + 1 , event.where.v + 1 ) ;
        }
 
        wxMacProcessNotifierAndPendingEvents() ;
        }
 
        wxMacProcessNotifierAndPendingEvents() ;
index 1a59104b9eaf1bddae5348415d36a282de416be5..fd0f461f173833798c03ad22da21b7a9e10b681b 100644 (file)
@@ -26,6 +26,8 @@
 #if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
 IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
 #if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
 IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
+IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase , wxGDIObject )
+IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject ) 
 #endif
 
 #ifdef __UNIX__
 #endif
 
 #ifdef __UNIX__
@@ -241,6 +243,12 @@ wxBitmapRefData::~wxBitmapRefData()
 
 wxList wxBitmap::sm_handlers;
 
 
 wxList wxBitmap::sm_handlers;
 
+
+bool wxBitmap::CopyFromIcon(const wxIcon& icon)
+{
+    Ref(icon) ;
+}
+
 wxBitmap::wxBitmap()
 {
     m_refData = NULL;
 wxBitmap::wxBitmap()
 {
     m_refData = NULL;
index 55df1bd41e8670deeb788b72fb471905123f081a..d03b4244fd6607c5c19e6235f412dab3ee07ed2a 100644 (file)
@@ -900,11 +900,13 @@ bool wxYield()
 #endif
     EventRecord event ;
 
 #endif
     EventRecord event ;
 
-       long sleepTime = 0 ; //::GetCaretTime();
+       long sleepTime = 1 ; //::GetCaretTime();
 
        while ( !wxTheApp->IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, wxApp::s_macCursorRgn))
        {
        wxTheApp->MacHandleOneEvent( &event );
 
        while ( !wxTheApp->IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, wxApp::s_macCursorRgn))
        {
        wxTheApp->MacHandleOneEvent( &event );
+           if ( event.what != kHighLevelEvent )
+                   SetRectRgn( wxApp::s_macCursorRgn , event.where.h , event.where.v ,  event.where.h + 1 , event.where.v + 1 ) ;
        }
 
        wxMacProcessNotifierAndPendingEvents() ;
        }
 
        wxMacProcessNotifierAndPendingEvents() ;
index 1a59104b9eaf1bddae5348415d36a282de416be5..fd0f461f173833798c03ad22da21b7a9e10b681b 100644 (file)
@@ -26,6 +26,8 @@
 #if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
 IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
 #if !USE_SHARED_LIBRARIES
 IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
 IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
+IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase , wxGDIObject )
+IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject ) 
 #endif
 
 #ifdef __UNIX__
 #endif
 
 #ifdef __UNIX__
@@ -241,6 +243,12 @@ wxBitmapRefData::~wxBitmapRefData()
 
 wxList wxBitmap::sm_handlers;
 
 
 wxList wxBitmap::sm_handlers;
 
+
+bool wxBitmap::CopyFromIcon(const wxIcon& icon)
+{
+    Ref(icon) ;
+}
+
 wxBitmap::wxBitmap()
 {
     m_refData = NULL;
 wxBitmap::wxBitmap()
 {
     m_refData = NULL;
index 7bfb1d8309ea4b78af32a894770552e982546fd3..26cb83e93c2182f4317d757d7aa06d64f01e1b5f 100644 (file)
@@ -61,7 +61,7 @@ bool wxIcon::LoadFile(const wxString& filename, long type,
 
   m_refData = new wxBitmapRefData;
 
 
   m_refData = new wxBitmapRefData;
 
-  wxBitmapHandler *handler = FindHandler(type);
+  wxBitmapHandler *handler = FindHandler((wxBitmapType)type);
 
   if ( handler )
        return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
 
   if ( handler )
        return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
index fe599686ad797fa6ca6bf9be0c081736ad14c613..3e6277ac5b38967c371269ee66a201d8fb37ed7d 100644 (file)
@@ -347,22 +347,6 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event)
 // other
 // ---------------------------------------------------------------------------
 
 // other
 // ---------------------------------------------------------------------------
 
-void wxMenu::Attach(wxMenuBar *menubar)
-{
-    // menu can be in at most one menubar because otherwise they would both
-    // delete the menu pointer
-    wxASSERT_MSG( !m_menuBar, wxT("menu belongs to 2 menubars, expect a crash") );
-
-    m_menuBar = menubar;
-}
-
-void wxMenu::Detach()
-{
-    wxASSERT_MSG( m_menuBar, wxT("can't detach menu if it's not attached") );
-
-    m_menuBar = NULL;
-}
-
 wxWindow *wxMenu::GetWindow() const
 {
     if ( m_invokingWindow != NULL )
 wxWindow *wxMenu::GetWindow() const
 {
     if ( m_invokingWindow != NULL )
@@ -979,8 +963,6 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
     if ( !wxMenuBarBase::Append(menu, title) )
         return FALSE;
 
     if ( !wxMenuBarBase::Append(menu, title) )
         return FALSE;
 
-    menu->Attach(this);
-
     m_titles.Add(title);
 
     if ( IsAttached() )
     m_titles.Add(title);
 
     if ( IsAttached() )
@@ -1004,11 +986,14 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
     return TRUE;
 }
 
     return TRUE;
 }
 
-void wxMenuBar::Attach(wxFrame *frame)
+void wxMenuBar::Detach()
 {
 {
-//    wxASSERT_MSG( !IsAttached(), wxT("menubar already attached!") );
+    wxMenuBarBase::Detach() ;
+}
 
 
-    m_menuBarFrame = frame;
+void wxMenuBar::Attach(wxFrame *frame)
+{
+    wxMenuBarBase::Attach( frame ) ;
 
 #if wxUSE_ACCEL
     RebuildAccelTable();
 
 #if wxUSE_ACCEL
     RebuildAccelTable();
index 686a969462e84bd2d4357dba6ccd3e04cedafeed..6e94d2804988ed1136ee5d3d74c32aaa967703f4 100644 (file)
@@ -80,7 +80,6 @@ void wxNotebook::Init()
     m_macHorizontalBorder = 7;
     m_macVerticalBorder = 8;
 #endif
     m_macHorizontalBorder = 7;
     m_macVerticalBorder = 8;
 #endif
-    m_pImageList = NULL;
     m_nSelection = -1;
 }
 
     m_nSelection = -1;
 }
 
@@ -132,14 +131,17 @@ wxNotebook::~wxNotebook()
 // ----------------------------------------------------------------------------
 // wxNotebook accessors
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxNotebook accessors
 // ----------------------------------------------------------------------------
-int wxNotebook::GetPageCount() const
+
+void wxNotebook::SetPadding(const wxSize& padding)
+{
+}
+
+void wxNotebook::SetTabSize(const wxSize& sz)
 {
 {
-    return m_aPages.Count();
 }
 
 }
 
-int wxNotebook::GetRowCount() const
+void wxNotebook::SetPageSize(const wxSize& size)
 {
 {
-    return 1;
 }
 
 int wxNotebook::SetSelection(int nPage)
 }
 
 int wxNotebook::SetSelection(int nPage)
@@ -152,24 +154,11 @@ int wxNotebook::SetSelection(int nPage)
     return m_nSelection;
 }
 
     return m_nSelection;
 }
 
-void wxNotebook::AdvanceSelection(bool bForward)
-{
-    if (GetPageCount() == 0) {
-        return;
-    }
-    int nSel = GetSelection();
-    int nMax = GetPageCount() - 1;
-    if ( bForward )
-        SetSelection(nSel == nMax ? 0 : nSel + 1);
-    else
-        SetSelection(nSel == 0 ? nMax : nSel - 1);
-}
-
 bool wxNotebook::SetPageText(int nPage, const wxString& strText)
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 bool wxNotebook::SetPageText(int nPage, const wxString& strText)
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
-    wxNotebookPage *page = m_aPages[nPage];
+    wxNotebookPage *page = m_pages[nPage];
     page->SetLabel(strText);
     MacSetupTabs();
 
     page->SetLabel(strText);
     MacSetupTabs();
 
@@ -180,7 +169,7 @@ wxString wxNotebook::GetPageText(int nPage) const
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
-    wxNotebookPage *page = m_aPages[nPage];
+    wxNotebookPage *page = m_pages[nPage];
     return page->GetLabel();
 }
 
     return page->GetLabel();
 }
 
@@ -200,23 +189,16 @@ bool wxNotebook::SetPageImage(int nPage, int nImage)
     return FALSE;
 }
 
     return FALSE;
 }
 
-void wxNotebook::SetImageList(wxImageList* imageList)
-{ 
-    m_pImageList = imageList;
-    // TODO
-}
-
 // ----------------------------------------------------------------------------
 // wxNotebook operations
 // ----------------------------------------------------------------------------
 
 // ----------------------------------------------------------------------------
 // wxNotebook operations
 // ----------------------------------------------------------------------------
 
-// remove one page from the notebook
-bool wxNotebook::DeletePage(int nPage)
+// remove one page from the notebook, without deleting the window
+wxNotebookPage* wxNotebook::DoRemovePage(int nPage)
 {
 {
-    wxCHECK( IS_VALID_PAGE(nPage), FALSE );
-
-    delete m_aPages[nPage];
-    m_aPages.Remove(nPage);
+    wxCHECK( IS_VALID_PAGE(nPage), NULL );
+    wxNotebookPage* page = m_pages[nPage] ;
+    m_pages.Remove(nPage);
 
     MacSetupTabs();
 
 
     MacSetupTabs();
 
@@ -224,20 +206,9 @@ bool wxNotebook::DeletePage(int nPage)
         m_nSelection = GetPageCount() - 1;
     }
     if(m_nSelection >= 0) {
         m_nSelection = GetPageCount() - 1;
     }
     if(m_nSelection >= 0) {
-        m_aPages[m_nSelection]->Show(true);
+        m_pages[m_nSelection]->Show(true);
     }
     }
-
-    return true;
-}
-
-// remove one page from the notebook, without deleting the window
-bool wxNotebook::RemovePage(int nPage)
-{
-    wxCHECK( IS_VALID_PAGE(nPage), FALSE );
-
-    m_aPages.Remove(nPage);
-
-    return TRUE;
+    return page;
 }
 
 // remove all pages
 }
 
 // remove all pages
@@ -245,26 +216,12 @@ bool wxNotebook::DeleteAllPages()
 {
     // TODO: delete native widget pages
 
 {
     // TODO: delete native widget pages
 
-    int nPageCount = GetPageCount();
-    int nPage;
-    for ( nPage = 0; nPage < nPageCount; nPage++ )
-        delete m_aPages[nPage];
-
-    m_aPages.Clear();
-
+    WX_CLEAR_ARRAY(m_pages) ;
     MacSetupTabs();
 
     return TRUE;
 }
 
     MacSetupTabs();
 
     return TRUE;
 }
 
-// add a page to the notebook
-bool wxNotebook::AddPage(wxNotebookPage *pPage,
-                         const wxString& strText,
-                         bool bSelect,
-                         int imageId)
-{
-    return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId);
-}
 
 // same as AddPage() but does it at given position
 bool wxNotebook::InsertPage(int nPage,
 
 // same as AddPage() but does it at given position
 bool wxNotebook::InsertPage(int nPage,
@@ -279,7 +236,7 @@ bool wxNotebook::InsertPage(int nPage,
     pPage->SetLabel(strText);
 
     // save the pointer to the page
     pPage->SetLabel(strText);
 
     // save the pointer to the page
-    m_aPages.Insert(pPage, nPage);
+    m_pages.Insert(pPage, nPage);
 
     MacSetupTabs();
 
 
     MacSetupTabs();
 
@@ -321,7 +278,7 @@ void wxNotebook::MacSetupTabs()
     Boolean enabled = true;
     for(int ii = 0; ii < GetPageCount(); ii++)
     {
     Boolean enabled = true;
     for(int ii = 0; ii < GetPageCount(); ii++)
     {
-        page = m_aPages[ii];
+        page = m_pages[ii];
         info.version = 0;
         info.iconSuiteID = 0;
 #if TARGET_CARBON
         info.version = 0;
         info.iconSuiteID = 0;
 #if TARGET_CARBON
@@ -366,9 +323,9 @@ void wxNotebook::OnSize(wxSizeEvent& event)
     int w, h;
     GetSize(&w, &h);
 
     int w, h;
     GetSize(&w, &h);
 
-    unsigned int nCount = m_aPages.Count();
+    unsigned int nCount = m_pages.Count();
     for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
     for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
-        wxNotebookPage *pPage = m_aPages[nPage];
+        wxNotebookPage *pPage = m_pages[nPage];
         pPage->SetSize(kwxMacTabLeftMargin, kwxMacTabTopMargin,
                        w - kwxMacTabLeftMargin - kwxMacTabRightMargin,
                        h - kwxMacTabTopMargin - kwxMacTabBottomMargin );
         pPage->SetSize(kwxMacTabLeftMargin, kwxMacTabTopMargin,
                        w - kwxMacTabLeftMargin - kwxMacTabRightMargin,
                        h - kwxMacTabTopMargin - kwxMacTabBottomMargin );
@@ -395,7 +352,7 @@ void wxNotebook::OnSetFocus(wxFocusEvent& event)
 {
     // set focus to the currently selected page if any
     if ( m_nSelection != -1 )
 {
     // set focus to the currently selected page if any
     if ( m_nSelection != -1 )
-        m_aPages[m_nSelection]->SetFocus();
+        m_pages[m_nSelection]->SetFocus();
 
     event.Skip();
 }
 
     event.Skip();
 }
@@ -448,7 +405,7 @@ void wxNotebook::ChangePage(int nOldSel, int nSel)
     // and it may happen - just do nothing
     if ( nSel == nOldSel )
     {
     // and it may happen - just do nothing
     if ( nSel == nOldSel )
     {
-        wxNotebookPage *pPage = m_aPages[nSel];
+        wxNotebookPage *pPage = m_pages[nSel];
         pPage->Show(FALSE);
         pPage->Show(TRUE);
         pPage->SetFocus();
         pPage->Show(FALSE);
         pPage->Show(TRUE);
         pPage->SetFocus();
@@ -457,10 +414,10 @@ void wxNotebook::ChangePage(int nOldSel, int nSel)
 
     // Hide previous page
     if ( nOldSel != -1 ) {
 
     // Hide previous page
     if ( nOldSel != -1 ) {
-        m_aPages[nOldSel]->Show(FALSE);
+        m_pages[nOldSel]->Show(FALSE);
     }
 
     }
 
-    wxNotebookPage *pPage = m_aPages[nSel];
+    wxNotebookPage *pPage = m_pages[nSel];
     pPage->Show(TRUE);
     pPage->SetFocus();
 
     pPage->Show(TRUE);
     pPage->SetFocus();
 
index c7bf4dce281ff9f8b3207758c648772a5cc7f78f..cafbf2ed98076120aeeca5fcd3caeb21a688c63b 100644 (file)
@@ -181,28 +181,6 @@ void wxRadioBox::Enable(int item, bool enable)
        }
 }
 
        }
 }
 
-
-//-------------------------------------------------------------------------------------
-//             ¥ FindString
-//-------------------------------------------------------------------------------------
-// Finds a button matching the given string, returning the position if found 
-// or -1 if not found
-
-int wxRadioBox::FindString(const wxString& s) const
-{
-    int i;
-    wxRadioButton *current;
-    
-    current=m_radioButtonCycle;
-    for (i = 0; i < m_noItems; i++)
-    {
-        if (s == current->GetLabel())
-            return i;
-       current=current->NextInCycle();
-    }
-    return -1;
-}
-
 //-------------------------------------------------------------------------------------
 //             ¥ GetLabel()
 //-------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------
 //             ¥ GetLabel()
 //-------------------------------------------------------------------------------------
@@ -218,7 +196,7 @@ wxString wxRadioBox::GetLabel() const
 //-------------------------------------------------------------------------------------
 // Returns the label for the given button
 
 //-------------------------------------------------------------------------------------
 // Returns the label for the given button
 
-wxString wxRadioBox::GetLabel(int item) const
+wxString wxRadioBox::GetString(int item) const
 {
        int i;
     wxRadioButton *current;
 {
        int i;
     wxRadioButton *current;
@@ -254,31 +232,6 @@ int wxRadioBox::GetSelection() const
     return i;
 }
 
     return i;
 }
 
-//-------------------------------------------------------------------------------------
-//             ¥ GetString
-//-------------------------------------------------------------------------------------
-// Find string for position
-
-wxString wxRadioBox::GetString(int item) const
-{
-
-    return GetLabel(item);
-}
-
-//-------------------------------------------------------------------------------------
-//             ¥ GetStringSelection
-//-------------------------------------------------------------------------------------
-// Returns the selected string
-
-wxString wxRadioBox::GetStringSelection () const
-{
-    int sel = GetSelection ();
-    if (sel > -1)
-        return this->GetString (sel);
-    else
-        return wxString("");
-}
-
 //-------------------------------------------------------------------------------------
 //             ¥ Number
 //-------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------
 //             ¥ Number
 //-------------------------------------------------------------------------------------
@@ -302,7 +255,7 @@ void wxRadioBox::SetLabel(const wxString& label)
 //-------------------------------------------------------------------------------------
 // Sets the label of a given button
 
 //-------------------------------------------------------------------------------------
 // Sets the label of a given button
 
-void wxRadioBox::SetLabel(int item,const wxString& label)
+void wxRadioBox::SetString(int item,const wxString& label)
 {
        int i;
     wxRadioButton *current;
 {
        int i;
     wxRadioButton *current;
@@ -341,24 +294,6 @@ void wxRadioBox::SetSelection(int item)
     
 }
 
     
 }
 
-//-------------------------------------------------------------------------------------
-//             ¥ SetStringSelection
-//-------------------------------------------------------------------------------------
-// Sets a button by passing the desired string. This does not cause 
-// wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted
-
-bool wxRadioBox::SetStringSelection (const wxString& s)
-{
-    int sel = FindString (s);
-    if (sel > -1)
-    {
-        SetSelection (sel);
-        return TRUE;
-    }
-    else
-        return FALSE;
-}
-
 //-------------------------------------------------------------------------------------
 //             ¥ Show(bool)
 //-------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------
 //             ¥ Show(bool)
 //-------------------------------------------------------------------------------------
@@ -479,15 +414,15 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
        maxHeight=-1;
        for (i = 0 ; i < m_noItems; i++)
                {
        maxHeight=-1;
        for (i = 0 ; i < m_noItems; i++)
                {
-               GetTextExtent(GetLabel(i), &eachWidth[i], &eachHeight[i]);
+               GetTextExtent(GetString(i), &eachWidth[i], &eachHeight[i]);
                eachWidth[i] = (int)(eachWidth[i] + RADIO_SIZE);
                eachHeight[i] = (int)((3*eachHeight[i])/2);
                if (maxWidth<eachWidth[i]) maxWidth = eachWidth[i];
                if (maxHeight<eachHeight[i]) maxHeight = eachHeight[i];
                }
 
                eachWidth[i] = (int)(eachWidth[i] + RADIO_SIZE);
                eachHeight[i] = (int)((3*eachHeight[i])/2);
                if (maxWidth<eachWidth[i]) maxWidth = eachWidth[i];
                if (maxHeight<eachHeight[i]) maxHeight = eachHeight[i];
                }
 
-       totHeight = GetNumVer() * (maxHeight + charHeight/2) + charHeight*3/2;
-       totWidth  = GetNumHor() * (maxWidth + charWidth) + charWidth;
+       totHeight = GetRowCount() * (maxHeight + charHeight/2) + charHeight*3/2;
+       totWidth  = GetColumnCount() * (maxWidth + charWidth) + charWidth;
 
     // only change our width/height if asked for
     if ( width == -1 )
 
     // only change our width/height if asked for
     if ( width == -1 )
@@ -550,7 +485,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the vertical direction
 
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the vertical direction
 
-int wxRadioBox::GetNumVer() const
+int wxRadioBox::GetRowCount() const
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
@@ -567,7 +502,7 @@ int wxRadioBox::GetNumVer() const
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the horizontal direction
 
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the horizontal direction
 
-int wxRadioBox::GetNumHor() const
+int wxRadioBox::GetColumnCount() const
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
index c2b0a7bbc2d0f5614fc9bdeb5199acacd73943d5..fc4e5e588852d3e193f2af9dfcc2378b0f01df7d 100644 (file)
@@ -84,11 +84,6 @@ int wxSpinButton::GetValue() const
 void wxSpinButton::SetValue(int val)
 {
        m_value = val ;
 void wxSpinButton::SetValue(int val)
 {
        m_value = val ;
-  wxScrollEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId);
-
-  event.SetPosition(m_value);
-  event.SetEventObject( this );
-  GetEventHandler()->ProcessEvent(event);
 }
 
 void wxSpinButton::SetRange(int minVal, int maxVal)
 }
 
 void wxSpinButton::SetRange(int minVal, int maxVal)
index 54384ccb1cac80082a83aac2906631d5aba165a5..31aca328439b36c9564c3a4ae4b9fa8070181160 100644 (file)
@@ -23,7 +23,7 @@
 // wxSpinCtrl
 //-----------------------------------------------------------------------------
 
 // wxSpinCtrl
 //-----------------------------------------------------------------------------
 
-#if wxUSE_SPINBTN
+#if wxUSE_SPINBTN && !defined(__WXMAC__)
 
 #if !USE_SHARED_LIBRARY
      IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl,wxControl)
 
 #if !USE_SHARED_LIBRARY
      IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl,wxControl)
index 03f68a2ea748fba9c407f11c856fcdcf12991cc3..1605258450a15a073be758da83ac1fe609e95bed 100644 (file)
@@ -19,7 +19,7 @@
 #include "wx/dcclient.h"
 
 #if !USE_SHARED_LIBRARY
 #include "wx/dcclient.h"
 
 #if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxStaticBitmapBase)
+IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
 #endif
 
 /*
 #endif
 
 /*
index 68e1453ba8fca3af63cf51fd52e0c9d3951b97c3..6439400bf380e239c93a531b6b3fac5f8506e5c3 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 
 #if !USE_SHARED_LIBRARY
 #include <stdio.h>
 
 #if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxStaticTextBase)
+IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
 #endif
 
 #include <wx/mac/uma.h>
 #endif
 
 #include <wx/mac/uma.h>
index 9a2c72ef33e438996e7e8ad20ba82887894b24fe..0724fe9da9a8cc4d921d0ad7c8fd010de92b8378 100644 (file)
@@ -107,7 +107,16 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
 
        MacPreControlCreate( parent , id ,  "" , pos , mySize ,style, validator , name , &bounds , title ) ;
 
 
        MacPreControlCreate( parent , id ,  "" , pos , mySize ,style, validator , name , &bounds , title ) ;
 
-       m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , "\p" , false , 0 , 0 , 1, 
+    if ( m_windowStyle & wxTE_MULTILINE )
+    {
+        wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER),
+                      wxT("wxTE_PROCESS_ENTER style is ignored for multiline text controls (they always process it)") );
+
+        m_windowStyle |= wxTE_PROCESS_ENTER;
+    }
+
+
+       m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, 
                ( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
        MacPostControlCreate() ;
 
                ( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
        MacPostControlCreate() ;
 
@@ -653,7 +662,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
        keychar = short(ev->message & charCodeMask);
        keycode = short(ev->message & keyCodeMask) >> 8 ;
        UMAHandleControlKey( m_macControl , keycode , keychar , ev->modifiers ) ;
        keychar = short(ev->message & charCodeMask);
        keycode = short(ev->message & keyCodeMask) >> 8 ;
        UMAHandleControlKey( m_macControl , keycode , keychar , ev->modifiers ) ;
-       if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN)
+       if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN || event.KeyCode() == WXK_DELETE || event.KeyCode() == WXK_BACK)
        {
         wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
         event.SetString( GetValue() ) ;
        {
         wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
         event.SetString( GetValue() ) ;
index 1dc5b4e6ae3ed4fb3765bc703ded4de9efe6108c..62f65318ea5e38ce450fa140d9805abe153bafbc 100644 (file)
@@ -296,6 +296,11 @@ void wxWindow::CaptureMouse()
     wxTheApp->s_captureWindow = this ;
 }
 
     wxTheApp->s_captureWindow = this ;
 }
 
+wxWindow* wxWindowBase::GetCapture()
+{
+    return wxTheApp->s_captureWindow ;
+}
+
 void wxWindow::ReleaseMouse()
 {
     wxTheApp->s_captureWindow = NULL ;
 void wxWindow::ReleaseMouse()
 {
     wxTheApp->s_captureWindow = NULL ;
index 7bfb1d8309ea4b78af32a894770552e982546fd3..26cb83e93c2182f4317d757d7aa06d64f01e1b5f 100644 (file)
@@ -61,7 +61,7 @@ bool wxIcon::LoadFile(const wxString& filename, long type,
 
   m_refData = new wxBitmapRefData;
 
 
   m_refData = new wxBitmapRefData;
 
-  wxBitmapHandler *handler = FindHandler(type);
+  wxBitmapHandler *handler = FindHandler((wxBitmapType)type);
 
   if ( handler )
        return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
 
   if ( handler )
        return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
index fe599686ad797fa6ca6bf9be0c081736ad14c613..3e6277ac5b38967c371269ee66a201d8fb37ed7d 100644 (file)
@@ -347,22 +347,6 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event)
 // other
 // ---------------------------------------------------------------------------
 
 // other
 // ---------------------------------------------------------------------------
 
-void wxMenu::Attach(wxMenuBar *menubar)
-{
-    // menu can be in at most one menubar because otherwise they would both
-    // delete the menu pointer
-    wxASSERT_MSG( !m_menuBar, wxT("menu belongs to 2 menubars, expect a crash") );
-
-    m_menuBar = menubar;
-}
-
-void wxMenu::Detach()
-{
-    wxASSERT_MSG( m_menuBar, wxT("can't detach menu if it's not attached") );
-
-    m_menuBar = NULL;
-}
-
 wxWindow *wxMenu::GetWindow() const
 {
     if ( m_invokingWindow != NULL )
 wxWindow *wxMenu::GetWindow() const
 {
     if ( m_invokingWindow != NULL )
@@ -979,8 +963,6 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
     if ( !wxMenuBarBase::Append(menu, title) )
         return FALSE;
 
     if ( !wxMenuBarBase::Append(menu, title) )
         return FALSE;
 
-    menu->Attach(this);
-
     m_titles.Add(title);
 
     if ( IsAttached() )
     m_titles.Add(title);
 
     if ( IsAttached() )
@@ -1004,11 +986,14 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
     return TRUE;
 }
 
     return TRUE;
 }
 
-void wxMenuBar::Attach(wxFrame *frame)
+void wxMenuBar::Detach()
 {
 {
-//    wxASSERT_MSG( !IsAttached(), wxT("menubar already attached!") );
+    wxMenuBarBase::Detach() ;
+}
 
 
-    m_menuBarFrame = frame;
+void wxMenuBar::Attach(wxFrame *frame)
+{
+    wxMenuBarBase::Attach( frame ) ;
 
 #if wxUSE_ACCEL
     RebuildAccelTable();
 
 #if wxUSE_ACCEL
     RebuildAccelTable();
index 686a969462e84bd2d4357dba6ccd3e04cedafeed..6e94d2804988ed1136ee5d3d74c32aaa967703f4 100644 (file)
@@ -80,7 +80,6 @@ void wxNotebook::Init()
     m_macHorizontalBorder = 7;
     m_macVerticalBorder = 8;
 #endif
     m_macHorizontalBorder = 7;
     m_macVerticalBorder = 8;
 #endif
-    m_pImageList = NULL;
     m_nSelection = -1;
 }
 
     m_nSelection = -1;
 }
 
@@ -132,14 +131,17 @@ wxNotebook::~wxNotebook()
 // ----------------------------------------------------------------------------
 // wxNotebook accessors
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxNotebook accessors
 // ----------------------------------------------------------------------------
-int wxNotebook::GetPageCount() const
+
+void wxNotebook::SetPadding(const wxSize& padding)
+{
+}
+
+void wxNotebook::SetTabSize(const wxSize& sz)
 {
 {
-    return m_aPages.Count();
 }
 
 }
 
-int wxNotebook::GetRowCount() const
+void wxNotebook::SetPageSize(const wxSize& size)
 {
 {
-    return 1;
 }
 
 int wxNotebook::SetSelection(int nPage)
 }
 
 int wxNotebook::SetSelection(int nPage)
@@ -152,24 +154,11 @@ int wxNotebook::SetSelection(int nPage)
     return m_nSelection;
 }
 
     return m_nSelection;
 }
 
-void wxNotebook::AdvanceSelection(bool bForward)
-{
-    if (GetPageCount() == 0) {
-        return;
-    }
-    int nSel = GetSelection();
-    int nMax = GetPageCount() - 1;
-    if ( bForward )
-        SetSelection(nSel == nMax ? 0 : nSel + 1);
-    else
-        SetSelection(nSel == 0 ? nMax : nSel - 1);
-}
-
 bool wxNotebook::SetPageText(int nPage, const wxString& strText)
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 bool wxNotebook::SetPageText(int nPage, const wxString& strText)
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
-    wxNotebookPage *page = m_aPages[nPage];
+    wxNotebookPage *page = m_pages[nPage];
     page->SetLabel(strText);
     MacSetupTabs();
 
     page->SetLabel(strText);
     MacSetupTabs();
 
@@ -180,7 +169,7 @@ wxString wxNotebook::GetPageText(int nPage) const
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
-    wxNotebookPage *page = m_aPages[nPage];
+    wxNotebookPage *page = m_pages[nPage];
     return page->GetLabel();
 }
 
     return page->GetLabel();
 }
 
@@ -200,23 +189,16 @@ bool wxNotebook::SetPageImage(int nPage, int nImage)
     return FALSE;
 }
 
     return FALSE;
 }
 
-void wxNotebook::SetImageList(wxImageList* imageList)
-{ 
-    m_pImageList = imageList;
-    // TODO
-}
-
 // ----------------------------------------------------------------------------
 // wxNotebook operations
 // ----------------------------------------------------------------------------
 
 // ----------------------------------------------------------------------------
 // wxNotebook operations
 // ----------------------------------------------------------------------------
 
-// remove one page from the notebook
-bool wxNotebook::DeletePage(int nPage)
+// remove one page from the notebook, without deleting the window
+wxNotebookPage* wxNotebook::DoRemovePage(int nPage)
 {
 {
-    wxCHECK( IS_VALID_PAGE(nPage), FALSE );
-
-    delete m_aPages[nPage];
-    m_aPages.Remove(nPage);
+    wxCHECK( IS_VALID_PAGE(nPage), NULL );
+    wxNotebookPage* page = m_pages[nPage] ;
+    m_pages.Remove(nPage);
 
     MacSetupTabs();
 
 
     MacSetupTabs();
 
@@ -224,20 +206,9 @@ bool wxNotebook::DeletePage(int nPage)
         m_nSelection = GetPageCount() - 1;
     }
     if(m_nSelection >= 0) {
         m_nSelection = GetPageCount() - 1;
     }
     if(m_nSelection >= 0) {
-        m_aPages[m_nSelection]->Show(true);
+        m_pages[m_nSelection]->Show(true);
     }
     }
-
-    return true;
-}
-
-// remove one page from the notebook, without deleting the window
-bool wxNotebook::RemovePage(int nPage)
-{
-    wxCHECK( IS_VALID_PAGE(nPage), FALSE );
-
-    m_aPages.Remove(nPage);
-
-    return TRUE;
+    return page;
 }
 
 // remove all pages
 }
 
 // remove all pages
@@ -245,26 +216,12 @@ bool wxNotebook::DeleteAllPages()
 {
     // TODO: delete native widget pages
 
 {
     // TODO: delete native widget pages
 
-    int nPageCount = GetPageCount();
-    int nPage;
-    for ( nPage = 0; nPage < nPageCount; nPage++ )
-        delete m_aPages[nPage];
-
-    m_aPages.Clear();
-
+    WX_CLEAR_ARRAY(m_pages) ;
     MacSetupTabs();
 
     return TRUE;
 }
 
     MacSetupTabs();
 
     return TRUE;
 }
 
-// add a page to the notebook
-bool wxNotebook::AddPage(wxNotebookPage *pPage,
-                         const wxString& strText,
-                         bool bSelect,
-                         int imageId)
-{
-    return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId);
-}
 
 // same as AddPage() but does it at given position
 bool wxNotebook::InsertPage(int nPage,
 
 // same as AddPage() but does it at given position
 bool wxNotebook::InsertPage(int nPage,
@@ -279,7 +236,7 @@ bool wxNotebook::InsertPage(int nPage,
     pPage->SetLabel(strText);
 
     // save the pointer to the page
     pPage->SetLabel(strText);
 
     // save the pointer to the page
-    m_aPages.Insert(pPage, nPage);
+    m_pages.Insert(pPage, nPage);
 
     MacSetupTabs();
 
 
     MacSetupTabs();
 
@@ -321,7 +278,7 @@ void wxNotebook::MacSetupTabs()
     Boolean enabled = true;
     for(int ii = 0; ii < GetPageCount(); ii++)
     {
     Boolean enabled = true;
     for(int ii = 0; ii < GetPageCount(); ii++)
     {
-        page = m_aPages[ii];
+        page = m_pages[ii];
         info.version = 0;
         info.iconSuiteID = 0;
 #if TARGET_CARBON
         info.version = 0;
         info.iconSuiteID = 0;
 #if TARGET_CARBON
@@ -366,9 +323,9 @@ void wxNotebook::OnSize(wxSizeEvent& event)
     int w, h;
     GetSize(&w, &h);
 
     int w, h;
     GetSize(&w, &h);
 
-    unsigned int nCount = m_aPages.Count();
+    unsigned int nCount = m_pages.Count();
     for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
     for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
-        wxNotebookPage *pPage = m_aPages[nPage];
+        wxNotebookPage *pPage = m_pages[nPage];
         pPage->SetSize(kwxMacTabLeftMargin, kwxMacTabTopMargin,
                        w - kwxMacTabLeftMargin - kwxMacTabRightMargin,
                        h - kwxMacTabTopMargin - kwxMacTabBottomMargin );
         pPage->SetSize(kwxMacTabLeftMargin, kwxMacTabTopMargin,
                        w - kwxMacTabLeftMargin - kwxMacTabRightMargin,
                        h - kwxMacTabTopMargin - kwxMacTabBottomMargin );
@@ -395,7 +352,7 @@ void wxNotebook::OnSetFocus(wxFocusEvent& event)
 {
     // set focus to the currently selected page if any
     if ( m_nSelection != -1 )
 {
     // set focus to the currently selected page if any
     if ( m_nSelection != -1 )
-        m_aPages[m_nSelection]->SetFocus();
+        m_pages[m_nSelection]->SetFocus();
 
     event.Skip();
 }
 
     event.Skip();
 }
@@ -448,7 +405,7 @@ void wxNotebook::ChangePage(int nOldSel, int nSel)
     // and it may happen - just do nothing
     if ( nSel == nOldSel )
     {
     // and it may happen - just do nothing
     if ( nSel == nOldSel )
     {
-        wxNotebookPage *pPage = m_aPages[nSel];
+        wxNotebookPage *pPage = m_pages[nSel];
         pPage->Show(FALSE);
         pPage->Show(TRUE);
         pPage->SetFocus();
         pPage->Show(FALSE);
         pPage->Show(TRUE);
         pPage->SetFocus();
@@ -457,10 +414,10 @@ void wxNotebook::ChangePage(int nOldSel, int nSel)
 
     // Hide previous page
     if ( nOldSel != -1 ) {
 
     // Hide previous page
     if ( nOldSel != -1 ) {
-        m_aPages[nOldSel]->Show(FALSE);
+        m_pages[nOldSel]->Show(FALSE);
     }
 
     }
 
-    wxNotebookPage *pPage = m_aPages[nSel];
+    wxNotebookPage *pPage = m_pages[nSel];
     pPage->Show(TRUE);
     pPage->SetFocus();
 
     pPage->Show(TRUE);
     pPage->SetFocus();
 
index c7bf4dce281ff9f8b3207758c648772a5cc7f78f..cafbf2ed98076120aeeca5fcd3caeb21a688c63b 100644 (file)
@@ -181,28 +181,6 @@ void wxRadioBox::Enable(int item, bool enable)
        }
 }
 
        }
 }
 
-
-//-------------------------------------------------------------------------------------
-//             ¥ FindString
-//-------------------------------------------------------------------------------------
-// Finds a button matching the given string, returning the position if found 
-// or -1 if not found
-
-int wxRadioBox::FindString(const wxString& s) const
-{
-    int i;
-    wxRadioButton *current;
-    
-    current=m_radioButtonCycle;
-    for (i = 0; i < m_noItems; i++)
-    {
-        if (s == current->GetLabel())
-            return i;
-       current=current->NextInCycle();
-    }
-    return -1;
-}
-
 //-------------------------------------------------------------------------------------
 //             ¥ GetLabel()
 //-------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------
 //             ¥ GetLabel()
 //-------------------------------------------------------------------------------------
@@ -218,7 +196,7 @@ wxString wxRadioBox::GetLabel() const
 //-------------------------------------------------------------------------------------
 // Returns the label for the given button
 
 //-------------------------------------------------------------------------------------
 // Returns the label for the given button
 
-wxString wxRadioBox::GetLabel(int item) const
+wxString wxRadioBox::GetString(int item) const
 {
        int i;
     wxRadioButton *current;
 {
        int i;
     wxRadioButton *current;
@@ -254,31 +232,6 @@ int wxRadioBox::GetSelection() const
     return i;
 }
 
     return i;
 }
 
-//-------------------------------------------------------------------------------------
-//             ¥ GetString
-//-------------------------------------------------------------------------------------
-// Find string for position
-
-wxString wxRadioBox::GetString(int item) const
-{
-
-    return GetLabel(item);
-}
-
-//-------------------------------------------------------------------------------------
-//             ¥ GetStringSelection
-//-------------------------------------------------------------------------------------
-// Returns the selected string
-
-wxString wxRadioBox::GetStringSelection () const
-{
-    int sel = GetSelection ();
-    if (sel > -1)
-        return this->GetString (sel);
-    else
-        return wxString("");
-}
-
 //-------------------------------------------------------------------------------------
 //             ¥ Number
 //-------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------
 //             ¥ Number
 //-------------------------------------------------------------------------------------
@@ -302,7 +255,7 @@ void wxRadioBox::SetLabel(const wxString& label)
 //-------------------------------------------------------------------------------------
 // Sets the label of a given button
 
 //-------------------------------------------------------------------------------------
 // Sets the label of a given button
 
-void wxRadioBox::SetLabel(int item,const wxString& label)
+void wxRadioBox::SetString(int item,const wxString& label)
 {
        int i;
     wxRadioButton *current;
 {
        int i;
     wxRadioButton *current;
@@ -341,24 +294,6 @@ void wxRadioBox::SetSelection(int item)
     
 }
 
     
 }
 
-//-------------------------------------------------------------------------------------
-//             ¥ SetStringSelection
-//-------------------------------------------------------------------------------------
-// Sets a button by passing the desired string. This does not cause 
-// wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted
-
-bool wxRadioBox::SetStringSelection (const wxString& s)
-{
-    int sel = FindString (s);
-    if (sel > -1)
-    {
-        SetSelection (sel);
-        return TRUE;
-    }
-    else
-        return FALSE;
-}
-
 //-------------------------------------------------------------------------------------
 //             ¥ Show(bool)
 //-------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------
 //             ¥ Show(bool)
 //-------------------------------------------------------------------------------------
@@ -479,15 +414,15 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
        maxHeight=-1;
        for (i = 0 ; i < m_noItems; i++)
                {
        maxHeight=-1;
        for (i = 0 ; i < m_noItems; i++)
                {
-               GetTextExtent(GetLabel(i), &eachWidth[i], &eachHeight[i]);
+               GetTextExtent(GetString(i), &eachWidth[i], &eachHeight[i]);
                eachWidth[i] = (int)(eachWidth[i] + RADIO_SIZE);
                eachHeight[i] = (int)((3*eachHeight[i])/2);
                if (maxWidth<eachWidth[i]) maxWidth = eachWidth[i];
                if (maxHeight<eachHeight[i]) maxHeight = eachHeight[i];
                }
 
                eachWidth[i] = (int)(eachWidth[i] + RADIO_SIZE);
                eachHeight[i] = (int)((3*eachHeight[i])/2);
                if (maxWidth<eachWidth[i]) maxWidth = eachWidth[i];
                if (maxHeight<eachHeight[i]) maxHeight = eachHeight[i];
                }
 
-       totHeight = GetNumVer() * (maxHeight + charHeight/2) + charHeight*3/2;
-       totWidth  = GetNumHor() * (maxWidth + charWidth) + charWidth;
+       totHeight = GetRowCount() * (maxHeight + charHeight/2) + charHeight*3/2;
+       totWidth  = GetColumnCount() * (maxWidth + charWidth) + charWidth;
 
     // only change our width/height if asked for
     if ( width == -1 )
 
     // only change our width/height if asked for
     if ( width == -1 )
@@ -550,7 +485,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the vertical direction
 
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the vertical direction
 
-int wxRadioBox::GetNumVer() const
+int wxRadioBox::GetRowCount() const
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
@@ -567,7 +502,7 @@ int wxRadioBox::GetNumVer() const
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the horizontal direction
 
 //-------------------------------------------------------------------------------------
 // return the number of buttons in the horizontal direction
 
-int wxRadioBox::GetNumHor() const
+int wxRadioBox::GetColumnCount() const
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
 {
     if ( m_windowStyle & wxRA_SPECIFY_ROWS )
     {
index c2b0a7bbc2d0f5614fc9bdeb5199acacd73943d5..fc4e5e588852d3e193f2af9dfcc2378b0f01df7d 100644 (file)
@@ -84,11 +84,6 @@ int wxSpinButton::GetValue() const
 void wxSpinButton::SetValue(int val)
 {
        m_value = val ;
 void wxSpinButton::SetValue(int val)
 {
        m_value = val ;
-  wxScrollEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId);
-
-  event.SetPosition(m_value);
-  event.SetEventObject( this );
-  GetEventHandler()->ProcessEvent(event);
 }
 
 void wxSpinButton::SetRange(int minVal, int maxVal)
 }
 
 void wxSpinButton::SetRange(int minVal, int maxVal)
index 54384ccb1cac80082a83aac2906631d5aba165a5..31aca328439b36c9564c3a4ae4b9fa8070181160 100644 (file)
@@ -23,7 +23,7 @@
 // wxSpinCtrl
 //-----------------------------------------------------------------------------
 
 // wxSpinCtrl
 //-----------------------------------------------------------------------------
 
-#if wxUSE_SPINBTN
+#if wxUSE_SPINBTN && !defined(__WXMAC__)
 
 #if !USE_SHARED_LIBRARY
      IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl,wxControl)
 
 #if !USE_SHARED_LIBRARY
      IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl,wxControl)
index 03f68a2ea748fba9c407f11c856fcdcf12991cc3..1605258450a15a073be758da83ac1fe609e95bed 100644 (file)
@@ -19,7 +19,7 @@
 #include "wx/dcclient.h"
 
 #if !USE_SHARED_LIBRARY
 #include "wx/dcclient.h"
 
 #if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxStaticBitmapBase)
+IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
 #endif
 
 /*
 #endif
 
 /*
index 68e1453ba8fca3af63cf51fd52e0c9d3951b97c3..6439400bf380e239c93a531b6b3fac5f8506e5c3 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 
 #if !USE_SHARED_LIBRARY
 #include <stdio.h>
 
 #if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxStaticTextBase)
+IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
 #endif
 
 #include <wx/mac/uma.h>
 #endif
 
 #include <wx/mac/uma.h>
index 9a2c72ef33e438996e7e8ad20ba82887894b24fe..0724fe9da9a8cc4d921d0ad7c8fd010de92b8378 100644 (file)
@@ -107,7 +107,16 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
 
        MacPreControlCreate( parent , id ,  "" , pos , mySize ,style, validator , name , &bounds , title ) ;
 
 
        MacPreControlCreate( parent , id ,  "" , pos , mySize ,style, validator , name , &bounds , title ) ;
 
-       m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , "\p" , false , 0 , 0 , 1, 
+    if ( m_windowStyle & wxTE_MULTILINE )
+    {
+        wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER),
+                      wxT("wxTE_PROCESS_ENTER style is ignored for multiline text controls (they always process it)") );
+
+        m_windowStyle |= wxTE_PROCESS_ENTER;
+    }
+
+
+       m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , "\p" , true , 0 , 0 , 1, 
                ( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
        MacPostControlCreate() ;
 
                ( style & wxTE_PASSWORD ) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
        MacPostControlCreate() ;
 
@@ -653,7 +662,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
        keychar = short(ev->message & charCodeMask);
        keycode = short(ev->message & keyCodeMask) >> 8 ;
        UMAHandleControlKey( m_macControl , keycode , keychar , ev->modifiers ) ;
        keychar = short(ev->message & charCodeMask);
        keycode = short(ev->message & keyCodeMask) >> 8 ;
        UMAHandleControlKey( m_macControl , keycode , keychar , ev->modifiers ) ;
-       if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN)
+       if ( keychar >= 0x20 || event.KeyCode() == WXK_RETURN || event.KeyCode() == WXK_DELETE || event.KeyCode() == WXK_BACK)
        {
         wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
         event.SetString( GetValue() ) ;
        {
         wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
         event.SetString( GetValue() ) ;
index 1dc5b4e6ae3ed4fb3765bc703ded4de9efe6108c..62f65318ea5e38ce450fa140d9805abe153bafbc 100644 (file)
@@ -296,6 +296,11 @@ void wxWindow::CaptureMouse()
     wxTheApp->s_captureWindow = this ;
 }
 
     wxTheApp->s_captureWindow = this ;
 }
 
+wxWindow* wxWindowBase::GetCapture()
+{
+    return wxTheApp->s_captureWindow ;
+}
+
 void wxWindow::ReleaseMouse()
 {
     wxTheApp->s_captureWindow = NULL ;
 void wxWindow::ReleaseMouse()
 {
     wxTheApp->s_captureWindow = NULL ;