You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
750 B
27 lines
750 B
13 years ago
|
#include "translator.h"
|
||
|
#include <boost/algorithm/string.hpp>
|
||
|
|
||
|
AlignmentFlag parseAlignment(std::string aligment)
|
||
|
{
|
||
|
boost::to_lower(aligment);
|
||
|
boost::erase_all(aligment, " ");
|
||
|
if(aligment == "topleft")
|
||
|
return AlignTopLeft;
|
||
|
else if(aligment == "topright")
|
||
|
return AlignTopRight;
|
||
|
else if(aligment == "bottomleft")
|
||
|
return AlignBottomLeft;
|
||
|
else if(aligment == "bottomright")
|
||
|
return AlignBottomRight;
|
||
|
else if(aligment == "left")
|
||
|
return AlignLeftCenter;
|
||
|
else if(aligment == "right")
|
||
|
return AlignRightCenter;
|
||
|
else if(aligment == "top")
|
||
|
return AlignTopCenter;
|
||
|
else if(aligment == "bottom")
|
||
|
return AlignBottomCenter;
|
||
|
else
|
||
|
return AlignCenter;
|
||
|
}
|