kControlFocusNoPart, otherwise return a non-zero part code.
kUserClickedToFocusPart - is a constant defined for this example. You should
define your own value for handling click-to-focus type events. */
- /* save the drawing state */
- SetPort((**tpvars).fDrawingEnvironment);
- wxMacWindowClipper clipper( wxFindControlFromMacControl(theControl ) ) ;
- /* calculate the next highlight state */
+ /* calculate the next highlight state */
switch (action) {
default:
case kControlFocusNoPart:
new focus state */
if ( IsControlVisible( theControl ) )
{
+ /* save the drawing state */
+ SetPort((**tpvars).fDrawingEnvironment);
+ wxMacWindowClipper clipper( wxFindControlFromMacControl(theControl ) ) ;
DrawThemeEditTextFrame(&varsp->fRTextOutline, varsp->fIsActive ? kThemeStateActive: kThemeStateInactive);
DrawThemeFocusRect(&varsp->fRFocusOutline, varsp->fIsActive && varsp->fInFocus);
}
}
wxString st = str ;
- st.Replace(wxT("\n"), wxT("\r"));
+ wxMacConvertNewlines13To10( &st ) ;
if ( !m_macUsesTXN )
{
m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , false , 0 , 0 , 1,
}
#endif
}
- result.Replace(wxT("\r"),wxT("\n")) ;
+ wxMacConvertNewlines10To13( &result ) ;
return result ;
}
void wxTextCtrl::SetValue(const wxString& str)
{
wxString st = str ;
- st.Replace(wxT("\n"), wxT("\r"));
+ wxMacConvertNewlines13To10( &st ) ;
if ( !m_macUsesTXN )
{
wxCharBuffer text = st.mb_str(wxConvLocal) ;
void wxTextCtrl::Replace(long from, long to, const wxString& str)
{
wxString value = str ;
- value.Replace(wxT("\n"), wxT("\r"));
+ wxMacConvertNewlines13To10( &value ) ;
if ( !m_macUsesTXN )
{
ControlEditTextSelectionRec selection ;
void wxTextCtrl::WriteText(const wxString& str)
{
wxString st = str ;
- st.Replace(wxT("\n"), wxT("\r"));
+ wxMacConvertNewlines13To10( &st ) ;
if ( !m_macUsesTXN )
{
wxCharBuffer text = st.mb_str(wxConvLocal) ;
return FALSE ;
}
-// Makes 'unmodified'
+// Makes modifie or unmodified
+void wxTextCtrl::MarkDirty()
+{
+ m_dirty = true;
+}
+
void wxTextCtrl::DiscardEdits()
{
m_dirty = false;