+ return found;
+}
+
+void StyleManager::ApplyStyle( Toolkit::Builder builder, Toolkit::Control control )
+{
+ std::string styleName = control.GetStyleName();
+ if( GetStyleNameForControl( builder, control, styleName ) )
+ {
+ builder.ApplyStyle( styleName, control );
+ }
+
+ if( mDefaultFontSize >= 0 )
+ {
+ // Apply the style for logical font size
+ std::stringstream fontSizeQualifier;
+ fontSizeQualifier << styleName << FONT_SIZE_QUALIFIER << mDefaultFontSize;
+ builder.ApplyStyle( fontSizeQualifier.str(), control );
+ }
+}
+
+const StylePtr StyleManager::GetRecordedStyle( Toolkit::Control control )
+{
+ if( mThemeBuilder )
+ {
+ std::string styleName = control.GetStyleName();
+
+ if( GetStyleNameForControl( mThemeBuilder, control, styleName ) )
+ {
+ const StylePtr style = GetImpl(mThemeBuilder).GetStyle( styleName );
+ return style;
+ }
+ }
+ return StylePtr(NULL);