1 /****************************************************************************
2 ** $Id: rs_selection.h 1868 2004-04-05 23:12:06Z andrew $
4 ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
6 ** This file is part of the qcadlib Library project.
8 ** This file may be distributed and/or modified under the terms of the
9 ** GNU General Public License version 2 as published by the Free Software
10 ** Foundation and appearing in the file LICENSE.GPL included in the
11 ** packaging of this file.
13 ** Licensees holding valid qcadlib Professional Edition licenses may use
14 ** this file in accordance with the qcadlib Commercial License
15 ** Agreement provided with the Software.
17 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 ** See http://www.ribbonsoft.com for further details.
22 ** Contact info@ribbonsoft.com if any conditions of this licensing are
25 **********************************************************************/
27 #ifndef RS_SELECTION_H
28 #define RS_SELECTION_H
30 #include "rs_entitycontainer.h"
31 #include "rs_graphicview.h"
36 * API Class for selecting entities.
37 * There's no interaction handled in this class.
38 * This class is connected to an entity container and
39 * can be connected to a graphic view.
41 * @author Andrew Mustun
45 RS_Selection(RS_EntityContainer& entityContainer,
46 RS_GraphicView* graphicView=NULL);
48 void selectSingle(RS_Entity* e);
49 void selectAll(bool select=true);
53 void invertSelection();
54 void selectWindow(const Vector& v1, const Vector& v2,
55 bool select=true, bool cross=false);
56 void deselectWindow(const Vector& v1, const Vector& v2) {
57 selectWindow(v1, v2, false);
59 void selectIntersected(const Vector& v1, const Vector& v2,
61 void deselectIntersected(const Vector& v1, const Vector& v2) {
62 selectIntersected(v1, v2, false);
64 void selectContour(RS_Entity* e);
66 void selectLayer(RS_Entity* e);
67 void selectLayer(const RS_String& layerName, bool select=true);
68 void deselectLayer(RS_String& layerName) {
69 selectLayer(layerName, false);
73 RS_EntityContainer* container;
75 RS_GraphicView* graphicView;