{
namespace Loader
{
-const std::string BlendShapes::NUMBER_OF_BLEND_SHAPES("uNumberOfBlendShapes");
-const std::string BlendShapes::UNNORMALIZE_FACTOR("uBlendShapeUnnormalizeFactor");
-const std::string BlendShapes::COMPONENT_SIZE("uBlendShapeComponentSize");
+const char* BlendShapes::NUMBER_OF_BLEND_SHAPES("uNumberOfBlendShapes");
+const char* BlendShapes::UNNORMALIZE_FACTOR("uBlendShapeUnnormalizeFactor");
+const char* BlendShapes::COMPONENT_SIZE("uBlendShapeComponentSize");
-const std::string BlendShapes::COMPONENTS("blendShapeComponents");
+const char* BlendShapes::COMPONENTS("blendShapeComponents");
-const std::string BlendShapes::WEIGHTS_UNIFORM("uBlendShapeWeight");
+const char* BlendShapes::WEIGHTS_UNIFORM("uBlendShapeWeight");
void BlendShapes::ConfigureProperties(const std::pair<MeshDefinition, MeshGeometry>& mesh, Shader shader, Actor actor)
{
char weightNameBuffer[32];
char unnormalizeFactorNameBuffer[64];
- char* const pWeightName = weightNameBuffer + snprintf(weightNameBuffer, sizeof(weightNameBuffer), "%s", WEIGHTS_UNIFORM.c_str());
- char* const pFactorName = unnormalizeFactorNameBuffer + snprintf(unnormalizeFactorNameBuffer, sizeof(unnormalizeFactorNameBuffer), "%s", UNNORMALIZE_FACTOR.c_str());
+ char* const pWeightName = weightNameBuffer + snprintf(weightNameBuffer, sizeof(weightNameBuffer), "%s", WEIGHTS_UNIFORM);
+ char* const pFactorName = unnormalizeFactorNameBuffer + snprintf(unnormalizeFactorNameBuffer, sizeof(unnormalizeFactorNameBuffer), "%s", UNNORMALIZE_FACTOR);
for(const auto& blendShape : mesh.first.mBlendShapes)
{
snprintf(pWeightName, sizeof(weightNameBuffer) - (pWeightName - weightNameBuffer), "[%d]", index);
};
// shader properties - animatable (uniforms)
- static const std::string NUMBER_OF_BLEND_SHAPES; ///< Integer number of blend shapes loaded.
- static const std::string UNNORMALIZE_FACTOR; ///< Scalar(s) for position components of blend shapes; Version 1.0: float array (1 per blend shape); Version 2.0: single float.
- static const std::string COMPONENT_SIZE; ///< Integer offset from one component (positions / normals / tangents) of a blend shape to the next.
+ static const char* NUMBER_OF_BLEND_SHAPES; ///< Integer number of blend shapes loaded.
+ static const char* UNNORMALIZE_FACTOR; ///< Scalar(s) for position components of blend shapes; Version 1.0: float array (1 per blend shape); Version 2.0: single float.
+ static const char* COMPONENT_SIZE; ///< Integer offset from one component (positions / normals / tangents) of a blend shape to the next.
// shader properties - read-only (not available as uniforms)
- static const std::string COMPONENTS; ///< Integer bitmask of the blend shape components that the shader uses; refer to the Components enum.
+ static const char* COMPONENTS; ///< Integer bitmask of the blend shape components that the shader uses; refer to the Components enum.
// actor property (instance) - animatable (uniforms)
- static const std::string WEIGHTS_UNIFORM; ///< The weight of each blend shape in a float array
+ static const char* WEIGHTS_UNIFORM; ///< The weight of each blend shape in a float array
/**
* @brief Registers properties based on the mesh definition (and geometry) and identified by the above string constants,
namespace
{
-const std::string NODES = "nodes";
-const std::string SCENES = "scenes";
-const std::string NODE = "node";
-const std::string URI = "uri";
-const std::string URL = "url";
-const std::string CUSTOMIZATION = "customization";
-const std::string HINTS = "hints";
-const std::string NAME("name");
-const std::string BLEND_SHAPE_HEADER("blendShapeHeader");
-const std::string BLEND_SHAPES("blendShapes");
-const std::string BLEND_SHAPE_VERSION_1_0("1.0");
-const std::string BLEND_SHAPE_VERSION_2_0("2.0");
-const std::string VERSION("version");
+const char* NODES = "nodes";
+const char* SCENES = "scenes";
+const char* NODE = "node";
+const char* URI = "uri";
+const char* URL = "url";
+const char* HINTS = "hints";
+const char* NAME("name");
+const char* BLEND_SHAPE_HEADER("blendShapeHeader");
+const char* BLEND_SHAPES("blendShapes");
+const char* BLEND_SHAPE_VERSION_1_0("1.0");
+const char* BLEND_SHAPE_VERSION_2_0("2.0");
+const char* VERSION("version");
const char* const SHADOW_MAP_SIZE = "shadowMapSize";
const char* const ORTHOGRAPHIC_SIZE = "orthographicSize";
{
namespace
{
-const std::string PRE_COMPUTED_BRDF_TEXTURE_FILE_NAME = "brdfLUT.png";
+const char* PRE_COMPUTED_BRDF_TEXTURE_FILE_NAME = "brdfLUT.png";
}
EnvironmentDefinition::RawData
Dali::Mutex gInitializeMutex;
Dali::Mutex gReadMutex;
-const std::string POSITION_PROPERTY("position");
-const std::string ORIENTATION_PROPERTY("orientation");
-const std::string SCALE_PROPERTY("scale");
-const std::string BLEND_SHAPE_WEIGHTS_UNIFORM("uBlendShapeWeight");
-const std::string MRENDERER_MODEL_IDENTIFICATION("M-Renderer");
-const std::string ROOT_NODE_NAME("RootNode");
+const char* POSITION_PROPERTY("position");
+const char* ORIENTATION_PROPERTY("orientation");
+const char* SCALE_PROPERTY("scale");
+const char* BLEND_SHAPE_WEIGHTS_UNIFORM("uBlendShapeWeight");
+const char* MRENDERER_MODEL_IDENTIFICATION("M-Renderer");
+const char* ROOT_NODE_NAME("RootNode");
const Vector3 SCALE_TO_ADJUST(100.0f, 100.0f, 100.0f);
const Geometry::Type GLTF2_TO_DALI_PRIMITIVES[]{
const float duration = LoadDataFromAccessors<float>(context, input, output, inputDataBuffer, outputDataBuffer);
char weightNameBuffer[32];
- auto prefixSize = snprintf(weightNameBuffer, sizeof(weightNameBuffer), "%s[", BLEND_SHAPE_WEIGHTS_UNIFORM.c_str());
+ auto prefixSize = snprintf(weightNameBuffer, sizeof(weightNameBuffer), "%s[", BLEND_SHAPE_WEIGHTS_UNIFORM);
char* const pWeightName = weightNameBuffer + prefixSize;
const auto remainingSize = sizeof(weightNameBuffer) - prefixSize;
for(uint32_t weightIndex = 0u, endWeightIndex = channel.mSampler->mOutput->mCount / channel.mSampler->mInput->mCount; weightIndex < endWeightIndex; ++weightIndex)
uint16_t (*mFunc)(uintptr_t&);
};
-const std::string QUAD("quad");
+const char* QUAD("quad");
///@brief Reads a blob from the given stream @a source into @a target, which must have
/// at least @a descriptor.length bytes.
actor.AddRenderer(renderer);
}
-const std::string NodeDefinition::ORIGINAL_MATRIX_PROPERTY_NAME = "originalMatrix";
+const char* NodeDefinition::ORIGINAL_MATRIX_PROPERTY_NAME = "originalMatrix";
Actor NodeDefinition::CreateActor(CreateParams& params)
{
static std::string_view GetIblYDirectionUniformName();
public: // DATA
- static const std::string ORIGINAL_MATRIX_PROPERTY_NAME;
+ static const char* ORIGINAL_MATRIX_PROPERTY_NAME;
std::string mName;
uint32_t mNodeId = INVALID_INDEX;
{
namespace
{
-const std::string JOINT_MATRIX{"jointMatrix"};
+const char* JOINT_MATRIX{"jointMatrix"};
const std::map<Property::Type, Constraint (*)(Actor&, Property::Index)> sConstraintFactory = {
{Property::Type::BOOLEAN,
{
// Register bone transform on shader.
char propertyNameBuffer[32];
- snprintf(propertyNameBuffer, sizeof(propertyNameBuffer), "%s[%d]", Skinning::BONE_UNIFORM_NAME.c_str(), boneIdx);
+ snprintf(propertyNameBuffer, sizeof(propertyNameBuffer), "%s[%d]", Skinning::BONE_UNIFORM_NAME, boneIdx);
DALI_ASSERT_DEBUG(shader.GetPropertyIndex(propertyNameBuffer) == Property::INVALID_INDEX);
auto propBoneXform = shader.RegisterProperty(propertyNameBuffer, Matrix{false});
{
namespace
{
-const std::string SHADER_HINT_OUTPUT_IS_TRANSPARENT("OUTPUT_IS_TRANSPARENT"); ///< Might generate transparent alpha from opaque inputs.
-const std::string SHADER_HINT_MODIFIES_GEOMETRY("MODIFIES_GEOMETRY"); ///< Might change position of vertices, this option disables any culling optimizations.
-
+const char* SHADER_HINT_OUTPUT_IS_TRANSPARENT("OUTPUT_IS_TRANSPARENT"); ///< Might generate transparent alpha from opaque inputs.
+const char* SHADER_HINT_MODIFIES_GEOMETRY("MODIFIES_GEOMETRY"); ///< Might change position of vertices, this option disables any culling optimizations.
} // namespace
ShaderDefinition::ShaderDefinition(const ShaderDefinition& other)
{
const unsigned int Skinning::MAX_JOINTS = 64;
-const std::string Skinning::BONE_UNIFORM_NAME = "uBone";
-
+const char* Skinning::BONE_UNIFORM_NAME = "uBone";
} // namespace Loader
} // namespace Scene3D
} // namespace Dali
/*
* @brief Name of bone matrix uniform (array).
*/
- static const std::string BONE_UNIFORM_NAME;
+ static const char* BONE_UNIFORM_NAME;
Skinning() = delete;
};
{
#define TOKEN_STRING(x) #x
-const std::string KEYNAME_ACTORS = "actors";
-const std::string KEYNAME_ENTRY_TRANSITION = "entryTransition";
-const std::string KEYNAME_EXIT_TRANSITION = "exitTransition";
-const std::string KEYNAME_INCLUDES = "includes";
-const std::string KEYNAME_INHERIT = "inherit";
-const std::string KEYNAME_MAPPINGS = "mappings";
-const std::string KEYNAME_NAME = "name";
-const std::string KEYNAME_SIGNALS = "signals";
-const std::string KEYNAME_STATES = "states";
-const std::string KEYNAME_STYLES = "styles";
-const std::string KEYNAME_TEMPLATES = "templates";
-const std::string KEYNAME_TRANSITIONS = "transitions";
-const std::string KEYNAME_TYPE = "type";
-const std::string KEYNAME_VISUALS = "visuals";
-
-const std::string PROPERTIES = "properties";
-const std::string ANIMATABLE_PROPERTIES = "animatableProperties";
+const char* KEYNAME_ACTORS = "actors";
+const char* KEYNAME_ENTRY_TRANSITION = "entryTransition";
+const char* KEYNAME_EXIT_TRANSITION = "exitTransition";
+const char* KEYNAME_INCLUDES = "includes";
+const char* KEYNAME_INHERIT = "inherit";
+const char* KEYNAME_MAPPINGS = "mappings";
+const char* KEYNAME_SIGNALS = "signals";
+const char* KEYNAME_STATES = "states";
+const char* KEYNAME_STYLES = "styles";
+const char* KEYNAME_TEMPLATES = "templates";
+const char* KEYNAME_TRANSITIONS = "transitions";
+const char* KEYNAME_TYPE = "type";
+const char* KEYNAME_VISUALS = "visuals";
+
+const char* PROPERTIES = "properties";
+const char* ANIMATABLE_PROPERTIES = "animatableProperties";
typedef std::vector<const TreeNode*> TreeNodeList;
namespace
{
-const std::string READING_INFO_TYPE_NAME = "name";
-const std::string READING_INFO_TYPE_ROLE = "role";
-const std::string READING_INFO_TYPE_DESCRIPTION = "description";
-const std::string READING_INFO_TYPE_STATE = "state";
-const std::string READING_INFO_TYPE_ATTRIBUTE_NAME = "reading_info_type";
-const std::string READING_INFO_TYPE_SEPARATOR = "|";
+const char* READING_INFO_TYPE_NAME = "name";
+const char* READING_INFO_TYPE_ROLE = "role";
+const char* READING_INFO_TYPE_DESCRIPTION = "description";
+const char* READING_INFO_TYPE_STATE = "state";
+const char* READING_INFO_TYPE_ATTRIBUTE_NAME = "reading_info_type";
+const char* READING_INFO_TYPE_SEPARATOR = "|";
} // namespace
namespace Dali
const char* const IMAGE_BRDF_FILE_NAME = "brdfLUT.png";
// glTF file extension
-const std::string GLTF_EXT(".gltf");
+const char* GLTF_EXT(".gltf");
/**
* cube map face index
* The alignment depends on the alignment value of the text label (Use Text::VerticalAlignment enumerations).
*/
const float VERTICAL_ALIGNMENT_TABLE[Text::VerticalAlignment::BOTTOM + 1] =
- {
+{
0.0f, // VerticalAlignment::TOP
0.5f, // VerticalAlignment::CENTER
1.0f // VerticalAlignment::BOTTOM
};
-const std::string TEXT_FIT_ENABLE_KEY("enable");
-const std::string TEXT_FIT_MIN_SIZE_KEY("minSize");
-const std::string TEXT_FIT_MAX_SIZE_KEY("maxSize");
-const std::string TEXT_FIT_STEP_SIZE_KEY("stepSize");
-const std::string TEXT_FIT_FONT_SIZE_KEY("fontSize");
-const std::string TEXT_FIT_FONT_SIZE_TYPE_KEY("fontSizeType");
+const char* TEXT_FIT_ENABLE_KEY("enable");
+const char* TEXT_FIT_MIN_SIZE_KEY("minSize");
+const char* TEXT_FIT_MAX_SIZE_KEY("maxSize");
+const char* TEXT_FIT_STEP_SIZE_KEY("stepSize");
+const char* TEXT_FIT_FONT_SIZE_KEY("fontSize");
+const char* TEXT_FIT_FONT_SIZE_TYPE_KEY("fontSizeType");
#if defined(DEBUG_ENABLED)
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_CONTROLS");
#endif
const Scripting::StringEnum AUTO_SCROLL_STOP_MODE_TABLE[] =
- {
+{
{"IMMEDIATE", Toolkit::TextLabel::AutoScrollStopMode::IMMEDIATE},
{"FINISH_LOOP", Toolkit::TextLabel::AutoScrollStopMode::FINISH_LOOP},
};
#define GET_LOCALE_TEXT(string) dgettext("dali-toolkit", string)
#endif
-const std::string TEXT_SELECTION_POPUP_BUTTON_STYLE_NAME("TextSelectionPopupButton");
+const char* TEXT_SELECTION_POPUP_BUTTON_STYLE_NAME("TextSelectionPopupButton");
const Dali::Vector4 DEFAULT_OPTION_PRESSED_COLOR(Dali::Vector4(0.24f, 0.72f, 0.8f, 1.0f));
const float DEFAULT_OPTION_PRESSED_CORNER_RADIUS = 0.0f;
const Dali::Vector4 DEFAULT_LABEL_PADDING(Dali::Vector4(24.0f, 24.0f, 14.0f, 14.0f));
const char* const OPTION_PASTE("optionPaste"); // "Paste" popup option.
const char* const OPTION_CLIPBOARD("optionClipboard"); // "Clipboard" popup option.
-const std::string IDS_LTR("IDS_LTR");
-const std::string RTL_DIRECTION("RTL");
+const char* IDS_LTR("IDS_LTR");
+const char* RTL_DIRECTION("RTL");
BaseHandle Create()
{
// Whether to mirror the list of buttons (for right to left languages)
bool mirror = false;
#if defined(__GLIBC__)
- char* idsLtr = GET_LOCALE_TEXT(IDS_LTR.c_str());
+ char* idsLtr = GET_LOCALE_TEXT(IDS_LTR);
if(NULL != idsLtr)
{
- mirror = (0 == strcmp(idsLtr, RTL_DIRECTION.c_str()));
+ mirror = (0 == strcmp(idsLtr, RTL_DIRECTION));
if(mirror)
{
DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_TEXT_PERFORMANCE_MARKER, false);
-const std::string KEY_C_NAME = "c";
-const std::string KEY_V_NAME = "v";
-const std::string KEY_X_NAME = "x";
-const std::string KEY_A_NAME = "a";
-const std::string KEY_INSERT_NAME = "Insert";
+const char* KEY_C_NAME = "c";
+const char* KEY_V_NAME = "v";
+const char* KEY_X_NAME = "x";
+const char* KEY_A_NAME = "a";
+const char* KEY_INSERT_NAME = "Insert";
} // namespace
constexpr float MAX_FLOAT = std::numeric_limits<float>::max();
-const std::string EMPTY_STRING("");
+const char* EMPTY_STRING = "";
} // namespace
}
}
-const std::string& Controller::InputFontHandler::GetInputFontFamily(const Controller& controller)
+std::string Controller::InputFontHandler::GetInputFontFamily(const Controller& controller)
{
if(NULL != controller.mImpl->mEventData)
{
struct Controller::InputFontHandler
{
static void SetInputFontFamily(Controller& controller, const std::string& fontFamily);
- static const std::string& GetInputFontFamily(const Controller& controller);
+ static std::string GetInputFontFamily(const Controller& controller);
static void SetInputFontWeight(const Controller& controller, FontWeight weight);
static bool IsInputFontWeightDefined(const Controller& controller);
static FontWeight GetInputFontWeight(const Controller& controller);
namespace
{
-const std::string EMPTY_STRING("");
+const char* EMPTY_STRING = "";
}
namespace Dali::Toolkit::Text
}
}
-const std::string& Controller::InputProperties::GetInputShadowProperties(const Controller& controller)
+std::string Controller::InputProperties::GetInputShadowProperties(const Controller& controller)
{
return controller.mImpl->mEventData ? controller.mImpl->mEventData->mInputStyle.shadowProperties : EMPTY_STRING;
}
}
}
-const std::string& Controller::InputProperties::GetInputUnderlineProperties(const Controller& controller)
+std::string Controller::InputProperties::GetInputUnderlineProperties(const Controller& controller)
{
return controller.mImpl->mEventData ? controller.mImpl->mEventData->mInputStyle.underlineProperties : EMPTY_STRING;
}
}
}
-const std::string& Controller::InputProperties::GetInputEmbossProperties(const Controller& controller)
+std::string Controller::InputProperties::GetInputEmbossProperties(const Controller& controller)
{
return controller.mImpl->mEventData ? controller.mImpl->mEventData->mInputStyle.embossProperties : controller.GetDefaultEmbossProperties();
}
}
}
-const std::string& Controller::InputProperties::GetInputOutlineProperties(const Controller& controller)
+std::string Controller::InputProperties::GetInputOutlineProperties(const Controller& controller)
{
return controller.mImpl->mEventData ? controller.mImpl->mEventData->mInputStyle.outlineProperties : controller.GetDefaultOutlineProperties();
}
static void SetInputShadowProperties(Controller& controller, const std::string& shadowProperties);
- static const std::string& GetInputShadowProperties(const Controller& controller);
+ static std::string GetInputShadowProperties(const Controller& controller);
static void SetInputUnderlineProperties(Controller& controller, const std::string& underlineProperties);
- static const std::string& GetInputUnderlineProperties(const Controller& controller);
+ static std::string GetInputUnderlineProperties(const Controller& controller);
static void SetInputEmbossProperties(Controller& controller, const std::string& embossProperties);
- static const std::string& GetInputEmbossProperties(const Controller& controller);
+ static std::string GetInputEmbossProperties(const Controller& controller);
static void SetInputOutlineProperties(Controller& controller, const std::string& outlineProperties);
- static const std::string& GetInputOutlineProperties(const Controller& controller);
+ static std::string GetInputOutlineProperties(const Controller& controller);
static void SetInputModePassword(Controller& controller, bool passwordInput);
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_CONTROLS");
#endif
-const std::string EMPTY_STRING("");
+const char* EMPTY_STRING = "";
const char* const PLACEHOLDER_TEXT = "text";
const char* const PLACEHOLDER_TEXT_FOCUSED = "textFocused";
}
}
-const std::string& Controller::PlaceholderHandler::GetPlaceholderFontFamily(const Controller& controller)
+std::string Controller::PlaceholderHandler::GetPlaceholderFontFamily(const Controller& controller)
{
if((NULL != controller.mImpl->mEventData) && (NULL != controller.mImpl->mEventData->mPlaceholderFont))
{
static void SetPlaceholderText(Controller& controller, PlaceholderType type, const std::string& text);
static void GetPlaceholderText(const Controller& controller, PlaceholderType type, std::string& text);
static void SetPlaceholderFontFamily(Controller& controller, const std::string& placeholderTextFontFamily);
- static const std::string& GetPlaceholderFontFamily(const Controller& controller);
+ static std::string GetPlaceholderFontFamily(const Controller& controller);
static void SetPlaceholderTextFontWeight(Controller& controller, FontWeight weight);
static bool IsPlaceholderTextFontWeightDefined(const Controller& controller);
static FontWeight GetPlaceholderTextFontWeight(const Controller& controller);
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_CONTROLS");
#endif
-const std::string EMPTY_STRING("");
+const char* EMPTY_STRING = "";
template<typename Type>
void EnsureCreated(Type*& object)
}
}
-const std::string& Controller::GetDefaultFontFamily() const
+std::string Controller::GetDefaultFontFamily() const
{
return mImpl->mFontDefaults ? mImpl->mFontDefaults->mFontDescription.family : EMPTY_STRING;
}
PlaceholderHandler::SetPlaceholderFontFamily(*this, placeholderTextFontFamily);
}
-const std::string& Controller::GetPlaceholderFontFamily() const
+std::string Controller::GetPlaceholderFontFamily() const
{
return PlaceholderHandler::GetPlaceholderFontFamily(*this);
}
mImpl->mEmbossDefaults->properties = embossProperties;
}
-const std::string& Controller::GetDefaultEmbossProperties() const
+std::string Controller::GetDefaultEmbossProperties() const
{
return mImpl->mEmbossDefaults ? mImpl->mEmbossDefaults->properties : EMPTY_STRING;
}
mImpl->mOutlineDefaults->properties = outlineProperties;
}
-const std::string& Controller::GetDefaultOutlineProperties() const
+std::string Controller::GetDefaultOutlineProperties() const
{
return mImpl->mOutlineDefaults ? mImpl->mOutlineDefaults->properties : EMPTY_STRING;
}
InputFontHandler::SetInputFontFamily(*this, fontFamily);
}
-const std::string& Controller::GetInputFontFamily() const
+std::string Controller::GetInputFontFamily() const
{
return InputFontHandler::GetInputFontFamily(*this);
}
InputProperties::SetInputShadowProperties(*this, shadowProperties);
}
-const std::string& Controller::GetInputShadowProperties() const
+std::string Controller::GetInputShadowProperties() const
{
return InputProperties::GetInputShadowProperties(*this);
}
InputProperties::SetInputUnderlineProperties(*this, underlineProperties);
}
-const std::string& Controller::GetInputUnderlineProperties() const
+std::string Controller::GetInputUnderlineProperties() const
{
return InputProperties::GetInputUnderlineProperties(*this);
}
InputProperties::SetInputEmbossProperties(*this, embossProperties);
}
-const std::string& Controller::GetInputEmbossProperties() const
+std::string Controller::GetInputEmbossProperties() const
{
return InputProperties::GetInputEmbossProperties(*this);
}
InputProperties::SetInputOutlineProperties(*this, outlineProperties);
}
-const std::string& Controller::GetInputOutlineProperties() const
+std::string Controller::GetInputOutlineProperties() const
{
return InputProperties::GetInputOutlineProperties(*this);
}
}
}
-const std::string& Controller::GetInputStrikethroughProperties() const
+std::string Controller::GetInputStrikethroughProperties() const
{
return (NULL != mImpl->mEventData) ? mImpl->mEventData->mInputStyle.strikethroughProperties : EMPTY_STRING;
}
*
* @return The default font family.
*/
- const std::string& GetDefaultFontFamily() const;
+ std::string GetDefaultFontFamily() const;
/**
* @brief Sets the placeholder text font family.
*
* @return The placeholder text font family
*/
- const std::string& GetPlaceholderFontFamily() const;
+ std::string GetPlaceholderFontFamily() const;
/**
* @brief Sets the default font weight.
*
* @return The emboss's properties string.
*/
- const std::string& GetDefaultEmbossProperties() const;
+ std::string GetDefaultEmbossProperties() const;
/**
* @brief Sets the outline's properties string.
*
* @return The outline's properties string.
*/
- const std::string& GetDefaultOutlineProperties() const;
+ std::string GetDefaultOutlineProperties() const;
/**
* @brief Sets the default line spacing.
*
* @return The input text's font family name.
*/
- const std::string& GetInputFontFamily() const;
+ std::string GetInputFontFamily() const;
/**
* @brief Sets the input font's weight.
*
* @return The shadow's properties string.
*/
- const std::string& GetInputShadowProperties() const;
+ std::string GetInputShadowProperties() const;
/**
* @brief Sets the input underline's properties string.
*
* @return The underline's properties string.
*/
- const std::string& GetInputUnderlineProperties() const;
+ std::string GetInputUnderlineProperties() const;
/**
* @brief Sets the input emboss's properties string.
*
* @return The emboss's properties string.
*/
- const std::string& GetInputEmbossProperties() const;
+ std::string GetInputEmbossProperties() const;
/**
* @brief Sets input the outline's properties string.
*
* @return The outline's properties string.
*/
- const std::string& GetInputOutlineProperties() const;
+ std::string GetInputOutlineProperties() const;
/**
* @brief Sets the input strikethrough's properties string.
*
* @return The strikethrough's properties string.
*/
- const std::string& GetInputStrikethroughProperties() const;
+ std::string GetInputStrikethroughProperties() const;
/**
* @brief Set the control's interface.
{
namespace
{
-const std::string NONE("none");
-const std::string MULTIPLY("multiply");
+const char* MULTIPLY = "multiply";
} // namespace
void ProcessEmbeddedItem(const Tag& tag, EmbeddedItem& embeddedItem)
{
namespace
{
-const std::string FONT_PREFIX("font-");
-const unsigned int FONT_PREFIX_LENGTH = 5u;
-const unsigned int MIN_FONT_ATTRIBUTE_SIZE = 4u; ///< The minimum length of any of the possible 'weight', 'width' , 'slant' or 'size' values.
const unsigned int MAX_FONT_ATTRIBUTE_SIZE = 15u; ///< The maximum length of any of the possible 'weight', 'width' or 'slant' values.
const float PIXEL_FORMAT_64_FACTOR = 64.f; ///< 64.f is used to convert from point size to 26.6 pixel format.
} // namespace
const char* const HEX_COLOR_TOKEN("0x");
const char* const ALPHA_ONE("FF");
-const std::string BLACK_COLOR("black");
-const std::string WHITE_COLOR("white");
-const std::string RED_COLOR("red");
-const std::string GREEN_COLOR("green");
-const std::string BLUE_COLOR("blue");
-const std::string YELLOW_COLOR("yellow");
-const std::string MAGENTA_COLOR("magenta");
-const std::string CYAN_COLOR("cyan");
-const std::string TRANSPARENT_COLOR("transparent");
-
-const std::string SOLID_UNDERLINE("solid");
-const std::string DASHED_UNDERLINE("dashed");
-const std::string DOUBLE_UNDERLINE("double");
-
-const std::string BEGIN_HORIZONTAL_ALIGNMENT("begin");
-const std::string CENTER_HORIZONTAL_ALIGNMENT("center");
-const std::string END_HORIZONTAL_ALIGNMENT("end");
+const char* BLACK_COLOR("black");
+const char* WHITE_COLOR("white");
+const char* RED_COLOR("red");
+const char* GREEN_COLOR("green");
+const char* BLUE_COLOR("blue");
+const char* YELLOW_COLOR("yellow");
+const char* MAGENTA_COLOR("magenta");
+const char* CYAN_COLOR("cyan");
+const char* TRANSPARENT_COLOR("transparent");
+
+const char* SOLID_UNDERLINE("solid");
+const char* DASHED_UNDERLINE("dashed");
+const char* DOUBLE_UNDERLINE("double");
+
+const char* BEGIN_HORIZONTAL_ALIGNMENT("begin");
+const char* CENTER_HORIZONTAL_ALIGNMENT("center");
+const char* END_HORIZONTAL_ALIGNMENT("end");
} // namespace
{
namespace
{
-const std::string COLOR_KEY("color");
-const std::string OFFSET_KEY("offset");
-const std::string BLUR_RADIUS_KEY("blurRadius");
-const std::string WIDTH_KEY("width");
-const std::string HEIGHT_KEY("height");
-const std::string ENABLE_KEY("enable");
-const std::string TYPE_KEY("type");
-const std::string DASH_WIDTH_KEY("dashWidth");
-const std::string DASH_GAP_KEY("dashGap");
-const std::string TRUE_TOKEN("true");
-const std::string FALSE_TOKEN("false");
+const char* COLOR_KEY = "color";
+const char* OFFSET_KEY = "offset";
+const char* BLUR_RADIUS_KEY = "blurRadius";
+const char* WIDTH_KEY = "width";
+const char* HEIGHT_KEY = "height";
+const char* ENABLE_KEY = "enable";
+const char* TYPE_KEY = "type";
+const char* DASH_WIDTH_KEY = "dashWidth";
+const char* DASH_GAP_KEY = "dashGap";
+const char* TRUE_TOKEN = "true";
} // namespace
bool ParseShadowProperties(const Property::Map& shadowPropertiesMap,
{
namespace
{
-const std::string STYLE_KEY("style");
-const std::string WEIGHT_KEY("weight");
-const std::string WIDTH_KEY("width");
-const std::string SLANT_KEY("slant");
-const std::string FAMILY_KEY("family");
-const std::string TYPE_KEY("type");
-
-const std::string SYSTEM_TOKEN("system");
+const char* WEIGHT_KEY = "weight";
+const char* WIDTH_KEY = "width";
+const char* SLANT_KEY = "slant";
+const char* FAMILY_KEY = "family";
+const char* TYPE_KEY = "type";
+
+const char* SYSTEM_TOKEN = "system";
} // namespace