]> git.saurik.com Git - wxWidgets.git/commitdiff
cleanup
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2005 06:14:32 +0000 (06:14 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2005 06:14:32 +0000 (06:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/menu.cpp

index 71701a0a040112635b9e6a22e2429d5e49d8fc3e..69824cf29137673532d6617ff847fd1f632fbec6 100644 (file)
@@ -568,6 +568,19 @@ auto-merge for MDI in case this will be necessary
 
 */
 
+const wxMenuInfoList& wxMenuBar::GetMenuInfos() const
+{
+    wxMenuInfoList* list = const_cast< wxMenuInfoList* >( &m_menuInfos ) ;
+    WX_CLEAR_LIST( wxMenuInfoList , *list ) ;
+    for( size_t i = 0 ; i < GetMenuCount() ; ++i )
+    {
+        wxMenuInfo* info = new wxMenuInfo() ;
+        info->Create( const_cast<wxMenuBar*>(this)->GetMenu(i) , GetLabelTop(i) ) ;
+        list->Append( info ) ;
+    }
+    return m_menuInfos ;
+}
+
 wxMenuBar* wxMenuBar::s_macInstalledMenuBar = NULL ;
 wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ;
 
@@ -808,10 +821,6 @@ int wxMenuBar::FindMenu(const wxString& title)
 }
 
 
-// ---------------------------------------------------------------------------
-// wxMenuBar construction
-// ---------------------------------------------------------------------------
-
 // ---------------------------------------------------------------------------
 // wxMenuBar construction
 // ---------------------------------------------------------------------------