+ if( IsTopLevel() )
+ return ;
+
+ RGBColor white = { 0xFFFF, 0xFFFF , 0xFFFF } ;
+ RGBColor black = { 0x0000, 0x0000 , 0x0000 } ;
+ RGBColor face = { 0xDDDD, 0xDDDD , 0xDDDD } ;
+ RGBColor shadow = { 0x4444, 0x4444 , 0x4444 } ;
+ PenNormal() ;
+
+ if (HasFlag(wxRAISED_BORDER) || HasFlag( wxSUNKEN_BORDER) || HasFlag(wxDOUBLE_BORDER) )
+ {
+#if wxMAC_USE_THEME_BORDER
+ Rect rect = { 0 , 0 , m_height , m_width } ;
+ SInt32 border = 0 ;
+ /*
+ GetThemeMetric( kThemeMetricListBoxFrameOutset , &border ) ;
+ InsetRect( &rect , border , border );
+ DrawThemeListBoxFrame(&rect,IsEnabled() ? kThemeStateActive : kThemeStateInactive) ;
+ */
+
+ DrawThemePrimaryGroup(&rect ,IsEnabled() ? kThemeStateActive : kThemeStateInactive) ;
+#else
+ bool sunken = HasFlag( wxSUNKEN_BORDER ) ;
+ RGBForeColor( &face );
+ MoveTo( 0 , m_height - 2 );
+ LineTo( 0 , 0 );
+ LineTo( m_width - 2 , 0 );
+
+ MoveTo( 2 , m_height - 3 );
+ LineTo( m_width - 3 , m_height - 3 );
+ LineTo( m_width - 3 , 2 );
+
+ RGBForeColor( sunken ? &face : &black );
+ MoveTo( 0 , m_height - 1 );
+ LineTo( m_width - 1 , m_height - 1 );
+ LineTo( m_width - 1 , 0 );
+
+ RGBForeColor( sunken ? &shadow : &white );
+ MoveTo( 1 , m_height - 3 );
+ LineTo( 1, 1 );
+ LineTo( m_width - 3 , 1 );
+
+ RGBForeColor( sunken ? &white : &shadow );
+ MoveTo( 1 , m_height - 2 );
+ LineTo( m_width - 2 , m_height - 2 );
+ LineTo( m_width - 2 , 1 );
+
+ RGBForeColor( sunken ? &black : &face );
+ MoveTo( 2 , m_height - 4 );
+ LineTo( 2 , 2 );
+ LineTo( m_width - 4 , 2 );
+#endif
+ }
+ else if (HasFlag(wxSIMPLE_BORDER))
+ {
+ Rect rect = { 0 , 0 , m_height , m_width } ;
+ RGBForeColor( &black ) ;
+ FrameRect( &rect ) ;
+ }