+void wxWindowMac::MacPaintBorders( )
+{
+ if( m_macWindowData )
+ 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) )
+ {
+ bool sunken = HasFlag( wxSUNKEN_BORDER ) ;
+ RGBColor pen1 = sunken ? white : black ;
+ RGBColor pen2 = sunken ? shadow : face ;
+ RGBColor pen3 = sunken ? face : shadow ;
+ RGBColor pen4 = sunken ? black : white ;
+
+ RGBForeColor( &pen1 ) ;
+ {
+ Rect rect = { 0 , 0 , m_height , m_width } ;
+ FrameRect( &rect ) ;
+ }
+ RGBForeColor( &pen2 ) ;
+ {
+ Rect rect = { 1 , 1 , m_height -1 , m_width -1} ;
+ FrameRect( &rect ) ;
+ }
+ RGBForeColor( &pen3 ) ;
+ {
+ Rect rect = { 0 , 0 , m_height -2 , m_width -2} ;
+ FrameRect( &rect ) ;
+ }
+ RGBForeColor( &pen4 ) ;
+ {
+ MoveTo( 0 , 0 ) ;
+ LineTo( m_width - 3 , 0 ) ;
+ MoveTo( 0 , 0 ) ;
+ LineTo( 0 , m_height - 3 ) ;
+ }
+ }
+ else if (HasFlag(wxSIMPLE_BORDER))
+ {
+ Rect rect = { 0 , 0 , m_height , m_width } ;
+ RGBForeColor( &black ) ;
+ FrameRect( &rect ) ;
+ }
+/*
+ if ( this->GetParent() )
+ {
+ wxPaintDC dc(GetParent());
+ GetParent()->PrepareDC(dc);
+
+ if (HasFlag(wxRAISED_BORDER) || HasFlag( wxSUNKEN_BORDER) )
+ {
+ bool sunken = HasFlag( wxSUNKEN_BORDER ) ;
+
+ wxPen m_penButton3DShadow( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DSHADOW ), 1, wxSOLID ) ;
+ wxPen m_penButton3DFace( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DFACE ), 1, wxSOLID ) ;
+
+ wxPen wxPen1 = sunken ? *wxWHITE_PEN : *wxBLACK_PEN;
+ wxPen wxPen2 = sunken ? m_penButton3DShadow : m_penButton3DShadow;
+ wxPen wxPen3 = sunken ? m_penButton3DFace : m_penButton3DShadow;
+ wxPen wxPen4 = sunken ? *wxBLACK_PEN : *wxWHITE_PEN;
+
+ dc.SetPen(wxPen1);
+ dc.DrawRectangle(m_x, m_y, m_width, m_height); // outer - right and button
+
+ dc.SetPen(wxPen2);
+ dc.DrawRectangle(m_x+1, m_y+1, m_width-1, m_height-1); // outer - left and top
+
+ dc.SetPen(wxPen3);
+ dc.DrawRectangle(m_x, m_y, m_width-2, m_height-2); // inner - right and button
+
+ dc.SetPen(wxPen4);
+ dc.DrawLine(m_x, m_y, m_x + m_width-3, m_y); // inner - left and top
+ dc.DrawLine(m_x, m_y, m_x, m_y + m_height-3);
+ }
+ else if (HasFlag(wxDOUBLE_BORDER))
+ {
+ bool sunken = HasFlag( wxSUNKEN_BORDER ) ;
+
+ wxPen m_penButton3DShadow( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DSHADOW ), 1, wxSOLID ) ;
+ wxPen m_penButton3DFace( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DFACE ), 1, wxSOLID ) ;
+
+ wxPen wxPen1 = sunken ? *wxWHITE_PEN : *wxBLACK_PEN;
+ wxPen wxPen2 = sunken ? m_penButton3DShadow : m_penButton3DShadow;
+ wxPen wxPen3 = sunken ? m_penButton3DFace : m_penButton3DShadow;
+ wxPen wxPen4 = sunken ? *wxBLACK_PEN : *wxWHITE_PEN;
+
+ dc.SetPen(wxPen1);
+ dc.DrawRectangle(m_x, m_y, m_width, m_height); // outer - right and button
+
+ dc.SetPen(wxPen2);
+ dc.DrawRectangle(m_x+1, m_y+1, m_width-1, m_height-1); // outer - left and top
+
+ dc.SetPen(wxPen3);
+ dc.DrawRectangle(m_x, m_y, m_width-2, m_height-2); // inner - right and button
+
+ dc.SetPen(wxPen4);
+ dc.DrawLine(m_x, m_y, m_x + m_width-3, m_y); // inner - left and top
+ dc.DrawLine(m_x, m_y, m_x, m_y + m_height-3);
+ }
+ else if (HasFlag(wxSIMPLE_BORDER))
+ {
+ dc.SetPen(*wxBLACK_PEN);
+ dc.DrawRectangle(m_x, m_y, m_width, m_height);
+ }
+ }
+ */
+}
+
+// New function that will replace some of the above.
+void wxWindowMac::SetScrollbar(int orient, int pos, int thumbVisible,
+ int range, bool refresh)