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
Support span tag: background
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
text-controller-text-updater.cpp
diff --git
a/dali-toolkit/internal/text/text-controller-text-updater.cpp
b/dali-toolkit/internal/text/text-controller-text-updater.cpp
index
75ea73c
..
0b24bc0
100644
(file)
--- a/
dali-toolkit/internal/text/text-controller-text-updater.cpp
+++ b/
dali-toolkit/internal/text/text-controller-text-updater.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 202
1
Samsung Electronics Co., Ltd.
+ * Copyright (c) 202
2
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-26,6
+26,7
@@
#include <dali-toolkit/internal/text/character-set-conversion.h>
#include <dali-toolkit/internal/text/markup-processor.h>
#include <dali-toolkit/internal/text/text-controller-impl.h>
#include <dali-toolkit/internal/text/character-set-conversion.h>
#include <dali-toolkit/internal/text/markup-processor.h>
#include <dali-toolkit/internal/text/text-controller-impl.h>
+#include <dali-toolkit/internal/text/text-controller-placeholder-handler.h>
#include <dali-toolkit/internal/text/text-editable-control-interface.h>
namespace
#include <dali-toolkit/internal/text/text-editable-control-interface.h>
namespace
@@
-55,7
+56,7
@@
void Controller::TextUpdater::SetText(Controller& controller, const std::string&
ResetText(controller);
// Remove the style.
ResetText(controller);
// Remove the style.
-
controller
.ClearStyleData();
+
impl
.ClearStyleData();
CharacterIndex lastCursorIndex = 0u;
CharacterIndex lastCursorIndex = 0u;
@@
-89,7
+90,9
@@
void Controller::TextUpdater::SetText(Controller& controller, const std::string&
logicalModel->mEmbeddedItems,
logicalModel->mAnchors,
logicalModel->mUnderlinedCharacterRuns,
logicalModel->mEmbeddedItems,
logicalModel->mAnchors,
logicalModel->mUnderlinedCharacterRuns,
- logicalModel->mBackgroundColorRuns);
+ logicalModel->mBackgroundColorRuns,
+ logicalModel->mStrikethroughCharacterRuns,
+ logicalModel->mBoundedParagraphRuns);
Length textSize = 0u;
const uint8_t* utf8 = NULL;
Length textSize = 0u;
const uint8_t* utf8 = NULL;
@@
-141,7
+144,7
@@
void Controller::TextUpdater::SetText(Controller& controller, const std::string&
}
else
{
}
else
{
-
controller.ShowPlaceholderText(
);
+
PlaceholderHandler::ShowPlaceholderText(impl
);
}
unsigned int oldCursorPos = (nullptr != eventData ? eventData->mPrimaryCursorPosition : 0);
}
unsigned int oldCursorPos = (nullptr != eventData ? eventData->mPrimaryCursorPosition : 0);
@@
-150,7
+153,7
@@
void Controller::TextUpdater::SetText(Controller& controller, const std::string&
controller.ResetCursorPosition(lastCursorIndex);
// Scrolls the text to make the cursor visible.
controller.ResetCursorPosition(lastCursorIndex);
// Scrolls the text to make the cursor visible.
-
controller
.ResetScrollPosition();
+
impl
.ResetScrollPosition();
impl.RequestRelayout();
impl.RequestRelayout();
@@
-350,7
+353,7
@@
void Controller::TextUpdater::InsertText(Controller& controller, const std::stri
if(addFontSizeRun)
{
if(addFontSizeRun)
{
- fontDescriptionRun.size = static_cast<PointSize26Dot6>(inputStyle.size * impl.
mFontSizeScale
* 64.f);
+ fontDescriptionRun.size = static_cast<PointSize26Dot6>(inputStyle.size * impl.
GetFontSizeScale()
* 64.f);
fontDescriptionRun.sizeDefined = true;
}
fontDescriptionRun.sizeDefined = true;
}
@@
-405,7
+408,7
@@
void Controller::TextUpdater::InsertText(Controller& controller, const std::stri
impl.IsPlaceholderAvailable())
{
// Show place-holder if empty after removing the pre-edit text
impl.IsPlaceholderAvailable())
{
// Show place-holder if empty after removing the pre-edit text
-
controller.ShowPlaceholderText(
);
+
PlaceholderHandler::ShowPlaceholderText(impl
);
eventData->mUpdateCursorPosition = true;
impl.ClearPreEditFlag();
}
eventData->mUpdateCursorPosition = true;
impl.ClearPreEditFlag();
}