2 * Copyright 2003, 2004 Martin Fuchs
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 // Martin Fuchs, 23.07.2003
29 /// information structure for creation of FileChildWindow
30 struct FileChildWndInfo
: public ChildWndInfo
32 typedef ChildWndInfo super
;
34 FileChildWndInfo(HWND hmdiclient
, LPCTSTR path
, ENTRY_TYPE etype
=ET_UNKNOWN
);
40 int _open_mode
; //OPEN_WINDOW_MODE
43 /// information structure for creation of MDIShellBrowserChild
44 struct ShellChildWndInfo
: public FileChildWndInfo
46 typedef FileChildWndInfo super
;
48 ShellChildWndInfo(HWND hmdiclient
, LPCTSTR path
, const ShellPath
& root_shell_path
);
50 ShellPath _shell_path
;
51 ShellPath _root_shell_path
;
54 /// information structure for creation of FileChildWindow for NT object namespace
55 struct NtObjChildWndInfo
: public FileChildWndInfo
57 typedef FileChildWndInfo super
;
59 NtObjChildWndInfo(HWND hmdiclient
, LPCTSTR path
);
62 /// information structure for creation of FileChildWindow for the Registry
63 struct RegistryChildWndInfo
: public FileChildWndInfo
65 typedef FileChildWndInfo super
;
67 RegistryChildWndInfo(HWND hmdiclient
, LPCTSTR path
);
70 /// information structure for creation of FileChildWindow
71 struct FATChildWndInfo
: public FileChildWndInfo
73 typedef FileChildWndInfo super
;
75 FATChildWndInfo(HWND hmdiclient
, LPCTSTR path
);
78 /// information structure for creation of WebChildWindow
79 struct WebChildWndInfo
: public FileChildWndInfo
81 typedef FileChildWndInfo super
;
83 WebChildWndInfo(HWND hmdiclient
, LPCTSTR url
);
87 /// MDI child window displaying file lists
88 struct FileChildWindow
: public ExtContextMenuHandlerT
<ChildWindow
>
90 typedef ExtContextMenuHandlerT
<ChildWindow
> super
;
92 FileChildWindow(HWND hwnd
, const FileChildWndInfo
& info
);
94 static FileChildWindow
* create(const FileChildWndInfo
& info
);
97 LRESULT
WndProc(UINT nmsg
, WPARAM wparam
, LPARAM lparam
);
98 int Command(int id
, int code
);
99 int Notify(int id
, NMHDR
* pnmh
);
101 virtual void resize_children(int cx
, int cy
);
102 virtual String
jump_to_int(LPCTSTR url
);
104 void scan_entry(Entry
* entry
);
106 bool expand_entry(Entry
* dir
);
107 static void collapse_entry(Pane
* pane
, Entry
* dir
);
109 void set_curdir(Entry
* entry
);
110 void activate_entry(Pane
* pane
);
116 TCHAR _path
[MAX_PATH
];
117 bool _header_wdths_ok
;
120 const Root
& get_root() const {return _root
;}
122 void set_focus_pane(Pane
* pane
)
123 {_focus_pane
= pane
==_right
? 1: 0;}
125 void switch_focus_pane()
126 {SetFocus(_focus_pane
? *_left
: *_right
);}
130 /// The "Execute..."-dialog lets the user enter a command line to launch.
131 struct ExecuteDialog
{ ///@todo use class Dialog
135 static INT_PTR CALLBACK
WndProc(HWND hwnd
, UINT nmsg
, WPARAM wparam
, LPARAM lparam
);