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.
19 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
22 #include <dali/public-api/images/resource-image.h>
23 #include <dali/public-api/object/property-map.h>
26 #include <dali-toolkit/internal/controls/image-view/image-view-impl.h>
34 ImageView::ImageView()
38 ImageView::ImageView( const ImageView& imageView )
39 : Control( imageView )
43 ImageView& ImageView::operator=( const ImageView& imageView )
45 if( &imageView != this )
47 Control::operator=( imageView );
52 ImageView::~ImageView()
56 ImageView ImageView::New()
58 return Internal::ImageView::New();
61 ImageView ImageView::New( Image image )
63 ImageView imageView = Internal::ImageView::New();
64 imageView.SetImage( image );
65 return ImageView( imageView );
68 ImageView ImageView::New( const std::string& url,
71 ImageView imageView = Internal::ImageView::New();
72 imageView.SetImage( url, size );
76 ImageView ImageView::DownCast( BaseHandle handle )
78 return Control::DownCast<ImageView, Internal::ImageView>( handle );
81 void ImageView::SetImage( Image image )
83 Dali::Toolkit::GetImpl( *this ).SetImage( image );
86 void ImageView::SetImage( const std::string& url,
87 ImageDimensions size )
89 Dali::Toolkit::GetImpl( *this ).SetImage( url, size );
92 Image ImageView::GetImage() const
97 ImageView::ImageView( Internal::ImageView& implementation )
98 : Control( implementation )
102 ImageView::ImageView( Dali::Internal::CustomActor* internal )
103 : Control( internal )
105 VerifyCustomActorPointer<Internal::ImageView>( internal );
108 } // namespace Toolkit