I was able to accomplish this by reusing many ideas from bgsearch.e. Hopefully the underlying macros that I call upon are stable. I'm listing what I'm using in this post so SlickTeam can confirm for me if it is kosher for me to call these functions from my user macros and that they will be stable in future releases.
This functionality is really handy because I'm getting C++ find references results from an external tool (cquery which has clang parsing!
https://github.com/cquery-project/cquery) and putting the results into a search window - functionality I've always wanted from SlickEdit's reference search (
https://community.slickedit.com/index.php?topic=15005.0 and
https://community.slickedit.com/index.php?topic=16328.0).
I made use of 'class SearchResults' from se/search/SearchResults.e and used the following member functions:
SearchResults.initialize()
SearchResults.showResults()
SearchResults.insertFileLine()
SearchResults.setContext()
SearchResults.insertContextLine()
SearchResults.setMatchLinenum()
SearchResults.insertLine()
SearchResults.done()
Additionally for showing the context of the results, I used many functions that the comments say are new to v23:
tag_search_result_context_start()
tag_search_result_context_find()
tag_search_result_context_get_contexts()
tag_search_result_context_get_info()
tag_search_result_context_end()