ReactOS 0.4.15-dev-7928-g68a8619
SDIMainFrame Struct Reference

#include <mainframe.h>

Inheritance diagram for SDIMainFrame:
Collaboration diagram for SDIMainFrame:

Public Types

typedef ExtContextMenuHandlerT< ShellBrowserChildT< MainFrameBase > > super
 
- Public Types inherited from ExtContextMenuHandlerT< ShellBrowserChildT< MainFrameBase > >
typedef ShellBrowserChildT< MainFrameBasesuper
 
- Public Types inherited from ShellBrowserChildT< MainFrameBase >
typedef MainFrameBase super
 
- Public Types inherited from MainFrameBase
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

 SDIMainFrame (HWND hwnd)
 
- Public Member Functions inherited from ExtContextMenuHandlerT< ShellBrowserChildT< MainFrameBase > >
 ExtContextMenuHandlerT (HWND hwnd)
 
 ExtContextMenuHandlerT (HWND hwnd, const PARA &info)
 
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
- Public Member Functions inherited from ShellBrowserChildT< MainFrameBase >
 ShellBrowserChildT (HWND hwnd)
 
 ShellBrowserChildT (HWND hwnd, const ShellChildWndInfo &info)
 
- Public Member Functions inherited from MainFrameBase
 MainFrameBase (HWND hwnd)
 
 ~MainFrameBase ()
 
- 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 ()
 
virtual void entry_selected (Entry *entry)=0
 

Static Public Member Functions

static HWND Create ()
 
static HWND Create (LPCTSTR path, int mode=OWM_EXPLORE|OWM_DETAILS)
 
static HWND Create (LPCITEMIDLIST pidl, int mode=OWM_EXPLORE|OWM_DETAILS|OWM_PIDL)
 
- Static Public Member Functions inherited from MainFrameBase
static HWND Create (const ExplorerCmd &cmd)
 
static int OpenShellFolders (LPIDA pida, HWND hFrameWnd)
 
- 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
 
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)
 
int Command (int id, int code)
 
void resize_frame (int cx, int cy)
 
void resize_children ()
 
void update_clnt_rect ()
 
void update_shell_browser ()
 
void jump_to (LPCTSTR path, int mode)
 
void jump_to (LPCITEMIDLIST path, int mode)
 
virtual void entry_selected (Entry *entry)
 
void set_url (LPCTSTR url)
 
- Protected Member Functions inherited from ShellBrowserChildT< MainFrameBase >
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
int Notify (int id, NMHDR *pnmh)
 
- Protected Member Functions inherited from MainFrameBase
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
bool ProcessMessage (UINT nmsg, WPARAM wparam, LPARAM lparam, LRESULT *pres)
 
int Command (int id, int code)
 
int Notify (int id, NMHDR *pnmh)
 
virtual BOOL TranslateMsg (MSG *pmsg)
 
void toggle_child (HWND hwnd, UINT cmd, HWND hchild, int band_idx=-1)
 
void resize_frame_client ()
 
virtual void resize_frame (int cx, int cy)
 
virtual void frame_get_clientspace (PRECT prect)
 
BOOL toggle_fullscreen ()
 
void fullscreen_move ()
 
void FillBookmarks ()
 
virtual bool go_to (LPCTSTR url, bool new_window)
 
- Protected Member Functions inherited from Window
virtual LRESULT Init (LPCREATESTRUCT pcs)
 
virtual LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
virtual int Command (int id, int code)
 
virtual int Notify (int id, NMHDR *pnmh)
 
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

ShellPathInfo _shellpath_info
 
WindowHandle _left_hwnd
 
WindowHandle _right_hwnd
 
int _split_pos
 
int _last_split
 
RECT _clnt_rect
 
String _url
 
- Protected Attributes inherited from ExtContextMenuHandlerT< ShellBrowserChildT< MainFrameBase > >
CtxMenuInterfaces _cm_ifs
 
- Protected Attributes inherited from ShellBrowserChildT< MainFrameBase >
auto_ptr< ShellBrowser_shellBrowser
 
- Protected Attributes inherited from MainFrameBase
FullScreenParameters _fullscreen
 
HACCEL _hAccel
 
