1 //------------------------------------------------------------------------------
2 // emFileManControlPanel.h
3 //
4 // Copyright (C) 2006-2008,2010,2014-2016 Oliver Hamann.
5 //
6 // Homepage: http://eaglemode.sourceforge.net/
7 //
8 // This program is free software: you can redistribute it and/or modify it under
9 // the terms of the GNU General Public License version 3 as published by the
10 // Free Software Foundation.
11 //
12 // This program is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 // FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for
15 // more details.
16 //
17 // You should have received a copy of the GNU General Public License version 3
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 //------------------------------------------------------------------------------
20 
21 #ifndef emFileManControlPanel_h
22 #define emFileManControlPanel_h
23 
24 #ifndef emFileManModel_h
25 #include <emFileMan/emFileManModel.h>
26 #endif
27 
28 #ifndef emFileManViewConfig_h
29 #include <emFileMan/emFileManViewConfig.h>
30 #endif
31 
32 
33 class emFileManControlPanel : public emLinearLayout {
34 
35 public:
36 
37 	emFileManControlPanel(ParentArg parent, const emString & name,
38 	                      emView & contentView);
39 
40 	virtual ~emFileManControlPanel();
41 
42 protected:
43 
44 	virtual bool Cycle();
45 
46 private:
47 
48 	void UpdateButtonStates();
49 
50 	class Group : public emRasterGroup {
51 	public:
52 		Group(ParentArg parent, const emString & name,
53 		      emView & contentView, emFileManModel * fmModel,
54 		      const emFileManModel::CommandNode * cmd);
55 		virtual ~Group();
56 	protected:
57 		virtual bool Cycle();
58 		virtual void AutoExpand();
59 	private:
60 		class Button : public emButton {
61 		public:
62 			Button(ParentArg parent, const emString & name,
63 			       emView & contentView, emFileManModel * fmModel,
64 			       const emFileManModel::CommandNode * cmd);
65 			virtual ~Button();
66 		protected:
67 			virtual void Clicked();
68 		private:
69 			emView & ContentView;
70 			emRef<emFileManModel> FMModel;
71 			emString CmdPath;
72 		};
73 		emView & ContentView;
74 		emRef<emFileManModel> FMModel;
75 		emString CmdPath;
76 	};
77 
78 	emView & ContentView;
79 	emRef<emFileManModel> FMModel;
80 	emRef<emFileManViewConfig> FMVConfig;
81 	emRef<emFileManThemeNames> FMThemeNames;
82 
83 	emPackGroup * GrView;
84 		emRadioButton::Mechanism RbmAspect;
85 		emRadioButton::Mechanism RbmTheme;
86 		emRadioButton * RbSortByName;
87 		emRadioButton * RbSortByDate;
88 		emRadioButton * RbSortBySize;
89 		emRadioButton * RbSortByEnding;
90 		emRadioButton * RbSortByClass;
91 		emRadioButton * RbSortByVersion;
92 		emCheckButton * CbSortDirectoriesFirst;
93 		emCheckButton * CbShowHiddenFiles;
94 		emRadioButton * RbPerLocale;
95 		emRadioButton * RbCaseSensitive;
96 		emRadioButton * RbCaseInsensitive;
97 		emCheckButton * CbAutosave;
98 		emButton * BtSaveAsDefault;
99 	emRasterGroup * GrSelection;
100 		emButton * BtSelectAll;
101 		emButton * BtClearSelection;
102 		emButton * BtSwapSelection;
103 		emButton * BtPaths2Clipboard;
104 		emButton * BtNames2Clipboard;
105 		emLinearGroup * GrSelInfo;
106 			emPanel * SelInfo;
107 	emRasterGroup * GrCommand;
108 };
109 
110 
111 #endif
112