<commit_before>/*
 NUI3 - C++ cross-platform GUI framework for OpenGL based applications
 Copyright (C) 2002-2003 <NAME> & <NAME>
 
 licence: see nui3/LICENCE.TXT
 */


#include "nui.h"
#include "nuiNavigationController.h"
#include "nuiViewController.h"
#include "nuiNavigationBar.h"


#define NOTIF_PENDING_OPERATION _T("nuiNavigationController_PendingOp")
#define NAVBAR_ANIM_ALPHA_DURATION 0.25f


// static inits
//
std::vector<nuiEasingMethod> nuiNavigationController::mEasings;
std::vector<float> nuiNavigationController::mDurations;
//



//**********************************************
//
// Constructor
//
nuiNavigationController::nuiNavigationController()
: nuiSimpleContainer(), mEventSink(this)
{
  if (SetObjectClass(_T("nuiNavigationController")))
    InitAttributes();
  
  if (mEasings.size() == 0)
    InitStatic();
  
  mpIn = NULL;
  mpOut = NULL;
  mPushed = false;
  mPoped = false;
  mAlphed = false;
  mShowNavigationBar = true;
  
  mPendingLayout = true;
  
 
}



//**********************************************
//
// Destructor
//
nuiNavigationController::~nuiNavigationController()
{
  std::list<nuiAnimation*>::iterator it;
  for (it = mCurrentAnims.begin(); it != mCurrentAnims.end(); ++it)
    delete *it;
  
  std::vector<nuiViewController*>::iterator itv;
  for (itv = mViewControllers.begin(); itv != mViewControllers.end(); ++itv)
  {
    nuiViewController* pView = *itv;
    if (mShowNavigationBar)
      pView->GetNavigationBar()->Release();
    
    bool toDelete = pView->IsOverlayed();
    pView->Release();
    if (pView == mpIn)
      pView->Release();
    else
    if (toDelete)
      DelChild(pView);
  }
}<commit_msg>fixed bug in nuiNavigationController destructor<commit_after>/*
 NUI3 - C++ cross-platform GUI framework for OpenGL based applications
 Copyright (C) 2002-2003 <NAME> & <NAME>
 
 licence: see nui3/LICENCE.TXT
 */


#include "nui.h"
#include "nuiNavigationController.h"
#include "nuiViewController.h"
#include "nuiNavigationBar.h"


#define NOTIF_PENDING_OPERATION _T("nuiNavigationController_PendingOp")
#define NAVBAR_ANIM_ALPHA_DURATION 0.25f


// static inits
//
std::vector<nuiEasingMethod> nuiNavigationController::mEasings;
std::vector<float> nuiNavigationController::mDurations;
//



//**********************************************
//
// Constructor
//
nuiNavigationController::nuiNavigationController()
: nuiSimpleContainer(), mEventSink(this)
{
  if (SetObjectClass(_T("nuiNavigationController")))
    InitAttributes();
  
  if (mEasings.size() == 0)
    InitStatic();
  
  mpIn = NULL;
  mpOut = NULL;
  mPushed = false;
  mPoped = false;
  mAlphed = false;
  mShowNavigationBar = true;
  
  mPendingLayout = true;
  
 
}



//**********************************************
//
// Destructor
//
nuiNavigationController::~nuiNavigationController()
{
  std::list<nuiAnimation*>::iterator it;
  for (it = mCurrentAnims.begin(); it != mCurrentAnims.end(); ++it)
    delete *it;
  
  std::vector<nuiViewController*>::iterator itv;
  for (itv = mViewControllers.begin(); itv != mViewControllers.end(); ++itv)
  {
    nuiViewController* pView = *itv;
    if (mShowNavigationBar)
      pView->GetNavigationBar()->Release();
    
    bool toDelete = pView->IsOverlayed();
    pView->Release();
    if (toDelete)
      pView->Release();
  }
}
{'fraction_non_alphanumeric': 0.18959782280012097, 'fraction_numerical': 0.008466888418506199, 'mean_word_length': 4.504159733777039, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7051586', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1104, 'n_words': 201}