HIMAGELIST _himl_old
 
- 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 MainFrameBase
WindowHandle _hwndrebar
 
WindowHandle _htoolbar
 
WindowHandle _haddrcombo
 
WindowHandle _hstatusbar
 
WindowHandle _hsidebar
 
HIMAGELIST _himl
 
HMENU _hMenuFrame
 
HMENU _hMenuWindow
 
MenuInfo _menu_info
 
- 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
 
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 137 of file mainframe.h.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ SDIMainFrame()

SDIMainFrame::SDIMainFrame ( HWND  hwnd)

Definition at line 1332 of file mainframe.cpp.

1333 : super(hwnd)
1334{
1337
1338 /* wait for PM_OPEN_WINDOW message before creating a shell view
1339 update_shell_browser();*/
1340}
#define DEFAULT_SPLIT_POS
Definition: window.h:270
int _last_split
Definition: mainframe.h:162
ExtContextMenuHandlerT< ShellBrowserChildT< MainFrameBase > > super
Definition: mainframe.h:143
int _split_pos
Definition: mainframe.h:161
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Member Function Documentation

◆ Command()

int SDIMainFrame::Command ( int  id,
int  code 
)
protectedvirtual

Reimplemented from MainFrameBase.

Definition at line 1522 of file mainframe.cpp.

1523{
1524 switch(id) {
1525 case ID_VIEW_MDI:
1527 break;
1528
1529 default:
1530 return super::Command(id, code);
1531 }
1532
1533 return 0;
1534}
#define ID_VIEW_MDI
Definition: resource.h:220
Explorer command line parser.
Definition: explorer.h:90
int Command(int id, int code)
Definition: mainframe.cpp:388
static HWND Create(const ExplorerCmd &cmd)
Definition: mainframe.cpp:40
String _url
Definition: mainframe.h:165
Definition: inflate.c:139

◆ Create() [1/3]

HWND SDIMainFrame::Create ( )
static

Definition at line 1342 of file mainframe.cpp.

1343{
1345
1349 0/*hwndDesktop*/, hMenuFrame);
1350}
#define IDS_TITLE
Definition: resource.h:30
HMENU hMenuFrame
Definition: main.c:37
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
#define IDM_SDIFRAME
Definition: resource.h:69
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HINSTANCE _hInstance
Definition: globals.h:270
ATOM _hframeClass
Definition: globals.h:274
convenient loading of string resources
Definition: globals.h:304
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)
Definition: window.cpp:87
#define LoadMenu
Definition: winuser.h:5817
#define CW_USEDEFAULT
Definition: winuser.h:225
#define MAKEINTRESOURCE
Definition: winuser.h:591
const CHAR * LPCTSTR
Definition: xmlstorage.h:193

Referenced by StartMenuHandler::Command(), MainFrameBase::Create(), Create(), and MainFrameBase::OpenShellFolders().

◆ Create() [2/3]

HWND SDIMainFrame::Create ( LPCITEMIDLIST  pidl,
int  mode = OWM_EXPLORE|OWM_DETAILS|OWM_PIDL 
)
static

Definition at line 1352 of file mainframe.cpp.

1353{
1354 HWND hFrame = Create();
1355 if (!hFrame)
1356 return 0;
1357
1358 ShowWindow(hFrame, SW_SHOW);
1359
1360 SDIMainFrame* pFrame = GET_WINDOW(SDIMainFrame, hFrame);
1361
1362 if (pFrame)
1363 pFrame->jump_to(pidl, mode);
1364
1365 return hFrame;
1366}
GLenum mode
Definition: glext.h:6217
#define GET_WINDOW(CLASS, hwnd)
Definition: window.h:88
static HWND Create()
Definition: mainframe.cpp:1342
void jump_to(LPCTSTR path, int mode)
Definition: mainframe.cpp:1665
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:775

◆ Create() [3/3]

HWND SDIMainFrame::Create ( LPCTSTR  path,
int  mode = OWM_EXPLORE|OWM_DETAILS 
)
static

Definition at line 1368 of file mainframe.cpp.

