merge the formfield patch from ooo-build
[ooovba.git] / svx / inc / galbrws.hxx
blob6e4da56fe1ab5beadd7048f8f22d957217c4650c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: galbrws.hxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SVX_GALBRWS_HXX_
32 #define _SVX_GALBRWS_HXX_
34 #include <sfx2/ctrlitem.hxx>
35 #include <sfx2/dockwin.hxx>
36 #include <vcl/graph.hxx>
37 #include <tools/urlobj.hxx>
38 #include "svx/svxdllapi.h"
40 // -----------
41 // - Defines -
42 // -----------
44 #define GALLERYBROWSER() ((GalleryBrowser*)( SfxViewFrame::Current()->GetChildWindow(GalleryChildWindow::GetChildWindowId())->GetWindow()))
46 // -------------------------
47 // - SvxGalleryChildWindow -
48 // -------------------------
50 class SVX_DLLPUBLIC GalleryChildWindow : public SfxChildWindow
52 public:
53 GalleryChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
54 ~GalleryChildWindow();
56 SFX_DECL_CHILDWINDOW( GalleryChildWindow );
59 // ------------------
60 // - FormModel -
61 // ------------------
63 class FmFormModel;
65 // ------------------
66 // - GalleryBrowser -
67 // ------------------
69 class GalleryBrowser1;
70 class GalleryBrowser2;
71 class GallerySplitter;
72 class Gallery;
74 class GalleryBrowser : public SfxDockingWindow
76 friend class GalleryBrowser1;
77 friend class GalleryBrowser2;
78 friend class GallerySplitter;
79 using Window::KeyInput;
81 private:
83 Size maLastSize;
84 GallerySplitter* mpSplitter;
85 GalleryBrowser1* mpBrowser1;
86 GalleryBrowser2* mpBrowser2;
87 Gallery* mpGallery;
88 long mnDummy1;
89 long mnDummy2;
90 long mnDummy3;
92 void InitSettings();
94 virtual BOOL Close();
95 virtual void Resize();
96 virtual void GetFocus();
98 DECL_LINK( SplitHdl, void* );
100 protected:
102 void ThemeSelectionHasChanged();
104 public:
106 GalleryBrowser( SfxBindings* pBindings, SfxChildWindow* pCW,
107 Window* pParent, const ResId& rResId );
108 ~GalleryBrowser();
110 INetURLObject GetURL() const;
111 String GetFilterName() const;
112 Graphic GetGraphic() const;
113 BOOL GetVCDrawModel( FmFormModel& rModel ) const;
114 BOOL IsLinkage() const;
116 BOOL KeyInput( const KeyEvent& rKEvt, Window* pWindow );
119 #endif // _SVX_GALBRWS_HXX_