ReactOS  0.4.15-dev-1397-g19779b3
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)
 
 Window (INT cx, INT cy, BOOL fAutoHide=FALSE)
 
virtual ~Window ()
 
virtual LRESULT CALLBACK WindowProcDx (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void DoAction ()
 
- 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 ()
 
static BOOL DoRegisterClass (HINSTANCE hInstance)
 
static HWND DoCreateMainWnd (HINSTANCE hInstance, LPCTSTR pszText, INT cx, INT cy, DWORD style=WS_POPUP|WS_THICKFRAME|WS_CLIPCHILDREN, DWORD exstyle=WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST, BOOL fAutoHide=FALSE)
 
static INT DoMainLoop ()
 
static WindowGetAppbarData (HWND hwnd)
 
static LRESULT CALLBACK WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static DWORD WINAPI ActionThreadFunc (LPVOID args)
 

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)
 
void OnCommand (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
 
void OnPaint (HWND hwnd)
 
void OnRButtonDown (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
 
void OnKey (HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
 
void OnAppBarCallback (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL AppBar_Register (HWND hwnd)
 
BOOL AppBar_UnRegister (HWND hwnd)
 
BOOL AppBar_SetAutoHide (HWND hwnd, BOOL fHide)
 
BOOL AppBar_AutoHide (HWND hwnd)
 
BOOL AppBar_NoAutoHide (HWND hwnd)
 
BOOL AppBar_SetSide (HWND hwnd, UINT uSide)
 
void AppBar_SetAlwaysOnTop (HWND hwnd, BOOL fOnTop)
 
void AppBar_Hide (HWND hwnd)
 
void AppBar_UnHide (HWND hwnd)
 
void AppBar_SetAutoHideTimer (HWND hwnd)
 
void AppBar_SetAutoUnhideTimer (HWND hwnd)
 
void AppBar_Size (HWND hwnd)
 
void AppBar_QueryPos (HWND hwnd, LPRECT lprc)
 
void AppBar_QuerySetPos (UINT uEdge, LPRECT lprc, PAPPBARDATA pabd, BOOL fMove)
 
void AppBar_PosChanged (PAPPBARDATA pabd)
 
BOOL OnCreate (HWND hwnd, LPCREATESTRUCT lpCreateStruct)
 
void OnActivate (HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized)
 
void OnWindowPosChanged (HWND hwnd, const LPWINDOWPOS lpwpos)
 
void OnSize (HWND hwnd, UINT state, int cx, int cy)
 
void OnMove (HWND hwnd, int x, int y)
 
void OnNCDestroy (HWND hwnd)
 
void OnTimer (HWND hwnd, UINT id)
 
UINT OnNCHitTest (HWND hwnd, int x, int y)
 
void OnLButtonDown (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
 
void OnMouseMove (HWND hwnd, int x, int y, UINT keyFlags)
 
void OnLButtonUp (HWND hwnd, int x, int y, UINT keyFlags)
 
void GetWorkArea (LPRECT prc) const
 

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
 
- Protected Attributes inherited from Window
HWND m_hwnd
 
BOOL m_fAutoHide
 
BOOL m_fOnTop
 
BOOL m_fHiding
 
UINT m_uSide
 
LONG m_cxWidth
 
LONG m_cyHeight
 
LONG m_cxSave
 
LONG m_cySave
 
BOOL m_fAppBarRegd
 
BOOL m_fMoving
 
BOOL m_bDragged
 
POINT m_ptDragOn
 
RECT m_rcAppBar
 
RECT m_rcDrag
 

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),
646  _shellpath_info(info) //@@ copies info -> no reference to _create_info !
647 {
656 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
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.

660 {
662  info._pos.rcNormalPosition,
665  NULL,
666  WS_CLIPCHILDREN | (info._pos.showCmd==SW_SHOWMAXIMIZED? WS_MAXIMIZE: 0));
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
#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
#define NULL
Definition: types.h:112
#define WS_MAXIMIZE
Definition: pedump.c:623

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

◆ entry_selected()

void MDIShellBrowserChild::entry_selected ( Entry entry)
protectedvirtual

Implements BrowserCallback.

Definition at line 778 of file shellbrowser.cpp.

779 {
780  if (_left_hwnd)
782 
783  _shellBrowser->UpdateFolderView(entry->get_shell_folder());
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
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
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:34
void UpdateFolderView(IShellFolder *folder)
void set_url(LPCTSTR url)
Definition: window.cpp:567
uint32_t entry
Definition: isohybrid.c:63
#define TEXT(s)
Definition: k32.h:26
virtual void resize_children(int cx, int cy)
Definition: window.cpp:527
#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 }
virtual LRESULT Init(LPCREATESTRUCT pcs)
Definition: window.cpp:241
struct _CONTEXT CONTEXT

◆ 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
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
#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.

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:3245
#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:3243
#define CreateWindowEx
Definition: winuser.h:5730
_Tp * get() const _STLP_NOTHROW
Definition: _auto_ptr.h:66
#define WC_TREEVIEW
Definition: commctrl.h:3241
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 NULL
Definition: types.h:112
#define TVS_SHOWSELALWAYS
Definition: commctrl.h:3248
#define TVS_HASLINES
Definition: commctrl.h:3244
#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

Referenced by Init().

◆ 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
Explorer command line parser.
Definition: explorer.h:89
#define ID_REFRESH
Definition: resource.h:16
static MDIShellBrowserChild * create(const ShellChildWndInfo &info)
WindowHandle _left_hwnd
Definition: window.h:324
#define TRUE
Definition: types.h:120
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
WindowHandle _right_hwnd
Definition: window.h:325
struct _CONTEXT CONTEXT
#define PM_TRANSLATE_MSG
Definition: window.h:266
static HWND Create(const ExplorerCmd &cmd)
Definition: mainframe.cpp:40
void invalidate_cache()
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#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)
#define SendMessage
Definition: winuser.h:5818
#define PM_DISPATCH_COMMAND
Definition: window.h:265
#define LOWORD(l)
Definition: pedump.c:82
auto_ptr< ShellBrowser > _shellBrowser
Definition: shellbrowser.h:209
static UINT WPARAM wparam
Definition: combo.c:716

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: