ReactOS  0.4.12-dev-75-g00dd17e
MDIShellBrowserChild Struct Reference

#include <shellbrowser.h>

Inheritance diagram for MDIShellBrowserChild:
Collaboration diagram for MDIShellBrowserChild:

Public Types

typedef ExtContextMenuHandlerT< ShellBrowserChildT< ChildWindow > > super
 
- Public Types inherited from ExtContextMenuHandlerT< ShellBrowserChildT< ChildWindow > >
typedef ShellBrowserChildT< ChildWindowsuper
 
- Public Types inherited from ShellBrowserChildT< ChildWindow >
typedef ChildWindow super
 
- Public Types inherited from ChildWindow
typedef PreTranslateWindow super
 
- Public Types inherited from PreTranslateWindow
typedef Window super
 
- Public Types inherited from Window
typedef map< HWND, Window * > WindowMap
 
typedef Window *(* CREATORFUNC) (HWND)
 
typedef Window *(* CREATORFUNC_INFO) (HWND, const void *)
 

Public Member Functions

 MDIShellBrowserChild (HWND hwnd, const ShellChildWndInfo &info)
 
LRESULT Init (LPCREATESTRUCT)
 
virtual String jump_to_int (LPCTSTR url)
 
- Public Member Functions inherited from ExtContextMenuHandlerT< ShellBrowserChildT< ChildWindow > >
 ExtContextMenuHandlerT (HWND hwnd)
 
 ExtContextMenuHandlerT (HWND hwnd, const PARA &info)
 
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
- Public Member Functions inherited from ShellBrowserChildT< ChildWindow >
 ShellBrowserChildT (HWND hwnd)
 
 ShellBrowserChildT (HWND hwnd, const ShellChildWndInfo &info)
 
- Public Member Functions inherited from ChildWindow
 ChildWindow (HWND hwnd, const ChildWndInfo &info)
 
bool go_to (LPCTSTR url)
 
- Public Member Functions inherited from PreTranslateWindow
 PreTranslateWindow (HWND)
 
 ~PreTranslateWindow ()
 
- Public Member Functions inherited from Window
 Window (HWND hwnd)
 
virtual ~Window ()
 
LRESULT SendParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 
LRESULT PostParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 
- Public Member Functions inherited from BrowserCallback
virtual ~BrowserCallback ()
 

Static Public Member Functions

static MDIShellBrowserChildcreate (const ShellChildWndInfo &info)
 
- Static Public Member Functions inherited from ChildWindow
static ChildWindowcreate (const ChildWndInfo &info, const RECT &rect, CREATORFUNC_INFO creator, LPCTSTR classname, LPCTSTR title=NULL, DWORD style=0)
 
