Arbitrary selection of text on text object activation
Usage:
currently, the 'state' argument for the gobj_activate function has three valid values: 0, 1 or 2. (at least for the text objext, text_activate)
The arbitrary selection of text achived using the following: Let s be the starting point and e the end point (using characters as unit), SSS...SSS and EEE...EEE the binary encoding of these numbers respectively.
we have to encode these values in an >=32 bits integer (int)
1SSS SSSS SSSS SSSS EEEE EEEE EEEE EEEE
Ex: state = ((0b1 << 31) | (0x0003 << 16) | 0x0009), select from char 3 to char 9.
We set bit 32 to 1 in order to distinguish it from the other valid 'state' values (0, 1 and 2).
Merge request reports
Activity
I assume you're using the bitmath so that we don't have to alter the function sig of gobj_activate or the activate callback _widgetbehavior struct.
If so, is there a way to keep the bitmath hidden so that it never touches the frontend? I mean, with GUI textarea you can add whatever args you need. And I'd much rather see two more readable int args for "start" and "end" than a single int with three values encoded in it.
added 1 commit
- f17c40e1 - make frontend paramenter passing more clear, add two arguments sel_start and...