/*  GNU Moe - My Own Editor
    Copyright (C) 2005, 2006, 2007, 2008, 2009 Antonio Diaz Diaz.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

namespace Block {

Buffer * bufferp() throw();
Point & anchor() throw();		// anchor for marking
Point & begin() throw();
Point & end() throw();

bool in_block( const Buffer & buffer, const Point & p ) throw();
bool in_block_or_end( const Buffer & buffer, const Point & p ) throw();
bool valid() throw();

void save_block_position() throw();
void restore_block_position() throw();
void reset() throw();
void set_block( Buffer & buffer, const Point & p1, const Point & p2 ) throw();
void set_begin( Buffer & buffer, const Point & p ) throw();
void set_end( Buffer & buffer, const Point & p ) throw();

bool follow_marking( const Buffer & buffer, const Point & p ) throw();
void toggle_marking( Buffer & buffer, const Point & p ) throw();

bool copy_block( Buffer & buffer, const Point & p, const bool move = false ) throw();
bool delete_block() throw();

} // end namespace Block
