]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/uma.cpp
supporting readonly and singleline attributes for non-mlte textrcontrol
[wxWidgets.git] / src / mac / carbon / uma.cpp
index aedb25e2749b9959ca758aae8cd59d4fef1f690c..b7061575adb9beb398559fe4dcd9806384fbcf65 100644 (file)
@@ -275,8 +275,8 @@ void UMAAppendSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding
 void UMAInsertSubMenuItem( MenuRef menu , const wxString& title, wxFontEncoding encoding , MenuItemIndex item , SInt16 id  )
 {
     MacInsertMenuItem(menu, "\pA" , item);
-    UMASetMenuItemText(menu, item , title , encoding);
-    SetMenuItemHierarchicalID( menu , item , id ) ;
+    UMASetMenuItemText(menu, item+1, title , encoding);
+    SetMenuItemHierarchicalID( menu , item+1 , id ) ;
 }
 
 void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry )
@@ -543,24 +543,6 @@ void UMAActivateControl( ControlRef inControl )
 #endif    
 }
 
-void UMADrawControl( ControlRef inControl )
-{
-#if TARGET_API_MAC_CARBON
-    ::Draw1Control( inControl );
-#else
-    WindowRef theWindow = GetControlOwner(inControl) ;
-    wxMacPortStateHelper help( (GrafPtr) GetWindowPort(theWindow) ) ;
-    RgnHandle updateRgn = NewRgn() ;
-    GetWindowUpdateRgn( theWindow , updateRgn ) ;
-    Point zero = { 0 , 0 } ;
-    LocalToGlobal( &zero ) ;
-    OffsetRgn( updateRgn , -zero.h , -zero.v ) ;
-    ::DrawControlInCurrentPort( inControl ) ;
-    InvalWindowRgn( theWindow, updateRgn) ;
-    DisposeRgn( updateRgn ) ;
-#endif
-}
-
 void UMAMoveControl( ControlRef inControl , short x , short y )
 {
 #if !TARGET_API_MAC_OSX