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
Allow text-selection scroll indicator to have a different style
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
controls
/
text-controls
/
text-selection-toolbar-impl.h
diff --git
a/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h
b/dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h
index
7309781
..
f5908bb
100644
(file)
--- a/
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h
+++ b/
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h
@@
-1,8
+1,8
@@
-#ifndef
__DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H__
-#define
__DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H__
+#ifndef
DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H
+#define
DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H
/*
/*
- * Copyright (c) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
7
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.
@@
-21,6
+21,7
@@
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
+#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/public-api/controls/table-view/table-view.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
#include <dali-toolkit/public-api/controls/table-view/table-view.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
@@
-36,11
+37,6
@@
namespace Toolkit
namespace Internal
{
namespace Internal
{
-namespace
-{
-
-} // namespace
-
class TextSelectionToolbar : public Control
{
public:
class TextSelectionToolbar : public Control
{
public:
@@
-89,6
+85,18
@@
public:
*/
void RaiseAbove( Layer target );
*/
void RaiseAbove( Layer target );
+ /**
+ * Sets the scroll bar padding.
+ *
+ * @param[in] padding The padding value.
+ */
+ void SetScrollBarPadding( const Vector2& padding );
+
+ /**
+ * @return The padding value.
+ */
+ const Vector2& GetScrollBarPadding() const;
+
private: // From Control
/**
private: // From Control
/**
@@
-102,11
+110,6
@@
private: // From Control
virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
/**
virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
/**
- * @copydoc Control::OnStageConnection()
- */
- virtual void OnStageConnection( int depth );
-
- /**
* @brief Set max size of Popup
* @param[in] maxSize Size (Vector2)
*/
* @brief Set max size of Popup
* @param[in] maxSize Size (Vector2)
*/
@@
-118,11
+121,17
@@
private: // From Control
*/
const Dali::Vector2& GetPopupMaxSize() const;
*/
const Dali::Vector2& GetPopupMaxSize() const;
+private: // Implementation
+
+ /**
+ * @copydoc Toolkit::TextSelectionToolbar::ConfigureScrollview()
+ */
+ void ConfigureScrollview( const Property::Map& properties );
+
/**
* @brief Set up scrollview to scroll Toolbar horizontally
/**
* @brief Set up scrollview to scroll Toolbar horizontally
- * @param[out] scrollView scrollview to setup
*/
*/
- void SetUpScrollView(
Toolkit::ScrollView& scrollView
);
+ void SetUpScrollView();
/**
* @brief Set up the parts that make the Toolbar
/**
* @brief Set up the parts that make the Toolbar
@@
-130,6
+139,13
@@
private: // From Control
void SetUp();
/**
void SetUp();
/**
+ * @brief Enable or disable the scroll-bar
+ *
+ * @param[in] enable True if the scroll-bar is required
+ */
+ void SetUpScrollBar( bool enable );
+
+ /**
* Toolbar has started to scroll
* @param[in] position current scroll view position
*/
* Toolbar has started to scroll
* @param[in] position current scroll view position
*/
@@
-141,8
+157,6
@@
private: // From Control
*/
void OnScrollCompleted( const Vector2& position );
*/
void OnScrollCompleted( const Vector2& position );
-private: // Implementation
-
/**
* Construct a new TextField.
*/
/**
* Construct a new TextField.
*/
@@
-161,14
+175,15
@@
private:
private: // Data
private: // Data
- Layer m
StencilLayer; ///< The stencil layer
+ Layer m
ToolbarLayer; ///< The layer used to house the toolbar.
Toolkit::TableView mTableOfButtons; ///< Actor which holds all the buttons, sensitivity can be set on buttons via this actor
Toolkit::ScrollView mScrollView; ///< Provides scrolling of Toolbar when content does not fit.
Toolkit::TableView mTableOfButtons; ///< Actor which holds all the buttons, sensitivity can be set on buttons via this actor
Toolkit::ScrollView mScrollView; ///< Provides scrolling of Toolbar when content does not fit.
+ Toolkit::ScrollBar mScrollBar; ///< An horizontal scroll bar for the text's popup options.
RulerPtr mRulerX; ///< Ruler to clamp horizontal scrolling. Updates on Relayout
Size mMaxSize; ///< Max size of the Toolbar
RulerPtr mRulerX; ///< Ruler to clamp horizontal scrolling. Updates on Relayout
Size mMaxSize; ///< Max size of the Toolbar
+ Vector2 mScrollBarPadding; ///< The padding used to position the scroll indicator.
unsigned int mIndexInTable; ///< Index in table to add option
Dali::Vector< unsigned int > mDividerIndexes; ///< Vector of indexes in the Toolbar that contain dividers.
unsigned int mIndexInTable; ///< Index in table to add option
Dali::Vector< unsigned int > mDividerIndexes; ///< Vector of indexes in the Toolbar that contain dividers.
-
};
} // namespace Internal
};
} // namespace Internal
@@
-197,4
+212,4
@@
inline const Toolkit::Internal::TextSelectionToolbar& GetImpl( const Toolkit::Te
} // namespace Dali
} // namespace Dali
-#endif //
__DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H__
+#endif //
DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H