WIP: Expose current TextAttributes from the underlying console API. #2032
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This is not a polished PR that is ready to merge; it demonstrates a
direction for which I need to get buy-off from the team before pursuing
further.
I'm currently working on implementing the XTPUSHSGR/XTPOPSGR control
sequences (WIP PR here, which requires saving a [stack of] text
attributes, and not just the legacy attributes, but full RGB colors,
etc.
My first instinct was to implement the "business logic" (the stack) in
the
AdaptDispatch
layer, but that will require getting the [full] textattributes from the underlying console API. This is not a terribly
"invasive" change, but it is exposing new stuff at a layer boundary.
Put another way, this means pound-including the
"../buffer/out/TextAttribute.hpp" header in a few places outside of
"buffer/out", and is that okay, or does that header need to be kept
private and isolated?
So there are a few ways this could go:
attributes down another layer (so
AdaptDispatch
just forwards onthe PushGraphicsRendition call to the lower layer, OR
attributes.
OR
some particular requests that I do certain things differently (I
totally understand being picky about stuff that cuts across API
layers).
What do you think?
References
Related: PR #1978
Related: Issue #1796
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
none