- Static Public Member Functions inherited from Window
static HWND Create (CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static HWND Create (CREATORFUNC_INFO creator, const void *info, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static Windowcreate_mdi_child (const ChildWndInfo &info, const MDICREATESTRUCT &mcs, CREATORFUNC_INFO creator)
 
static LRESULT CALLBACK WindowWndProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static INT_PTR CALLBACK DialogProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static Windowget_window (HWND hwnd)
 get window controller from window handle More...
 
template<typename CLASS >
static CLASS * get_window (HWND hwnd)
 
static void register_pretranslate (HWND hwnd)
 
static void unregister_pretranslate (HWND hwnd)
 
static BOOL pretranslate_msg (LPMSG pmsg)
 
static void register_dialog (HWND hwnd)
 
static void unregister_dialog (HWND hwnd)
 
static BOOL dispatch_dialog_msg (LPMSG pmsg)
 
static int MessageLoop ()
 
static void CancelModes ()
 

Protected Member Functions

LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
void update_shell_browser ()
 
virtual void entry_selected (Entry *entry)
 
- Protected Member Functions inherited from ShellBrowserChildT< ChildWindow >
int Notify (int id, NMHDR *pnmh)
 
- Protected Member Functions inherited from ChildWindow
virtual void resize_children (int cx, int cy)
 
void set_url (LPCTSTR url)
 
- Protected Member Functions inherited from Window
virtual int Command (int id, int code)
 

Protected Attributes

ShellChildWndInfo _create_info
 
ShellPathInfo _shellpath_info
 
- Protected Attributes inherited from ExtContextMenuHandlerT< ShellBrowserChildT< ChildWindow > >
CtxMenuInterfaces _cm_ifs
 
- Protected Attributes inherited from ShellBrowserChildT< ChildWindow >
auto_ptr< ShellBrowser_shellBrowser
 
- Protected Attributes inherited from ChildWindow
MenuInfo_menu_info
 
WindowHandle _left_hwnd
 
WindowHandle _right_hwnd
 
int _focus_pane
 
int _split_pos
 
int _last_split
 
HWND _hwndFrame
 
String _statusText
 
String _url
 
stack< String_url_history
 

Additional Inherited Members

- Public Attributes inherited from Window
IAccessible IAccessible_iface
 
IOleWindow IOleWindow_iface
 
IEnumVARIANT IEnumVARIANT_iface
 
LONG ref
 
- Static Protected Member Functions inherited from Window
static Windowcreate_controller (HWND hwnd)
 create controller for a new window More...
 
static StaticWindowDataGetStaticWindowData ()
 
static LRESULT CALLBACK MDICBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
static LRESULT CALLBACK PropSheetCBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
- Static Protected Attributes inherited from Window
static WindowMap s_wnd_map
 
static const voids_new_info = NULL
 
static CREATORFUNC s_window_creator = NULL
 
static HHOOK s_hcbtHook = 0
 
static WindowSet s_pretranslate_windows
 
static WindowSet s_dialogs
 

Detailed Description

Definition at line 247 of file shellbrowser.h.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ MDIShellBrowserChild()

MDIShellBrowserChild::MDIShellBrowserChild ( HWND  hwnd,
const ShellChildWndInfo info 
)

todo Conversion of shell path into path string -> store into URL history const String& path = GetDesktopFolder().get_name(info._shell_path, SHGDN_FORADDRESSBAR); const String& parsingpath = GetDesktopFolder().get_name(info._shell_path, SHGDN_FORPARSING);

store path into history if (info._path && *info._path) _url_history.push(info._path);

Definition at line 643 of file shellbrowser.cpp.

644  : super(hwnd, info),
645  _create_info(info),
646  _shellpath_info(info) //@@ copies info -> no reference to _create_info !
647 {
656 }
ExtContextMenuHandlerT< ShellBrowserChildT< ChildWindow > > super
Definition: shellbrowser.h:253
ShellChildWndInfo _create_info
Definition: shellbrowser.h:264
ShellPathInfo _shellpath_info
Definition: shellbrowser.h:265

Member Function Documentation

◆ create()

MDIShellBrowserChild * MDIShellBrowserChild::create ( const ShellChildWndInfo info)
static

Definition at line 659 of file shellbrowser.cpp.

Referenced by MDIMainFrame::Command(), MDIMainFrame::WndProc(), and WndProc().

660 {
662  info._pos.rcNormalPosition,
665  NULL,
667 
668  return static_cast<MDIShellBrowserChild*>(child);
669 }
information structure for creation of MDIShellBrowserChild
Definition: filechild.h:44
#define SW_SHOWMAXIMIZED
Definition: winuser.h:767
#define WS_CLIPCHILDREN
Definition: pedump.c:619
static HWND child
Definition: cursoricon.c:298
#define CLASSNAME_CHILDWND
Definition: explorer.h:75
smooth NULL
Definition: ftsmooth.c:416
#define WINDOW_CREATOR_INFO(WND_CLASS, INFO_CLASS)
Definition: window.h:215
static ChildWindow * create(const ChildWndInfo &info, const RECT &rect, CREATORFUNC_INFO creator, LPCTSTR classname, LPCTSTR title=NULL, DWORD style=0)
Definition: window.cpp:369
RECT rcNormalPosition
Definition: winuser.h:3237
WINDOWPLACEMENT _pos
Definition: filechild.h:39
#define WS_MAXIMIZE
Definition: pedump.c:623

◆ entry_selected()

void MDIShellBrowserChild::entry_selected ( Entry entry)
protectedvirtual

Implements BrowserCallback.

Definition at line 778 of file shellbrowser.cpp.

779 {
780  if (_left_hwnd)
781  _shellBrowser->select_folder(entry, false);
782 
784 
785  // set size of new created shell view windows
786  ClientRect rt(_hwnd);
787  resize_children(rt.right, rt.bottom);
788 
789  // set new URL
791 
792  if (entry->get_path(path, COUNTOF(path))) {
793  String url;
794 
795  if (path[0] == ':')
796  url.printf(TEXT("shell://%s"), path);
797  else
798  url.printf(TEXT("file://%s"), path);
799 
800  set_url(url);
801  }
802 }
WindowHandle _left_hwnd
Definition: window.h:324
static WCHAR String[]
Definition: stringtable.c:55
virtual bool get_path(PTSTR path, size_t path_count) const =0
char TCHAR
Definition: xmlstorage.h:189
bool select_folder(Entry *entry, bool expand)
static const WCHAR url[]
Definition: encode.c:1432
#define MAX_PATH
Definition: compat.h:26
virtual ShellFolder get_shell_folder() const
Definition: shellfs.cpp:237
void UpdateFolderView(IShellFolder *folder)
void set_url(LPCTSTR url)
Definition: window.cpp:567
#define TEXT(s)
Definition: k32.h:26
virtual void resize_children(int cx, int cy)
Definition: window.cpp:527
Definition: services.c:325
#define COUNTOF(x)
Definition: utility.h:93
auto_ptr< ShellBrowser > _shellBrowser
Definition: shellbrowser.h:209

◆ Init()

LRESULT MDIShellBrowserChild::Init ( LPCREATESTRUCT  pcs)
virtual

Reimplemented from Window.

Definition at line 672 of file shellbrowser.cpp.

673 {
674  CONTEXT("MDIShellBrowserChild::Init()");
675 
676  if (super::Init(pcs))
677  return 1;
678 
680 
681  return 0;
682 }
struct _CONTEXT CONTEXT
virtual LRESULT Init(LPCREATESTRUCT pcs)
Definition: window.cpp:241

◆ jump_to_int()

String MDIShellBrowserChild::jump_to_int ( LPCTSTR  url)
virtual
Todo:
use fname

Implements ChildWindow.

Definition at line 757 of file shellbrowser.cpp.

758 {
759  String dir, fname;
760 
761  if (!_tcsnicmp(url, TEXT("shell://"), 8)) {
763  return url;
764  }
765 
766  if (SplitFileSysURL(url, dir, fname)) {
767 
769 
771  return FmtString(TEXT("file://%s"), (LPCTSTR)dir);
772  }
773 
774  return String();
775 }
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
static WCHAR String[]
Definition: stringtable.c:55
#define _tcsnicmp
Definition: xmlstorage.h:207
bool jump_to_pidl(LPCITEMIDLIST pidl)
unsigned int dir
Definition: maze.c:112
static const WCHAR url[]
Definition: encode.c:1432
#define TEXT(s)
Definition: k32.h:26
wrapper class for item ID lists
Definition: shellclasses.h:651
auto_ptr< ShellBrowser > _shellBrowser
Definition: shellbrowser.h:209
bool SplitFileSysURL(LPCTSTR url, String &dir_out, String &fname_out)
Definition: utility.cpp:504

◆ update_shell_browser()

void MDIShellBrowserChild::update_shell_browser ( )
protected

Definition at line 724 of file shellbrowser.cpp.

Referenced by Init().

725 {
726  int split_pos = DEFAULT_SPLIT_POS;
727 
728  if (_shellBrowser.get()) {
729  split_pos = _split_pos;
730  delete _shellBrowser.release();
731  }
732 
733  // create explorer treeview
735  if (!_left_hwnd) {
736  ClientRect rect(_hwnd);
737 
740  0, rect.top, split_pos-SPLIT_WIDTH/2, rect.bottom-rect.top,
741  _hwnd, (HMENU)IDC_FILETREE, g_Globals._hInstance, 0);
742  }
743  } else {
744  if (_left_hwnd) {
746  _left_hwnd = 0;
747  }
748  }
749 
751  _shellpath_info, this, _cm_ifs));
752 
753  _shellBrowser->Init();
754 }
HWND _hwndFrame
Definition: window.h:331
WindowHandle _left_hwnd
Definition: window.h:324
#define TVS_LINESATROOT
Definition: commctrl.h:3216
#define IDC_FILETREE
Definition: resource.h:188
WindowHandle _right_hwnd
Definition: window.h:325
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI DestroyWindow(_In_ HWND)
& rect
Definition: startmenu.cpp:1413
#define SPLIT_WIDTH
Definition: eventvwr.c:62
#define DEFAULT_SPLIT_POS
Definition: window.h:270
_Tp * release() _STLP_NOTHROW
Definition: _auto_ptr.h:53
#define TVS_HASBUTTONS
Definition: commctrl.h:3214
#define CreateWindowEx
Definition: winuser.h:5621
smooth NULL
Definition: ftsmooth.c:416
_Tp * get() const _STLP_NOTHROW
Definition: _auto_ptr.h:66
#define WC_TREEVIEW
Definition: commctrl.h:3212
ShellChildWndInfo _create_info
Definition: shellbrowser.h:264
HINSTANCE _hInstance
Definition: globals.h:270
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
#define WS_TABSTOP
Definition: pedump.c:634
ShellPathInfo _shellpath_info
Definition: shellbrowser.h:265
int _split_pos
Definition: window.h:328
#define TVS_SHOWSELALWAYS
Definition: commctrl.h:3219
#define TVS_HASLINES
Definition: commctrl.h:3215
#define WS_VISIBLE
Definition: pedump.c:620
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
auto_ptr< ShellBrowser > _shellBrowser
Definition: shellbrowser.h:209
static IShellBrowser ShellBrowser
Definition: htmldoc.c:3702

