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
Reduce Cyclomatic Complexity of some methods in text-typesetter, transtion-data ...
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
controls
/
text-controls
/
text-label-impl.h
diff --git
a/dali-toolkit/internal/controls/text-controls/text-label-impl.h
b/dali-toolkit/internal/controls/text-controls/text-label-impl.h
index
bc2459f
..
a863c9c
100644
(file)
--- a/
dali-toolkit/internal/controls/text-controls/text-label-impl.h
+++ b/
dali-toolkit/internal/controls/text-controls/text-label-impl.h
@@
-2,7
+2,7
@@
#define DALI_TOOLKIT_INTERNAL_TEXT_LABEL_H
/*
#define DALI_TOOLKIT_INTERNAL_TEXT_LABEL_H
/*
- * Copyright (c) 20
17
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
@@
-18,6
+18,9
@@
*
*/
*
*/
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/property-map.h>
+
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
@@
-26,6
+29,8
@@
#include <dali-toolkit/internal/text/text-scroller-interface.h>
#include <dali-toolkit/internal/text/rendering/text-renderer.h>
#include <dali-toolkit/internal/text/text-scroller.h>
#include <dali-toolkit/internal/text/text-scroller-interface.h>
#include <dali-toolkit/internal/text/rendering/text-renderer.h>
#include <dali-toolkit/internal/text/text-scroller.h>
+#include <dali-toolkit/internal/visuals/text/text-visual.h>
+
namespace Dali
{
namespace Dali
{
@@
-73,41
+78,46
@@
private: // From Control
/**
* @copydoc Control::OnInitialize()
*/
/**
* @copydoc Control::OnInitialize()
*/
- v
irtual void OnInitialize()
;
+ v
oid OnInitialize() override
;
/**
* @copydoc Control::OnStyleChange()
*/
/**
* @copydoc Control::OnStyleChange()
*/
- v
irtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change )
;
+ v
oid OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override
;
/**
* @copydoc Control::OnRelayout()
*/
/**
* @copydoc Control::OnRelayout()
*/
- v
irtual void OnRelayout( const Vector2& size, RelayoutContainer& container )
;
+ v
oid OnRelayout( const Vector2& size, RelayoutContainer& container ) override
;
/**
* @copydoc Control::GetNaturalSize()
*/
/**
* @copydoc Control::GetNaturalSize()
*/
-
virtual Vector3 GetNaturalSize()
;
+
Vector3 GetNaturalSize() override
;
/**
* @copydoc Control::GetHeightForWidth()
*/
/**
* @copydoc Control::GetHeightForWidth()
*/
- virtual float GetHeightForWidth( float width );
+ float GetHeightForWidth( float width ) override;
+
+ /**
+ * @copydoc Control::OnPropertySet()
+ */
+ void OnPropertySet( Property::Index index, const Property::Value& propertyValue ) override ;
-// From ControlInterface
+
// From ControlInterface
/**
* @copydoc Text::ControlInterface::RequestTextRelayout()
*/
/**
* @copydoc Text::ControlInterface::RequestTextRelayout()
*/
- v
irtual void RequestTextRelayout()
;
+ v
oid RequestTextRelayout() override
;
private: // from TextScroller
/**
* @copydoc Text::ScrollerInterface::ScrollingFinished()
*/
private: // from TextScroller
/**
* @copydoc Text::ScrollerInterface::ScrollingFinished()
*/
- v
irtual void ScrollingFinished()
;
+ v
oid ScrollingFinished() override
;
private: // Implementation
private: // Implementation
@@
-127,27
+137,33
@@
private:
TextLabel(const TextLabel&);
TextLabel& operator=(const TextLabel& rhs);
TextLabel(const TextLabel&);
TextLabel& operator=(const TextLabel& rhs);
- // Connection needed to re-render text, when a Text Label returns to the stage
- void OnStageConnect( Dali::Actor actor );
-
/**
/**
- * @brief
Render view, create and attach actor(s) to this Text Label
+ * @brief
Set up Autoscrolling
*/
*/
- void
RenderText
();
+ void
SetUpAutoScrolling
();
/**
/**
- * @brief Set up Autoscrolling
+ * Creates a text-scroller if one has not been created.
+ * @return The text scroller.
*/
*/
- void SetUpAutoScrolling();
+ Text::TextScrollerPtr GetTextScroller()
+ {
+ if( !mTextScroller )
+ {
+ mTextScroller = Text::TextScroller::New( *this );
+ }
+ return mTextScroller;
+ }
private: // Data
Text::ControllerPtr mController;
private: // Data
Text::ControllerPtr mController;
- Text::RendererPtr mRenderer;
Text::TextScrollerPtr mTextScroller;
Text::TextScrollerPtr mTextScroller;
- Actor mRenderableActor;
+
+ Toolkit::Visual::Base mVisual;
+
int mRenderingBackend;
int mRenderingBackend;
- bool m
HasBeenStag
ed:1;
+ bool m
TextUpdateNeed
ed:1;
};
} // namespace Internal
};
} // namespace Internal