mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
view menu reflects configurable toolbar state
This commit is contained in:
parent
e03dc39162
commit
8214e69b08
@ -405,6 +405,17 @@ void CDragToolbar::UpdateURLBars(char* url)
|
||||
m_pToolbar->UpdateURLBars(url);
|
||||
}
|
||||
|
||||
BOOL CDragToolbar::MakeVisible(BOOL visible)
|
||||
{
|
||||
return CWnd::ShowWindow(visible ? SW_SHOW : SW_HIDE);
|
||||
}
|
||||
|
||||
BOOL CDragToolbar::WantsToBeVisible()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Messages for CDragToolbar
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@ -796,6 +807,8 @@ UINT CCustToolbarExternalTab::GetTabID(void)
|
||||
|
||||
#define SPACE_BETWEEN_TOOLBARS 2
|
||||
|
||||
IMPLEMENT_DYNAMIC(CCustToolbar,CControlBar)
|
||||
|
||||
CCustToolbar::CCustToolbar(int nNumToolbars)
|
||||
{
|
||||
m_bEraseBackground = TRUE;
|
||||
@ -996,35 +1009,43 @@ void CCustToolbar::AddNewWindowAtIndex(UINT nToolbarID, CToolbarWindow* pWindow,
|
||||
CDragToolbar *pDragToolbar = CreateDragBar();
|
||||
if(pDragToolbar->Create(this, pWindow))
|
||||
{
|
||||
m_nNumShowing++;
|
||||
m_pToolbarArray[nPosition] = pDragToolbar;
|
||||
pWindow->GetToolbar()->ShowWindow(SW_SHOW);
|
||||
BOOL bIsOpen = pDragToolbar->GetOpen();
|
||||
pDragToolbar->SetTabTip(tabTip);
|
||||
pDragToolbar->SetToolbarID(nToolbarID);
|
||||
|
||||
if (bIsOpen)
|
||||
if (pDragToolbar->WantsToBeVisible())
|
||||
{
|
||||
pDragToolbar->ShowWindow(SW_SHOW);
|
||||
m_nNumOpen++;
|
||||
if(nPosition < m_nAnimationPos || m_nAnimationPos == -1)
|
||||
m_nNumShowing++;
|
||||
m_pToolbarArray[nPosition] = pDragToolbar;
|
||||
pWindow->GetToolbar()->ShowWindow(SW_SHOW);
|
||||
BOOL bIsOpen = pDragToolbar->GetOpen();
|
||||
// pDragToolbar->SetTabTip(tabTip);
|
||||
// pDragToolbar->SetToolbarID(nToolbarID);
|
||||
|
||||
if (bIsOpen)
|
||||
{
|
||||
if(m_nAnimationPos != -1)
|
||||
pDragToolbar->MakeVisible(TRUE);
|
||||
m_nNumOpen++;
|
||||
if(nPosition < m_nAnimationPos || m_nAnimationPos == -1)
|
||||
{
|
||||
m_pToolbarArray[m_nAnimationPos]->SetAnimation(NULL);
|
||||
if(m_nAnimationPos != -1)
|
||||
{
|
||||
m_pToolbarArray[m_nAnimationPos]->SetAnimation(NULL);
|
||||
}
|
||||
m_pToolbarArray[nPosition]->SetAnimation(m_pAnimation);
|
||||
if(m_pAnimation)
|
||||
m_pAnimation->ShowWindow(SW_SHOW);
|
||||
m_nAnimationPos = nPosition;
|
||||
}
|
||||
m_pToolbarArray[nPosition]->SetAnimation(m_pAnimation);
|
||||
if(m_pAnimation)
|
||||
m_pAnimation->ShowWindow(SW_SHOW);
|
||||
m_nAnimationPos = nPosition;
|
||||
|
||||
}
|
||||
|
||||
m_nActiveToolbars++; // don't
|
||||
|
||||
m_pParent->RecalcLayout();
|
||||
|
||||
} else {
|
||||
m_pHiddenToolbarArray[nPosition] = pDragToolbar;
|
||||
pWindow->GetToolbar()->ShowWindow(SW_HIDE);
|
||||
pDragToolbar->MakeVisible(FALSE);
|
||||
}
|
||||
|
||||
m_nActiveToolbars++;
|
||||
|
||||
|
||||
m_pParent->RecalcLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1051,7 +1072,7 @@ void CCustToolbar::AddNewWindowGuts(UINT nToolbarID, CToolbarWindow* pWindow, in
|
||||
|
||||
if(bIsOpen)
|
||||
{
|
||||
pDragToolbar->ShowWindow(SW_SHOW);
|
||||
pDragToolbar->MakeVisible(TRUE);
|
||||
m_nNumOpen++;
|
||||
if(nPosition < m_nAnimationPos || m_nAnimationPos == -1)
|
||||
{
|
||||
@ -1069,7 +1090,6 @@ void CCustToolbar::AddNewWindowGuts(UINT nToolbarID, CToolbarWindow* pWindow, in
|
||||
|
||||
m_nActiveToolbars++;
|
||||
|
||||
|
||||
m_pParent->RecalcLayout();
|
||||
}
|
||||
|
||||
@ -1144,7 +1164,7 @@ void CCustToolbar::ShowDragToolbar(int nIndex, BOOL bShow)
|
||||
m_pToolbarArray[nIndex]->GetToolbar()->ShowWindow(SW_SHOW);
|
||||
if(m_pToolbarArray[nIndex]->GetOpen()){
|
||||
CheckAnimationChangedToolbar(m_pToolbarArray[nIndex], nIndex, TRUE);
|
||||
m_pToolbarArray[nIndex]->ShowWindow(SW_SHOW);
|
||||
m_pToolbarArray[nIndex]->MakeVisible(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1160,7 +1180,7 @@ void CCustToolbar::ShowDragToolbar(int nIndex, BOOL bShow)
|
||||
m_nActiveToolbars--;
|
||||
m_pHiddenToolbarArray[nIndex] = m_pToolbarArray[nIndex];
|
||||
m_pToolbarArray[nIndex] = NULL;
|
||||
m_pHiddenToolbarArray[nIndex]->ShowWindow(SW_HIDE);
|
||||
m_pHiddenToolbarArray[nIndex]->MakeVisible(FALSE);
|
||||
m_pHiddenToolbarArray[nIndex]->GetToolbar()->ShowWindow(SW_HIDE);
|
||||
CheckAnimationChangedToolbar(m_pHiddenToolbarArray[nIndex], nIndex, FALSE);
|
||||
|
||||
@ -1297,9 +1317,12 @@ void CCustToolbar::SetToolbarStyle(int nToolbarStyle)
|
||||
|
||||
void CCustToolbar::BeActiveToolbar()
|
||||
{
|
||||
for(int i = 0; i < m_nNumToolbars; i++)
|
||||
for(int i = 0; i < m_nNumToolbars; i++) {
|
||||
if(m_pToolbarArray[i] != NULL)
|
||||
m_pToolbarArray[i]->BeActiveToolbar();
|
||||
if(m_pHiddenToolbarArray[i] != NULL)
|
||||
m_pHiddenToolbarArray[i]->BeActiveToolbar();
|
||||
}
|
||||
}
|
||||
|
||||
void CCustToolbar::OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler )
|
||||
@ -1664,7 +1687,7 @@ LRESULT CCustToolbar::OnHideToolbar(WPARAM wParam, LPARAM lParam)
|
||||
CDragToolbar *pToolbar = (CDragToolbar*)CWnd::FromHandlePermanent(hwnd);
|
||||
|
||||
pToolbar->SetOpen(FALSE);
|
||||
pToolbar->ShowWindow(SW_HIDE);
|
||||
pToolbar->MakeVisible(FALSE);
|
||||
m_nNumOpen--;
|
||||
|
||||
int nIndex = FindIndex(pToolbar);
|
||||
@ -2266,7 +2289,7 @@ int CCustToolbar::FindDragToolbarFromID(UINT nToolbarID, CDragToolbar **pToolbar
|
||||
void CCustToolbar::OpenDragToolbar(int nIndex)
|
||||
{
|
||||
m_pToolbarArray[nIndex]->SetOpen(TRUE);
|
||||
m_pToolbarArray[nIndex]->ShowWindow(SW_SHOW);
|
||||
m_pToolbarArray[nIndex]->MakeVisible(TRUE);
|
||||
|
||||
CheckAnimationChangedToolbar(m_pToolbarArray[nIndex], nIndex, TRUE);
|
||||
|
||||
|
@ -163,6 +163,8 @@ public:
|
||||
HTAB_BITMAP GetHTabType(void) { return m_eHTabType;}
|
||||
void OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler );
|
||||
virtual void UpdateURLBars(char* url);
|
||||
virtual BOOL MakeVisible(BOOL visible);
|
||||
virtual BOOL WantsToBeVisible();
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CDragToolbar)
|
||||
@ -215,6 +217,8 @@ class CRDFToolbar;
|
||||
|
||||
class CCustToolbar : public CControlBar {
|
||||
|
||||
DECLARE_DYNAMIC(CCustToolbar)
|
||||
|
||||
protected:
|
||||
CFrameWnd * m_pParent;
|
||||
CDragToolbar** m_pToolbarArray;
|
||||
|
@ -564,9 +564,12 @@ void CMainFrame::OnShowWindow (BOOL bShow, UINT nStatus)
|
||||
void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
|
||||
{
|
||||
CGenericFrame::OnActivate(nState, pWndOther, bMinimized);
|
||||
IChrome *chrome = GetChrome();
|
||||
if (chrome)
|
||||
chrome->ToolbarActivation();
|
||||
if (nState != WA_INACTIVE)
|
||||
{
|
||||
IChrome *chrome = GetChrome();
|
||||
if (chrome)
|
||||
chrome->ToolbarActivation();
|
||||
}
|
||||
}
|
||||
|
||||
// returns TRUE if something was added to the folder, false otherwise
|
||||
|
@ -1474,6 +1474,50 @@ void CGenericFrame::BuildHelpMenu(CMenu * pMenu)
|
||||
pMenu->InsertMenu(idx,MF_BYPOSITION | MF_STRING,ID_COMMAND_ABOUT, aboutCommunicator);
|
||||
}
|
||||
|
||||
void CGenericFrame::BuildViewMenu(CMenu *pMenu)
|
||||
{
|
||||
if (GetMainContext() == NULL)
|
||||
return;
|
||||
|
||||
pMenu->DeleteMenu(0, MF_BYPOSITION); // kill the placeholder
|
||||
|
||||
CRDFToolbarHolder *bars;
|
||||
HT_Pane rootPane;
|
||||
uint barCtr;
|
||||
uint32 barCount;
|
||||
IChrome *chrome = GetChrome();
|
||||
|
||||
// get the RDF toolbar holder. exit on failure.
|
||||
bars = NULL;
|
||||
if (chrome) {
|
||||
CCustToolbar *basicBars = chrome->GetCustomizableToolbar();
|
||||
if (basicBars->IsKindOf(RUNTIME_CLASS(CRDFToolbarHolder)))
|
||||
bars = (CRDFToolbarHolder *) basicBars;
|
||||
}
|
||||
if (!bars)
|
||||
return;
|
||||
|
||||
// insert a show/hide menu item for each toolbar
|
||||
rootPane = bars->GetHTPane();
|
||||
barCount = HT_GetViewListCount(rootPane);
|
||||
if (barCount > ID_VIEW_LASTTOOLBAR - ID_VIEW_FIRSTTOOLBAR + 1)
|
||||
barCount = ID_VIEW_LASTTOOLBAR - ID_VIEW_FIRSTTOOLBAR + 1;
|
||||
for (barCtr = 0; barCtr < barCount; barCtr++) {
|
||||
HT_View view = HT_GetNthView(rootPane, barCtr);
|
||||
CRDFToolbar *bar = (CRDFToolbar *) HT_GetViewFEData(view);
|
||||
char *name = HT_GetViewName(view);
|
||||
if (!name)
|
||||
name = "";
|
||||
CString menuText;
|
||||
if (bars->IsWindowShowing(bar))
|
||||
menuText.Format(IDS_HIDETOOLBARMENUITEM, name);
|
||||
else
|
||||
menuText.Format(IDS_SHOWTOOLBARMENUITEM, name);
|
||||
pMenu->InsertMenu(barCtr, MF_BYPOSITION | MF_STRING, ID_VIEW_FIRSTTOOLBAR+barCtr,
|
||||
menuText);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* CGenericFrame::OnToolsWeb
|
||||
@ -1853,7 +1897,9 @@ void CGenericFrame::OnInitMenuPopup(CMenu * pPopup, UINT nIndex, BOOL bSysMenu)
|
||||
else if (pPopup->GetMenuItemID(0) == IDC_FIRST_HELP_MENU_ID)
|
||||
{
|
||||
BuildHelpMenu(pPopup);
|
||||
}
|
||||
}
|
||||
else if (pPopup->GetMenuItemID(0) == ID_VIEW_FIRSTTOOLBAR)
|
||||
BuildViewMenu(pPopup);
|
||||
else
|
||||
{
|
||||
HT_Resource pEntry;
|
||||
@ -3052,11 +3098,16 @@ BOOL CGenericFrame::OnCommand(UINT wParam,LONG lParam)
|
||||
#endif
|
||||
|
||||
UINT nID = LOWORD(wParam);
|
||||
if( nID >= ID_OPTIONS_ENCODING_1 && nID <= ID_OPTIONS_ENCODING_70)
|
||||
{
|
||||
if( nID >= ID_OPTIONS_ENCODING_1 && nID <= ID_OPTIONS_ENCODING_70) {
|
||||
OnToggleEncoding( nID );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (nID >= ID_VIEW_FIRSTTOOLBAR && nID <= ID_VIEW_LASTTOOLBAR) {
|
||||
ToggleToolbarVisibility(nID - ID_VIEW_FIRSTTOOLBAR);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (m_bDisableHotkeys && nCode==1) {
|
||||
switch (LOWORD(wParam)) {
|
||||
case ID_SECURITY:
|
||||
@ -3119,6 +3170,33 @@ BOOL CGenericFrame::OnCommand(UINT wParam,LONG lParam)
|
||||
return CommonCommand(wParam, lParam);
|
||||
}
|
||||
|
||||
void CGenericFrame::ToggleToolbarVisibility(UINT toolbarIndex)
|
||||
{
|
||||
CRDFToolbarHolder *bars;
|
||||
HT_Pane rootPane;
|
||||
IChrome *chrome = GetChrome();
|
||||
|
||||
// get the RDF toolbar holder. exit on failure.
|
||||
bars = NULL;
|
||||
if (chrome) {
|
||||
CCustToolbar *basicBars = chrome->GetCustomizableToolbar();
|
||||
if (basicBars->IsKindOf(RUNTIME_CLASS(CRDFToolbarHolder)))
|
||||
bars = (CRDFToolbarHolder *) basicBars;
|
||||
}
|
||||
if (!bars)
|
||||
return;
|
||||
|
||||
// assume menu item order is the same as RDF view order. toggle visibility
|
||||
// for the nth RDF view. (this is a decent assumption, since the view menu
|
||||
// is rebuilt each time it's pulled down, and it's build from the RDF views)
|
||||
rootPane = bars->GetHTPane();
|
||||
if (toolbarIndex < HT_GetViewListCount(rootPane)) {
|
||||
HT_View view = HT_GetNthView(rootPane, toolbarIndex);
|
||||
CRDFToolbar *bar = (CRDFToolbar *) HT_GetViewFEData(view);
|
||||
bars->ShowToolbar(bar, !bars->IsWindowShowing(bar));
|
||||
}
|
||||
}
|
||||
|
||||
// returns TRUE if something was added to the folder, false otherwise
|
||||
BOOL CGenericFrame::FileBookmark(HT_Resource pFolder)
|
||||
{
|
||||
|
@ -133,6 +133,7 @@ public:
|
||||
virtual CFrameWnd *GetFrameWnd();
|
||||
virtual void UpdateHistoryDialog();
|
||||
void BuildHelpMenu(CMenu * pMenu);
|
||||
void BuildViewMenu(CMenu * pMenu);
|
||||
|
||||
// override this only if you want to
|
||||
virtual void OnConstructWindowMenu ( CMenu * pMenu );
|
||||
@ -232,6 +233,7 @@ protected:
|
||||
|
||||
virtual ~CGenericFrame();
|
||||
virtual void GetMessageString( UINT nID, CString& rMessage ) const;
|
||||
void ToggleToolbarVisibility(UINT toolbarIndex);
|
||||
|
||||
// Generated message map functions
|
||||
afx_msg void OnEnterIdle(UINT nWhy, CWnd* pWho );
|
||||
|
@ -218,6 +218,13 @@ BEGIN
|
||||
IDS_NETSCAPE_TOOLBAR "no"
|
||||
END
|
||||
|
||||
// A template for the View/Hide Toolbars View Menu items
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SHOWTOOLBARMENUITEM "Show %s"
|
||||
IDS_HIDETOOLBARMENUITEM "Hide %s"
|
||||
END
|
||||
|
||||
|
||||
// Large and small versions of the animation. The very first frame of the
|
||||
// animation only shows up when the animation is resting. The second through
|
||||
@ -797,9 +804,7 @@ END
|
||||
|
||||
IDM_MAINFRAMEVIEWMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
MENUITEM "Show &Navigation Toolbar", ID_VIEW_COMMANDTOOLBAR
|
||||
MENUITEM "Show &Location Toolbar", ID_VIEW_LOCATIONTOOLBAR
|
||||
MENUITEM "Show &Personal Toolbar", ID_VIEW_CUSTOMTOOLBAR
|
||||
MENUITEM "placeholder", ID_VIEW_FIRSTTOOLBAR
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "In&crease Font\tCtrl+]" ID_VIEW_INCREASEFONT
|
||||
MENUITEM "&Decrease Font\tCtrl+[" ID_VIEW_DECREASEFONT
|
||||
|
@ -3147,6 +3147,13 @@
|
||||
#define ID_HIST_FILE_ADDTOTOOLBAR 43020
|
||||
#define ID_HIST_FILE_INTERNETSHORTCUT 43021
|
||||
#define ID_OTHER_FONTFACE 43022
|
||||
|
||||
// toolbar menus are built dynamically. reserve some command IDs.
|
||||
#define ID_VIEW_FIRSTTOOLBAR 43100
|
||||
#define ID_VIEW_LASTTOOLBAR 43109
|
||||
#define IDS_SHOWTOOLBARMENUITEM 43100
|
||||
#define IDS_HIDETOOLBARMENUITEM 43101
|
||||
|
||||
#define IDS_TRANSFER_STATUS 59142
|
||||
#define IDS_SECURITY_STATUS 59143
|
||||
#define IDS_SIGNED_STATUS 59144
|
||||
|
@ -1541,10 +1541,16 @@ static void toolbarNotifyProcedure (HT_Notification ns, HT_Resource n, HT_Event
|
||||
CRDFToolbar* theNewToolbar = CRDFToolbar::CreateUserToolbar(theView, theToolbarHolder->GetCachedParentWindow());
|
||||
CButtonToolbarWindow *pWindow = new CButtonToolbarWindow(theNewToolbar,
|
||||
theApp.m_pToolbarStyle, 43, 27, eSMALL_HTAB);
|
||||
|
||||
|
||||
uint32 index = HT_GetViewIndex(theView);
|
||||
|
||||
theToolbarHolder->AddNewWindowAtIndex(ID_PERSONAL_TOOLBAR+index, pWindow, index, 43, 27, 1,
|
||||
|
||||
// note: first parameter is toolbar ID, which was ID_PERSONAL_TOOLBAR+index and is now
|
||||
// (with the advent of RDF toolbars) theoretically ID_VIEW_FIRSTTOOLBAR+index.
|
||||
// however, toolbar IDs aren't really used any more, so we're just using index alone.
|
||||
// in fact, the old IDs are causing problems from other parts of the code that
|
||||
// go looking for particular toolbars which don't necessarily exist any more.
|
||||
// if there are problems with toolbar IDs, you've found the right place to start.
|
||||
theToolbarHolder->AddNewWindowAtIndex(index, pWindow, index, 43, 27, 1,
|
||||
HT_GetNodeName(HT_TopNode(theNewToolbar->GetHTView())),theApp.m_pToolbarStyle);
|
||||
}
|
||||
else if (whatHappened == HT_EVENT_VIEW_DELETED)
|
||||
@ -2661,11 +2667,8 @@ int CRDFDragToolbar::Create(CWnd *pParent, CToolbarWindow *pToolbar)
|
||||
CRDFToolbar* pToolbar = (CRDFToolbar*)m_pToolbar->GetToolbar();
|
||||
HT_Resource top = HT_TopNode(pToolbar->GetHTView());
|
||||
HT_GetNodeData(top, gNavCenter->toolbarCollapsed, HT_COLUMN_STRING, (void **)&data);
|
||||
if (data)
|
||||
{
|
||||
if (data[0] == 'y' || data[0] == 'Y')
|
||||
SetOpen(FALSE);
|
||||
}
|
||||
if (data && (data[0] == 'y' || data[0] == 'Y'))
|
||||
SetOpen(FALSE);
|
||||
}
|
||||
return rtnval;
|
||||
}
|
||||
@ -2676,6 +2679,26 @@ void CRDFDragToolbar::SetOpen(BOOL bIsOpen)
|
||||
CopySettingsToRDF();
|
||||
}
|
||||
|
||||
BOOL CRDFDragToolbar::MakeVisible(BOOL visible)
|
||||
{
|
||||
BOOL rtnval = CDragToolbar::MakeVisible(visible);
|
||||
CopySettingsToRDF();
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
BOOL CRDFDragToolbar::WantsToBeVisible()
|
||||
{
|
||||
char *data;
|
||||
CRDFToolbar* pToolbar = (CRDFToolbar*)m_pToolbar->GetToolbar();
|
||||
HT_Resource top = HT_TopNode(pToolbar->GetHTView());
|
||||
HT_GetNodeData(top, gNavCenter->toolbarVisible, HT_COLUMN_STRING, (void **)&data);
|
||||
return !data || data[0] == 'y' || data[0] == 'Y';
|
||||
}
|
||||
|
||||
|
||||
// intended to be called when the parent window comes to the front, this ensures
|
||||
// the RDF toolbar settings reflect those of the topmost window, so when the app
|
||||
// is re-launched, it will come up with the settings of the last top window.
|
||||
void CRDFDragToolbar::BeActiveToolbar()
|
||||
{
|
||||
CopySettingsToRDF();
|
||||
@ -2683,10 +2706,14 @@ void CRDFDragToolbar::BeActiveToolbar()
|
||||
|
||||
void CRDFDragToolbar::CopySettingsToRDF(void)
|
||||
{
|
||||
char *data = GetOpen() ? "no" : "yes";
|
||||
CRDFToolbar* pToolbar = (CRDFToolbar*)m_pToolbar->GetToolbar();
|
||||
HT_Resource top = HT_TopNode(pToolbar->GetHTView());
|
||||
|
||||
char *data = GetOpen() ? "no" : "yes";
|
||||
HT_SetNodeData(top, gNavCenter->toolbarCollapsed, HT_COLUMN_STRING, data);
|
||||
|
||||
data = IsWindowVisible() ? "yes" : "no";
|
||||
HT_SetNodeData(top, gNavCenter->toolbarVisible, HT_COLUMN_STRING, data);
|
||||
}
|
||||
|
||||
void CRDFDragToolbar::OnPaint(void)
|
||||
@ -2789,12 +2816,15 @@ void CRDFDragToolbar::OnPaint(void)
|
||||
// The container of all the toolbars
|
||||
// ==========================================================
|
||||
|
||||
IMPLEMENT_DYNAMIC(CRDFToolbarHolder,CCustToolbar)
|
||||
|
||||
CRDFToolbarHolder::CRDFToolbarHolder(int maxToolbars, CFrameWnd* pParentWindow)
|
||||
:CCustToolbar(maxToolbars)
|
||||
{
|
||||
m_pCachedParentWindow = pParentWindow;
|
||||
m_pCurrentPopupButton = NULL;
|
||||
m_pCurrentDockedButton = NULL;
|
||||
SetSaveToolbarInfo(FALSE); // stored in RDF, instead
|
||||
}
|
||||
|
||||
CRDFToolbarHolder::~CRDFToolbarHolder()
|
||||
|
@ -360,6 +360,8 @@ public:
|
||||
virtual int Create(CWnd *pParent, CToolbarWindow *pToolbar);
|
||||
virtual void SetOpen(BOOL bIsOpen);
|
||||
virtual void BeActiveToolbar();
|
||||
virtual BOOL MakeVisible(BOOL visible);
|
||||
virtual BOOL WantsToBeVisible();
|
||||
|
||||
protected:
|
||||
void CopySettingsToRDF(void);
|
||||
@ -375,6 +377,8 @@ public:
|
||||
|
||||
class CRDFToolbarHolder : public CCustToolbar
|
||||
{
|
||||
DECLARE_DYNAMIC(CRDFToolbarHolder)
|
||||
|
||||
protected:
|
||||
HT_Pane m_ToolbarPane;
|
||||
CFrameWnd* m_pCachedParentWindow;
|
||||
|
Loading…
x
Reference in New Issue
Block a user