/** @brief load callback.
*
* @note Now, this view is moving onto the screen. Get ready for this view. If this view content is alive, load callback won't be called.
- * In the most cases, this callback will be triggered with this step load -> inactive -> active.
+ * In the most cases, this callback will be triggered with this step load -> deactivate -> activate.
*/
virtual void on_load() {}
* @note Remove resources with regards to this view for saving memory or keep the content for performance. It's up to your scenario.
* Unload will be called just right before when the view is going to be deleted by popping or it's piled under the more than one view.
* If the view content is not alive, the unload won't be called.
- * In the most cases, this callback will be triggered with this step. inactive -> unload -> destroy
+ * In the most cases, this callback will be triggered with this step. deactivate -> unload -> destroy
*/
virtual void on_unload() {}
- /** @brief active callback.
+ /** @brief activate callback.
*
- * @note View is on active state after show transition is finished.
- * From whatever the state, if the view is on the screen, the active callback will be called.
- * In the most cases, this callback will be triggered with this step. load -> inactive -> active
+ * @note View is on activate state after show transition is finished.
+ * From whatever the state, if the view is on the screen, the activate callback will be called.
+ * In the most cases, this callback will be triggered with this step. load -> deactivate -> activate
*/
- virtual void on_active() {}
+ virtual void on_activate() {}
- /** @brief inactive callback.
+ /** @brief deactivate callback.
*
- * @note View is on inactive state. Get ready for unload. Hide transition may be triggered at this point.
- * Inactive state is triggered on this scenario that the view is still visible but it's not interactive with users.
- * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the inactive state will be triggered.
- * Some UI controls such as a center popup or a menu popup blocks the view, this view may be inactive but still visible in someway (with transparency)
+ * @note View is on deactivate state. Get ready for unload. Hide transition may be triggered at this point.
+ * Deactivate state is triggered on this scenario that the view is still visible but it's not interactivate with users.
+ * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the deactivate state will be triggered.
+ * Some UI controls such as a center popup or a menu popup blocks the view, this view may be deactivate but still visible in someway (with transparency)
*/
- virtual void on_inactive() {}
+ virtual void on_deactivate() {}
/** @brief pause callback.
*
* @note When the system blocks the application running in cases such as phone call, system notification, switching applications ...
* When Window turns to deactivate. (@see ui_base_viewmgr_base :: deactivate()).
- * If the view were inactive or unload state, the pause won't be called.
+ * If the view were deactivate or unload state, the pause won't be called.
*/
virtual void on_pause() {}
/** @brief resume callback.
*
- * @note View is turning back to the active state again from pause.
+ * @note View is turning back to the activate state again from pause.
* When the system allows the application turns to activate.
* When the Window turns to activate. (@see ui_base_viewmgr :: activate())
*/
*/
bool set_indicator(ui_view_indicator indicator);
- void active_top_view();
+ void activate_top_view();
protected:
ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_listener);
/** @brief load callback.
*
* @note Now, this view is moving onto the screen. Get ready for this view. If this view content is alive, load callback won't be called.
- * In the most cases, this callback will be triggered with this step load -> inactive -> active.
+ * In the most cases, this callback will be triggered with this step load -> deactivate -> activate.
*/
virtual void on_load() = 0;
* @note Remove resources with regards to this view for saving memory or keep the content for performance. It's up to your scenario.
* Unload will be called just right before when the view is going to be deleted by popping or it's piled under the more than one view.
* If the view content is not alive, the unload won't be called.
- * In the most cases, this callback will be triggered with this step. inactive -> unload -> destroy
+ * In the most cases, this callback will be triggered with this step. deactivate -> unload -> destroy
*/
virtual void on_unload() = 0;
- /** @brief active callback.
+ /** @brief activate callback.
*
- * @note View is on active state after show transition is finished.
- * From whatever the state, if the view is on the screen, the active callback will be called.
- * In the most cases, this callback will be triggered with this step. load -> inactive -> active
+ * @note View is on activate state after show transition is finished.
+ * From whatever the state, if the view is on the screen, the activate callback will be called.
+ * In the most cases, this callback will be triggered with this step. load -> deactivate -> activate
*/
- virtual void on_active() = 0;
+ virtual void on_activate() = 0;
- /** @brief inactive callback.
+ /** @brief deactivate callback.
*
- * @note View is on inactive state. Get ready for unload. Hide transition may be triggered at this point.
- * Inactive state is triggered on this scenario that the view is still visible but it's not interactive with users.
- * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the inactive state will be triggered.
- * Some UI controls such as a center popup or a menu popup blocks the view, this view may be inactive but still visible in someway (with transparency)
+ * @note View is on deactivate state. Get ready for unload. Hide transition may be triggered at this point.
+ * Deactivate state is triggered on this scenario that the view is still visible but it's not interactivate with users.
+ * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the deactivate state will be triggered.
+ * Some UI controls such as a center popup or a menu popup blocks the view, this view may be deactivate but still visible in someway (with transparency)
*/
- virtual void on_inactive() = 0;
+ virtual void on_deactivate() = 0;
/** @brief pause callback.
*
* @note When the system blocks the application running in cases such as phone call, system notification, switching applications ...
* When Window turns to deactivate. (@see ui_viewmgr_base :: deactivate()).
- * If the view were inactive or unload state, the pause won't be called.
+ * If the view were deactivate or unload state, the pause won't be called.
*/
virtual void on_pause() = 0;
/** @brief resume callback.
*
- * @note View is turning back to the active state again from pause.
+ * @note View is turning back to the activate state again from pause.
* When the system allows the application turns to activate.
* When the Window turns to activate. (@see ui_viewmgr_base :: activate())
*/
{
UI_VIEW_STATE_LOAD = 0, ///< Load state
UI_VIEW_STATE_UNLOAD, ///< Unload state
- UI_VIEW_STATE_ACTIVE, ///< Active state
- UI_VIEW_STATE_INACTIVE, ///< Inactive state
+ UI_VIEW_STATE_ACTIVATE, ///< Activate state
+ UI_VIEW_STATE_DEACTIVATE, ///< Deactivate state
UI_VIEW_STATE_PAUSE, ///< Pause state
UI_VIEW_STATE_LAST
};
*/
virtual void on_unload();
- /** @brief view active state.
+ /** @brief view activate state.
*
* @note this state will be triggered by ui_iface_viewmgr.
*
* @see ui_iface_controller for this state in detail.
*/
- virtual void on_active();
+ virtual void on_activate();
- /** @brief view inactive state.
+ /** @brief view deactivate state.
*
* @note this state will be triggered by ui_iface_viewmgr.
*
* @see ui_iface_controller for this state in detail.
*/
- virtual void on_inactive();
+ virtual void on_deactivate();
/** @brief view pause state.
*
private:
static bool soft_key; //If system doesn't support HW back key, then this value is @c true.
static bool event_block; //Event block on view transition. This value should be configurable by system.
- list<ui_iface_view*> view_list; //View list.
+ list<ui_iface_view*> view_list; //View list.
bool activated; //Activated status of this viewmgr.
/**
/**
* @brief Return the active status of viewmgr.
*
- * @return @c true if viewmgr is active, @c false otherwise.
+ * @return @c true if viewmgr is activated, @c false otherwise.
*
* @see activate()
* @see deactivate()
return this->layout;
}
-void ui_base_viewmgr::active_top_view()
+void ui_base_viewmgr::activate_top_view()
{
elm_object_part_content_unset(this->get_base(), "content");
{
if (!ui_iface_viewmgr::activate()) return false;
- this->active_top_view();
+ this->activate_top_view();
//FIXME: Necessary??
ui_base_view *view = this->get_last_view();
- view->on_active();
+ view->on_activate();
evas_object_show(this->win);
if (true)
{
ui_base_view *view = this->get_last_view();
- if (view) view->on_inactive();
+ if (view) view->on_deactivate();
evas_object_lower(this->win);
}
else
{
this->pop_view_finished(pview);
this->pop_view_finished(view);
- this->active_top_view();
+ this->activate_top_view();
return true;
}
LOGE("invalid effect transition style?! = %s", view->get_transition_style());
this->pop_view_finished(pview);
this->pop_view_finished(view);
- this->active_top_view();
+ this->activate_top_view();
return true;
}
//In case, if viewmgr has one view, we skip effect.
if (this->get_view_count() == 1) {
- this->active_top_view();
+ this->activate_top_view();
this->push_view_finished(view);
return view;
}
//In case, if view doesn't have transition effect
if (!strcmp(view->get_transition_style(), "none")) {
- this->active_top_view();
+ this->activate_top_view();
this->push_view_finished(pview);
this->push_view_finished(view);
return view;
Elm_Layout *effect = this->set_transition_layout(view->get_transition_style());
if (!effect) {
LOGE("invalid effect transition style?! = %s", view->get_transition_style());
- this->active_top_view();
+ this->activate_top_view();
this->push_view_finished(pview);
this->push_view_finished(view);
return view;
this->controller->on_unload();
}
-void ui_iface_view::on_active()
+void ui_iface_view::on_activate()
{
- this->state = UI_VIEW_STATE_ACTIVE;
+ this->state = UI_VIEW_STATE_ACTIVATE;
if (!this->controller) return;
- this->controller->on_active();
+ this->controller->on_activate();
}
-void ui_iface_view::on_inactive()
+void ui_iface_view::on_deactivate()
{
- this->state = UI_VIEW_STATE_INACTIVE;
+ this->state = UI_VIEW_STATE_DEACTIVATE;
if (!this->controller) return;
- this->controller->on_inactive();
+ this->controller->on_deactivate();
}
void ui_iface_view::on_pause()
{
this->state = UI_VIEW_STATE_PAUSE;
if (!this->content) return;
- if (state != UI_VIEW_STATE_ACTIVE) return;
+ if (state != UI_VIEW_STATE_ACTIVATE) return;
if (!this->controller) return;
this->controller->on_pause();
}
void ui_iface_view::on_resume()
{
- this->state = UI_VIEW_STATE_ACTIVE;
+ this->state = UI_VIEW_STATE_ACTIVATE;
if (state != UI_VIEW_STATE_PAUSE) return;
if (!this->content) return;
if (!this->controller) return;
return true;
}
- //A new view has been pushed. This should be active.
- view->on_active();
+ //A new view has been pushed. This should be activate.
+ view->on_activate();
this->set_event_block(view, false);
return true;
return true;
}
- //The previous view has been popped. It should become active.
- view->on_active();
+ //The previous view has been popped. It should become activate.
+ view->on_activate();
this->set_event_block(view, false);
return true;
for (typename std::list<ui_iface_view*>::reverse_iterator it = this->view_list.rbegin(); it != this->view_list.rend(); it++)
{
ui_iface_view *view = *it;
- view->on_inactive();
+ view->on_deactivate();
view->on_unload();
view->on_destroy();
delete (view);
if (this->view_list.size() > 0)
{
pview = this->view_list.back();
- pview->on_inactive();
+ pview->on_deactivate();
this->set_event_block(pview, true);
}
view->on_load();
}
- view->on_inactive();
+ view->on_deactivate();
//FIXME: First view has no effect?
if (this->view_list.size() != 1) this->set_event_block(view, true);
{
//destroy viewmgr?
ui_iface_view *view = this->view_list.back();
- view->on_inactive();
+ view->on_deactivate();
view->on_unload();
view->on_destroy();
delete(view);
//last page to be popped.
ui_iface_view *view = this->view_list.back();
- view->on_inactive();
+ view->on_deactivate();
this->set_event_block(view, true);
//Below object has to be used in child class...
//Make this getter method? or define instance?
- //previous page to be current active.
+ //previous page is to be active page.
auto nx = std::prev(this->view_list.end(), 2);
ui_iface_view *pview = *nx;
pview->on_load();
- pview->on_inactive();
+ pview->on_deactivate();
this->set_event_block(pview, true);
return true;