ultimatepp/uppsrc/ide/MacroElement.cpp
klugier f4d1b41dd0 .ide Macro manager is now independed from theide #1746. Macro manager improve menu bar. #1746
git-svn-id: svn://ultimatepp.org/upp/trunk@11192 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2017-06-22 20:35:03 +00:00

34 lines
580 B
C++

#include "ide.h"
MacroElement::MacroElement(Type type, const String& fileName, int line, const String& comment)
: type(type)
, comment(comment)
, fileName(fileName)
, line(line)
{}
Image MacroElement::GetImage() const
{
switch(type)
{
case(Type::MACRO):
return IdeImg::Macro();
case(Type::FUNCTION):
return IdeImg::Fn();
case(Type::UNKNOWN):
return Image();
}
return Image();
}
String MacroElement::GetContent() const
{
String content = TrimBoth(comment);
if(content.GetCount())
content << "\n";
content << prototype << code;
return content;
}