X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol.cpp;h=5bbc4e72ac3dfb48c715e4fe960acdc33e8ac859;hp=77cb876b88cee6f4382436cc322c1f059048f380;hb=5ff76a127dce1541de4f27d29db5e019d80363e0;hpb=306d2f61a1b64179e801fa8a0bb2bd7b4e9dd682 diff --git a/dali-toolkit/public-api/controls/control.cpp b/dali-toolkit/public-api/controls/control.cpp index 77cb876..5bbc4e7 100644 --- a/dali-toolkit/public-api/controls/control.cpp +++ b/dali-toolkit/public-api/controls/control.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 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. @@ -15,7 +15,10 @@ * */ +// CLASS HEADER #include + +// INTERNAL INCLUDES #include namespace Dali @@ -24,14 +27,6 @@ namespace Dali namespace Toolkit { -const char* const Control::ACTION_CONTROL_ACTIVATED = "control-activated"; - -const char* const Control::SIGNAL_KEY_EVENT = "key-event"; -const char* const Control::SIGNAL_TAPPED = "tapped"; -const char* const Control::SIGNAL_PANNED = "panned"; -const char* const Control::SIGNAL_PINCHED = "pinched"; -const char* const Control::SIGNAL_LONG_PRESSED = "long-pressed"; - Control Control::New() { return Internal::Control::New(); @@ -74,51 +69,6 @@ const Internal::Control& Control::GetImplementation() const return static_cast(CustomActor::GetImplementation()); } -void Control::SetSizePolicy( SizePolicy widthPolicy, SizePolicy heightPolicy ) -{ - GetImplementation().SetSizePolicy( widthPolicy, heightPolicy ); -} - -void Control::GetSizePolicy( SizePolicy& widthPolicy, SizePolicy& heightPolicy ) const -{ - GetImplementation().GetSizePolicy( widthPolicy, heightPolicy ); -} - -void Control::SetMinimumSize( const Vector3& size ) -{ - GetImplementation().SetMinimumSize( size ); -} - -const Vector3& Control::GetMinimumSize() const -{ - return GetImplementation().GetMinimumSize(); -} - -void Control::SetMaximumSize( const Vector3& size ) -{ - GetImplementation().SetMaximumSize( size ); -} - -const Vector3& Control::GetMaximumSize() const -{ - return GetImplementation().GetMaximumSize(); -} - -Vector3 Control::GetNaturalSize() -{ - return GetImplementation().GetNaturalSize(); -} - -float Control::GetHeightForWidth( float width ) -{ - return GetImplementation().GetHeightForWidth( width ); -} - -float Control::GetWidthForHeight( float height ) -{ - return GetImplementation().GetWidthForHeight( height ); -} - void Control::SetKeyInputFocus() { GetImplementation().SetKeyInputFocus(); @@ -154,6 +104,16 @@ LongPressGestureDetector Control::GetLongPressGestureDetector() const return GetImplementation().GetLongPressGestureDetector(); } +void Control::SetStyleName( const std::string& styleName ) +{ + GetImplementation().SetStyleName( styleName ); +} + +const std::string& Control::GetStyleName() const +{ + return GetImplementation().GetStyleName(); +} + void Control::SetBackgroundColor( const Vector4& color ) { GetImplementation().SetBackgroundColor( color ); @@ -164,9 +124,9 @@ Vector4 Control::GetBackgroundColor() const return GetImplementation().GetBackgroundColor(); } -void Control::SetBackground( Image image ) +void Control::SetBackgroundImage( Image image ) { - GetImplementation().SetBackground( image ); + GetImplementation().SetBackgroundImage( image ); } void Control::ClearBackground() @@ -184,6 +144,16 @@ Control::KeyEventSignalType& Control::KeyEventSignal() return GetImplementation().KeyEventSignal(); } +Control::KeyInputFocusSignalType& Control::KeyInputFocusGainedSignal() +{ + return GetImplementation().KeyInputFocusGainedSignal(); +} + +Control::KeyInputFocusSignalType& Control::KeyInputFocusLostSignal() +{ + return GetImplementation().KeyInputFocusLostSignal(); +} + Control::Control(Internal::Control& implementation) : CustomActor(implementation) {