Files
libreoffice/sd/source/ui/view/ViewTabBar.cxx

304 lines
8.8 KiB
C++
Raw Normal View History

INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
/*************************************************************************
*
* $RCSfile: ViewTabBar.cxx,v $
*
* $Revision: 1.3 $
INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
*
* last change: $Author: obo $ $Date: 2004-11-16 16:16:02 $
INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include "ViewTabBar.hxx"
#define USE_TAB_CONTROL
#include "ViewShell.hxx"
#include "PaneManager.hxx"
#include "ViewShellBase.hxx"
#include "DrawViewShell.hxx"
#include "FrameView.hxx"
#include "sdresid.hxx"
#include "strings.hrc"
#include "helpids.h"
#include <vcl/tabpage.hxx>
namespace {
enum ViewTabBarEntry {
VTBE_FIRST = 1,
VTBE_EDIT_VIEW = VTBE_FIRST,
VTBE_OUTLINE_VIEW,
VTBE_NOTES_VIEW,
VTBE_HANDOUT_VIEW,
VTBE_SLIDE_VIEW,
VTBE_LAST = VTBE_SLIDE_VIEW
};
} // end of anonymous namespace
namespace sd {
class ViewTabPage : public TabPage
{
public:
ViewTabPage (Window* pParent) : TabPage(pParent) {}
virtual void Resize (void)
{ SetPosSizePixel(Point(0,0),GetParent()->GetOutputSizePixel()); }
};
ViewTabBar::ViewTabBar (ViewShellBase& rViewShellBase, Window* pParent)
: TabControl (pParent),
mrViewShellBase (rViewShellBase)
{
// SetMaxPageWidth(150);
// SetHelpId( HID_SD_TABBAR_PAGES );
// Add tabs for the views that can be displayed in the center pane.
InsertPage (VTBE_EDIT_VIEW,
String (SdResId (STR_DRAW_MODE)));
InsertPage (VTBE_OUTLINE_VIEW,
String (SdResId (STR_OUTLINE_MODE)));
InsertPage (VTBE_NOTES_VIEW,
String (SdResId (STR_NOTES_MODE)));
InsertPage (VTBE_HANDOUT_VIEW,
String (SdResId (STR_HANDOUT_MODE)));
InsertPage (VTBE_SLIDE_VIEW,
String (SdResId (STR_SLIDE_MODE)));
// InsertPage (VTBE_OLD_SLIDE_VIEW,
// String (SdResId (STR_SLIDE_MODE)));
// Set one new tab page for all tab entries. We need it only to
// determine the height of the tab bar.
TabPage* pTabPage = new TabPage (this);
for (USHORT nIndex=VTBE_FIRST; nIndex<=VTBE_LAST; nIndex++)
{
SetTabPage (nIndex, pTabPage);
pTabPage->Hide();
}
// Set help texts.
SetHelpId (VTBE_EDIT_VIEW, HID_SD_BTN_DRAW);
SetHelpId (VTBE_SLIDE_VIEW, HID_SD_BTN_SLIDE);
// SetHelpId (VTBE_OLD_SLIDE_VIEW, HID_SD_BTN_SLIDE);
SetHelpId (VTBE_OUTLINE_VIEW, HID_SD_BTN_OUTLINE);
SetHelpId (VTBE_NOTES_VIEW, HID_SD_BTN_NOTES);
SetHelpId (VTBE_HANDOUT_VIEW, HID_SD_BTN_HANDOUT);
// Register as listener at the view shell base.
mrViewShellBase.GetPaneManager().AddEventListener (
LINK(this, ViewTabBar, ViewShellBaseEventHandler));
}
ViewTabBar::~ViewTabBar (void)
{
// Set all references to the one tab page to NULL and delete the page.
TabPage* pTabPage = GetTabPage (VTBE_FIRST);
for (USHORT nIndex=VTBE_FIRST; nIndex<=VTBE_LAST; nIndex++)
{
SetTabPage (nIndex, NULL);
}
delete pTabPage;
// Tell the view shell base that we are not able to listen anymore.
mrViewShellBase.GetPaneManager().RemoveEventListener (
LINK(this, ViewTabBar, ViewShellBaseEventHandler));
}
void ViewTabBar::ActivatePage (void)
{
TabControl::ActivatePage ();
ViewShell::ShellType eType (
mrViewShellBase.GetPaneManager().GetViewShellType(
PaneManager::PT_CENTER));
PageKind ePageKind (PK_STANDARD);
switch (GetCurPageId())
{
case VTBE_EDIT_VIEW:
eType = ViewShell::ST_IMPRESS;
ePageKind = PK_STANDARD;
break;
case VTBE_OUTLINE_VIEW:
eType = ViewShell::ST_OUTLINE;
break;
case VTBE_NOTES_VIEW:
eType = ViewShell::ST_NOTES;
ePageKind = PK_NOTES;
break;
case VTBE_HANDOUT_VIEW:
eType = ViewShell::ST_HANDOUT;
ePageKind = PK_HANDOUT;
break;
case VTBE_SLIDE_VIEW:
eType = ViewShell::ST_SLIDE_SORTER;
break;
default:
eType = ViewShell::ST_NONE;
break;
}
ViewShell* pViewShell = mrViewShellBase.GetMainViewShell();
FrameView* pFrameView = pViewShell->GetFrameView();
pFrameView->SetViewShEditMode (EM_PAGE, pFrameView->GetPageKind());
DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(pViewShell);
if (pDrawViewShell != NULL)
{
pFrameView->SetLayerMode (pDrawViewShell->IsLayerModeActive());
pFrameView->SetViewShEditMode(EM_PAGE, ePageKind);
}
mrViewShellBase.GetPaneManager().RequestMainViewShellChange (eType);
}
void ViewTabBar::Paint (const Rectangle& rRect)
{
Color aOriginalFillColor (GetFillColor());
Color aOriginalLineColor (GetLineColor());
// Because the actual window background is transparent--to avoid
// flickering due to multiple background paintings by this and by child
// windows--we have to paint the background for this control
// explicitly: the actual control is not painted over its whole bounding
// box.
INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
SetFillColor (GetSettings().GetStyleSettings().GetDialogColor());
SetLineColor ();
DrawRect (rRect)
;
INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
TabControl::Paint (rRect);
SetFillColor (aOriginalFillColor);
SetLineColor (aOriginalLineColor);
}
int ViewTabBar::GetHeight (void)
{
int nHeight (0);
INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
TabPage* pActivePage (GetTabPage(GetCurPageId()));
if (pActivePage!=NULL && IsReallyVisible())
INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
{
nHeight = pActivePage->GetPosPixel().Y();
nHeight -= 2;
}
if (nHeight <= 0)
// Using a default when the real height can not be determined. To
// get correct height this method should be called when the control
// is visible.
nHeight = 21;
INTEGRATION: CWS impress2 (1.1.2); FILE ADDED 2004/07/06 11:21:50 af 1.1.2.19: #i22705# Setting edit mode to EM_PAGE when switching view shell. 2004/06/28 07:55:42 af 1.1.2.18: #i22705# Using new PaneManager::RequestMainViewShellChange() method. 2004/06/22 12:14:24 af 1.1.2.17: #i22705# Removed already-commented-out line. 2004/06/16 08:31:05 af 1.1.2.16: #i22705# The tab page is deleted in the destructor. 2004/06/15 15:05:32 af 1.1.2.15: #i22705# Finished the switch of the base class to TabControl. 2004/06/14 13:50:41 af 1.1.2.14: #i22705# Using correct background color for TabControl. 2004/06/14 09:13:54 af 1.1.2.13: #i22705# Replaced TabBar by TabControl. 2004/06/12 12:30:52 af 1.1.2.12: #i22705# Fixed initialization. 2004/06/06 13:00:37 af 1.1.2.11: #i22705# When switching to a view shell, the master page mode is ended as well. 2004/06/04 07:11:12 af 1.1.2.10: #i22705# Commented out the support for the old slide sorter. 2004/05/23 13:31:28 af 1.1.2.9: #i22705# Using new PaneManager class. 2004/05/19 14:14:45 af 1.1.2.8: #i22705# Removed unused code. 2004/05/05 13:38:01 af 1.1.2.7: #i22705# (last commit was an accident) Added an entry for the old slide sorter (for debugging). 2004/05/05 11:04:09 af 1.1.2.6: #i22705#lidesorter\controller\SlideSorterController.cxx 2004/04/27 12:44:38 af 1.1.2.5: #i22705# Adaption to relocation of event ids. 2004/04/22 15:13:03 af 1.1.2.4: #i22705# Changed argument of constructor from ViewShell& to ViewShellBase&. 2004/04/22 07:37:02 af 1.1.2.3: #i22705# Added help ids for tab bar entries. 2004/04/21 15:21:37 af 1.1.2.2: #i22705# Completed initial implementation. 2004/04/15 12:01:30 af 1.1.2.1: #i22705# Initialn revision.
2004-07-13 13:53:50 +00:00
return nHeight;
}
IMPL_LINK(ViewTabBar, ViewShellBaseEventHandler, PaneManagerEvent*, pEvent)
{
if (pEvent->meEventId == PaneManagerEvent::EID_VIEW_SHELL_ADDED
&& pEvent->mePane == PaneManager::PT_CENTER)
{
// Select the tab of the currently active view.
ViewTabBarEntry eActiveView = VTBE_EDIT_VIEW;
switch (mrViewShellBase.GetPaneManager().GetViewShellType (
PaneManager::PT_CENTER))
{
case ViewShell::ST_DRAW:
case ViewShell::ST_IMPRESS:
eActiveView = VTBE_EDIT_VIEW;
break;
case ViewShell::ST_OUTLINE:
eActiveView = VTBE_OUTLINE_VIEW;
break;
case ViewShell::ST_SLIDE_SORTER:
eActiveView = VTBE_SLIDE_VIEW;
break;
case ViewShell::ST_NOTES:
eActiveView = VTBE_NOTES_VIEW;
break;
case ViewShell::ST_HANDOUT:
eActiveView = VTBE_HANDOUT_VIEW;
break;
}
SetCurPageId (eActiveView);
}
return 0;
}
} // end of namespace sd