ReactOS  0.4.14-dev-52-g6116262
mainframe.h
Go to the documentation of this file.
1 /*
2  * Copyright 2003, 2004, 2005 Martin Fuchs
3  *
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.
8  *
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.
13  *
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 
20  //
21  // Explorer clone
22  //
23  // mainframe.h
24  //
25  // Martin Fuchs, 23.07.2003
26  //
27 
28 
29 #define PM_OPEN_WINDOW (WM_APP+0x07)
30 
37 };
38 
39 
42 {
44 
47 
48  static HWND Create(const ExplorerCmd& cmd);
49  static int OpenShellFolders(LPIDA pida, HWND hFrameWnd);
50 
51  WindowHandle _hwndrebar;
52 
53  WindowHandle _htoolbar;
54  WindowHandle _haddrcombo;
55  WindowHandle _hstatusbar;
56 
57  WindowHandle _hsidebar;
59 
62 
64 
65 protected:
67 
68  HACCEL _hAccel;
70 
72  bool ProcessMessage(UINT nmsg, WPARAM wparam, LPARAM lparam, LRESULT* pres);
73  int Command(int id, int code);
74  int Notify(int id, NMHDR* pnmh);
75 
76  virtual BOOL TranslateMsg(MSG* pmsg);
77 
78  void toggle_child(HWND hwnd, UINT cmd, HWND hchild, int band_idx=-1);
79 
80  void resize_frame_client();
81  virtual void resize_frame(int cx, int cy);
82  virtual void frame_get_clientspace(PRECT prect);
83 
85  void fullscreen_move();
86 
87  void FillBookmarks();
88  virtual bool go_to(LPCTSTR url, bool new_window);
89 };
90 
91 
92 #ifndef _NO_MDI
93 
94 struct MDIMainFrame : public MainFrameBase
95 {
97 
99 
100  static HWND Create();
103 
106 
107 protected:
109 
110  WindowHandle _hextrabar;
111 #ifndef _NO_WIN_FS
112  WindowHandle _hdrivebar;
113 #endif
114 
115 protected:
117  int Command(int id, int code);
118 
119  virtual BOOL TranslateMsg(MSG* pmsg);
120 
122  bool activate_child_window(LPCTSTR filesys);
123 
124  virtual void resize_frame(int cx, int cy);
125  virtual void frame_get_clientspace(PRECT prect);
126 
127  virtual bool go_to(LPCTSTR url, bool new_window);
128 
129 #ifndef _NO_WIN_FS
131 #endif
132 };
133 
134 #endif
135 
136 
138  ShellBrowserChildT<MainFrameBase>
139  >
140 {
141  typedef ExtContextMenuHandlerT<
143  > super;
144 
146 
147  static HWND Create();
150 
151 protected:
153 
154  WindowHandle _left_hwnd;
155  WindowHandle _right_hwnd;
156 
164 
166 
168  int Command(int id, int code);
169 
170  void resize_frame(int cx, int cy);
171  void resize_children();
172  void update_clnt_rect();
173 
174  void update_shell_browser();
175  void jump_to(LPCTSTR path, int mode);
176  void jump_to(LPCITEMIDLIST path, int mode);
177 
178  // interface BrowserCallback
179  virtual void entry_selected(Entry* entry);
180 
181  void set_url(LPCTSTR url);
182 };
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: mainframe.cpp:928
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
bool activate_drive_window(LPCTSTR path)
Definition: mainframe.cpp:1249
void resize_frame(int cx, int cy)
Definition: mainframe.cpp:1536
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
Explorer command line parser.
Definition: explorer.h:89
FullScreenParameters _fullscreen
Definition: mainframe.h:66
WindowHandle _hwndrebar
Definition: mainframe.h:51
int Command(int id, int code)
Definition: mainframe.cpp:1018
Definition: ftp_var.h:139
information structure to hold current shell folder information
Definition: shellbrowser.h:34
WindowHandle _haddrcombo
Definition: mainframe.h:54
virtual BOOL TranslateMsg(MSG *pmsg)
Definition: mainframe.cpp:920
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
BOOL toggle_fullscreen()
Definition: mainframe.cpp:586
WindowHandle _hdrivebar
Definition: mainframe.h:112
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
TCHAR _drives[BUFFER_LEN]
Definition: mainframe.h:130
void resize_children()
Definition: mainframe.cpp:1577
virtual void entry_selected(Entry *entry)
Definition: mainframe.cpp:1645
int Command(int id, int code)
Definition: mainframe.cpp:388
WindowHandle _right_hwnd
Definition: mainframe.h:155
static WCHAR String[]
Definition: stringtable.c:55
UINT_PTR WPARAM
Definition: windef.h:207
MDIMainFrame(HWND hwnd)
Definition: mainframe.cpp:691
static HWND Create()
Definition: mainframe.cpp:1342
static HWND Create(const ExplorerCmd &cmd)
Definition: mainframe.cpp:40
String _url
Definition: mainframe.h:165
HMENU _hMenuFrame
Definition: mainframe.h:60
void update_clnt_rect()
Definition: mainframe.cpp:1598
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: mainframe.cpp:1384
HIMAGELIST _himl
Definition: mainframe.h:58
PreTranslateWindow super
Definition: mainframe.h:43
MainFrameBase super
Definition: mainframe.h:96
unsigned int BOOL
Definition: ntddk_ex.h:94
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
void toggle_child(HWND hwnd, UINT cmd, HWND hchild, int band_idx=-1)
Definition: mainframe.cpp:634
void fullscreen_move()
Definition: mainframe.cpp:616
void set_url(LPCTSTR url)
Definition: mainframe.cpp:1656
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
bool activate_child_window(LPCTSTR filesys)
Definition: mainframe.cpp:1277
smooth NULL
Definition: ftsmooth.c:416
virtual void frame_get_clientspace(PRECT prect)
Definition: mainframe.cpp:1178
void FillBookmarks()
Definition: mainframe.cpp:651
#define BUFFER_LEN
Definition: utility.h:97
LONG_PTR LPARAM
Definition: windef.h:208
ChildWindow * CreateChild(LPCTSTR path=NULL, int mode=OWM_EXPLORE|OWM_DETAILS)
Definition: mainframe.cpp:909
HWND _hmdiclient
Definition: mainframe.h:108
void resize_frame_client()
Definition: mainframe.cpp:551
int _last_split
Definition: mainframe.h:162
int Notify(int id, NMHDR *pnmh)
Definition: mainframe.cpp:457
Explorer frame window base class.
Definition: mainframe.h:41
virtual void resize_frame(int cx, int cy)
Definition: mainframe.cpp:512
virtual bool go_to(LPCTSTR url, bool new_window)
Definition: mainframe.cpp:681
char TCHAR
Definition: xmlstorage.h:189
static HWND Create()
Definition: mainframe.cpp:866
virtual void resize_frame(int cx, int cy)
Definition: mainframe.cpp:1190
"rooted" window with special shell namespace root
Definition: mainframe.h:34
int _split_pos
Definition: mainframe.h:161
static HWND new_window(LPCSTR lpClassName, DWORD dwStyle, HWND parent)
Definition: editor.c:54
static const WCHAR url[]
Definition: encode.c:1432
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: mainframe.cpp:301
WindowHandle _left_hwnd
Definition: mainframe.h:154
HACCEL _hAccel
Definition: mainframe.h:68
WindowHandle _hsidebar
Definition: mainframe.h:57
bool ProcessMessage(UINT nmsg, WPARAM wparam, LPARAM lparam, LRESULT *pres)
Definition: mainframe.cpp:311
uint32_t entry
Definition: isohybrid.c:63
HIMAGELIST _himl_old
Definition: mainframe.h:69
virtual BOOL TranslateMsg(MSG *pmsg)
Definition: mainframe.cpp:379
GLenum mode
Definition: glext.h:6217
menu info structure
Definition: window.h:275
MainFrameBase(HWND hwnd)
Definition: mainframe.cpp:150
WindowHandle _htoolbar
Definition: mainframe.h:53
HWND hFrameWnd
Definition: main.c:30
OPEN_WINDOW_MODE
Definition: mainframe.h:31
void update_shell_browser()
Definition: mainframe.cpp:1605
ExtContextMenuHandlerT< ShellBrowserChildT< MainFrameBase > > super
Definition: mainframe.h:143
Definition: services.c:325
ShellPathInfo _shellpath_info
Definition: mainframe.h:152
static int OpenShellFolders(LPIDA pida, HWND hFrameWnd)
Definition: mainframe.cpp:77
unsigned int UINT
Definition: ndis.h:50
HMENU _hMenuWindow
Definition: mainframe.h:61
RECT _clnt_rect
Definition: mainframe.h:163
SDIMainFrame(HWND hwnd)
Definition: mainframe.cpp:1332
virtual void frame_get_clientspace(PRECT prect)
Definition: mainframe.cpp:558
window in explore mode
Definition: mainframe.h:33
_Out_opt_ int * cx
Definition: commctrl.h:570
WindowHandle _hstatusbar
Definition: mainframe.h:55
virtual bool go_to(LPCTSTR url, bool new_window)
Definition: mainframe.cpp:1313
view files in detail mode
Definition: mainframe.h:35
void jump_to(LPCTSTR path, int mode)
Definition: mainframe.cpp:1665
LONG_PTR LRESULT
Definition: windef.h:209
int Command(int id, int code)
Definition: mainframe.cpp:1522
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
MenuInfo _menu_info
Definition: mainframe.h:63
base of all file and directory entries
Definition: entries.h:82
WindowHandle _hextrabar
Definition: mainframe.h:110
Definition: shlobj.h:490
path is given as PIDL, otherwise as LPCTSTR
Definition: mainframe.h:36
static UINT WPARAM wparam
Definition: combo.c:716