Revert to tizen branch.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / view / view.h
index 08826c0..b42340c 100644 (file)
@@ -1,33 +1,32 @@
 #ifndef __DALI_TOOLKIT_VIEW_H__
 #define __DALI_TOOLKIT_VIEW_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.
-//
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/actors/image-actor.h>
+#include <dali/public-api/adaptor-framework/orientation.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
-namespace Dali DALI_IMPORT_API
-{
-
-namespace Internal DALI_INTERNAL
+namespace Dali
 {
-// Forward declarations
-class CustomActor;
-}
 
 namespace Toolkit
 {
@@ -64,21 +63,23 @@ class View;
  * mView.SetBackground( backgroundImageActor );
  *
  * // Connects the orientation signal with the View::OrientationChanged method.
- * application.GetOrientation().ChangedSignal().Connect( &view, &Toolkit::View::OrientationChanged );
+ * application.GetWindow().GetOrientation().ChangedSignal().Connect( &view, &Toolkit::View::OrientationChanged );
  *
  * // Create a content layer.
  * Layer contentLayer = Layer::New();
  * contentLayer.SetAnchorPoint( AnchorPoint::CENTER );
  * contentLayer.SetParentOrigin( ParentOrigin::CENTER );
- * contentLayer.ApplyConstraint( ParentConstraint::Size::New( ParentSize() ) );
  * view.AddContentLayer( contentLayer );
  * \endcode
+ *
+ * Signals
+ * | %Signal Name                | Method                                   |
+ * |-----------------------------|------------------------------------------|
+ * | orientation-animation-start | @ref OrientationAnimationStartedSignal() |
+
  */
-class View : public Control
+class DALI_IMPORT_API View : public Control
 {
-public:
-  //Signal Names
-  static const char* const SIGNAL_ORIENTATION_ANIMATION_START;
 
 public:
 
@@ -100,9 +101,11 @@ public:
   View& operator=( const View& handle );
 
   /**
-   * virtual Destructor.
+   * @brief Destructor
+   *
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
    */
-  virtual ~View();
+  ~View();
 
   /**
    * Create an initialized View.
@@ -186,12 +189,12 @@ public:
 public: //Signals
 
   // Orientation change animation starts.
-  typedef SignalV2< void ( View, Animation&, const Orientation& ) > OrientationAnimationStartedSignalV2;
+  typedef Signal< void ( View, Animation&, const Orientation& ) > OrientationAnimationStartedSignalType;
 
   /**
    * Signal emitted just before the rotate animation starts when the device orientation changes.
    */
-  OrientationAnimationStartedSignalV2& OrientationAnimationStartedSignal();
+  OrientationAnimationStartedSignalType& OrientationAnimationStartedSignal();
 
 public: // Not intended for application developers
 
@@ -199,16 +202,15 @@ public: // Not intended for application developers
    * Creates a handle using the Toolkit::Internal implementation.
    * @param[in]  implementation  The Control implementation.
    */
-  View( Internal::View& implementation );
+  DALI_INTERNAL View( Internal::View& implementation );
 
   /**
    * Allows the creation of this Control from an Internal::CustomActor pointer.
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
-  View( Dali::Internal::CustomActor* internal );
+  explicit DALI_INTERNAL View( Dali::Internal::CustomActor* internal );
 };
 
-
 } // namespace Toolkit
 
 } // namespace Dali