// ----
// ---- file   : NT_DebugUndoDialog.tks
// ---- author : Bastian Spiegel <bs@tkscript.de>
// ---- legal  : (c) 2012-2015 by Bastian Spiegel. 
// ----          Distributed under terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL). See 
// ----          http://www.gnu.org/licenses/licenses.html#LGPL or COPYING for further information.
// ----
// ---- info   : This is part of the "syntracker" sequencer.
// ----
// ---- created: 16Jan2012
// ---- changed: 19Jan2012, 23Jan2015
// ----
// ----
// ----
module MNT_DebugUndoDialog;

use namespace ui;
use namespace st2;


class NT_DebugUndoDialog extends ActionConsumer {
   TextEditDialog *d;

   public method run(NodeTrackerEditor _editor) {
      d <= TextEditDialog.New("Debug undo stack", 
                              "Debug undo stack", 
                              "Ok", "Cancel",
                              (_editor.tracker_node.ui_undo_stack.getDebugString()), 
                              this);
      d.setEnableDialogIsPopup(true);
      d.showCentered();
      d.textedit.gotoEnd();
      d.focusOKButton();
   }
    
   public virtual consumeAction(StringAction _action) : boolean {
      if(_action.getActionProvider() == d)
      {
         return true;
      }
      return false;
   }
}
