namespace Toolkit
{
+const Property::Index TextView::PROPERTY_MARKUP_ENABLED( Internal::TextView::TEXTVIEW_PROPERTY_START_INDEX );
+
namespace Internal
{
SignalConnectorType signalConnector1( typeRegistration, Toolkit::TextView::SIGNAL_TEXT_SCROLLED , &TextView::DoConnectSignal );
+PropertyRegistration property1( typeRegistration, "markup-enabled", Toolkit::TextView::PROPERTY_MARKUP_ENABLED, Property::BOOLEAN, &TextView::SetProperty, &TextView::GetProperty );
+
/**
* Whether the text-view-processor operation sets, inserts, replaces, removes text.
*
}
}
+void TextView::SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
+{
+ Toolkit::TextView textView = Toolkit::TextView::DownCast( Dali::BaseHandle( object ) );
+
+ if ( textView && ( index == Toolkit::TextView::PROPERTY_MARKUP_ENABLED ) )
+ {
+ Internal::TextView& textViewImpl( GetImpl( textView ) );
+ bool newValue( value.Get<bool>() );
+ textViewImpl.SetMarkupProcessingEnabled( newValue );
+ if( newValue )
+ {
+ const std::string& currentText( textViewImpl.GetText() );
+ if( ! currentText.empty() )
+ {
+ textViewImpl.SetText( currentText );
+ }
+ }
+ }
+}
+
+Property::Value TextView::GetProperty( BaseObject* object, Property::Index propertyIndex )
+{
+ Toolkit::TextView textView = Toolkit::TextView::DownCast( Dali::BaseHandle( object ) );
+
+ if ( textView && ( propertyIndex == Toolkit::TextView::PROPERTY_MARKUP_ENABLED ) )
+ {
+ return Property::Value( GetImpl( textView ).mMarkUpEnabled );
+ }
+
+ return Property::Value();
+}
+
} // namespace Internal
} // namespace Toolkit
{
public:
+ // Properties
+ enum
+ {
+ TEXTVIEW_PROPERTY_START_INDEX = ControlImpl::CONTROL_PROPERTY_END_INDEX + 1,
+ TEXTVIEW_PROPERTY_END_INDEX = TEXTVIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
+ };
+
/**
* Internal exceed policy with the valid combinations.
*/
*/
static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+ // Properties
+
+ /**
+ * Called when a property of an object of this type is set.
+ * @param[in] object The object whose property is set.
+ * @param[in] index The property index.
+ * @param[in] value The new property value.
+ */
+ static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
+
+ /**
+ * Called to retrieve a property of an object of this type.
+ * @param[in] object The object whose property is to be retrieved.
+ * @param[in] index The property index.
+ * @return The current value of the property.
+ */
+ static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+
+
private: // From ControlImpl
/**