diff options
Diffstat (limited to 'src/kernel/tqinputcontext.cpp')
| -rw-r--r-- | src/kernel/tqinputcontext.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/kernel/tqinputcontext.cpp b/src/kernel/tqinputcontext.cpp index 7f0d5501d..913b0da5f 100644 --- a/src/kernel/tqinputcontext.cpp +++ b/src/kernel/tqinputcontext.cpp @@ -52,8 +52,8 @@ class TQInputContextPrivate { public: TQInputContextPrivate() - : holderWidget( 0 ), composingWidget( 0 ), hasFocus( FALSE ), - isComposing( FALSE ) + : holderWidget( 0 ), composingWidget( 0 ), hasFocus( false ), + isComposing( false ) #if !defined(TQT_NO_IM_PREEDIT_RELOCATION) , preeditString( TQString::null ), cursorPosition( -1 ), selLength ( 0 ) @@ -75,7 +75,7 @@ public: } void resetComposingState() { - isComposing = FALSE; + isComposing = false; #if !defined(TQT_NO_IM_PREEDIT_RELOCATION) preeditString = TQString::null; cursorPosition = -1; @@ -265,7 +265,7 @@ public: a text widget -> a non-text widget -> another text widget To enable the preedit relocation feature, the input context class - have to reimplement isPreeditRelocationEnabled() as returns TRUE. + have to reimplement isPreeditRelocationEnabled() as returns true. The implementation requires that the preedit preservation is also enabled since preedit relocation is a special case of the preedit preservation. If the preedit relocation is disabled, the input @@ -376,14 +376,14 @@ void TQInputContext::setFocusWidget( TQWidget *w ) d->composingWidget ); // invoke sendIMEventInternal() rather than sendIMEvent() to // avoid altering the composing state - if ( isPreeditRelocation == TRUE ) { + if ( isPreeditRelocation ) { // clear preedit of previously focused text // widget. preserved preedit may be exist even if - // isPreeditRelocationEnabled() == FALSE. + // isPreeditRelocationEnabled() == false. sendIMEventInternal( TQEvent::IMEnd ); } d->composingWidget = w; // changes recipient of TQIMEvent - if ( isPreeditRelocation == TRUE ) { + if ( isPreeditRelocation ) { #if !defined(TQT_NO_IM_PREEDIT_RELOCATION) if ( isPreeditRelocationEnabled() ) { // copy preedit state to the widget that gaining focus @@ -399,7 +399,7 @@ void TQInputContext::setFocusWidget( TQWidget *w ) } } } - d->hasFocus = w ? TRUE : FALSE; + d->hasFocus = w; } @@ -413,14 +413,14 @@ void TQInputContext::releaseComposingWidget( TQWidget *w ) { if ( d->composingWidget == w ) { d->composingWidget = 0; - d->hasFocus = FALSE; + d->hasFocus = false; } } #endif // TQ_WS_X11 /*! \internal - This function can be reimplemented in a subclass as returning TRUE + This function can be reimplemented in a subclass as returning true if you want making your input method enable the preedit relocation. See the description for preedit relocation of TQInputContext. @@ -429,13 +429,13 @@ void TQInputContext::releaseComposingWidget( TQWidget *w ) */ bool TQInputContext::isPreeditRelocationEnabled() { - return FALSE; + return false; } /*! This function indicates whether IMStart event had been sent to the text widget. It is ensured that an input context can send IMCompose - or IMEnd event safely if this function returned TRUE. + or IMEnd event safely if this function returned true. The state is automatically being tracked through sendIMEvent(). @@ -451,7 +451,7 @@ bool TQInputContext::isComposing() const This function can be reimplemented in a subclass to filter input events. - Return TRUE if the \a event has been consumed. Otherwise, the + Return true if the \a event has been consumed. Otherwise, the unfiltered \a event will be forwarded to widgets as ordinary way. Although the input events have accept() and ignore() methods, leave it untouched. @@ -478,7 +478,7 @@ bool TQInputContext::isComposing() const bool TQInputContext::filterEvent( const TQEvent *event ) { Q_UNUSED(event); - return FALSE; + return false; } @@ -602,7 +602,7 @@ void TQInputContext::sendIMEvent( TQEvent::Type type, const TQString &text, if ( type == TQEvent::IMStart ) { sendIMEventInternal( type, text, cursorPosition, selLength ); - d->isComposing = TRUE; + d->isComposing = true; } else if ( type == TQEvent::IMEnd ) { d->resetComposingState(); sendIMEventInternal( type, text, cursorPosition, selLength ); |
