2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-09 04:46:15 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 04:46:15 +00:00
|
|
|
* $RCSfile: navigatr.hxx,v $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2006-12-12 16:44:36 +00:00
|
|
|
* $Revision: 1.13 $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2006-12-12 16:44:36 +00:00
|
|
|
* last change: $Author: kz $ $Date: 2006-12-12 17:44:36 $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 04:46:15 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-09 04:46:15 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 04:46:15 +00:00
|
|
|
* 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.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 04:46:15 +00:00
|
|
|
* 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.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 04:46:15 +00:00
|
|
|
* 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
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
#ifndef SD_NAVIGATOR_HXX
|
|
|
|
#define SD_NAVIGATOR_HXX
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
#ifndef _SV_WINDOW_HXX
|
|
|
|
#include <vcl/window.hxx>
|
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
#ifndef _SV_LSTBOX_HXX //autogen
|
|
|
|
#include <vcl/lstbox.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _TOOLBOX_HXX //autogen
|
|
|
|
#include <vcl/toolbox.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SFXCTRLITEM_HXX //autogen
|
|
|
|
#include <sfx2/ctrlitem.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SDTREELB_HXX
|
|
|
|
#include "sdtreelb.hxx"
|
|
|
|
#endif
|
2001-04-04 15:41:39 +00:00
|
|
|
#ifndef _PRESENTATION_HXX
|
|
|
|
#include "pres.hxx"
|
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#define NAVSTATE_NONE 0x00000000
|
|
|
|
|
|
|
|
#define NAVBTN_PEN_ENABLED 0x00000010
|
|
|
|
#define NAVBTN_PEN_DISABLED 0x00000020
|
|
|
|
#define NAVBTN_PEN_CHECKED 0x00000040
|
|
|
|
#define NAVBTN_PEN_UNCHECKED 0x00000080
|
|
|
|
|
|
|
|
#define NAVTLB_UPDATE 0x00000100
|
|
|
|
|
|
|
|
#define NAVBTN_FIRST_ENABLED 0x00001000
|
|
|
|
#define NAVBTN_FIRST_DISABLED 0x00002000
|
|
|
|
#define NAVBTN_PREV_ENABLED 0x00004000
|
|
|
|
#define NAVBTN_PREV_DISABLED 0x00008000
|
|
|
|
|
|
|
|
#define NAVBTN_LAST_ENABLED 0x00010000
|
|
|
|
#define NAVBTN_LAST_DISABLED 0x00020000
|
|
|
|
#define NAVBTN_NEXT_ENABLED 0x00040000
|
|
|
|
#define NAVBTN_NEXT_DISABLED 0x00080000
|
|
|
|
|
|
|
|
// forward
|
2004-01-20 12:40:39 +00:00
|
|
|
namespace sd {
|
|
|
|
class DrawDocShell;
|
|
|
|
class NavigatorChildWindow;
|
|
|
|
class View;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
class Menu;
|
2005-06-14 15:23:53 +00:00
|
|
|
class SdNavigatorControllerItem;
|
|
|
|
class SdPageNameControllerItem;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class NavDocInfo
|
|
|
|
{
|
|
|
|
public:
|
2006-12-12 16:44:36 +00:00
|
|
|
NavDocInfo() { mpDocShell = NULL; }
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
BOOL HasName() { return( (BOOL) bName ); }
|
|
|
|
BOOL IsActive() { return( (BOOL) bActive ); }
|
|
|
|
|
|
|
|
void SetName( BOOL bOn = TRUE ) { bName = bOn; }
|
|
|
|
void SetActive( BOOL bOn = TRUE ) { bActive = bOn; }
|
2004-01-20 12:40:39 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
friend class SdNavigatorWin;
|
|
|
|
BOOL bName : 1;
|
|
|
|
BOOL bActive : 1;
|
2006-12-12 16:44:36 +00:00
|
|
|
::sd::DrawDocShell* mpDocShell;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
class SdNavigatorWin
|
|
|
|
: public Window
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-01-20 12:40:39 +00:00
|
|
|
public:
|
|
|
|
SdNavigatorWin(
|
|
|
|
::Window* pParent,
|
|
|
|
::sd::NavigatorChildWindow* pChildWinContext,
|
|
|
|
const SdResId& rSdResId,
|
|
|
|
SfxBindings* pBindings );
|
|
|
|
virtual ~SdNavigatorWin();
|
|
|
|
|
|
|
|
virtual void KeyInput( const KeyEvent& rKEvt );
|
|
|
|
|
|
|
|
void InitTreeLB( const SdDrawDocument* pDoc );
|
|
|
|
void RefreshDocumentLB( const String* pDocName = NULL );
|
|
|
|
|
|
|
|
BOOL InsertFile(const String& rFileName);
|
|
|
|
|
|
|
|
NavigatorDragType GetNavigatorDragType();
|
2006-12-12 16:44:36 +00:00
|
|
|
void SetNavigatorDragType(NavigatorDragType eType) { meDragType = eType; }
|
2004-01-20 12:40:39 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void Resize();
|
2004-01-23 09:50:44 +00:00
|
|
|
virtual long Notify(NotifyEvent& rNEvt);
|
2004-01-20 12:40:39 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
private:
|
2004-01-20 12:40:39 +00:00
|
|
|
friend class ::sd::NavigatorChildWindow;
|
|
|
|
friend class SdNavigatorControllerItem;
|
|
|
|
friend class SdPageNameControllerItem;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:44:36 +00:00
|
|
|
ToolBox maToolbox;
|
|
|
|
SdPageObjsTLB maTlbObjects;
|
|
|
|
ListBox maLbDocs;
|
|
|
|
|
|
|
|
::sd::NavigatorChildWindow* mpChildWinContext;
|
|
|
|
Size maSize;
|
|
|
|
Size maMinSize;
|
|
|
|
// Size maFltWinSize;
|
|
|
|
BOOL mbDocImported;
|
|
|
|
String maDropFileName;
|
|
|
|
NavigatorDragType meDragType;
|
|
|
|
List* mpDocList;
|
|
|
|
SfxBindings* mpBindings;
|
|
|
|
SdNavigatorControllerItem* mpNavigatorCtrlItem;
|
|
|
|
SdPageNameControllerItem* mpPageNameCtrlItem;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2002-05-21 13:14:26 +00:00
|
|
|
ImageList maImageList;
|
|
|
|
ImageList maImageListH;
|
|
|
|
|
2001-04-04 15:41:39 +00:00
|
|
|
USHORT GetDragTypeSdResId( NavigatorDragType eDT, BOOL bImage = FALSE );
|
|
|
|
NavDocInfo* GetDocInfo();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2001-04-04 15:41:39 +00:00
|
|
|
DECL_LINK( GetFocusObjectsHdl, void * );
|
|
|
|
DECL_LINK( SelectToolboxHdl, void * );
|
|
|
|
DECL_LINK( ClickToolboxHdl, ToolBox * );
|
2004-08-02 14:05:53 +00:00
|
|
|
DECL_LINK( DropdownClickToolBoxHdl, ToolBox * );
|
2001-04-04 15:41:39 +00:00
|
|
|
DECL_LINK( ClickPageHdl, void * );
|
|
|
|
DECL_LINK( ClickObjectHdl, void * );
|
|
|
|
DECL_LINK( SelectDocumentHdl, void * );
|
|
|
|
DECL_LINK( MenuSelectHdl, Menu * );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2002-05-21 13:14:26 +00:00
|
|
|
virtual void DataChanged( const DataChangedEvent& rDCEvt );
|
|
|
|
void SetDragImage();
|
|
|
|
void ApplyImageList();
|
2004-01-20 12:40:39 +00:00
|
|
|
};
|
2002-05-21 13:14:26 +00:00
|
|
|
|
2001-04-04 15:41:39 +00:00
|
|
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* ControllerItem fuer Navigator
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
class SdNavigatorControllerItem : public SfxControllerItem
|
|
|
|
{
|
2004-01-20 12:40:39 +00:00
|
|
|
public:
|
|
|
|
SdNavigatorControllerItem( USHORT, SdNavigatorWin*, SfxBindings* );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
protected:
|
2000-09-18 16:07:07 +00:00
|
|
|
virtual void StateChanged( USHORT nSId, SfxItemState eState,
|
|
|
|
const SfxPoolItem* pState );
|
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
private:
|
|
|
|
SdNavigatorWin* pNavigatorWin;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* ControllerItem fuer Navigator zum Anzeigen der Seite in der TreeLB
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
class SdPageNameControllerItem : public SfxControllerItem
|
|
|
|
{
|
2004-01-20 12:40:39 +00:00
|
|
|
public:
|
|
|
|
SdPageNameControllerItem( USHORT, SdNavigatorWin*, SfxBindings* );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
protected:
|
2000-09-18 16:07:07 +00:00
|
|
|
virtual void StateChanged( USHORT nSId, SfxItemState eState,
|
|
|
|
const SfxPoolItem* pState );
|
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
private:
|
|
|
|
SdNavigatorWin* pNavigatorWin;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
2004-01-20 12:40:39 +00:00
|
|
|
#endif
|