[Uim] surrounding text

Etsushi Kato ek.kato at gmail.com
Thu Nov 9 16:57:44 EET 2006


On 11/9/06, YAMAMOTO Kengo / YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> At Wed, 11 Oct 2006 14:46:43 +0900,
> ek.kato at gmail.com wrote:
> >
> > I've added specific handling with widgets which use/inherit GtkEntry
> > and GtkTextView.  See details below.
> >
> > On 10/10/06, YAMAMOTO Kengo / YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> > > At Tue, 10 Oct 2006 14:31:01 +0900,
> > > ek.kato at gmail.com wrote:
> > > >
> > > > On 10/10/06, YAMAMOTO Kengo / YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> > > > > As written as follows along with enum UTextArea, the cursor of
> > > > > UTextArea_Clipboard must always be positioned at end of the text
> > > > > virtually.
> >
> > OK.  Now UTextOrigin_End is only supported in the acquisition of
> > UTextArea_Clipboard.
>
> Sorry, my expression was confusable. What I meant is that treat
> clipboard texts as if its cursor position is always at end, as
> follows.
>
>   "a clipboard textI"
>
> "I" indicates virtual cursor position. So all following argument
> sets must return "a clipboard text".
>
> (UTextOrigin_Begin,  0, UTextExtent_Full)
> (UTextOrigin_Cursor, UTextExtent_Full, 0)
> (UTextOrigin_End,    UTextExtent_Full, 0)

I'll fix to support UTextOrigin_Begin and UTextOrigin_Cursor later.


> > The problems for the input context on a custom widget which doesn't
> > use/inherit GtkEntry or GtkTextView is still remained.  But it can't
> > be helped for now.
> >
> >  * Maybe these widget don't support get_surrounding and/or
> >    delete_surrounding.
>
> I've relaxed the API requirements. Such widgets are simply
> allowed to deny the operation.
>
> >  * Even if it supports delete_surrounding, we can't use
> >    UTextExtent_Full and/or UTextExtent_Line.
>
> The relaxed requirements allows returning a string shorter than
> requested.
>
> >  * A text acquired with UTextArea_Selection doesn't mean it is on the
> >    target application.
>
> If it is not ensured, I prefer simply denies the operation. But
> if such widgets are existing a lot, trying to acquire a most
> likely its own selection text will be a valuable
> workaround. Please do as you believing as best.

OK.

> >  * How to delete the selected text?  We just expect it will be
> >    replaced with newly committed text.
>
> In Qt, QTextEdit::removeSelectedText() and QLineEdit::del() may
> be used to delete selection. Even if a partial deletion is
> instructed, following sequence may be used although selected
> state will be lost.
>
> 1) Delete entire selection
> 2) Insert the rest selection text partially removed after

I mean the problem exists only for non gtkentry/gtktextview inherited
widgets.  Deletion of selected text surely works fine for
gtkentry/gtktextview.

Cheers,
-- 
Etsushi Kato
ek.kato at gmail.com



More information about the uim mailing list