mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +00:00
- Add an address bar to serve as the web browser and folder history list (not yet functional)
- Hide the drivebar by default. It's cleaner this way - Remove the old rebar hack. This should get rid of those annoying blue marks at the end of the toolbars svn path=/trunk/; revision=36666
This commit is contained in:
parent
22ed768c30
commit
0f3e8477e1
12 changed files with 64 additions and 31 deletions
|
@ -38,7 +38,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "Panel &nástrojù", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "Panel &extra", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "L&išta diskù", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "L&išta diskù", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "&Boèní panel", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "&Stavový øádek", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -41,7 +41,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "&Werkzeugleiste", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "&Extraleiste", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "&Laufwerksleiste", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "&Laufwerksleiste", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "Se&itenleiste", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "&Statusleiste", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -38,7 +38,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "&Toolbar", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "&Extra Bar", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "S&ide Bar", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "&Status Bar", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -38,7 +38,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "&Herramientas", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "Barra &Extra", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "Barra de &Unidades", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "Barra de &Unidades", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "Barra &Lateral", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "Barra de &Estado", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -38,7 +38,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "Barre d'&outils", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "Barre d'&extras", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "&Barre des lecteurs", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "&Barre des lecteurs", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "&Volet latéral", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "Barre d'&état", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -38,7 +38,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "ツール バー(&T)", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "エキストラ バー(&E)", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "ドライブバー(&D)", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "ドライブバー(&D)", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "サイド バー(&I)", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "ステータス バー(&S)", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -41,7 +41,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "&Bara cu instrumente", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "&Extra Bar", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "&Drivebar", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "&Bara de stare", ID_VIEW_STATUSBAR
|
||||
MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -38,7 +38,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "&Ïàíåëü èíñòðóìåíòîâ", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "&Äîïîëíèòåëüíàÿ ïàíåëü", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "&Äèñêè", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "&Äèñêè", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "È&çáðàííîå", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "&Ñòðîêà ñîñòîÿíèÿ", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -76,7 +76,7 @@ BEGIN
|
|||
BEGIN
|
||||
MENUITEM "&Verktygsfält", ID_VIEW_TOOL_BAR
|
||||
MENUITEM "&Extrafält", ID_VIEW_EXTRA_BAR
|
||||
MENUITEM "E&nhetsfält", ID_VIEW_DRIVE_BAR, CHECKED
|
||||
MENUITEM "E&nhetsfält", ID_VIEW_DRIVE_BAR
|
||||
MENUITEM "S&idfält", ID_VIEW_SIDE_BAR
|
||||
MENUITEM "&Statusfält", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#define IDW_EXTRABAR 0x102
|
||||
#define IDW_DRIVEBAR 0x103
|
||||
#define IDW_ADDRESSBAR 0x104
|
||||
#define IDW_COMMANDBAR 0x105
|
||||
#define IDW_SIDEBAR 0x106
|
||||
#define IDW_FIRST_CHILD 0xC000 /*0x200*/
|
||||
|
||||
|
|
|
@ -186,10 +186,21 @@ MainFrameBase::MainFrameBase(HWND hwnd)
|
|||
CheckMenuItem(_menu_info._hMenuView, ID_VIEW_TOOL_BAR, MF_BYCOMMAND|MF_CHECKED);
|
||||
|
||||
|
||||
// address & command bar
|
||||
WindowCanvas canvas(hwnd);
|
||||
RECT rect = {0, 0, 0, 0};
|
||||
DrawText(canvas, TEXT("My"), -1, &rect, DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT);
|
||||
// address bar
|
||||
_haddrcombo = CreateWindowEx(0,
|
||||
WC_COMBOBOX,
|
||||
TEXT("Address"),
|
||||
WS_CHILD|WS_TABSTOP|WS_BORDER|WS_VISIBLE|CBS_DROPDOWN|
|
||||
CCS_NOPARENTALIGN|CCS_NORESIZE|CCS_NODIVIDER|CCS_NOMOVEY,
|
||||
0, 0, 0, 0,
|
||||
hwnd,
|
||||
(HMENU)IDW_ADDRESSBAR,
|
||||
g_Globals._hInstance,
|
||||
0);
|
||||
|
||||
HFONT hFont = (HFONT)GetStockObject(ANSI_VAR_FONT);
|
||||
SendMessageW(_haddrcombo, WM_SETFONT, (WPARAM)hFont, 0);
|
||||
|
||||
|
||||
_hstatusbar = CreateStatusWindow(WS_CHILD|WS_VISIBLE, 0, hwnd, IDW_STATUSBAR);
|
||||
CheckMenuItem(_menu_info._hMenuView, ID_VIEW_STATUSBAR, MF_BYCOMMAND|MF_CHECKED);
|
||||
|
@ -205,11 +216,16 @@ MainFrameBase::MainFrameBase(HWND hwnd)
|
|||
|
||||
// create rebar window to manage toolbar and drivebar
|
||||
#ifndef _NO_REBAR
|
||||
_hwndrebar = CreateWindowEx(WS_EX_TOOLWINDOW, REBARCLASSNAME, NULL,
|
||||
WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|
|
||||
RBS_VARHEIGHT|RBS_DBLCLKTOGGLE|
|
||||
WS_BORDER|RBS_AUTOSIZE|RBS_BANDBORDERS,
|
||||
0, 0, 0, 0, _hwnd, 0, g_Globals._hInstance, 0);
|
||||
_hwndrebar = CreateWindowEx(WS_EX_TOOLWINDOW,
|
||||
REBARCLASSNAME,
|
||||
NULL,
|
||||
WS_CHILD|WS_VISIBLE|WS_BORDER|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|
|
||||
RBS_VARHEIGHT|RBS_DBLCLKTOGGLE| RBS_AUTOSIZE|RBS_BANDBORDERS,
|
||||
0, 0, 0, 0,
|
||||
_hwnd,
|
||||
NULL,
|
||||
g_Globals._hInstance,
|
||||
0);
|
||||
|
||||
int btn_hgt = HIWORD(SendMessage(_htoolbar, TB_GETBUTTONSIZE, 0, 0));
|
||||
|
||||
|
@ -217,9 +233,6 @@ MainFrameBase::MainFrameBase(HWND hwnd)
|
|||
|
||||
rbBand.cbSize = sizeof(REBARBANDINFO);
|
||||
rbBand.fMask = RBBIM_TEXT|RBBIM_STYLE|RBBIM_CHILD|RBBIM_CHILDSIZE|RBBIM_SIZE;
|
||||
#ifndef RBBS_HIDETITLE // missing in MinGW headers as of 25.02.2004
|
||||
#define RBBS_HIDETITLE 0x400
|
||||
#endif
|
||||
rbBand.fStyle = RBBS_CHILDEDGE|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE;
|
||||
|
||||
rbBand.cxMinChild = 0;
|
||||
|
@ -233,7 +246,16 @@ MainFrameBase::MainFrameBase(HWND hwnd)
|
|||
rbBand.cxMinChild = 0;
|
||||
rbBand.cyMinChild = btn_hgt;
|
||||
rbBand.cx = 284;
|
||||
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
|
||||
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)0, (LPARAM)&rbBand);
|
||||
|
||||
rbBand.fStyle &= ~RBBS_HIDETITLE;
|
||||
rbBand.fStyle |= RBBS_BREAK;
|
||||
rbBand.lpText = TEXT("Address :");
|
||||
rbBand.hwndChild = _haddrcombo;
|
||||
rbBand.cxMinChild = 0;
|
||||
rbBand.cyMinChild = btn_hgt;
|
||||
rbBand.cx = 400;
|
||||
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)3, (LPARAM)&rbBand);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -284,13 +306,8 @@ bool MainFrameBase::ProcessMessage(UINT nmsg, WPARAM wparam, LPARAM lparam, LRES
|
|||
break;
|
||||
|
||||
case WM_SIZE: {
|
||||
#ifdef __REACTOS__ ///@todo Work around to display rebar in ROS (with flickering) as long as the control isn't fixed
|
||||
int height = SendMessage(_hwndrebar, RB_GETBARHEIGHT, 0, 0);
|
||||
MoveWindow(_hwndrebar, 0, 0, LOWORD(lparam), height, TRUE);
|
||||
#else
|
||||
resize_frame(LOWORD(lparam), HIWORD(lparam));
|
||||
SendMessage(_hwndrebar, WM_SIZE, 0, 0);
|
||||
#endif
|
||||
break;} // do not pass message to DefFrameProc
|
||||
|
||||
case WM_GETMINMAXINFO: {
|
||||
|
@ -472,6 +489,8 @@ void MainFrameBase::resize_frame(int cx, int cy)
|
|||
int height = SendMessage(_hwndrebar, RB_GETBARHEIGHT, 0, 0);
|
||||
rect.top += height;
|
||||
rect.top += 5;
|
||||
|
||||
SetWindowPos(_haddrcombo, NULL, 0, 0, cx, height, SWP_NOMOVE);
|
||||
} else {
|
||||
if (IsWindowVisible(_htoolbar)) {
|
||||
SendMessage(_htoolbar, WM_SIZE, 0, 0);
|
||||
|
@ -747,7 +766,7 @@ MDIMainFrame::MDIMainFrame(HWND hwnd)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
CheckMenuItem(_menu_info._hMenuView, ID_VIEW_DRIVE_BAR, MF_BYCOMMAND|MF_CHECKED);
|
||||
CheckMenuItem(_menu_info._hMenuView, ID_VIEW_DRIVE_BAR, MF_BYCOMMAND|MF_UNCHECKED);
|
||||
|
||||
|
||||
#ifndef _NO_WIN_FS
|
||||
|
@ -795,7 +814,7 @@ MDIMainFrame::MDIMainFrame(HWND hwnd)
|
|||
rbBand.cxMinChild = 0;
|
||||
rbBand.cyMinChild = btn_hgt;
|
||||
rbBand.cx = 284;
|
||||
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
|
||||
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)1, (LPARAM)&rbBand);
|
||||
|
||||
#ifndef _NO_WIN_FS
|
||||
rbBand.fStyle |= RBBS_BREAK;
|
||||
|
@ -805,7 +824,10 @@ MDIMainFrame::MDIMainFrame(HWND hwnd)
|
|||
rbBand.cxMinChild = 0;
|
||||
rbBand.cyMinChild = btn_hgt;
|
||||
rbBand.cx = 400;
|
||||
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
|
||||
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)2, (LPARAM)&rbBand);
|
||||
|
||||
// hide the drivebar by default
|
||||
SendMessage(_hwndrebar, RB_SHOWBAND, 2, FALSE);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -1587,6 +1609,15 @@ void SDIMainFrame::entry_selected(Entry* entry)
|
|||
resize_children();
|
||||
}
|
||||
|
||||
void SDIMainFrame::set_url(LPCTSTR url)
|
||||
{
|
||||
if (_url != url) {
|
||||
_url = url;
|
||||
SetWindowText(_haddrcombo, url);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SDIMainFrame::jump_to(LPCTSTR path, int mode)
|
||||
{/*@@todo
|
||||
if (_shellBrowser.get() && (_shellpath_info._open_mode&~OWM_PIDL)==(mode&~OWM_PIDL)) {
|
||||
|
|
|
@ -51,6 +51,7 @@ struct MainFrameBase : public PreTranslateWindow
|
|||
WindowHandle _hwndrebar;
|
||||
|
||||
WindowHandle _htoolbar;
|
||||
WindowHandle _haddrcombo;
|
||||
WindowHandle _hstatusbar;
|
||||
|
||||
WindowHandle _hsidebar;
|
||||
|
@ -176,4 +177,6 @@ protected:
|
|||
|
||||
// interface BrowserCallback
|
||||
virtual void entry_selected(Entry* entry);
|
||||
|
||||
void set_url(LPCTSTR url);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue