/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
}
else
{
- DALI_LOG_WARNING( "Attempted AutoScrolling on a non SINGLE_LINE_BOX, request ignored" );
+ DALI_LOG_WARNING( "Attempted AutoScrolling on a non SINGLE_LINE_BOX, request ignored\n" );
mImpl->mAutoScrollEnabled = false;
}
}
mImpl->mFontDefaults->mFontDescription.family = defaultFontFamily;
DALI_LOG_INFO( gLogFilter, Debug::General, "Controller::SetDefaultFontFamily %s\n", defaultFontFamily.c_str());
- mImpl->mFontDefaults->familyDefined = true;
+ mImpl->mFontDefaults->familyDefined = !defaultFontFamily.empty();
// Clear the font-specific data
ClearFontData();
return EMPTY_STRING;
}
-void Controller::SetDefaultFontStyle( const std::string& style )
-{
- if( NULL == mImpl->mFontDefaults )
- {
- mImpl->mFontDefaults = new FontDefaults();
- }
-
- mImpl->mFontDefaults->mFontStyle = style;
-}
-
-const std::string& Controller::GetDefaultFontStyle() const
-{
- if( NULL != mImpl->mFontDefaults )
- {
- return mImpl->mFontDefaults->mFontStyle;
- }
-
- return EMPTY_STRING;
-}
-
void Controller::SetDefaultFontWeight( FontWeight weight )
{
if( NULL == mImpl->mFontDefaults )
mImpl->RequestRelayout();
}
+bool Controller::IsDefaultFontWeightDefined() const
+{
+ return mImpl->mFontDefaults->weightDefined;
+}
+
FontWeight Controller::GetDefaultFontWeight() const
{
if( NULL != mImpl->mFontDefaults )
mImpl->RequestRelayout();
}
+bool Controller::IsDefaultFontWidthDefined() const
+{
+ return mImpl->mFontDefaults->widthDefined;
+}
+
FontWidth Controller::GetDefaultFontWidth() const
{
if( NULL != mImpl->mFontDefaults )
mImpl->RequestRelayout();
}
+bool Controller::IsDefaultFontSlantDefined() const
+{
+ return mImpl->mFontDefaults->slantDefined;
+}
+
FontSlant Controller::GetDefaultFontSlant() const
{
if( NULL != mImpl->mFontDefaults )
void Controller::UpdateAfterFontChange( const std::string& newDefaultFont )
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::UpdateAfterFontChange");
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::UpdateAfterFontChange\n");
if( !mImpl->mFontDefaults->familyDefined ) // If user defined font then should not update when system font changes
{
return GetDefaultFontFamily();
}
-void Controller::SetInputFontStyle( const std::string& fontStyle )
-{
- if( NULL != mImpl->mEventData )
- {
- mImpl->mEventData->mInputStyle.fontStyle = fontStyle;
- }
-}
-
-const std::string& Controller::GetInputFontStyle() const
-{
- if( NULL != mImpl->mEventData )
- {
- return mImpl->mEventData->mInputStyle.fontStyle;
- }
-
- // Return the default font's style if there is no EventData.
- return GetDefaultFontStyle();
-}
-
void Controller::SetInputFontWeight( FontWeight weight )
{
if( NULL != mImpl->mEventData )
}
}
+bool Controller::IsInputFontWeightDefined() const
+{
+ bool defined = false;
+
+ if( NULL != mImpl->mEventData )
+ {
+ defined = mImpl->mEventData->mInputStyle.weightDefined;
+ }
+
+ return defined;
+}
+
FontWeight Controller::GetInputFontWeight() const
{
if( NULL != mImpl->mEventData )
}
}
+bool Controller::IsInputFontWidthDefined() const
+{
+ bool defined = false;
+
+ if( NULL != mImpl->mEventData )
+ {
+ defined = mImpl->mEventData->mInputStyle.widthDefined;
+ }
+
+ return defined;
+}
+
FontWidth Controller::GetInputFontWidth() const
{
if( NULL != mImpl->mEventData )
}
}
+bool Controller::IsInputFontSlantDefined() const
+{
+ bool defined = false;
+
+ if( NULL != mImpl->mEventData )
+ {
+ defined = mImpl->mEventData->mInputStyle.slantDefined;
+ }
+
+ return defined;
+}
+
FontSlant Controller::GetInputFontSlant() const
{
if( NULL != mImpl->mEventData )
mImpl->ChangeState( EventData::EDITING );
mImpl->mEventData->mUpdateCursorPosition = true; //If editing started without tap event, cursor update must be triggered.
}
-
+ mImpl->NotifyImfMultiLineStatus();
if( mImpl->IsShowingPlaceholderText() )
{
// Show alternative placeholder-text when editing
{
if( !mImpl->mEventData->mPreEditFlag )
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Entered PreEdit state" );
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Entered PreEdit state\n" );
// Record the start of the pre-edit text
mImpl->mEventData->mPreEditStartPosition = mImpl->mEventData->mPrimaryCursorPosition;