xref: /trunk/main/svx/inc/GalleryControl.hxx (revision a8eaca58)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 #ifndef SVX_SIDEBAR_GALLERY_CONTROL_HXX
23 #define SVX_SIDEBAR_GALLERY_CONTROL_HXX
24 
25 #include <vcl/window.hxx>
26 #include <vcl/graph.hxx>
27 #include <tools/urlobj.hxx>
28 #include "svx/svxdllapi.h"
29 
30 #include <boost/scoped_ptr.hpp>
31 
32 class SfxBindings;
33 
34 class Gallery;
35 class GallerySplitter;
36 class GalleryBrowser1;
37 class GalleryBrowser2;
38 class FmFormModel;
39 
40 namespace svx { namespace sidebar {
41 
42 
43 class SVX_DLLPUBLIC GalleryControl : public Window
44 {
45 public:
46     GalleryControl (
47         SfxBindings* pBindings,
48         Window* pParentWindow);
49     virtual ~GalleryControl (void);
50 
51 private:
52     Gallery* mpGallery;
53     ::boost::scoped_ptr<GallerySplitter> mpSplitter;
54     ::boost::scoped_ptr<GalleryBrowser1> mpBrowser1;
55     ::boost::scoped_ptr<GalleryBrowser2> mpBrowser2;
56 	Size maLastSize;
57     bool mbIsInitialResize;
58 
59     void InitSettings (void);
60 
61 	virtual void Resize (void);
62 	virtual void GetFocus (void);
63 
64     DECL_LINK(SplitHdl, void*);
65 
66 protected:
67 	void ThemeSelectionHasChanged (void);
68 
69 	INetURLObject GetURL (void) const;
70 	String GetFilterName (void) const;
71 	Graphic GetGraphic (void) const;
72 	sal_Bool GetVCDrawModel (FmFormModel& rModel) const;
73 	sal_Bool IsLinkage (void) const;
74     sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow);
75 };
76 
77 } } // end of namespace svx::sidebar
78 
79 #endif
80