projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(TextController) Reformatted to reduce LOC
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
text-controller.h
diff --git
a/dali-toolkit/internal/text/text-controller.h
b/dali-toolkit/internal/text/text-controller.h
index
109be1a
..
3240384
100644
(file)
--- a/
dali-toolkit/internal/text/text-controller.h
+++ b/
dali-toolkit/internal/text/text-controller.h
@@
-35,11
+35,7
@@
#include <dali-toolkit/internal/text/text-selectable-control-interface.h>
#include <dali-toolkit/public-api/text/text-enumerations.h>
#include <dali-toolkit/internal/text/text-selectable-control-interface.h>
#include <dali-toolkit/public-api/text/text-enumerations.h>
-namespace Dali
-{
-namespace Toolkit
-{
-namespace Text
+namespace Dali::Toolkit::Text
{
class Controller;
class ControlInterface;
{
class Controller;
class ControlInterface;
@@
-170,7
+166,10
@@
public: // Constructor.
*
* @return A pointer to a new Controller.
*/
*
* @return A pointer to a new Controller.
*/
- static ControllerPtr New();
+ static ControllerPtr New()
+ {
+ return ControllerPtr(new Controller());
+ }
/**
* @brief Create a new instance of a Controller.
/**
* @brief Create a new instance of a Controller.
@@
-179,7
+178,10
@@
public: // Constructor.
*
* @return A pointer to a new Controller.
*/
*
* @return A pointer to a new Controller.
*/
- static ControllerPtr New(ControlInterface* controlInterface);
+ static ControllerPtr New(ControlInterface* controlInterface)
+ {
+ return ControllerPtr(new Controller(controlInterface));
+ }
/**
* @brief Create a new instance of a Controller.
/**
* @brief Create a new instance of a Controller.
@@
-194,7
+196,13
@@
public: // Constructor.
static ControllerPtr New(ControlInterface* controlInterface,
EditableControlInterface* editableControlInterface,
SelectableControlInterface* selectableControlInterface,
static ControllerPtr New(ControlInterface* controlInterface,
EditableControlInterface* editableControlInterface,
SelectableControlInterface* selectableControlInterface,
- AnchorControlInterface* anchorControlInterface);
+ AnchorControlInterface* anchorControlInterface)
+ {
+ return ControllerPtr(new Controller(controlInterface,
+ editableControlInterface,
+ selectableControlInterface,
+ anchorControlInterface));
+ }
public: // Configure the text controller.
/**
public: // Configure the text controller.
/**
@@
-1633,6
+1641,21
@@
public: // Text-input Event Queuing.
void SelectWholeText();
/**
void SelectWholeText();
/**
+ * @copydoc Text::EditableControlInterface::CopyText()
+ */
+ string CopyText();
+
+ /**
+ * @copydoc Text::EditableControlInterface::CutText()
+ */
+ string CutText();
+
+ /**
+ * @copydoc Text::EditableControlInterface::PasteText()
+ */
+ void PasteText();
+
+ /**
* @copydoc Text::SelectableControlInterface::SelectNone()
*/
void SelectNone();
* @copydoc Text::SelectableControlInterface::SelectNone()
*/
void SelectNone();
@@
-1751,8
+1774,7
@@
private: // Update.
void InsertText(const std::string& text, InsertType type);
/**
void InsertText(const std::string& text, InsertType type);
/**
- * @brief Paste given string into Text model
- * @param[in] stringToPaste this string will be inserted into the text model
+ * @copydoc Text::EditableControlInterface::PasteText()
*/
void PasteText(const std::string& stringToPaste);
*/
void PasteText(const std::string& stringToPaste);
@@
-1883,12
+1905,18
@@
private: // Private contructors & copy operator.
/**
* @brief Private constructor.
*/
/**
* @brief Private constructor.
*/
- Controller();
+ Controller()
+ : Controller(nullptr, nullptr, nullptr, nullptr)
+ {
+ }
/**
* @brief Private constructor.
*/
/**
* @brief Private constructor.
*/
- Controller(ControlInterface* controlInterface);
+ Controller(ControlInterface* controlInterface)
+ : Controller(controlInterface, nullptr, nullptr, nullptr)
+ {
+ }
/**
* @brief Private constructor.
/**
* @brief Private constructor.
@@
-1898,11
+1926,8
@@
private: // Private contructors & copy operator.
SelectableControlInterface* selectableControlInterface,
AnchorControlInterface* anchorControlInterface);
SelectableControlInterface* selectableControlInterface,
AnchorControlInterface* anchorControlInterface);
- // Undefined
- Controller(const Controller& handle);
-
- // Undefined
- Controller& operator=(const Controller& handle);
+ Controller(const Controller& handle) = delete;
+ Controller& operator=(const Controller& handle) = delete;
protected: // Destructor.
/**
protected: // Destructor.
/**
@@
-1923,10
+1948,6
@@
private:
Impl* mImpl;
};
Impl* mImpl;
};
-} // namespace Text
-
-} // namespace Toolkit
-
-} // namespace Dali
+} // namespace Dali::Toolkit::Text
#endif // DALI_TOOLKIT_TEXT_CONTROLLER_H
#endif // DALI_TOOLKIT_TEXT_CONTROLLER_H