1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2003-2008 - TortoiseSVN
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
21 // include base classes
\r
23 #include "RevisionGraphOptions.h"
\r
25 // forward declarations
\r
27 class IRevisionGraphLayout;
\r
30 * Extends the base interface with a method that has full
\r
31 * modifying access to a given graph layout. In most cases,
\r
32 * the derived class will require \ref layout to be of
\r
33 * a particular sub-class and use that classes' interface.
\r
36 class ILayoutOption : public IRevisionGraphOption
\r
40 /// cast @a layout pointer to the respective modification
\r
41 /// interface and write the data.
\r
43 virtual void ApplyTo (IRevisionGraphLayout* layout) = 0;
\r
47 * Filtered sub-set of \ref CAllRevisionGraphOptions.
\r
48 * It applies all options in the order defined by their \ref priority.
\r
49 * The option instances may transform the layout any way they consider fit.
\r
51 * Contains only \ref ILayoutOption instances.
\r
54 class CLayoutOptions : public CRevisionGraphOptionList
\r
58 std::vector<ILayoutOption*> options;
\r
62 // construction / destruction
\r
64 CLayoutOptions (const std::vector<ILayoutOption*>& options);
\r
65 virtual ~CLayoutOptions() {}
\r
67 /// apply all filters
\r
69 void Apply (IRevisionGraphLayout* layout) const;
\r