1369{
1370 HWND hFrame = Create();
1371 if (!hFrame)
1372 return 0;
1373
1374 ShowWindow(hFrame, SW_SHOW);
1375
1376 MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hFrame);
1377
1378 if (pMainFrame)
1379 pMainFrame->CreateChild(path, mode);
1380
1381 return hFrame;
1382}
ChildWindow * CreateChild(LPCTSTR path=NULL, int mode=OWM_EXPLORE|OWM_DETAILS)
Definition: mainframe.cpp:909

◆ entry_selected()

void SDIMainFrame::entry_selected ( Entry entry)
protectedvirtual

Implements BrowserCallback.

Definition at line 1645 of file mainframe.cpp.

1646{
1647 if (_left_hwnd)
1649
1650 _shellBrowser->UpdateFolderView(entry->get_shell_folder());
1651
1652 // set size of new created shell view windows
1654}
uint32_t entry
Definition: isohybrid.c:63
WindowHandle _left_hwnd
Definition: mainframe.h:154
void resize_children()
Definition: mainframe.cpp:1577
auto_ptr< ShellBrowser > _shellBrowser
Definition: shellbrowser.h:209
void UpdateFolderView(IShellFolder *folder)
bool select_folder(Entry *entry, bool expand)

◆ jump_to() [1/2]

void SDIMainFrame::jump_to ( LPCITEMIDLIST  path,
int  mode 
)
protected

Definition at line 1679 of file mainframe.cpp.

1680{
1682 ShellPath shell_path = path;
1683
1684 _shellBrowser->jump_to(shell_path);
1685
1686 _shellpath_info._shell_path = shell_path;
1687 } else {
1690
1692 }
1693}
_Tp * get() const _STLP_NOTHROW
Definition: _auto_ptr.h:66
@ OWM_PIDL
view files in detail mode
Definition: mainframe.h:35
void update_shell_browser()
Definition: mainframe.cpp:1605
ShellPathInfo _shellpath_info
Definition: mainframe.h:152
void jump_to(LPCITEMIDLIST pidl)
ShellPath _shell_path
Definition: shellbrowser.h:45
wrapper class for item ID lists
Definition: shellclasses.h:652

◆ jump_to() [2/2]

void SDIMainFrame::jump_to ( LPCTSTR  path,
int  mode 
)
protected

Definition at line 1665 of file mainframe.cpp.

1666{/*@@todo
1667 if (_shellBrowser.get() && (_shellpath_info._open_mode&~OWM_PIDL)==(mode&~OWM_PIDL)) {
1668 _shellBrowser->jump_to(path);
1669
1670 _shellpath_info._shell_path = path;
1671 } else */{
1674
1676 }
1677}

Referenced by Create(), and WndProc().

◆ resize_children()

void SDIMainFrame::resize_children ( )
protected

Definition at line 1577 of file mainframe.cpp.

1578{
1579 HDWP hdwp = BeginDeferWindowPos(2);
1580
1581 int cx = _clnt_rect.left;
1582
1583 if (_left_hwnd) {
1585
1587 } else {
1588 //_split_pos = -1;
1589 cx = 0;
1590 }
1591
1592 if (_right_hwnd)
1594
1595 EndDeferWindowPos(hdwp);
1596}
#define SPLIT_WIDTH
Definition: eventvwr.c:45
_Out_opt_ int * cx
Definition: commctrl.h:585
WindowHandle _right_hwnd
Definition: mainframe.h:155
RECT _clnt_rect
Definition: mainframe.h:163
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define SWP_NOACTIVATE
Definition: winuser.h:1242
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOZORDER
Definition: winuser.h:1247
HDWP WINAPI BeginDeferWindowPos(_In_ int)

Referenced by entry_selected(), resize_frame(), and WndProc().

◆ resize_frame()

void SDIMainFrame::resize_frame ( int  cx,
int  cy 
)
protectedvirtual

Reimplemented from MainFrameBase.

Definition at line 1536 of file mainframe.cpp.

