Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 193
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: 12105
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: Wed Nov 20 15:32:41 CET 2019

Total time taken to generate the page: 0.01195 seconds