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 "AllGraphOptions.h"
\r
22 #include "Resource.h"
\r
24 #include "RemoveSimpleChanges.h"
\r
25 #include "RemoveDeletedBranches.h"
\r
26 #include "FoldTags.h"
\r
27 #include "ShowHeads.h"
\r
29 #include "ExactCopyFroms.h"
\r
30 #include "RevisionInRange.h"
\r
31 #include "RemovePathsBySubString.h"
\r
33 #include "StandardNodeSizeAssignment.h"
\r
34 #include "StandardNodePositioning.h"
\r
35 #include "StrictOrderNodePositioning.h"
\r
36 #include "UpsideDownLayout.h"
\r
38 // construction (create all option objects) / destruction
\r
40 CAllRevisionGraphOptions::CAllRevisionGraphOptions()
\r
42 // create filter options.
\r
44 // The order is critical as it determines the option bit position
\r
45 // in the registry DWORD.
\r
47 CStandardNodePositioning* standardNodePositioning
\r
48 = new CStandardNodePositioning (*this);
\r
49 new CRemoveSimpleChanges (*this);
\r
50 new CUpsideDownLayout (*this);
\r
51 new CShowHead (*this);
\r
52 IRevisionGraphOption* reduceCrossLines
\r
53 = new CRevisionGraphOptionImpl<IRevisionGraphOption, 0, ID_VIEW_REDUCECROSSLINES> (*this);
\r
54 new CExactCopyFroms (*this);
\r
55 new CRevisionGraphOptionImpl<IRevisionGraphOption, 0, 0> (*this); // 0x40 is not used
\r
56 new CFoldTags (*this);
\r
57 new CRemoveDeletedBranches (*this);
\r
58 new CShowWC (*this);
\r
60 (new CRevisionInRange (*this))->ToggleSelection();
\r
61 (new CRemovePathsBySubString (*this))->ToggleSelection();
\r
63 // create layout options
\r
65 (new CStandardNodeSizeAssignment (*this))->ToggleSelection();
\r
66 new CStrictOrderNodePositioning (*this, standardNodePositioning, reduceCrossLines);
\r
68 // link options as necessary
\r
70 standardNodePositioning->SetReduceCrossLines (reduceCrossLines);
\r
73 // access specific sub-sets
\r
75 CCopyFilterOptions CAllRevisionGraphOptions::GetCopyFilterOptions() const
\r
77 return GetFilteredList<CCopyFilterOptions, ICopyFilterOption>();
\r
80 CModificationOptions CAllRevisionGraphOptions::GetModificationOptions() const
\r
82 return GetFilteredList<CModificationOptions, IModificationOption>();
\r
85 CLayoutOptions CAllRevisionGraphOptions::GetLayoutOptions() const
\r
87 return GetFilteredList<CLayoutOptions, ILayoutOption>();
\r