◆ WndProc()

LRESULT MDIShellBrowserChild::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
protectedvirtual
Todo:
refresh shell child

Reimplemented from Window.

Definition at line 685 of file shellbrowser.cpp.

686 {
687  switch(nmsg) {
688  case PM_DISPATCH_COMMAND: {
689  switch(LOWORD(wparam)) {
690  case ID_WINDOW_NEW: {CONTEXT("MDIShellBrowserChild PM_DISPATCH_COMMAND ID_WINDOW_NEW");
692  break;}
693 
694  case ID_REFRESH:
697  break;
698 
699  case ID_VIEW_SDI:
701  break;
702 
703  default:
704  return super::WndProc(nmsg, wparam, lparam);
705  }
706  return TRUE;}
707 
708  case WM_SYSCOLORCHANGE:
709  /* Forward WM_SYSCOLORCHANGE to common controls */
712  break;
713 
714  case PM_TRANSLATE_MSG:
716 
717  default:
718  return super::WndProc(nmsg, wparam, lparam);
719  }
720 
721  return 0;
722 }
bool TranslateAccelerator(LPMSG lpmsg)
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
struct _CONTEXT CONTEXT
#define TRUE
Definition: types.h:120
Explorer command line parser.
Definition: explorer.h:89
#define ID_REFRESH
Definition: resource.h:18
static MDIShellBrowserChild * create(const ShellChildWndInfo &info)
WindowHandle _left_hwnd
Definition: window.h:324
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
WindowHandle _right_hwnd
Definition: window.h:325
#define PM_TRANSLATE_MSG
Definition: window.h:266
static HWND Create(const ExplorerCmd &cmd)
Definition: mainframe.cpp:40
void invalidate_cache()
#define ID_VIEW_SDI
Definition: resource.h:221
#define ID_WINDOW_NEW
Definition: resource.h:227
String _url
Definition: window.h:333
ShellChildWndInfo _create_info
Definition: shellbrowser.h:264
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
UINT WPARAM LPARAM lparam
Definition: msvc.h:92
#define SendMessage
Definition: winuser.h:5709
#define PM_DISPATCH_COMMAND
Definition: window.h:265
#define LOWORD(l)
Definition: pedump.c:82
auto_ptr< ShellBrowser > _shellBrowser
Definition: shellbrowser.h:209
UINT WPARAM wparam
Definition: msvc.h:92

Member Data Documentation

◆ _create_info

ShellChildWndInfo MDIShellBrowserChild::_create_info
protected

Definition at line 264 of file shellbrowser.h.

Referenced by update_shell_browser(), and WndProc().

◆ _shellpath_info

ShellPathInfo MDIShellBrowserChild::_shellpath_info
protected

Definition at line 265 of file shellbrowser.h.

Referenced by update_shell_browser().


The documentation for this struct was generated from the following files: