New with additional behavior flag for some Controls
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / text-controls / text-label.cpp
index 66710a1..6591d8d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,6 +38,19 @@ TextLabel TextLabel::New(const std::string& text)
   return label;
 }
 
+TextLabel TextLabel::New(ControlBehaviour additionalBehaviour)
+{
+  return Internal::TextLabel::New(static_cast<Toolkit::Internal::Control::ControlBehaviour>(additionalBehaviour));
+}
+
+TextLabel TextLabel::New(ControlBehaviour additionalBehaviour, const std::string& text)
+{
+  TextLabel label = Internal::TextLabel::New(static_cast<Toolkit::Internal::Control::ControlBehaviour>(additionalBehaviour));
+  label.SetProperty(TextLabel::Property::TEXT, text);
+
+  return label;
+}
+
 TextLabel::TextLabel()
 {
 }