[EMAIL PROTECTED] wrote:

> 
> On Mon, 27 Jan 2003, Angus Leeming wrote:
> 
>  If you want 'the "x" and "y" position as well as width and height
>  of
>> the work_area of the current BufferView to get the position and the
>> size of the preedit area and the cursor position.', then does not
>>         FL_OBJECT * ob = fl_create_input(...);
>>         int x, y, w, h;
>>         x=ob->x;
>>         y=ob->y;
>>         w=ob->w;
>>         h=ob->h;
>> give you what you want? Ie, each input widget will have its own
> 
> 
> Probably what I want is, in lib/flresource.c,
> 
> Display *
> fl_initialize(int *na, char *arg[], const char *appclass,
>               XrmOptionDescList appopt, int nappopt)
> {
>     char disp_name[256], disp_cls[256], buf[256];
>     XrmValue xval;
>      ....................................
>      ........................................
>      ........................................
> 
>    XRectangle pre_area;
>    XPoint location;
>     FL_OBJECT * ob = fl_create_input(...);
>     int x, y, w, h;
>     XVaNestedList preedit_list;
> 
>          pre_area.x = ob->x;
>          pre_area.y = ob->y;
>          pre_are.width = ob->w;
>          pre_area.height = ob->h;
>  
>          location.x = ob->x;
>          location.y = ob->y;
> 
>          preedit_list = XVaCreateNestedList( 0,
>                                       XNSpotLocation, &location,
>                                       XNFontSet, fontset,
>                                       XNArea, &pre_area,
>                                        NUll);
>      .............................
>      .............................
>      ............................
> 
> 
> Then, what should I put here in (...) of fl_create_input(...) ?
> 
> 
> 
>> Has this essay helped or are we still confusing each other?
> 
> 
> You surely are helping me a lot.

Maybe ;-)

fl_create_input creates a single input widget. It must belong to a 
parent FL_FORM. Since you are doing this in fl_initialize, no FL_FORM 
exists yet, so this is bound to fail.

As I read XCreateIC, most of the attributes can be added/removed 
after xic is created. Does that not mean that you can create a 
'pre-edit area' on the fly. Ie, when the user types 'Shift space' in 
a dialog, you'll have code in input.c that says: "Hello! he wants a 
pre-edit area" and you'll modify the attributes of the input context 
to reflect this --- for this particular input widget. Ditto, when in 
pre-edit mode and the input.c code receives a "Space' keypress, 
you'll know to turn off this stuff.

Any help?
Angus


Reply via email to