OSDN Git Service

Show Ignore Sub Menu
[tortoisegit/TortoiseGitJp.git] / TortoiseProc / RevisionGraph / AllGraphOptions.cpp
1 // TortoiseSVN - a Windows shell extension for easy version control\r
2 \r
3 // Copyright (C) 2003-2008 - TortoiseSVN\r
4 \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
9 \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
14 \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
18 //\r
19 \r
20 #include "StdAfx.h"\r
21 #include "AllGraphOptions.h"\r
22 #include "Resource.h"\r
23 \r
24 #include "RemoveSimpleChanges.h"\r
25 #include "RemoveDeletedBranches.h"\r
26 #include "FoldTags.h"\r
27 #include "ShowHeads.h"\r
28 #include "ShowWC.h"\r
29 #include "ExactCopyFroms.h"\r
30 #include "RevisionInRange.h"\r
31 #include "RemovePathsBySubString.h"\r
32 \r
33 #include "StandardNodeSizeAssignment.h"\r
34 #include "StandardNodePositioning.h"\r
35 #include "StrictOrderNodePositioning.h"\r
36 #include "UpsideDownLayout.h"\r
37 \r
38 // construction (create all option objects) / destruction\r
39 \r
40 CAllRevisionGraphOptions::CAllRevisionGraphOptions()\r
41 {\r
42     // create filter options.\r
43 \r
44     // The order is critical as it determines the option bit position\r
45     // in the registry DWORD.\r
46 \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
59 \r
60     (new CRevisionInRange (*this))->ToggleSelection();\r
61     (new CRemovePathsBySubString (*this))->ToggleSelection();\r
62 \r
63     // create layout options\r
64 \r
65     (new CStandardNodeSizeAssignment (*this))->ToggleSelection();\r
66     new CStrictOrderNodePositioning (*this, standardNodePositioning, reduceCrossLines);\r
67 \r
68     // link options as necessary\r
69 \r
70     standardNodePositioning->SetReduceCrossLines (reduceCrossLines);\r
71 }\r
72 \r
73 // access specific sub-sets\r
74 \r
75 CCopyFilterOptions CAllRevisionGraphOptions::GetCopyFilterOptions() const\r
76 {\r
77     return GetFilteredList<CCopyFilterOptions, ICopyFilterOption>();\r
78 }\r
79 \r
80 CModificationOptions CAllRevisionGraphOptions::GetModificationOptions() const\r
81 {\r
82     return GetFilteredList<CModificationOptions, IModificationOption>();\r
83 }\r
84 \r
85 CLayoutOptions CAllRevisionGraphOptions::GetLayoutOptions() const\r
86 {\r
87     return GetFilteredList<CLayoutOptions, ILayoutOption>();\r
88 }\r