X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Factors%2Fcustom-actor-internal.h;h=c3b57b3111bb67c033bcf5adc7cdb8e44034bba5;hb=baad1726f5f7f05d98da7ca591f24dbe3c49dab2;hp=6367a4309f5e7631258ef0c094aae32b420283c9;hpb=5c66381841dd4dfd82c5a118d34104a00a2e0e1c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/actors/custom-actor-internal.h b/dali/internal/event/actors/custom-actor-internal.h index 6367a43..c3b57b3 100644 --- a/dali/internal/event/actors/custom-actor-internal.h +++ b/dali/internal/event/actors/custom-actor-internal.h @@ -1,26 +1,28 @@ -#ifndef __DALI_INTERNAL_CUSTOM_ACTOR_H__ -#define __DALI_INTERNAL_CUSTOM_ACTOR_H__ - -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +#ifndef DALI_INTERNAL_CUSTOM_ACTOR_H +#define DALI_INTERNAL_CUSTOM_ACTOR_H + +/* + * Copyright (c) 2019 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // INTERNAL INCLUDES #include #include #include +#include namespace Dali { @@ -56,6 +58,13 @@ public: return *mImpl; } + /** + * Get the type info associated with this object. + * + * @return The type info + */ + Dali::TypeInfo GetTypeInfo(); + protected: /** @@ -68,9 +77,9 @@ private: /** * @copydoc Internal::Actor::OnStageConnectionExternal */ - virtual void OnStageConnectionExternal() + virtual void OnStageConnectionExternal( int32_t depth ) { - mImpl->OnStageConnection(); + mImpl->OnStageConnection( depth ); } /** @@ -133,6 +142,14 @@ private: } /** + * @copydoc Internal::Actor::OnHoverEvent + */ + virtual bool OnHoverEvent(const HoverEvent& event) + { + return mImpl->OnHoverEvent(event); + } + + /** * @copydoc Internal::Actor::OnKeyEvent */ virtual bool OnKeyEvent(const KeyEvent& event) @@ -141,35 +158,99 @@ private: } /** - * @copydoc Internal::Actor::OnMouseWheelEvent + * @copydoc Internal::Actor::OnWheelEvent */ - virtual bool OnMouseWheelEvent(const MouseWheelEvent& event) + virtual bool OnWheelEvent(const WheelEvent& event) { - return mImpl->OnMouseWheelEvent(event); + return mImpl->OnWheelEvent(event); } /** - * @copydoc Internal::Actor::GetChildByAlias + * @copydoc Internal::Actor::OnRelayout */ - virtual Dali::Actor GetChildByAlias(const std::string& actorAlias) + virtual void OnRelayout( const Vector2& size, RelayoutContainer& container ) { - return mImpl->GetChildByAlias(actorAlias); + mImpl->OnRelayout( size, container ); } /** - * Private constructor; see also CustomActor::New() + * @copydoc Internal::Actor::OnSetResizePolicy + */ + virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) + { + mImpl->OnSetResizePolicy( policy, dimension ); + } + + /** + * @copydoc Internal::Actor::GetNaturalSize + */ + virtual Vector3 GetNaturalSize() const + { + return mImpl->GetNaturalSize(); + } + + /** + * @copydoc Internal::Actor::CalculateChildSize + */ + virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension ) + { + return mImpl->CalculateChildSize( child, dimension ); + } + + /** + * @copydoc Internal::Actor::GetHeightForWidth + */ + virtual float GetHeightForWidth( float width ) + { + return mImpl->GetHeightForWidth( width ); + } + + /** + * @copydoc Internal::Actor::GetWidthForHeight */ - CustomActor(CustomActorImpl& extension); + virtual float GetWidthForHeight( float height ) + { + return mImpl->GetWidthForHeight( height ); + } - // Undefined - CustomActor(const CustomActor&); + /** + * @copydoc Internal::Actor::RelayoutDependentOnChildren + */ + virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) + { + return mImpl->RelayoutDependentOnChildren( dimension ); + } - // Undefined - CustomActor& operator=(const CustomActor& rhs); + /** + * @copydoc Internal::Actor::OnCalculateRelayoutSize + */ + virtual void OnCalculateRelayoutSize( Dimension::Type dimension ) + { + return mImpl->OnCalculateRelayoutSize( dimension ); + } + + /** + * @copydoc Internal::Actor::OnLayoutNegotiated + */ + virtual void OnLayoutNegotiated( float size, Dimension::Type dimension ) + { + return mImpl->OnLayoutNegotiated( size, dimension ); + } + + /** + * Private constructor; see also CustomActor::New() + */ + CustomActor( const SceneGraph::Node& node, CustomActorImpl& extension ); + + // no default or copy constructor or assignment + CustomActor() = delete; + CustomActor( const CustomActor& ) = delete; + CustomActor& operator=( const CustomActor& rhs ) = delete; protected: CustomActorImplPtr mImpl; + }; } // namespace Internal @@ -196,4 +277,4 @@ inline const Internal::CustomActor& GetImpl(const Dali::CustomActor& actor) } // namespace Dali -#endif // __DALI_INTERNAL_CUSTOM_ACTOR_H__ +#endif // DALI_INTERNAL_CUSTOM_ACTOR_H