* - \link script-hello Hello World in script \endlink
*
* - \link handle-body-idiom Handle – body idiom \endlink
- * - \link boost-library Boost Library \endlink
- * - \link boost-function Boost function usage \endlink
*
* \section Rendering
* - \link viewing-modes Viewing modes \endlink
+++ /dev/null
-/*! \page boost-function Boost function usage
-<h2 class="pg">Signal handler functions</h2>
- boost::function is mostly used to define callback function types in Dali.
- For example in text-actor.h:
- \code
-class TextActor : public RenderableActor
-{
-public:
- ...
- typedef boost::function<void (TextActor)> TextCallbackType;
- typedef Signal<TextSignalType, TextCallbackType> TextSignal;
-
-public:
- TextSignal SignalTextAvailable();
- ...
- }
- \endcode
-
- \p "boost::function<void (TextActor)>" specifies a function type which has no return value and takes \p TextActor as an argument.
- The application can set a function of this type to be called when the text available signal is emitted.
-
- <h2 class="pg">Specifying custom functions (eg. sorting)</h2>
- Dali::Layer::SetSortFunction() is an example where the developer should use a boost function in order to specify the sorting algorithm.\n
- This API accepts both standalone functions or class methods.\n
- Standalone functions can be simply given as:
- \code
- static float TestSortFunction(const Vector3& position, float sortModifier)
- {
- // do something
- }
-
- void TestApp::SetRootSort()
- {
- Layer root = Stage::GetCurrent().GetLayer( 0 );
- root.SetSortFunction(TestSortFunction);
- }
- \endcode
- For member functions \b binding needs to be done:
- \code
- float TestApp::TestSortFunction(const Vector3& position, float sortModifier)
- {
- // do something
- }
-
- void TestApp::SetRootSort()
- {
- Layer root = Stage::GetCurrent().GetLayer( 0 );
- root.SetSortFunction(boost::bind(&TestApp::TestSortFunction, this));
- }
- \endcode
- \n\n
- For more information please see <a href="http://www.boost.org/doc/">the boost project documentation</a>.
-
- */
-
+++ /dev/null
-/*! \page boost-library Boost Library
-
- Boost is a set of free software libraries that extend the functionality of C++.
-
- Dali API uses the following aspects of boost:
- - \link boost-function Boost functions\endlink
-
- For more information on the Boost library check the project's <a href="http://www.boost.org/doc/">website</a>.
- */
* return MyActor::New();
* }
*
- * Dali::Connection MyActor::DoConnectSignalCustom(BaseObject* object, const std::string& signalName, SignalCallback callback)
+ * Dali::Connection MyActor::DoConnectSignalCustom(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor)
* {
* Dali::Connection connection ;
*
*
* if(actor && "page-changed" == signalName)
* {
- * connection = return actor->SignalPageChanged().Connect((boost::lambda::bind(callback)));
+ * connection = return actor->PageChangedSignal().Connect( tracker, functor );
* }
*
* return connection ;