(Page) Using registered properties
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / navigation-frame / page.h
index 0dfc952..e0cf616 100644 (file)
@@ -1,28 +1,32 @@
 #ifndef __DALI_TOOLKIT_PAGE_H__
 #define __DALI_TOOLKIT_PAGE_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) 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.
+ * 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/common/dali-vector.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
 #include <dali-toolkit/public-api/controls/popup/popup.h>
 
-namespace Dali DALI_IMPORT_API
+namespace Dali
 {
 
 namespace Toolkit
@@ -39,17 +43,31 @@ class Page;
  * It serves as the root of a navigation view.
  * It also carries the title/subtitle/buttons/icons information which would be shown on the navigation bars when the item is on the top of the stack.
  */
-class Page : public Control
+class DALI_IMPORT_API Page : public Control
 {
 
 public:
 
   /**
-   * The names of custom properties installed by this control.
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the Page class.
    */
-  // Property Names
-  static const char* const PROPERTY_TITLE;       ///< name "title", type std::string
-  static const char* const PROPERTY_SUB_TITLE;   ///< name "sub-title", type std::string
+  struct Property
+  {
+    enum
+    {
+      TITLE = PROPERTY_START_INDEX, ///< name "title",          @see SetTitle(),         type string
+      SUB_TITLE,                    ///< name "sub-title",      @see SetSubTitle(),      type string
+    };
+  };
 
   /**
    * Structure to indicate a control on the navigation tool bar and its group (HorizontalLeft, HorizontalRight or HorizontalCenter)
@@ -193,13 +211,13 @@ public: // Not intended for application developers
    * Creates a handle using the Toolkit::Internal implementation.
    * @param[in] impl The Page implementation.
    */
-  Page(Internal::Page& impl);
+  DALI_INTERNAL Page(Internal::Page& impl);
 
   /**
    * Allows the creation of this Control from an Internal::CustomActor pointer.
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
-  Page( Dali::Internal::CustomActor* internal );
+  explicit DALI_INTERNAL Page( Dali::Internal::CustomActor* internal );
 };
 
 } // namespace Toolkit