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: 264
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: 13975
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: Thu Mar 28 18:05:34 CET 2024

Total time taken to generate the page: 0.01758 seconds