no_wrap implementation added, corrected rectangles, so that horizontal scrollbar does not have a gap at the left

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-01-02 13:43:03 +00:00
parent 21f442c3e5
commit 321267f659
2 changed files with 8 additions and 6 deletions

View File

@@ -216,7 +216,7 @@ static pascal void TPPaneDrawProc(ControlRef theControl, ControlPartCode thePart
InvalWindowRect( GetControlOwner( theControl ) , &oldbounds ) ; InvalWindowRect( GetControlOwner( theControl ) , &oldbounds ) ;
SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextArea, bounds.left + 2 , bounds.top + (varsp->fMultiline ? 0 : 2) , SetRect(&varsp->fRTextArea, bounds.left + (varsp->fMultiline ? 0 : 2) , bounds.top + (varsp->fMultiline ? 0 : 2) ,
bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2)); bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2));
RectRgn(varsp->fTextBackgroundRgn, &varsp->fRTextOutline); RectRgn(varsp->fTextBackgroundRgn, &varsp->fRTextOutline);
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left, TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left,
@@ -527,7 +527,7 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
GetControlBounds(theControl, &bounds); GetControlBounds(theControl, &bounds);
SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextArea, bounds.left + 2 , bounds.top + (varsp->fMultiline ? 0 : 2) , SetRect(&varsp->fRTextArea, bounds.left + (varsp->fMultiline ? 0 : 2) , bounds.top + (varsp->fMultiline ? 0 : 2) ,
bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2)); bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2));
/* calculate the background region for the text. In this case, it's kindof /* calculate the background region for the text. In this case, it's kindof
and irregular region because we're setting the scroll bar a little ways inside and irregular region because we're setting the scroll bar a little ways inside
@@ -550,7 +550,8 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ; frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ;
else else
{ {
frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ; // in case entry becomes impossible, remove the comment on the line below
// frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ;
frameOptions |= kTXNWantHScrollBarMask ; frameOptions |= kTXNWantHScrollBarMask ;
} }

View File

@@ -216,7 +216,7 @@ static pascal void TPPaneDrawProc(ControlRef theControl, ControlPartCode thePart
InvalWindowRect( GetControlOwner( theControl ) , &oldbounds ) ; InvalWindowRect( GetControlOwner( theControl ) , &oldbounds ) ;
SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextArea, bounds.left + 2 , bounds.top + (varsp->fMultiline ? 0 : 2) , SetRect(&varsp->fRTextArea, bounds.left + (varsp->fMultiline ? 0 : 2) , bounds.top + (varsp->fMultiline ? 0 : 2) ,
bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2)); bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2));
RectRgn(varsp->fTextBackgroundRgn, &varsp->fRTextOutline); RectRgn(varsp->fTextBackgroundRgn, &varsp->fRTextOutline);
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left, TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left,
@@ -527,7 +527,7 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
GetControlBounds(theControl, &bounds); GetControlBounds(theControl, &bounds);
SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRFocusOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom); SetRect(&varsp->fRTextOutline, bounds.left, bounds.top, bounds.right, bounds.bottom);
SetRect(&varsp->fRTextArea, bounds.left + 2 , bounds.top + (varsp->fMultiline ? 0 : 2) , SetRect(&varsp->fRTextArea, bounds.left + (varsp->fMultiline ? 0 : 2) , bounds.top + (varsp->fMultiline ? 0 : 2) ,
bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2)); bounds.right - (varsp->fMultiline ? 0 : 2), bounds.bottom - (varsp->fMultiline ? 0 : 2));
/* calculate the background region for the text. In this case, it's kindof /* calculate the background region for the text. In this case, it's kindof
and irregular region because we're setting the scroll bar a little ways inside and irregular region because we're setting the scroll bar a little ways inside
@@ -550,7 +550,8 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ; frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ;
else else
{ {
frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ; // in case entry becomes impossible, remove the comment on the line below
// frameOptions |= kTXNAlwaysWrapAtViewEdgeMask ;
frameOptions |= kTXNWantHScrollBarMask ; frameOptions |= kTXNWantHScrollBarMask ;
} }