1537{
1538 if (cy <= 0)
1539 return; // avoid resizing children when receiving RBN_AUTOSIZE while getting minimized
1540
1541 RECT rect = {0, 0, cx, cy};
1542
1543 if (_hwndrebar) {
1544 int height = ClientRect(_hwndrebar).bottom;
1545 rect.top += height;
1546 rect.top += 5;
1547 } else {
1550 WindowRect rt(_htoolbar);
1551 rect.top = rt.bottom;
1552 // rect.bottom -= rt.bottom;
1553 }
1554 }
1555
1557 int parts[] = {300, 500};
1558
1561 ClientRect rt(_hstatusbar);
1562 rect.bottom -= rt.bottom;
1563 }
1564
1566 WindowRect rt(_hsidebar);
1567 rect.left += rt.right-rt.left;
1568
1569 SetWindowPos(_hsidebar, 0, -1, rect.top-1, rt.right-rt.left, rect.bottom-rect.top+1, SWP_NOACTIVATE|SWP_NOZORDER);
1570 }
1571
1572 _clnt_rect = rect;
1573
1575}
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
static const D3D_BLOB_PART parts[]
Definition: blob.c:76
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
#define SB_SETPARTS
Definition: commctrl.h:1954
& rect
Definition: startmenu.cpp:1413
WindowHandle _hstatusbar
Definition: mainframe.h:55
WindowHandle _htoolbar
Definition: mainframe.h:53
WindowHandle _hsidebar
Definition: mainframe.h:57
WindowHandle _hwndrebar
Definition: mainframe.h:51
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_SIZE
Definition: winuser.h:1611
#define SendMessage
Definition: winuser.h:5843
BOOL WINAPI IsWindowVisible(_In_ HWND)

Referenced by update_clnt_rect(), update_shell_browser(), and WndProc().

◆ set_url()

void SDIMainFrame::set_url ( LPCTSTR  url)
protected

Definition at line 1656 of file mainframe.cpp.

1657{
1658 if (_url != url) {
1659 _url = url;
1661 }
1662}
static const WCHAR url[]
Definition: encode.c:1432
WindowHandle _haddrcombo
Definition: mainframe.h:54
#define SetWindowText
Definition: winuser.h:5857

◆ update_clnt_rect()

void SDIMainFrame::update_clnt_rect ( )
protected

Definition at line 1598 of file mainframe.cpp.

1599{
1600 ClientRect rect(_hwnd);
1601
1602 resize_frame(rect.right, rect.bottom);
1603}
void resize_frame(int cx, int cy)
Definition: mainframe.cpp:1536

Referenced by update_shell_browser().

◆ update_shell_browser()

void SDIMainFrame::update_shell_browser ( )
protected

Definition at line 1605 of file mainframe.cpp.

1606{
1607 int split_pos = DEFAULT_SPLIT_POS;
1608
1609 if (_shellBrowser.get()) {
1610 split_pos = _split_pos;
1611 delete _shellBrowser.release();
1612 }
1613
1614 // create explorer treeview
1616 if (!_left_hwnd) {
1617 ClientRect rect(_hwnd);
1618
1621 0, rect.top, split_pos-SPLIT_WIDTH/2, rect.bottom-rect.top,
1623
1624 // display tree window as long as the shell view is not yet visible
1625 resize_frame(rect.right, rect.bottom);
1626 MoveWindow(_left_hwnd, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, TRUE);
1627 }
1628 } else {
1629 if (_left_hwnd) {
1631 _left_hwnd = 0;
1632 }
1633 }
1634
1636 _shellpath_info, this, _cm_ifs));
1637
1638 if (_left_hwnd)
1640
1641 // update _clnt_rect and set size of new created shell view windows
1643}
_Tp * release() _STLP_NOTHROW
Definition: _auto_ptr.h:53
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
@ OWM_EXPLORE
Definition: mainframe.h:32
#define IDC_FILETREE
Definition: resource.h:188
#define WS_CHILD
Definition: pedump.c:617
#define WS_TABSTOP
Definition: pedump.c:634
#define WS_VISIBLE
Definition: pedump.c:620
#define TVS_LINESATROOT
Definition: commctrl.h:3249
#define TVS_SHOWSELALWAYS
Definition: commctrl.h:3252
#define TVS_HASLINES
Definition: commctrl.h:3248
#define WC_TREEVIEW
Definition: commctrl.h:3245
#define TVS_HASBUTTONS
Definition: commctrl.h:3247
#define TVS_NOTOOLTIPS
Definition: commctrl.h:3254
void update_clnt_rect()
Definition: mainframe.cpp:1598
Implementation of IShellBrowserImpl interface in explorer child windows.
Definition: ieframe.h:84
#define CreateWindowEx
Definition: winuser.h:5755
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)

