#define DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
#include <dali-toolkit/devel-api/styling/style-manager-devel.h>
#include <dali-toolkit/internal/text/controller/text-controller.h>
#include <dali-toolkit/internal/text/input-style.h>
+#include <dali-toolkit/internal/text/multi-language-support.h>
#include <dali-toolkit/internal/text/text-model.h>
#include <dali-toolkit/internal/text/text-view.h>
#include <dali-toolkit/public-api/styling/style-manager.h>
mEmbossDefaults(NULL),
mOutlineDefaults(NULL),
mEventData(NULL),
+ mIdleCallback(NULL),
mFontClient(),
mClipboard(),
mView(),
mTextFitChanged(false),
mTextFitArrayEnabled(false),
mIsLayoutDirectionChanged(false),
- mIsUserInteractionEnabled(true)
+ mIsUserInteractionEnabled(true),
+ mProcessorRegistered(false),
+ mTextCutout(false)
{
mModel = Model::New();
}
/**
+ * @copydoc Text::Controller::ResetFontAndStyleData()
+ */
+ void ResetFontAndStyleData()
+ {
+ ClearFontData();
+ ClearStyleData();
+ RequestRelayout();
+ }
+
+ /**
* @brief Helper to move the cursor, grab handle etc.
*/
bool ProcessInputEvents();
return mClipboard != nullptr ? true : false;
}
- bool IsClipboardEmpty()
- {
- bool result(Clipboard::IsAvailable() && EnsureClipboardCreated() && mClipboard.NumberOfItems());
- return !result; // If NumberOfItems greater than 0, return false
- }
-
bool IsClipboardVisible()
{
bool result(Clipboard::IsAvailable() && EnsureClipboardCreated() && mClipboard.IsVisible());
}
/**
+ * @brief Whether the clipboard is empty or not.
+ * Checks the types that the text controller can paste and returns the result.
+ *
+ * @return Return whether or not the clipboard is empty.
+ */
+ bool IsClipboardEmpty();
+
+ /**
* @copydoc Controller::GetLayoutDirection()
*/
Dali::LayoutDirection::Type GetLayoutDirection(Dali::Actor& actor) const;
EmbossDefaults* mEmbossDefaults; ///< Avoid allocating this when the user does not specify emboss parameters.
OutlineDefaults* mOutlineDefaults; ///< Avoid allocating this when the user does not specify outline parameters.
EventData* mEventData; ///< Avoid allocating everything for text input until EnableTextInput().
+ CallbackBase* mIdleCallback; ///< Callback what would be called at idler
TextAbstraction::FontClient mFontClient; ///< Handle to the font client.
Clipboard mClipboard; ///< Handle to the system clipboard
View mView; ///< The view interface to the rendering back-end.
bool mTextFitArrayEnabled : 1; ///< Whether the text's fit array is enabled.
bool mIsLayoutDirectionChanged : 1; ///< Whether the layout has changed.
bool mIsUserInteractionEnabled : 1; ///< Whether the user interaction is enabled.
+ bool mProcessorRegistered : 1; ///< Whether the text controller registered into processor or not.
+ bool mTextCutout : 1; ///< Whether the text cutout enabled.
private:
friend ControllerImplEventHandler;