Autocomplete fore/background

205 views
Skip to first unread message

Stefano Mtangoo

unread,
Feb 24, 2014, 4:28:03 AM2/24/14
to scintilla...@googlegroups.com
I need to manipulate Autocomple Box styles (BG, Foreground, et al). Is there any method?
Thanks

Neil Hodgson

unread,
Feb 24, 2014, 8:40:55 PM2/24/14
to Scintilla mailing list
Stefano Mtangoo:

> I need to manipulate Autocomple Box styles (BG, Foreground, et al). Is there any method?

These are hardcoded to the system settings, such as (on Windows) COLOR_HIGHLIGHTTEXT. On Windows the control panel (Window Color and Appearance) may be able to change these system settings although this is not easily found on recent releases.

Neil

Stefano D. Mtangoo

unread,
Feb 25, 2014, 2:39:23 AM2/25/14
to scintilla...@googlegroups.com
I don't want to mess up with system wide settings so I will remain content with status quo unless this is added!
Do you plan to add anything that will expose listbox for such and other modifications?
S.

   Neil



--
Stefano D. Mtangoo
Mob: +255 754710410
Twitter: @mtangoo
Web. http://hosannahighertech.co.tz
Linkedin: http://www.linkedin.com/pub/stefano-mtangoo/45/644/281
The purpose of man is to know his Maker Be known by his Maker
And make his Maker known So that others may know his Maker as their Maker(Emeal Zwayne)

Neil Hodgson

unread,
Feb 25, 2014, 9:22:47 PM2/25/14
to scintilla...@googlegroups.com
Stefano D. Mtangoo:

> I don't want to mess up with system wide settings so I will remain content with status quo unless this is added!
> Do you plan to add anything that will expose listbox for such and other modifications?

No, as it doesn’t appear very useful to override the system settings. You can implement your own list boxes and show them in front of Scintilla if its important enough.

It would be more interesting to design Scintilla to make it easier to implement new interactive widgets. For example, a HTML/CSS editor may want to allow colours to be edited through a colour-picker widget. I have looked at defining a simple common interface to integrate call tips, autocompletion and new widgets but there is a lot of communication performed between the core code and the widget code so that makes for a wide, complex interface.

Neil

Stefano Mtangoo

unread,
Feb 26, 2014, 9:03:34 AM2/26/14
to scintilla...@googlegroups.com, nyama...@me.com


On Wednesday, February 26, 2014 5:22:47 AM UTC+3, Neil Hodgson wrote:
Stefano D. Mtangoo:

> I don't want to mess up with system wide settings so I will remain content with status quo unless this is added!
> Do you plan to add anything that will expose listbox for such and other modifications?

   No, as it doesn’t appear very useful to override the system settings. You can implement your own list boxes and show them in front of Scintilla if its important enough.

   It would be more interesting to design Scintilla to make it easier to implement new interactive widgets. For example, a HTML/CSS editor may want to allow colours to be edited through a colour-picker widget.
 
I have Impemented a  simple documentation box in wxWidgets/wxSTC so I added new event to scintilla which is fired when AC is changed sending with it current selected word. It would be useful if Scintill would have extra ability to associate each Autocomplete word with **optional** text for documentation, so that each time
Scintilla fires, it will send that docs. Another way is associating each AC word with and ID (integer or long or even string). So each time selection changes, Event is fired with that specific ID. This will enable two same word have different docs.

Don't know how hard is that or even its acceptable with scintilla. I can try to implement in future if it will find acceptance!

Neil Hodgson

unread,
Feb 26, 2014, 5:04:15 PM2/26/14
to Scintilla mailing list
Stefano Mtangoo:

> It would be useful if Scintill would have extra ability to associate each Autocomplete word with **optional** text for documentation, so that each time
> Scintilla fires, it will send that docs.

That sounds like application functionality - use a map to associate each word with its documentation.

Neil

Stefano Mtangoo

unread,
Mar 10, 2014, 7:38:43 AM3/10/14
to scintilla...@googlegroups.com, nyama...@me.com
Hi Neil,
 I understand that documetation thing is application functionality in this case but even the map will be useless as Scintilla have no way to
get currently selected word in AC box. I have implemented a signal that does this (adding to what wxForum bcteh have started of course).
Can I send a patch to scintilla?

   Neil

Neil Hodgson

unread,
Mar 11, 2014, 6:11:03 AM3/11/14
to scintilla...@googlegroups.com
Stefano Mtangoo:

> I understand that documetation thing is application functionality in this case but even the map will be useless as Scintilla have no way to
> get currently selected word in AC box. I have implemented a signal that does this (adding to what wxForum bcteh have started of course).
> Can I send a patch to scintilla?

An API to retrieve the currently selected item's text is simple to implement so would be fine.

A signal that is triggered when the selection changes is more difficult, since this is not currently supported by the Platform interface, that is, the interface between Scintilla and platform libraries. Changing the Platform interface generally breaks building on each platform until that platform’s maintainer adds an implementation for the new functionality. There are 4 platform interfaces included in the Scintilla distribution and something like 6 or more maintained independently, so adding a new feature costs the time of each of those downstreams.

Generally, features exposed through the Platform interface should be widely implementable. Any new feature should be checked against other platforms to ensure that either the feature isn’t needed for a platform or that the proposed API can be reasonably implemented.

Neil

Stefano D. Mtangoo

unread,
Mar 11, 2014, 3:17:51 PM3/11/14
to scintilla...@googlegroups.com
On 11/03/2014 01:11 alasiri, Neil Hodgson wrote:
Stefano Mtangoo:

 I understand that documetation thing is application functionality in this case but even the map will be useless as Scintilla have no way to
get currently selected word in AC box. I have implemented a signal that does this (adding to what wxForum bcteh have started of course).
Can I send a patch to scintilla?
   An API to retrieve the currently selected item's text is simple to implement so would be fine.
Thats good to hear.


   A signal that is triggered when the selection changes is more difficult, since this is not currently supported by the Platform interface, that is, the interface between Scintilla and platform libraries. Changing the Platform interface generally breaks building on each platform until that platform's maintainer adds an implementation for the new functionality. There are 4 platform interfaces included in the Scintilla distribution and something like 6 or more maintained independently, so adding a new feature costs the time of each of those downstreams.

   Generally, features exposed through the Platform interface should be widely implementable. Any new feature should be checked against other platforms to ensure that either the feature isn't needed for a platform or that the proposed API can be reasonably implemented.
AFAIK it should be easy (given that there are signals for canceling Auto-complete for example). Since AC Box will be shown so getting selected text should not be difficult for any platform and sending that signal should use same mechanism as other signals.

Best Regards,
Stefano
Reply all
Reply to author
Forward
0 new messages