trying to avoid redraw problems at wrong places
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -212,28 +212,37 @@ static pascal void TPPaneDrawProc(ControlRef theControl, ControlPartCode thePart
|
|||||||
Rect oldbounds = varsp->fRFocusOutline ;
|
Rect oldbounds = varsp->fRFocusOutline ;
|
||||||
InsetRect( &oldbounds , -1 , -1 ) ;
|
InsetRect( &oldbounds , -1 , -1 ) ;
|
||||||
|
|
||||||
InvalWindowRect( GetControlOwner( theControl ) , &oldbounds ) ;
|
if ( IsControlVisible( theControl ) )
|
||||||
|
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 + 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,
|
if ( IsControlVisible( theControl ) )
|
||||||
varsp->fRTextArea.bottom, varsp->fRTextArea.right, varsp->fTXNFrame);
|
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left,
|
||||||
|
varsp->fRTextArea.bottom, varsp->fRTextArea.right, varsp->fTXNFrame);
|
||||||
|
else
|
||||||
|
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top + 30000 , varsp->fRTextArea.left + 30000 ,
|
||||||
|
varsp->fRTextArea.bottom + 30000 , varsp->fRTextArea.right + 30000 , varsp->fTXNFrame);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( IsControlVisible( theControl ) )
|
||||||
|
{
|
||||||
/* update the text region */
|
/* update the text region */
|
||||||
RGBColor white = { 65535 , 65535 , 65535 } ;
|
RGBColor white = { 65535 , 65535 , 65535 } ;
|
||||||
RGBBackColor( &white ) ;
|
RGBBackColor( &white ) ;
|
||||||
EraseRgn(varsp->fTextBackgroundRgn);
|
EraseRgn(varsp->fTextBackgroundRgn);
|
||||||
TXNDraw(varsp->fTXNRec, NULL);
|
TXNDraw(varsp->fTXNRec, NULL);
|
||||||
/* restore the drawing environment */
|
/* restore the drawing environment */
|
||||||
/* draw the text frame and focus frame (if necessary) */
|
/* draw the text frame and focus frame (if necessary) */
|
||||||
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
||||||
if ((**tpvars).fIsActive && varsp->fInFocus) DrawThemeFocusRect(&varsp->fRFocusOutline, true);
|
if ((**tpvars).fIsActive && varsp->fInFocus)
|
||||||
/* release our globals */
|
DrawThemeFocusRect(&varsp->fRFocusOutline, true);
|
||||||
HSetState((Handle) tpvars, state);
|
/* release our globals */
|
||||||
|
HSetState((Handle) tpvars, state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +258,7 @@ static pascal ControlPartCode TPPaneHitTestProc(ControlHandle theControl, Point
|
|||||||
/* set up our locals and lock down our globals*/
|
/* set up our locals and lock down our globals*/
|
||||||
result = 0;
|
result = 0;
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
||||||
if (tpvars != NULL) {
|
if (tpvars != NULL && IsControlVisible( theControl) ) {
|
||||||
state = HGetState((Handle) tpvars);
|
state = HGetState((Handle) tpvars);
|
||||||
HLock((Handle) tpvars);
|
HLock((Handle) tpvars);
|
||||||
/* find the region where we clicked */
|
/* find the region where we clicked */
|
||||||
@@ -276,7 +285,7 @@ static pascal ControlPartCode TPPaneTrackingProc(ControlHandle theControl, Point
|
|||||||
/* make sure we have some variables... */
|
/* make sure we have some variables... */
|
||||||
partCodeResult = 0;
|
partCodeResult = 0;
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
||||||
if (tpvars != NULL) {
|
if (tpvars != NULL && IsControlVisible( theControl ) ) {
|
||||||
/* lock 'em down */
|
/* lock 'em down */
|
||||||
state = HGetState((Handle) tpvars);
|
state = HGetState((Handle) tpvars);
|
||||||
HLock((Handle) tpvars);
|
HLock((Handle) tpvars);
|
||||||
@@ -319,7 +328,7 @@ static pascal void TPPaneIdleProc(ControlHandle theControl) {
|
|||||||
STPTextPaneVars **tpvars, *varsp;
|
STPTextPaneVars **tpvars, *varsp;
|
||||||
/* set up locals */
|
/* set up locals */
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
||||||
if (tpvars != NULL) {
|
if (tpvars != NULL && IsControlVisible( theControl ) ) {
|
||||||
/* if we're not active, then we have nothing to say about the cursor */
|
/* if we're not active, then we have nothing to say about the cursor */
|
||||||
if ((**tpvars).fIsActive) {
|
if ((**tpvars).fIsActive) {
|
||||||
char state;
|
char state;
|
||||||
@@ -404,12 +413,16 @@ static pascal void TPPaneActivateProc(ControlHandle theControl, Boolean activati
|
|||||||
/* de/activate the text edit record */
|
/* de/activate the text edit record */
|
||||||
SetPort((**tpvars).fDrawingEnvironment);
|
SetPort((**tpvars).fDrawingEnvironment);
|
||||||
wxMacWindowClipper clipper( wxFindControlFromMacControl(theControl ) ) ;
|
wxMacWindowClipper clipper( wxFindControlFromMacControl(theControl ) ) ;
|
||||||
GetControlBounds(theControl, &bounds);
|
GetControlBounds(theControl, &bounds);
|
||||||
varsp->fIsActive = activating;
|
varsp->fIsActive = activating;
|
||||||
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
||||||
/* redraw the frame */
|
/* redraw the frame */
|
||||||
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
if ( IsControlVisible( theControl ) )
|
||||||
if (varsp->fInFocus) DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive);
|
{
|
||||||
|
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
||||||
|
if (varsp->fInFocus)
|
||||||
|
DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive);
|
||||||
|
}
|
||||||
HSetState((Handle) tpvars, state);
|
HSetState((Handle) tpvars, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -467,11 +480,14 @@ static pascal ControlPartCode TPPaneFocusProc(ControlHandle theControl, ControlF
|
|||||||
focusResult = varsp->fInFocus ? 1 : kControlFocusNoPart;
|
focusResult = varsp->fInFocus ? 1 : kControlFocusNoPart;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
||||||
/* redraw the text fram and focus rectangle to indicate the
|
/* redraw the text fram and focus rectangle to indicate the
|
||||||
new focus state */
|
new focus state */
|
||||||
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
if ( IsControlVisible( theControl ) )
|
||||||
DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive && varsp->fInFocus);
|
{
|
||||||
|
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
||||||
|
DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive && varsp->fInFocus);
|
||||||
|
}
|
||||||
/* done */
|
/* done */
|
||||||
HSetState((Handle) tpvars, state);
|
HSetState((Handle) tpvars, state);
|
||||||
}
|
}
|
||||||
@@ -575,6 +591,11 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
|
|||||||
kTXNSystemDefaultEncoding,
|
kTXNSystemDefaultEncoding,
|
||||||
&varsp->fTXNRec, &varsp->fTXNFrame, (TXNObjectRefcon) tpvars);
|
&varsp->fTXNRec, &varsp->fTXNFrame, (TXNObjectRefcon) tpvars);
|
||||||
|
|
||||||
|
if ( !IsControlVisible( theControl ) )
|
||||||
|
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top + 30000 , varsp->fRTextArea.left + 30000 ,
|
||||||
|
varsp->fRTextArea.bottom + 30000 , varsp->fRTextArea.right + 30000 , varsp->fTXNFrame);
|
||||||
|
|
||||||
|
|
||||||
if ( (wxStyle & wxTE_MULTILINE) && (wxStyle & wxTE_DONTWRAP) )
|
if ( (wxStyle & wxTE_MULTILINE) && (wxStyle & wxTE_DONTWRAP) )
|
||||||
{
|
{
|
||||||
TXNControlTag tag = kTXNWordWrapStateTag ;
|
TXNControlTag tag = kTXNWordWrapStateTag ;
|
||||||
@@ -728,7 +749,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , true , 0 , 0 , 1,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , false , 0 , 0 , 1,
|
||||||
(style & wxTE_PASSWORD) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
|
(style & wxTE_PASSWORD) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
|
||||||
long size ;
|
long size ;
|
||||||
::GetControlData((ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*)((TEHandle *)&m_macTE) , &size ) ;
|
::GetControlData((ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*)((TEHandle *)&m_macTE) , &size ) ;
|
||||||
@@ -742,7 +763,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
| kControlWantsActivate | kControlHandlesTracking | kControlHasSpecialBackground
|
| kControlWantsActivate | kControlHandlesTracking | kControlHasSpecialBackground
|
||||||
| kControlGetsFocusOnClick | kControlSupportsLiveFeedback;
|
| kControlGetsFocusOnClick | kControlSupportsLiveFeedback;
|
||||||
/* create the control */
|
/* create the control */
|
||||||
m_macControl = NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", true, featurSet, 0, featurSet, kControlUserPaneProc, 0);
|
m_macControl = NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", false , featurSet, 0, featurSet, kControlUserPaneProc, 0);
|
||||||
/* set up the mUP specific features and data */
|
/* set up the mUP specific features and data */
|
||||||
mUPOpenControl((ControlHandle) m_macControl, m_windowStyle );
|
mUPOpenControl((ControlHandle) m_macControl, m_windowStyle );
|
||||||
}
|
}
|
||||||
|
@@ -212,28 +212,37 @@ static pascal void TPPaneDrawProc(ControlRef theControl, ControlPartCode thePart
|
|||||||
Rect oldbounds = varsp->fRFocusOutline ;
|
Rect oldbounds = varsp->fRFocusOutline ;
|
||||||
InsetRect( &oldbounds , -1 , -1 ) ;
|
InsetRect( &oldbounds , -1 , -1 ) ;
|
||||||
|
|
||||||
InvalWindowRect( GetControlOwner( theControl ) , &oldbounds ) ;
|
if ( IsControlVisible( theControl ) )
|
||||||
|
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 + 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,
|
if ( IsControlVisible( theControl ) )
|
||||||
varsp->fRTextArea.bottom, varsp->fRTextArea.right, varsp->fTXNFrame);
|
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top, varsp->fRTextArea.left,
|
||||||
|
varsp->fRTextArea.bottom, varsp->fRTextArea.right, varsp->fTXNFrame);
|
||||||
|
else
|
||||||
|
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top + 30000 , varsp->fRTextArea.left + 30000 ,
|
||||||
|
varsp->fRTextArea.bottom + 30000 , varsp->fRTextArea.right + 30000 , varsp->fTXNFrame);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( IsControlVisible( theControl ) )
|
||||||
|
{
|
||||||
/* update the text region */
|
/* update the text region */
|
||||||
RGBColor white = { 65535 , 65535 , 65535 } ;
|
RGBColor white = { 65535 , 65535 , 65535 } ;
|
||||||
RGBBackColor( &white ) ;
|
RGBBackColor( &white ) ;
|
||||||
EraseRgn(varsp->fTextBackgroundRgn);
|
EraseRgn(varsp->fTextBackgroundRgn);
|
||||||
TXNDraw(varsp->fTXNRec, NULL);
|
TXNDraw(varsp->fTXNRec, NULL);
|
||||||
/* restore the drawing environment */
|
/* restore the drawing environment */
|
||||||
/* draw the text frame and focus frame (if necessary) */
|
/* draw the text frame and focus frame (if necessary) */
|
||||||
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
||||||
if ((**tpvars).fIsActive && varsp->fInFocus) DrawThemeFocusRect(&varsp->fRFocusOutline, true);
|
if ((**tpvars).fIsActive && varsp->fInFocus)
|
||||||
/* release our globals */
|
DrawThemeFocusRect(&varsp->fRFocusOutline, true);
|
||||||
HSetState((Handle) tpvars, state);
|
/* release our globals */
|
||||||
|
HSetState((Handle) tpvars, state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +258,7 @@ static pascal ControlPartCode TPPaneHitTestProc(ControlHandle theControl, Point
|
|||||||
/* set up our locals and lock down our globals*/
|
/* set up our locals and lock down our globals*/
|
||||||
result = 0;
|
result = 0;
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
||||||
if (tpvars != NULL) {
|
if (tpvars != NULL && IsControlVisible( theControl) ) {
|
||||||
state = HGetState((Handle) tpvars);
|
state = HGetState((Handle) tpvars);
|
||||||
HLock((Handle) tpvars);
|
HLock((Handle) tpvars);
|
||||||
/* find the region where we clicked */
|
/* find the region where we clicked */
|
||||||
@@ -276,7 +285,7 @@ static pascal ControlPartCode TPPaneTrackingProc(ControlHandle theControl, Point
|
|||||||
/* make sure we have some variables... */
|
/* make sure we have some variables... */
|
||||||
partCodeResult = 0;
|
partCodeResult = 0;
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
||||||
if (tpvars != NULL) {
|
if (tpvars != NULL && IsControlVisible( theControl ) ) {
|
||||||
/* lock 'em down */
|
/* lock 'em down */
|
||||||
state = HGetState((Handle) tpvars);
|
state = HGetState((Handle) tpvars);
|
||||||
HLock((Handle) tpvars);
|
HLock((Handle) tpvars);
|
||||||
@@ -319,7 +328,7 @@ static pascal void TPPaneIdleProc(ControlHandle theControl) {
|
|||||||
STPTextPaneVars **tpvars, *varsp;
|
STPTextPaneVars **tpvars, *varsp;
|
||||||
/* set up locals */
|
/* set up locals */
|
||||||
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
tpvars = (STPTextPaneVars **) GetControlReference(theControl);
|
||||||
if (tpvars != NULL) {
|
if (tpvars != NULL && IsControlVisible( theControl ) ) {
|
||||||
/* if we're not active, then we have nothing to say about the cursor */
|
/* if we're not active, then we have nothing to say about the cursor */
|
||||||
if ((**tpvars).fIsActive) {
|
if ((**tpvars).fIsActive) {
|
||||||
char state;
|
char state;
|
||||||
@@ -404,12 +413,16 @@ static pascal void TPPaneActivateProc(ControlHandle theControl, Boolean activati
|
|||||||
/* de/activate the text edit record */
|
/* de/activate the text edit record */
|
||||||
SetPort((**tpvars).fDrawingEnvironment);
|
SetPort((**tpvars).fDrawingEnvironment);
|
||||||
wxMacWindowClipper clipper( wxFindControlFromMacControl(theControl ) ) ;
|
wxMacWindowClipper clipper( wxFindControlFromMacControl(theControl ) ) ;
|
||||||
GetControlBounds(theControl, &bounds);
|
GetControlBounds(theControl, &bounds);
|
||||||
varsp->fIsActive = activating;
|
varsp->fIsActive = activating;
|
||||||
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
||||||
/* redraw the frame */
|
/* redraw the frame */
|
||||||
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
if ( IsControlVisible( theControl ) )
|
||||||
if (varsp->fInFocus) DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive);
|
{
|
||||||
|
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
||||||
|
if (varsp->fInFocus)
|
||||||
|
DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive);
|
||||||
|
}
|
||||||
HSetState((Handle) tpvars, state);
|
HSetState((Handle) tpvars, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -467,11 +480,14 @@ static pascal ControlPartCode TPPaneFocusProc(ControlHandle theControl, ControlF
|
|||||||
focusResult = varsp->fInFocus ? 1 : kControlFocusNoPart;
|
focusResult = varsp->fInFocus ? 1 : kControlFocusNoPart;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
TPActivatePaneText(tpvars, varsp->fIsActive && varsp->fInFocus);
|
||||||
/* redraw the text fram and focus rectangle to indicate the
|
/* redraw the text fram and focus rectangle to indicate the
|
||||||
new focus state */
|
new focus state */
|
||||||
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
if ( IsControlVisible( theControl ) )
|
||||||
DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive && varsp->fInFocus);
|
{
|
||||||
|
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
|
||||||
|
DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive && varsp->fInFocus);
|
||||||
|
}
|
||||||
/* done */
|
/* done */
|
||||||
HSetState((Handle) tpvars, state);
|
HSetState((Handle) tpvars, state);
|
||||||
}
|
}
|
||||||
@@ -575,6 +591,11 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle )
|
|||||||
kTXNSystemDefaultEncoding,
|
kTXNSystemDefaultEncoding,
|
||||||
&varsp->fTXNRec, &varsp->fTXNFrame, (TXNObjectRefcon) tpvars);
|
&varsp->fTXNRec, &varsp->fTXNFrame, (TXNObjectRefcon) tpvars);
|
||||||
|
|
||||||
|
if ( !IsControlVisible( theControl ) )
|
||||||
|
TXNSetFrameBounds( varsp->fTXNRec, varsp->fRTextArea.top + 30000 , varsp->fRTextArea.left + 30000 ,
|
||||||
|
varsp->fRTextArea.bottom + 30000 , varsp->fRTextArea.right + 30000 , varsp->fTXNFrame);
|
||||||
|
|
||||||
|
|
||||||
if ( (wxStyle & wxTE_MULTILINE) && (wxStyle & wxTE_DONTWRAP) )
|
if ( (wxStyle & wxTE_MULTILINE) && (wxStyle & wxTE_DONTWRAP) )
|
||||||
{
|
{
|
||||||
TXNControlTag tag = kTXNWordWrapStateTag ;
|
TXNControlTag tag = kTXNWordWrapStateTag ;
|
||||||
@@ -728,7 +749,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if ( !m_macUsesTXN )
|
if ( !m_macUsesTXN )
|
||||||
{
|
{
|
||||||
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , true , 0 , 0 , 1,
|
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , false , 0 , 0 , 1,
|
||||||
(style & wxTE_PASSWORD) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
|
(style & wxTE_PASSWORD) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ;
|
||||||
long size ;
|
long size ;
|
||||||
::GetControlData((ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*)((TEHandle *)&m_macTE) , &size ) ;
|
::GetControlData((ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*)((TEHandle *)&m_macTE) , &size ) ;
|
||||||
@@ -742,7 +763,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
| kControlWantsActivate | kControlHandlesTracking | kControlHasSpecialBackground
|
| kControlWantsActivate | kControlHandlesTracking | kControlHasSpecialBackground
|
||||||
| kControlGetsFocusOnClick | kControlSupportsLiveFeedback;
|
| kControlGetsFocusOnClick | kControlSupportsLiveFeedback;
|
||||||
/* create the control */
|
/* create the control */
|
||||||
m_macControl = NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", true, featurSet, 0, featurSet, kControlUserPaneProc, 0);
|
m_macControl = NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", false , featurSet, 0, featurSet, kControlUserPaneProc, 0);
|
||||||
/* set up the mUP specific features and data */
|
/* set up the mUP specific features and data */
|
||||||
mUPOpenControl((ControlHandle) m_macControl, m_windowStyle );
|
mUPOpenControl((ControlHandle) m_macControl, m_windowStyle );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user