Referenced by jump_to().

◆ WndProc()

LRESULT SDIMainFrame::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
protectedvirtual
Todo:
read paths and window placements from registry
Todo:
content of 'path' not used any more

Reimplemented from MainFrameBase.

Definition at line 1384 of file mainframe.cpp.

1385{
1386 switch(nmsg) {
1387 case WM_SIZE:
1389 break;
1390
1391 case WM_PAINT: {
1392 PaintCanvas canvas(_hwnd);
1393
1394 if (_left_hwnd) {
1395 ClientRect rt(_hwnd);
1396 rt.left = _split_pos-SPLIT_WIDTH/2;
1397 rt.right = _split_pos+SPLIT_WIDTH/2+1;
1398
1399 if (_right_hwnd) {
1400 WindowRect right_rect(_right_hwnd);
1401 ScreenToClient(_hwnd, &right_rect);
1402 rt.top = right_rect.top;
1403 rt.bottom = right_rect.bottom;
1404 }
1405
1406 HBRUSH lastBrush = SelectBrush(canvas, GetStockBrush(COLOR_SPLITBAR));
1407 Rectangle(canvas, rt.left, rt.top-1, rt.right, rt.bottom+1);
1408 SelectObject(canvas, lastBrush);
1409 }
1410 break;}
1411
1412 case WM_SETCURSOR:
1413 if (_left_hwnd)
1414 if (LOWORD(lparam) == HTCLIENT) {
1415 POINT pt;
1416 GetCursorPos(&pt);
1417 ScreenToClient(_hwnd, &pt);
1418
1419 if (pt.x>=_split_pos-SPLIT_WIDTH/2 && pt.x<_split_pos+SPLIT_WIDTH/2+1) {
1421 return TRUE;
1422 }
1423 }
1424 goto def;
1425
1426 case WM_LBUTTONDOWN:
1427 if (_left_hwnd) {
1428 int x = GET_X_LPARAM(lparam);
1429
1430 ClientRect rt(_hwnd);
1431
1434 SetCapture(_hwnd);
1435 }
1436 }
1437 break;
1438
1439 case WM_LBUTTONUP:
1440 if (GetCapture() == _hwnd)
1442 break;
1443
1444 case WM_KEYDOWN:
1445 if (wparam == VK_ESCAPE)
1446 if (GetCapture() == _hwnd) {
1449 _last_split = -1;
1452 }
1453 break;
1454
1455 case WM_MOUSEMOVE:
1456 if (GetCapture() == _hwnd) {
1457 int x = GET_X_LPARAM(lparam);
1458
1459 ClientRect rt(_hwnd);
1460
1461 if (x>=0 && x<rt.right) {
1462 _split_pos = x;
1464 rt.left = x-SPLIT_WIDTH/2;
1465 rt.right = x+SPLIT_WIDTH/2+1;
1466 InvalidateRect(_hwnd, &rt, FALSE);
1468 UpdateWindow(_hwnd);
1470 }
1471 }
1472 break;
1473
1474 case PM_OPEN_WINDOW: {
1475 CONTEXT("SDIMainFrame PM_OPEN_WINDOW");
1476
1478 LPCTSTR path;
1479 ShellPath shell_path = DesktopFolderPath();
1480
1481 if (lparam) {
1482 if (wparam & OWM_PIDL) {
1483 // take over PIDL from lparam
1484 shell_path.assign((LPCITEMIDLIST)lparam); // create as "rooted" window
1485 FileSysShellPath fsp(shell_path);
1486 path = fsp;
1487
1488 if (path) {
1489 LOG(FmtString(TEXT("SDIMainFrame PM_OPEN_WINDOW: path=%s"), path));
1491 path = buffer;
1492 }
1493 } else {
1494 // take over path from lparam
1495 path = (LPCTSTR)lparam;
1496 shell_path = path; // create as "rooted" window
1497 }
1498 } else {
1501 *buffer = '\0';
1502
1503 path = buffer;
1504 shell_path = path;
1505 }
1506
1507 if (wparam & OWM_ROOTED)
1508 _shellpath_info._root_shell_path = shell_path;
1509 else
1510 _shellpath_info._root_shell_path = DesktopFolderPath(); //SpecialFolderPath(CSIDL_DRIVES, _hwnd);
1511
1512 jump_to(shell_path, wparam);
1513 return TRUE;} // success
1514
1515 default: def:
1516 return super::WndProc(nmsg, wparam, lparam);
1517 }
1518
1519 return 0;
1520}
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
Retrieval of file system paths of ShellPath objects.
Definition: shellclasses.h:933
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
#define pt(x, y)
Definition: drawing.c:79
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint buffer
Definition: glext.h:5915
#define TEXT(s)
Definition: k32.h:26
@ OWM_ROOTED
window in explore mode
Definition: mainframe.h:33
#define PM_OPEN_WINDOW
Definition: mainframe.h:29
#define LOG(txt)
Definition: utility.h:102
#define COLOR_SPLITBAR
Definition: window.h:271
struct _CONTEXT CONTEXT
#define LOWORD(l)
Definition: pedump.c:82
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
Shell folder path of the desktop.
Definition: shellclasses.h:992
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
ShellPath _root_shell_path
Definition: shellbrowser.h:46
void assign(LPCITEMIDLIST pidl, size_t size)
Definition: shellclasses.h:806
#define HIWORD(l)
Definition: typedefs.h:247
#define lstrcpy
Definition: winbase.h:3874
#define GetCurrentDirectory
Definition: winbase.h:3805
#define GetStockBrush(i)
Definition: windowsx.h:307
#define SelectBrush(hdc, hbr)
Definition: windowsx.h:515
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define WM_PAINT
Definition: winuser.h:1620
HWND WINAPI SetCapture(_In_ HWND hWnd)
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
#define IDC_ARROW
Definition: winuser.h:687
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2670
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define WM_MOUSEMOVE
Definition: winuser.h:1775
HWND WINAPI GetCapture(void)
Definition: message.c:2881
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
BOOL WINAPI UpdateWindow(_In_ HWND)
#define HTCLIENT
Definition: winuser.h:2475
#define LoadCursor
Definition: winuser.h:5812
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define WM_SETCURSOR
Definition: winuser.h:1636
#define WM_KEYDOWN
Definition: winuser.h:1715
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define IDC_SIZEWE
Definition: winuser.h:694
#define VK_ESCAPE
Definition: winuser.h:2214
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
char TCHAR
Definition: xmlstorage.h:189

