2 * Copyright (c) 2015 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.
20 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
23 #include <dali-toolkit/internal/controls/image-view/image-view-impl.h>
33 ImageView::ImageView()
37 ImageView::ImageView( const ImageView& imageView )
38 : Control( imageView )
42 ImageView& ImageView::operator=( const ImageView& imageView )
44 if( &imageView != this )
46 Control::operator=( imageView );
51 ImageView::~ImageView()
55 ImageView ImageView::New()
57 return Internal::ImageView::New();
60 ImageView ImageView::New( Image image )
62 ImageView imageView = Internal::ImageView::New();
63 imageView.SetImage( image );
67 ImageView ImageView::New( const std::string& url )
69 ImageView imageView = Internal::ImageView::New();
70 imageView.SetProperty( ImageView::Property::RESOURCE_URL, Dali::Property::Value( url ) );
74 ImageView ImageView::DownCast( BaseHandle handle )
76 return Control::DownCast<ImageView, Internal::ImageView>(handle);
79 void ImageView::SetImage( Image image )
81 Dali::Toolkit::GetImpl( *this ).SetImage( image );
84 Image ImageView::GetImage() const
86 return Dali::Toolkit::GetImpl( *this ).GetImage();
89 ImageView::ImageView( Internal::ImageView& implementation )
90 : Control( implementation )
94 ImageView::ImageView( Dali::Internal::CustomActor* internal )
97 VerifyCustomActorPointer<Internal::ImageView>( internal );
100 } // namespace Toolkit