2010-10-14 01:30:41 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 06:35:47 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 06:35:47 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 06:35:47 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 06:35:47 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 06:35:47 -05:00
|
|
|
* OpenOffice.org 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 version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 06:35:47 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
2010-10-18 06:55:43 -05:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
#ifndef TOOLBOX_HXX
|
|
|
|
#define TOOLBOX_HXX
|
|
|
|
|
|
|
|
#include <sfx2/basedlgs.hxx>
|
|
|
|
#include <sfx2/childwin.hxx>
|
|
|
|
#include <vcl/toolbox.hxx>
|
2010-08-27 01:59:10 -05:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "smmod.hxx"
|
|
|
|
#include "config.hxx"
|
2010-08-27 01:59:10 -05:00
|
|
|
#include "toolbox.hrc"
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
class SmToolBoxWindow : public SfxFloatingWindow
|
|
|
|
{
|
|
|
|
|
|
|
|
protected:
|
|
|
|
ToolBox aToolBoxCat;
|
2003-05-28 06:46:46 -05:00
|
|
|
FixedLine aToolBoxCat_Delim; // to visualy seperate the catalog part
|
2000-09-18 11:07:07 -05:00
|
|
|
ToolBox *pToolBoxCmd;
|
|
|
|
ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES];
|
2002-05-24 01:33:10 -05:00
|
|
|
ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */
|
2011-01-14 10:19:25 -06:00
|
|
|
sal_uInt16 nActiveCategoryRID;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2011-01-14 10:19:25 -06:00
|
|
|
virtual sal_Bool Close();
|
2002-04-24 07:24:47 -05:00
|
|
|
virtual void GetFocus();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2011-01-14 10:19:25 -06:00
|
|
|
void ApplyImageLists( sal_uInt16 nCategoryRID );
|
2002-05-24 01:33:10 -05:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
DECL_LINK( CategoryClickHdl, ToolBox* );
|
|
|
|
DECL_LINK( CmdSelectHdl, ToolBox* );
|
|
|
|
|
2006-05-05 01:58:37 -05:00
|
|
|
SmViewShell * GetView();
|
2011-03-14 11:51:14 -05:00
|
|
|
const ImageList * GetImageList( sal_uInt16 nResId );
|
2004-11-17 01:14:30 -06:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
public:
|
|
|
|
SmToolBoxWindow(SfxBindings *pBindings,
|
|
|
|
SfxChildWindow *pChildWindow,
|
|
|
|
Window *pParent);
|
|
|
|
~SmToolBoxWindow();
|
|
|
|
|
|
|
|
// Window
|
|
|
|
virtual void StateChanged( StateChangedType nStateChange );
|
2002-05-24 01:33:10 -05:00
|
|
|
virtual void DataChanged( const DataChangedEvent &rEvt );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2010-11-05 19:33:05 -05:00
|
|
|
void AdjustPosSize( bool bSetPos );
|
2011-01-14 10:19:25 -06:00
|
|
|
void SetCategory(sal_uInt16 nCategory);
|
2000-09-18 11:07:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
/**************************************************************************/
|
|
|
|
|
|
|
|
class SmToolBoxWrapper : public SfxChildWindow
|
|
|
|
{
|
|
|
|
SFX_DECL_CHILDWINDOW(SmToolBoxWrapper);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
SmToolBoxWrapper(Window *pParentWindow,
|
2011-01-14 10:19:25 -06:00
|
|
|
sal_uInt16, SfxBindings*, SfxChildWinInfo*);
|
2000-09-18 11:07:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 01:30:41 -05:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|