2012-05-28 20:23:01 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* Copyright 2012 LibreOffice contributors.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TEMPLATEDLG_HXX
|
|
|
|
#define TEMPLATEDLG_HXX
|
|
|
|
|
2012-06-22 05:15:33 -05:00
|
|
|
#include <set>
|
|
|
|
|
2012-05-28 20:23:01 -05:00
|
|
|
#include <vcl/dialog.hxx>
|
|
|
|
#include <vcl/button.hxx>
|
|
|
|
|
2012-06-24 12:22:42 -05:00
|
|
|
class Edit;
|
2012-06-25 16:06:20 -05:00
|
|
|
class PopupMenu;
|
2012-07-15 07:43:50 -05:00
|
|
|
class TemplateAbstractView;
|
2012-07-29 22:22:44 -05:00
|
|
|
class TemplateLocalView;
|
2012-07-13 21:01:48 -05:00
|
|
|
class TemplateOnlineView;
|
2012-07-04 08:23:29 -05:00
|
|
|
class TemplateSearchView;
|
|
|
|
class ThumbnailView;
|
2012-06-21 22:51:23 -05:00
|
|
|
class ThumbnailViewItem;
|
2012-06-21 17:50:58 -05:00
|
|
|
class ToolBox;
|
2012-06-10 10:50:01 -05:00
|
|
|
|
2012-06-23 21:50:11 -05:00
|
|
|
namespace com {
|
|
|
|
namespace sun { namespace star { namespace frame {
|
|
|
|
class XComponentLoader;
|
|
|
|
} } }
|
|
|
|
}
|
|
|
|
|
2012-07-15 11:46:02 -05:00
|
|
|
class SfxTemplateManagerDlg : public ModelessDialog
|
2012-05-28 20:23:01 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
SfxTemplateManagerDlg (Window *parent = NULL);
|
|
|
|
|
|
|
|
~SfxTemplateManagerDlg ();
|
|
|
|
|
|
|
|
DECL_LINK(ViewAllHdl, void*);
|
|
|
|
DECL_LINK(ViewDocsHdl, void*);
|
|
|
|
DECL_LINK(ViewPresentsHdl, void*);
|
|
|
|
DECL_LINK(ViewSheetsHdl, void*);
|
|
|
|
DECL_LINK(ViewDrawsHdl, void*);
|
|
|
|
|
2012-06-16 12:03:34 -05:00
|
|
|
private:
|
|
|
|
|
2012-06-18 23:10:59 -05:00
|
|
|
virtual void MouseButtonDown( const MouseEvent& rMEvt );
|
|
|
|
|
2012-07-08 12:37:11 -05:00
|
|
|
DECL_LINK(CloseOverlayHdl, void*);
|
2012-06-29 12:32:48 -05:00
|
|
|
|
2012-06-16 12:03:34 -05:00
|
|
|
DECL_LINK(OnClickSelectionMode, ImageButton*);
|
|
|
|
|
2012-06-21 21:50:23 -05:00
|
|
|
DECL_LINK(TBXViewHdl, void*);
|
|
|
|
DECL_LINK(TBXActionHdl, void*);
|
|
|
|
DECL_LINK(TBXTemplateHdl, void*);
|
2012-06-25 16:06:20 -05:00
|
|
|
DECL_LINK(TBXDropdownHdl, ToolBox*);
|
2012-06-21 21:50:23 -05:00
|
|
|
|
2012-06-21 22:51:23 -05:00
|
|
|
DECL_LINK(TVFolderStateHdl, const ThumbnailViewItem*);
|
|
|
|
DECL_LINK(TVTemplateStateHdl, const ThumbnailViewItem*);
|
|
|
|
|
2012-06-25 16:06:20 -05:00
|
|
|
DECL_LINK(MenuSelectHdl, Menu*);
|
2012-06-28 22:44:52 -05:00
|
|
|
DECL_LINK(MoveMenuSelectHdl, Menu*);
|
2012-07-30 20:07:49 -05:00
|
|
|
DECL_LINK(RepositoryMenuSelectHdl, Menu*);
|
2012-08-08 17:59:30 -05:00
|
|
|
DECL_LINK(DefaultTemplateMenuSelectHdl, Menu*);
|
2012-06-25 16:06:20 -05:00
|
|
|
|
2012-06-28 21:51:26 -05:00
|
|
|
DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*);
|
|
|
|
|
2012-07-06 05:46:49 -05:00
|
|
|
DECL_LINK(SearchUpdateHdl, void*);
|
2012-07-04 08:23:29 -05:00
|
|
|
|
2012-06-21 21:50:23 -05:00
|
|
|
void OnTemplateImport ();
|
|
|
|
void OnTemplateSearch ();
|
|
|
|
void OnTemplateEdit ();
|
|
|
|
void OnTemplateProperties ();
|
|
|
|
void OnTemplateDelete ();
|
2012-08-08 15:33:40 -05:00
|
|
|
void OnTemplateAsDefault ();
|
2012-08-11 12:43:01 -05:00
|
|
|
void OnTemplateExport ();
|
2012-07-08 18:42:33 -05:00
|
|
|
void OnFolderDelete ();
|
2012-08-08 09:09:27 -05:00
|
|
|
void OnRepositoryDelete ();
|
2012-06-21 21:50:23 -05:00
|
|
|
|
2012-07-08 10:28:31 -05:00
|
|
|
void centerTopButtons ();
|
|
|
|
|
2012-07-30 20:07:49 -05:00
|
|
|
void createRepositoryMenu ();
|
|
|
|
|
2012-08-08 17:59:30 -05:00
|
|
|
void createDefaultTemplateMenu ();
|
|
|
|
|
2012-07-13 21:01:48 -05:00
|
|
|
// Exchange view between local/online view.
|
|
|
|
void switchMainView (bool bDisplayLocal);
|
|
|
|
|
2012-07-27 08:40:24 -05:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Move templates stored in the filesystem to another folder.
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
|
|
|
|
void localMoveTo (sal_uInt16 nMenuId);
|
|
|
|
|
2012-07-29 20:58:31 -05:00
|
|
|
void remoteMoveTo (const sal_uInt16 nMenuId);
|
|
|
|
|
2012-07-27 08:40:24 -05:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Move search result templates stored in the filesystem to another folder.
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
|
|
|
|
void localSearchMoveTo (sal_uInt16 nMenuId);
|
|
|
|
|
2012-05-28 20:23:01 -05:00
|
|
|
private:
|
|
|
|
|
|
|
|
PushButton aButtonAll;
|
|
|
|
PushButton aButtonDocs;
|
|
|
|
PushButton aButtonPresents;
|
|
|
|
PushButton aButtonSheets;
|
|
|
|
PushButton aButtonDraws;
|
2012-06-16 12:03:34 -05:00
|
|
|
ImageButton maButtonSelMode;
|
2012-06-01 12:55:06 -05:00
|
|
|
|
2012-06-24 12:22:42 -05:00
|
|
|
Edit *mpSearchEdit;
|
2012-06-21 17:50:58 -05:00
|
|
|
ToolBox *mpViewBar;
|
|
|
|
ToolBox *mpActionBar;
|
|
|
|
ToolBox *mpTemplateBar;
|
2012-07-04 08:23:29 -05:00
|
|
|
TemplateSearchView *mpSearchView;
|
2012-07-15 07:43:50 -05:00
|
|
|
TemplateAbstractView *mpCurView;
|
2012-07-29 22:22:44 -05:00
|
|
|
TemplateLocalView *maView;
|
2012-07-13 21:01:48 -05:00
|
|
|
TemplateOnlineView *mpOnlineView;
|
2012-06-25 17:19:34 -05:00
|
|
|
PopupMenu *mpActionMenu;
|
2012-07-30 20:07:49 -05:00
|
|
|
PopupMenu *mpRepositoryMenu;
|
2012-08-08 17:59:30 -05:00
|
|
|
PopupMenu *mpTemplateDefaultMenu;
|
2012-06-22 05:15:33 -05:00
|
|
|
|
|
|
|
std::set<const ThumbnailViewItem*> maSelTemplates;
|
2012-06-24 07:53:15 -05:00
|
|
|
std::set<const ThumbnailViewItem*> maSelFolders;
|
2012-06-23 21:50:11 -05:00
|
|
|
|
|
|
|
com::sun::star::uno::Reference< com::sun::star::frame::XComponentLoader > mxDesktop;
|
2012-05-28 20:23:01 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TEMPLATEDLG_HXX
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|