eglaysher / rlvm

RealLive clone for Linux and OSX
http://rlvm.net
GNU General Public License v3.0
150 stars 25 forks source link

Extract text currently on screen to clipboard #92

Closed njlawton closed 3 years ago

njlawton commented 3 years ago

This would be nice to have so you can for example, pass the text into a translation program or dictionary.

njlawton commented 3 years ago

@eglaysher I understand that you no longer maintain this project but if you happen to have a code pointer to where the current onscreen text is available I would like to try add this feature.

Thanks for the great app!

eglaysher commented 3 years ago

rlvm doesn't think about layout that way; it doesn't store text that's on screen other than temporarily while rendering it to the resulting bitmap. RealLive's text out primitives are more like bitmap blit commands than a textwidget that maintains state in your favorite UI toolkit. This also doesn't count text which is actually baked into bitmaps; ie, most ui widgets.

So you can't get the onscreen text unless you add a bunch of state. If you wanted to just intercept text as its being printed (so you can print it to the console), start in RLMachine::PerformTextout(). If you want to actually keep track of all text printed while on screen, well good luck, but you'd probably want to start in the TextWindow class.

njlawton commented 3 years ago

Thanks for all the info! Intercepting the text might be just fine for my needs so I will take a look.

Sounds like keeping track of all the text on the current screen will be infeasible with the amount of time I would be willing to spend so I will close the issue.

Thanks again for taking the time to comment