U++ framework
Do not panic. Ask here before giving up.

Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » [Feature] CodeEditor: HighlightOutput::Put, need another overload
[Feature] CodeEditor: HighlightOutput::Put, need another overload [message #47868] Fri, 14 April 2017 20:25 Go to next message
omari is currently offline  omari
Messages: 276
Registered: March 2010
Experienced Member
in this overload :
void HighlightOutput::Put(int count, const HlStyle& ink, const HlStyle& paper)
{
	Set(pos, count, ink);
	SetPaper(pos, count, paper.color);
	pos += count;
}


To simplify the use, the third parameter(const HlStyle& paper) can be just a color:

void HighlightOutput::Put(int count, const HlStyle& ink, const Color paper)
{
	Set(pos, count, ink);
	SetPaper(pos, count, paper);
	pos += count;
}


with this overload, instead of
HlStyle paper;
paper.color = LtYellow();
Put(5, ink, paper);

i can call it like:
Put(5, ink, LtYellow());


regards
omari.
Re: [Feature] CodeEditor: HighlightOutput::Put, need another overload [message #47883 is a reply to message #47868] Sun, 16 April 2017 19:29 Go to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
omari wrote on Fri, 14 April 2017 20:25
in this overload :
void HighlightOutput::Put(int count, const HlStyle& ink, const HlStyle& paper)
{
	Set(pos, count, ink);
	SetPaper(pos, count, paper.color);
	pos += count;
}


To simplify the use, the third parameter(const HlStyle& paper) can be just a color:

void HighlightOutput::Put(int count, const HlStyle& ink, const Color paper)
{
	Set(pos, count, ink);
	SetPaper(pos, count, paper);
	pos += count;
}


with this overload, instead of
HlStyle paper;
paper.color = LtYellow();
Put(5, ink, paper);

i can call it like:
Put(5, ink, LtYellow());


OK. In the trunk.
Previous Topic: [Featur+Patch]TextDiffCtrl: Add filter by file status Updated/Added/Removed
Next Topic: [Bug] CodeEditor/Highlight/underline: probleme with the last char
Goto Forum:
  


Current Time: Sat Apr 25 16:24:11 GMT+2 2026

Total time taken to generate the page: 0.00476 seconds