All,
Finally getting back to work on the last of the examples for the csScintilla port and wanted to ask about changeCase(). EDT has forever had a "change case" key on the numeric keypad. It actually gets used a lot in the world where EDT is used. It works on single characters and entire selections, just flipping each character to the "other." Very handy if you are keying stuff in from a printout and didn't notice CAPS LOCK was on so now your CamelCase is now cAMELcASE.
The lowerCase() and upperCase() methods listed in cpp header files only work on selections. I ham fist in the single character support, no problem there. Given the wide range of selections Scintilla has though, I didn't want to:
- pull all of the selctions out into a safety copy somewhere.
- clear the selections
- walk through the saved selections char by char changing case
- reset the selections
I could do that, but first wanted to see how much pain it would be to bury it deeper in Scintilla so others might use it?
I poked around looking at the code (not deeply mind you) and noticed this:
CaseConverter caseConvFold;
CaseConverter caseConvUp;
CaseConverter caseConvLow;
in CaseConvert.cxx
Is caseConvFold just an odd name for caseConvOther? Is this functionality already baked in at the low level and I just need to figure out how to expose at the C++ level?
I guess what I'm really asking is can someone point me to a guide/tutorial for adding a new keyboard command so I can add SCI_CHANGECASE to complement SCI_LOWERCASE and SCI_UPPERCASE? Better yet, if this is partially done, where it got left off at?
Thanks,
Roland