/*! \file canvasremove.cpp
** \brief Template File
**
-** $Id: canvasremove.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
+** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
ACTION_SET_CATEGORY(Action::CanvasRemove,Action::CATEGORY_CANVAS);
ACTION_SET_PRIORITY(Action::CanvasRemove,0);
ACTION_SET_VERSION(Action::CanvasRemove,"0.0");
-ACTION_SET_CVS_ID(Action::CanvasRemove,"$Id: canvasremove.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $");
+ACTION_SET_CVS_ID(Action::CanvasRemove,"$Id$");
/* === G L O B A L S ======================================================= */
Action::CanvasRemove::get_param_vocab()
{
ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-
+
return ret;
}
bool
-Action::CanvasRemove::is_canidate(const ParamList &x)
+Action::CanvasRemove::is_candidate(const ParamList &x)
{
- if(canidate_check(get_param_vocab(),x))
+ if(candidate_check(get_param_vocab(),x))
{
Canvas::Handle canvas=x.find("canvas")->second.get_canvas();
assert(canvas);
// We cannot remove the root canvas.
if(canvas->is_root())
return false;
-
+
return true;
}
return false;
if(get_canvas()->is_inline())
throw Error(_("You cannot remove an inline canvas!"));
-
+
parent_canvas=get_canvas()->parent();
canvas_id=get_canvas()->get_id();
-
+
assert(parent_canvas);
-
+
parent_canvas->remove_child_canvas(get_canvas());
-
+
if(get_canvas_interface())
{
get_canvas_interface()->signal_canvas_removed()(get_canvas());