38 :
super(IID_IShellFolderViewCB),
40 _hwndFrame(hwndFrame),
41 _left_hwnd(left_hwnd),
42 _right_hwnd(right_hwnd),
43 _create_info(create_info),
102 CONTEXT(
"ShellBrowser::Init()");
144 if (!child_pidl || !child_pidl->mkid.cb)
176 CONTEXT(
"ShellBrowserChild::InitializeTree()");
182 TV_ITEM& tvItem = tvInsert.item;
184 tvInsert.hParent = 0;
189 tvItem.pszText =
_root._volname;
191 tvItem.cChildren = 1;
200 CONTEXT(
"ShellBrowser::InitDragDrop()");
218 ftetc.dwAspect = DVASPECT_CONTENT;
220 ftetc.tymed = TYMED_HGLOBAL;
231 CONTEXT(
"ShellBrowser::OnTreeGetDispInfo()");
238 lpdi->item.pszText =
entry->_display_name;
258 return found->second;
288 CONTEXT(
"ShellBrowser::OnTreeItemExpanding()");
297 entry->_shell_attribs &= ~SFGAO_HASSUBFOLDER;
303 tvItem.hItem = pnmtv->itemNew.hItem;
304 tvItem.cChildren = 0;
313 CONTEXT(
"ShellBrowser::InsertSubitems()");
332 while((hchild=hnext) != 0) {
350 if (
entry->_data.cFileName[0]==
TEXT(
'.') &&
351 (
entry->_data.cFileName[1]==
TEXT(
'\0') ||
361 tvItem.cChildren =
entry->_shell_attribs & SFGAO_HASSUBFOLDER? 1: 0;
363 if (
entry->_shell_attribs & SFGAO_SHARE) {
369 tvInsert.item = tvItem;
371 tvInsert.hParent = hParentItem;
387 CONTEXT(
"ShellBrowser::OnTreeItemSelected()");
400 CONTEXT(
"ShellBrowser::OnTreeItemRClick()");
430 CONTEXT(
"ShellBrowser::UpdateFolderView()");
461 if (pLastShellView) {
486 CONTEXT(
"ShellBrowser::OnDefaultCommand()");
488 if (pida->
cidl >= 1) {
531 CONTEXT(
"ShellBrowser::select_entry()");
564 for(
const void*
p=pidl;;) {
568 if (!
entry || !hitem)
574 p =
entry->get_next_path_component(
p);
609 CONTEXT(
"ShellBrowser::expand_folder()");
646 _shellpath_info(
info)
662 info._pos.rcNormalPosition,
674 CONTEXT(
"MDIShellBrowserChild::Init()");
736 ClientRect
rect(_hwnd);
786 ClientRect rt(_hwnd);
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
VOID WaitCursor(BOOL bBegin)
static BOOL expand(LPINT ac, LPTSTR **arg, LPCTSTR pattern)
#define STDMETHODCALLTYPE
void AddSuportedFormat(FORMATETC &ftetc)
virtual ULONG STDMETHODCALLTYPE AddRef()
virtual ULONG STDMETHODCALLTYPE Release()
OLE drop target for tree controls.
_Tp * get() const _STLP_NOTHROW
_Tp * release() _STLP_NOTHROW
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
_Rep_type::const_iterator const_iterator
COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST himl, COLORREF clrBk)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
HRESULT WINAPI RegisterDragDrop(HWND hwnd, LPDROPTARGET pDropTarget)
#define CLASSNAME_CHILDWND
HRESULT CreateViewWindow([in] IShellView *psvPrevious, [in] LPCFOLDERSETTINGS lpfs, [in] IShellBrowser *psb, [out] RECT *prcView, [out] HWND *phWnd)
HRESULT UIActivate([in] UINT uState)
HRESULT DestroyViewWindow()
HRESULT GetCurrentInfo([out] LPFOLDERSETTINGS lpfs)
HRESULT TranslateAccelerator([in] MSG *pmsg)
@ OWM_DETAILS
"rooted" window with special shell namespace root
ExplorerGlobals g_Globals
bool SplitFileSysURL(LPCTSTR url, String &dir_out, String &fname_out)
#define PM_DISPATCH_COMMAND
#define WINDOW_CREATOR_INFO(WND_CLASS, INFO_CLASS)
LPARAM TreeView_GetItemData(HWND hwndTreeView, HTREEITEM hItem)
#define DEFAULT_SPLIT_POS
static HMODULE MODULEINFO DWORD cb
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_DIRECTORY
PUIDLIST_RELATIVE WINAPI ILFindChild(PIDLIST_ABSOLUTE pidl1, PCIDLIST_ABSOLUTE pidl2)
#define TVE_COLLAPSERESET
#define TreeView_SelectItem(hwnd, hitem)
#define TreeView_Expand(hwnd, hitem, code)
#define TreeView_GetChild(hwnd, hitem)
#define TVS_SHOWSELALWAYS
#define LPSTR_TEXTCALLBACK
#define TreeView_GetRoot(hwnd)
#define TreeView_SetScrollTime(hwnd, uTime)
#define TreeView_GetNextSibling(hwnd, hitem)
#define ImageList_AddIcon(himl, hicon)
#define INDEXTOOVERLAYMASK(i)
#define TreeView_SetImageList(hwnd, himl, iImage)
#define TreeView_HitTest(hwnd, lpht)
#define TreeView_InsertItem(hwnd, lpis)
#define TVIF_SELECTEDIMAGE
#define TreeView_SetItem(hwnd, pitem)
#define TreeView_DeleteItem(hwnd, hitem)
ShellFolder & GetDesktopFolder()
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
#define SFVM_INITMENUPOPUP
struct _SFV_CREATE SFV_CREATE
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
virtual void entry_selected(Entry *entry)=0
Exception with context information.
virtual void resize_children(int cx, int cy)
void set_url(LPCTSTR url)
static ChildWindow * create(const ChildWndInfo &info, const RECT &rect, CREATORFUNC_INFO creator, LPCTSTR classname, LPCTSTR title=NULL, DWORD style=0)
base of all file and directory entries
void smart_scan(SORT_ORDER sortOrder=SORT_NAME, int scan_flags=0)
Explorer command line parser.
CtxMenuInterfaces _cm_ifs
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
const Icon & get_icon(int icon_id)
void free_icon(int icon_id)
static MDIShellBrowserChild * create(const ShellChildWndInfo &info)
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
ShellChildWndInfo _create_info
virtual void entry_selected(Entry *entry)
MDIShellBrowserChild(HWND hwnd, const ShellChildWndInfo &info)
void update_shell_browser()
ShellPathInfo _shellpath_info
LRESULT Init(LPCREATESTRUCT)
virtual String jump_to_int(LPCTSTR url)
static int OpenShellFolders(LPIDA pida, HWND hFrameWnd)
static HWND Create(const ExplorerCmd &cmd)
auto_ptr< ShellBrowser > _shellBrowser
Implementation of IShellBrowserImpl interface in explorer child windows.
bool TranslateAccelerator(LPMSG lpmsg)
HRESULT OnDefaultCommand(LPIDA pida)
TreeDropTarget * _pDropTarget
void OnTreeItemSelected(int idCtrl, LPNMTREEVIEW pnmtv)
void UpdateFolderView(IShellFolder *folder)
WindowHandle & _right_hwnd
ShellBrowser(HWND hwnd, HWND hwndFrame, HWND left_hwnd, WindowHandle &right_hwnd, ShellPathInfo &create_info, BrowserCallback *cb, CtxMenuInterfaces &cm_ifs)
void OnTreeItemExpanding(int idCtrl, LPNMTREEVIEW pnmtv)
int InsertSubitems(HTREEITEM hParentItem, Entry *entry, IShellFolder *pParentFolder)
void jump_to(LPCITEMIDLIST pidl)
virtual HRESULT STDMETHODCALLTYPE MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
shell view callback
BrowserCallback * _callback
CtxMenuInterfaces & _cm_ifs
bool jump_to_pidl(LPCITEMIDLIST pidl)
map< int, int > _image_map
bool select_folder(Entry *entry, bool expand)
HTREEITEM select_entry(HTREEITEM hitem, Entry *entry, bool expand=true)
ShellPathInfo & _create_info
ShellDirectory * _cur_dir
void OnTreeItemRClick(int idCtrl, LPNMHDR pnmh)
void OnTreeGetDispInfo(int idCtrl, LPNMHDR pnmh)
int get_image_idx(int icon_id)
information structure for creation of MDIShellBrowserChild
virtual Entry * find_entry(const void *)
shell file/directory entry
virtual ShellPath create_absolute_pidl() const
IShellFolder smart pointer.
String get_name(LPCITEMIDLIST pidl, SHGDNF flags=SHGDN_NORMAL) const
information structure to hold current shell folder information
ShellPath _root_shell_path
wrapper class for item ID lists
virtual LRESULT Init(LPCREATESTRUCT pcs)
IShellFolderViewCB * psfvcb
TW_UINT32 TW_UINT16 TW_UINT16 MSG
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
#define WM_SYSCOLORCHANGE
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HDC WINAPI GetDC(_In_opt_ HWND)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)