2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/public-api/controls/control-impl.h>
23 #include <dali/public-api/actors/image-actor.h>
24 #include <dali/public-api/animation/active-constraint.h>
25 #include <dali/public-api/animation/constraint.h>
26 #include <dali/public-api/animation/constraints.h>
27 #include <dali/public-api/object/type-registry.h>
28 #include <dali/public-api/object/type-registry-helper.h>
29 #include <dali/public-api/scripting/scripting.h>
30 #include <dali/public-api/size-negotiation/relayout-container.h>
31 #include <dali/integration-api/debug.h>
34 #include <dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h>
35 #include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
36 #include <dali-toolkit/public-api/controls/control.h>
37 #include <dali-toolkit/public-api/styling/style-manager.h>
38 #include <dali-toolkit/internal/styling/style-manager-impl.h>
49 #if defined(DEBUG_ENABLED)
50 Integration::Log::Filter* gLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_CONTROL");
53 const float MAX_FLOAT_VALUE( std::numeric_limits<float>::max() );
54 const Vector3 MAX_SIZE( MAX_FLOAT_VALUE, MAX_FLOAT_VALUE, MAX_FLOAT_VALUE );
55 const float BACKGROUND_ACTOR_Z_POSITION( -0.1f );
59 return Internal::Control::New();
62 // Setup signals and actions using the type-registry.
63 DALI_TYPE_REGISTRATION_BEGIN( Control, CustomActor, Create );
65 // Note: Properties are registered separately below,
67 DALI_SIGNAL_REGISTRATION( Control, "key-event", SIGNAL_KEY_EVENT )
68 DALI_SIGNAL_REGISTRATION( Control, "tapped", SIGNAL_TAPPED )
69 DALI_SIGNAL_REGISTRATION( Control, "panned", SIGNAL_PANNED )
70 DALI_SIGNAL_REGISTRATION( Control, "pinched", SIGNAL_PINCHED )
71 DALI_SIGNAL_REGISTRATION( Control, "long-pressed", SIGNAL_LONG_PRESSED )
73 DALI_ACTION_REGISTRATION( Control, "control-activated", ACTION_CONTROL_ACTIVATED )
75 DALI_TYPE_REGISTRATION_END()
78 * Structure which holds information about the background of a control
82 Actor actor; ///< Either a MeshActor or an ImageActor
83 Vector4 color; ///< The color of the actor.
97 * Sets all the required properties for the background actor.
99 * @param[in] actor The actor to set the properties on.
100 * @param[in] constrainingIndex The property index to constrain the parent's size on.
101 * @param[in] color The required color of the actor.
103 void SetupBackgroundActor( Actor actor, Property::Index constrainingIndex, const Vector4& color )
105 actor.SetColor( color );
106 actor.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
107 actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
108 actor.SetZ( BACKGROUND_ACTOR_Z_POSITION );
109 actor.SetRelayoutEnabled( true );
110 actor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
113 } // unnamed namespace
118 class Control::Impl : public ConnectionTracker
123 * Size indices for mMinMaxSize array
132 // Construction & Destruction
133 Impl(Control& controlImpl)
134 : mControlImpl( controlImpl ),
136 mStartingPinchScale( NULL ),
138 mPinchGestureDetector(),
139 mPanGestureDetector(),
140 mTapGestureDetector(),
141 mLongPressGestureDetector(),
144 mFlags( Control::CONTROL_BEHAVIOUR_NONE ),
145 mIsKeyboardNavigationSupported( false ),
146 mIsKeyboardFocusGroup( false ),
147 mInitialized( false )
153 // All gesture detectors will be destroyed so no need to disconnect.
155 delete mStartingPinchScale;
158 // Gesture Detection Methods
160 void PinchDetected(Actor actor, const PinchGesture& pinch)
162 mControlImpl.OnPinch(pinch);
165 void PanDetected(Actor actor, const PanGesture& pan)
167 mControlImpl.OnPan(pan);
170 void TapDetected(Actor actor, const TapGesture& tap)
172 mControlImpl.OnTap(tap);
175 void LongPressDetected(Actor actor, const LongPressGesture& longPress)
177 mControlImpl.OnLongPress(longPress);
180 // Background Methods
183 * Only creates an instance of the background if we actually use it.
184 * @return A reference to the Background structure.
186 Background& GetBackground()
190 mBackground = new Background;
198 * Called when a property of an object of this type is set.
199 * @param[in] object The object whose property is set.
200 * @param[in] index The property index.
201 * @param[in] value The new property value.
203 static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
205 Toolkit::Control control = Toolkit::Control::DownCast( BaseHandle( object ) );
209 Control& controlImpl( control.GetImplementation() );
213 case Toolkit::Control::Property::BACKGROUND_COLOR:
215 controlImpl.SetBackgroundColor( value.Get< Vector4 >() );
219 case Toolkit::Control::Property::BACKGROUND_IMAGE:
221 if ( value.HasKey( "image" ) )
223 Property::Map imageMap = value.GetValue( "image" ).Get< Property::Map >();
224 Image image = Scripting::NewImage( imageMap );
228 controlImpl.SetBackgroundImage( image );
231 else if ( value.Get< Property::Map >().Empty() )
233 // An empty map means the background is no longer required
234 controlImpl.ClearBackground();
239 case Toolkit::Control::Property::KEY_INPUT_FOCUS:
241 if ( value.Get< bool >() )
243 controlImpl.SetKeyInputFocus();
247 controlImpl.ClearKeyInputFocus();
256 * Called to retrieve a property of an object of this type.
257 * @param[in] object The object whose property is to be retrieved.
258 * @param[in] index The property index.
259 * @return The current value of the property.
261 static Property::Value GetProperty( BaseObject* object, Property::Index index )
263 Property::Value value;
265 Toolkit::Control control = Toolkit::Control::DownCast( BaseHandle( object ) );
269 Control& controlImpl( control.GetImplementation() );
273 case Toolkit::Control::Property::BACKGROUND_COLOR:
275 value = controlImpl.GetBackgroundColor();
279 case Toolkit::Control::Property::BACKGROUND_IMAGE:
283 Actor actor = controlImpl.GetBackgroundActor();
286 ImageActor imageActor = ImageActor::DownCast( actor );
289 Image image = imageActor.GetImage();
290 Property::Map imageMap;
291 Scripting::CreatePropertyMap( image, imageMap );
292 map[ "image" ] = imageMap;
300 case Toolkit::Control::Property::KEY_INPUT_FOCUS:
302 value = controlImpl.HasKeyInputFocus();
313 Control& mControlImpl;
314 Background* mBackground; ///< Only create the background if we use it
315 Vector3* mStartingPinchScale; ///< The scale when a pinch gesture starts, TODO: consider removing this
316 Toolkit::Control::KeyEventSignalType mKeyEventSignal;
319 PinchGestureDetector mPinchGestureDetector;
320 PanGestureDetector mPanGestureDetector;
321 TapGestureDetector mTapGestureDetector;
322 LongPressGestureDetector mLongPressGestureDetector;
323 // @todo change all these to Vector2 when we have a chance to sanitize the public API as well
324 Vector3 mCurrentSize; ///< Stores the current control's size, this is the negotiated size
325 Vector3 mNaturalSize; ///< Stores the size set through the Actor's API. This is size the actor wants to be. Useful when reset to the initial size is needed.
327 ControlBehaviour mFlags :6; ///< Flags passed in from constructor. Need to increase this size when new enums are added
328 bool mIsKeyboardNavigationSupported :1; ///< Stores whether keyboard navigation is supported by the control.
329 bool mIsKeyboardFocusGroup :1; ///< Stores whether the control is a focus group.
330 bool mInitialized :1;
332 // Properties - these need to be members of Internal::Control::Impl as they need to function within this class.
333 static PropertyRegistration PROPERTY_1;
334 static PropertyRegistration PROPERTY_2;
335 static PropertyRegistration PROPERTY_3;
338 // Properties registered without macro to use specific member variables.
339 PropertyRegistration Control::Impl::PROPERTY_1( typeRegistration, "background-color", Toolkit::Control::Property::BACKGROUND_COLOR, Property::VECTOR4, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
340 PropertyRegistration Control::Impl::PROPERTY_2( typeRegistration, "background-image", Toolkit::Control::Property::BACKGROUND_IMAGE, Property::MAP, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
341 PropertyRegistration Control::Impl::PROPERTY_3( typeRegistration, "key-input-focus", Toolkit::Control::Property::KEY_INPUT_FOCUS, Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
343 Toolkit::Control Control::New()
345 // Create the implementation, temporarily owned on stack
346 IntrusivePtr<Control> controlImpl = new Control( CONTROL_BEHAVIOUR_NONE );
348 // Pass ownership to handle
349 Toolkit::Control handle( *controlImpl );
351 // Second-phase init of the implementation
352 // This can only be done after the CustomActor connection has been made...
353 controlImpl->Initialize();
363 Vector3 Control::GetNaturalSize()
365 // could be overridden in derived classes.
366 return mImpl->mNaturalSize;
369 float Control::CalculateChildSize( const Dali::Actor& child, Dimension dimension )
371 // Could be overridden in derived classes.
372 return CalculateChildSizeBase( child, dimension );
375 bool Control::RelayoutDependentOnChildren( Dimension dimension )
377 return RelayoutDependentOnChildrenBase( dimension );
380 float Control::GetHeightForWidth( float width )
382 // could be overridden in derived classes.
383 float height( 0.0f );
384 if ( mImpl->mNaturalSize.width > 0.0f )
386 height = mImpl->mNaturalSize.height * width / mImpl->mNaturalSize.width;
391 float Control::GetWidthForHeight( float height )
393 // could be overridden in derived classes.
395 if ( mImpl->mNaturalSize.height > 0.0f )
397 width = mImpl->mNaturalSize.width * height / mImpl->mNaturalSize.height;
402 const Vector3& Control::GetControlSize() const
404 return mImpl->mCurrentSize;
407 const Vector3& Control::GetSizeSet() const
409 return mImpl->mNaturalSize;
412 void Control::SetKeyInputFocus()
414 if( Self().OnStage() )
416 Toolkit::KeyInputFocusManager::Get().SetFocus(Toolkit::Control::DownCast(Self()));
420 bool Control::HasKeyInputFocus()
423 if( Self().OnStage() )
425 result = Toolkit::KeyInputFocusManager::Get().IsKeyboardListener(Toolkit::Control::DownCast(Self()));
430 void Control::ClearKeyInputFocus()
432 if( Self().OnStage() )
434 Toolkit::KeyInputFocusManager::Get().RemoveFocus(Toolkit::Control::DownCast(Self()));
438 PinchGestureDetector Control::GetPinchGestureDetector() const
440 return mImpl->mPinchGestureDetector;
443 PanGestureDetector Control::GetPanGestureDetector() const
445 return mImpl->mPanGestureDetector;
448 TapGestureDetector Control::GetTapGestureDetector() const
450 return mImpl->mTapGestureDetector;
453 LongPressGestureDetector Control::GetLongPressGestureDetector() const
455 return mImpl->mLongPressGestureDetector;
458 void Control::SetBackgroundColor( const Vector4& color )
460 Background& background( mImpl->GetBackground() );
462 if ( background.actor )
464 // Just set the actor color
465 background.actor.SetColor( color );
468 background.color = color;
471 Vector4 Control::GetBackgroundColor() const
473 if ( mImpl->mBackground )
475 return mImpl->mBackground->color;
477 return Color::TRANSPARENT;
480 void Control::SetBackgroundImage( Image image )
482 Background& background( mImpl->GetBackground() );
484 if ( background.actor )
486 // Remove Current actor, unset AFTER removal so that we do not inform deriving classes
487 Self().Remove( background.actor );
488 background.actor.Reset();
491 ImageActor imageActor = ImageActor::New( image );
492 SetupBackgroundActor( imageActor, Actor::Property::SIZE, background.color );
494 // Set the background actor before adding so that we do not inform derived classes
495 background.actor = imageActor;
496 Self().Add( imageActor );
499 void Control::ClearBackground()
501 if ( mImpl->mBackground )
503 Background& background( mImpl->GetBackground() );
504 Self().Remove( background.actor );
506 delete mImpl->mBackground;
507 mImpl->mBackground = NULL;
511 Actor Control::GetBackgroundActor() const
513 if ( mImpl->mBackground )
515 return mImpl->mBackground->actor;
521 void Control::SetKeyboardNavigationSupport(bool isSupported)
523 mImpl->mIsKeyboardNavigationSupported = isSupported;
526 bool Control::IsKeyboardNavigationSupported()
528 return mImpl->mIsKeyboardNavigationSupported;
531 void Control::Activate()
533 // Inform deriving classes
537 bool Control::OnAccessibilityPan(PanGesture gesture)
539 return false; // Accessibility pan gesture is not handled by default
542 bool Control::OnAccessibilityTouch(const TouchEvent& touchEvent)
544 return false; // Accessibility touch event is not handled by default
547 bool Control::OnAccessibilityValueChange(bool isIncrease)
549 return false; // Accessibility value change action is not handled by default
552 void Control::SetAsKeyboardFocusGroup(bool isFocusGroup)
554 mImpl->mIsKeyboardFocusGroup = isFocusGroup;
556 // The following line will be removed when the deprecated API in KeyboardFocusManager is deleted
557 Toolkit::KeyboardFocusManager::Get().SetAsFocusGroup(Self(), isFocusGroup);
560 bool Control::IsKeyboardFocusGroup()
562 return Toolkit::KeyboardFocusManager::Get().IsFocusGroup(Self());
565 Actor Control::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
570 void Control::OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor)
574 bool Control::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
578 if( object && ( 0 == strcmp( actionName.c_str(), ACTION_CONTROL_ACTIVATED ) ) )
580 Toolkit::Control control = Toolkit::Control::DownCast( BaseHandle( object ) );
583 // if cast succeeds there is an implementation so no need to check
584 control.GetImplementation().OnActivated();
591 bool Control::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
593 Dali::BaseHandle handle( object );
595 bool connected( false );
596 Toolkit::Control control = Toolkit::Control::DownCast( handle );
599 Control& controlImpl( control.GetImplementation() );
602 if ( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_EVENT ) )
604 controlImpl.KeyEventSignal().Connect( tracker, functor );
606 else if( 0 == strcmp( signalName.c_str(), SIGNAL_TAPPED ) )
608 controlImpl.EnableGestureDetection( Gesture::Tap );
609 controlImpl.GetTapGestureDetector().DetectedSignal().Connect( tracker, functor );
611 else if( 0 == strcmp( signalName.c_str(), SIGNAL_PANNED ) )
613 controlImpl.EnableGestureDetection( Gesture::Pan );
614 controlImpl.GetPanGestureDetector().DetectedSignal().Connect( tracker, functor );
616 else if( 0 == strcmp( signalName.c_str(), SIGNAL_PINCHED ) )
618 controlImpl.EnableGestureDetection( Gesture::Pinch );
619 controlImpl.GetPinchGestureDetector().DetectedSignal().Connect( tracker, functor );
621 else if( 0 == strcmp( signalName.c_str(), SIGNAL_LONG_PRESSED ) )
623 controlImpl.EnableGestureDetection( Gesture::LongPress );
624 controlImpl.GetLongPressGestureDetector().DetectedSignal().Connect( tracker, functor );
628 // signalName does not match any signal
635 Toolkit::Control::KeyEventSignalType& Control::KeyEventSignal()
637 return mImpl->mKeyEventSignal;
640 bool Control::EmitKeyEventSignal( const KeyEvent& event )
642 // Guard against destruction during signal emission
643 Dali::Toolkit::Control handle( GetOwner() );
645 bool consumed = false;
647 // signals are allocated dynamically when someone connects
648 if ( !mImpl->mKeyEventSignal.Empty() )
650 consumed = mImpl->mKeyEventSignal.Emit( handle, event );
655 // Notification for derived classes
656 consumed = OnKeyEvent(event);
662 Control::Control( ControlBehaviour behaviourFlags )
663 : CustomActorImpl( behaviourFlags & REQUIRES_TOUCH_EVENTS ),
664 mImpl(new Impl(*this))
666 mImpl->mFlags = behaviourFlags;
669 void Control::Initialize()
671 // Calling deriving classes
674 // Test if the no size negotiation flag is not set
675 if( ( mImpl->mFlags & NO_SIZE_NEGOTIATION ) == 0 )
677 // Size negotiate disabled by default, so turn it on for this actor
678 Self().SetRelayoutEnabled( true );
681 if( mImpl->mFlags & REQUIRES_STYLE_CHANGE_SIGNALS )
683 Toolkit::StyleManager styleManager = Toolkit::StyleManager::Get();
685 // Register for style changes
686 styleManager.StyleChangeSignal().Connect( this, &Control::DoStyleChange );
689 GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
692 SetRequiresHoverEvents(mImpl->mFlags & REQUIRES_HOVER_EVENTS);
693 SetRequiresMouseWheelEvents(mImpl->mFlags & REQUIRES_MOUSE_WHEEL_EVENTS);
695 mImpl->mInitialized = true;
698 void Control::EnableGestureDetection(Gesture::Type type)
700 if ( (type & Gesture::Pinch) && !mImpl->mPinchGestureDetector )
702 mImpl->mPinchGestureDetector = PinchGestureDetector::New();
703 mImpl->mPinchGestureDetector.DetectedSignal().Connect(mImpl, &Impl::PinchDetected);
704 mImpl->mPinchGestureDetector.Attach(Self());
707 if ( (type & Gesture::Pan) && !mImpl->mPanGestureDetector )
709 mImpl->mPanGestureDetector = PanGestureDetector::New();
710 mImpl->mPanGestureDetector.DetectedSignal().Connect(mImpl, &Impl::PanDetected);
711 mImpl->mPanGestureDetector.Attach(Self());
714 if ( (type & Gesture::Tap) && !mImpl->mTapGestureDetector )
716 mImpl->mTapGestureDetector = TapGestureDetector::New();
717 mImpl->mTapGestureDetector.DetectedSignal().Connect(mImpl, &Impl::TapDetected);
718 mImpl->mTapGestureDetector.Attach(Self());
721 if ( (type & Gesture::LongPress) && !mImpl->mLongPressGestureDetector )
723 mImpl->mLongPressGestureDetector = LongPressGestureDetector::New();
724 mImpl->mLongPressGestureDetector.DetectedSignal().Connect(mImpl, &Impl::LongPressDetected);
725 mImpl->mLongPressGestureDetector.Attach(Self());
729 void Control::DisableGestureDetection(Gesture::Type type)
731 if ( (type & Gesture::Pinch) && mImpl->mPinchGestureDetector )
733 mImpl->mPinchGestureDetector.Detach(Self());
734 mImpl->mPinchGestureDetector.Reset();
737 if ( (type & Gesture::Pan) && mImpl->mPanGestureDetector )
739 mImpl->mPanGestureDetector.Detach(Self());
740 mImpl->mPanGestureDetector.Reset();
743 if ( (type & Gesture::Tap) && mImpl->mTapGestureDetector )
745 mImpl->mTapGestureDetector.Detach(Self());
746 mImpl->mTapGestureDetector.Reset();
749 if ( (type & Gesture::LongPress) && mImpl->mLongPressGestureDetector)
751 mImpl->mLongPressGestureDetector.Detach(Self());
752 mImpl->mLongPressGestureDetector.Reset();
756 void Control::OnInitialize()
760 void Control::OnActivated()
764 void Control::OnThemeChange( Toolkit::StyleManager styleManager )
766 GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
769 void Control::OnFontChange( bool defaultFontChange, bool defaultFontSizeChange )
773 void Control::OnPinch(const PinchGesture& pinch)
775 if( !( mImpl->mStartingPinchScale ) )
778 mImpl->mStartingPinchScale = new Vector3;
781 if( pinch.state == Gesture::Started )
783 *( mImpl->mStartingPinchScale ) = Self().GetCurrentScale();
786 Self().SetScale( *( mImpl->mStartingPinchScale ) * pinch.scale );
789 void Control::OnPan( const PanGesture& pan )
793 void Control::OnTap(const TapGesture& tap)
797 void Control::OnLongPress( const LongPressGesture& longPress )
801 void Control::OnControlStageConnection()
805 void Control::OnControlStageDisconnection()
809 void Control::OnControlChildAdd( Actor& child )
813 void Control::OnControlChildRemove( Actor& child )
817 void Control::OnControlSizeSet( const Vector3& size )
821 void Control::OnCalculateRelayoutSize( Dimension dimension )
825 void Control::OnLayoutNegotiated( float size, Dimension dimension )
829 void Control::OnRelayout( const Vector2& size, RelayoutContainer& container )
831 for( unsigned int i = 0, numChildren = Self().GetChildCount(); i < numChildren; ++i )
833 container.Add( Self().GetChildAt( i ), size );
837 void Control::OnSetResizePolicy( ResizePolicy policy, Dimension dimension )
841 void Control::OnKeyInputFocusGained()
846 void Control::OnKeyInputFocusLost()
851 void Control::OnSizeAnimation(Animation& animation, const Vector3& targetSize)
853 // @todo consider animating negotiated child sizes to target size
856 bool Control::OnTouchEvent(const TouchEvent& event)
858 return false; // Do not consume
861 bool Control::OnHoverEvent(const HoverEvent& event)
863 return false; // Do not consume
866 bool Control::OnKeyEvent(const KeyEvent& event)
868 return false; // Do not consume
871 bool Control::OnMouseWheelEvent(const MouseWheelEvent& event)
873 return false; // Do not consume
876 void Control::OnStageConnection()
878 // Notify derived classes.
879 OnControlStageConnection();
882 void Control::OnStageDisconnection()
884 // Notify derived classes
885 OnControlStageDisconnection();
888 void Control::OnChildAdd(Actor& child)
890 // If this is the background actor, then we do not want to relayout or inform deriving classes
891 if ( mImpl->mBackground && ( child == mImpl->mBackground->actor ) )
896 // Notify derived classes.
897 OnControlChildAdd( child );
900 void Control::OnChildRemove(Actor& child)
902 // If this is the background actor, then we do not want to relayout or inform deriving classes
903 if ( mImpl->mBackground && ( child == mImpl->mBackground->actor ) )
908 // Notify derived classes.
909 OnControlChildRemove( child );
912 void Control::OnSizeSet(const Vector3& targetSize)
914 if( targetSize != mImpl->mNaturalSize )
916 // Only updates size if set through Actor's API
917 mImpl->mNaturalSize = targetSize;
920 if( targetSize != mImpl->mCurrentSize )
922 // Update control size.
923 mImpl->mCurrentSize = targetSize;
925 // Notify derived classes.
926 OnControlSizeSet( targetSize );
930 void Control::SignalConnected( SlotObserver* slotObserver, CallbackBase* callback )
932 mImpl->SignalConnected( slotObserver, callback );
935 void Control::SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback )
937 mImpl->SignalDisconnected( slotObserver, callback );
940 void Control::DoStyleChange( Toolkit::StyleManager styleManager, StyleChange change )
942 if( change.themeChange )
944 OnThemeChange( styleManager );
946 else if( change.defaultFontChange || change.defaultFontSizeChange )
948 OnFontChange( change.defaultFontChange, change.defaultFontSizeChange );
952 } // namespace Internal
954 } // namespace Toolkit