Member Data Documentation

◆ _clnt_rect

RECT SDIMainFrame::_clnt_rect
protected

Definition at line 163 of file mainframe.h.

Referenced by resize_children(), and resize_frame().

◆ _last_split

int SDIMainFrame::_last_split
protected

Definition at line 162 of file mainframe.h.

Referenced by SDIMainFrame(), and WndProc().

◆ _left_hwnd

WindowHandle SDIMainFrame::_left_hwnd
protected

Definition at line 154 of file mainframe.h.

Referenced by entry_selected(), resize_children(), update_shell_browser(), and WndProc().

◆ _right_hwnd

WindowHandle SDIMainFrame::_right_hwnd
protected

Definition at line 155 of file mainframe.h.

Referenced by resize_children(), update_shell_browser(), and WndProc().

◆ _shellpath_info

ShellPathInfo SDIMainFrame::_shellpath_info
protected

Definition at line 152 of file mainframe.h.

Referenced by jump_to(), update_shell_browser(), and WndProc().

◆ _split_pos

int SDIMainFrame::_split_pos
protected
Todo:
focus handling for TAB switching int _focus_pane; // 0: left 1: right

Definition at line 161 of file mainframe.h.

Referenced by resize_children(), SDIMainFrame(), update_shell_browser(), and WndProc().

◆ _url

String SDIMainFrame::_url
protected

Definition at line 165 of file mainframe.h.

Referenced by Command(), and set_url().


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