xref: /AOO41X/main/svx/inc/svx/grafctrl.hxx (revision 3334a7e6acdae9820fa1a6f556bb10129a8de6b2)
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 
23 
24 #ifndef _SVX_GRAFCTRL_HXX
25 #define _SVX_GRAFCTRL_HXX
26 
27 #include <svl/lstner.hxx>
28 #include <svl/intitem.hxx>
29 #include <sfx2/tbxctrl.hxx>
30 #include "svx/svxdllapi.h"
31 
32 // ----------------
33 // - TbxImageItem -
34 // ----------------
35 
36 class SVX_DLLPUBLIC TbxImageItem : public SfxUInt16Item
37 {
38 public:
39                             TYPEINFO();
40                             TbxImageItem( sal_uInt16 nWhich = 0, sal_uInt16 nImage = 0 );
41 
42     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
43     virtual int             operator==( const SfxPoolItem& ) const;
44 };
45 
46 // -------------------------------
47 // - SvxGrafFilterToolBoxControl -
48 // -------------------------------
49 
50 class SVX_DLLPUBLIC SvxGrafFilterToolBoxControl : public SfxToolBoxControl
51 {
52 public:
53 
54                                 SFX_DECL_TOOLBOX_CONTROL();
55 
56                                 SvxGrafFilterToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
57                                 ~SvxGrafFilterToolBoxControl();
58 
59     virtual void                StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
60     virtual SfxPopupWindowType  GetPopupWindowType() const;
61     virtual SfxPopupWindow*     CreatePopupWindow();
62 };
63 
64 // -------------------------
65 // - SvxGrafToolBoxControl -
66 // -------------------------
67 
68 class SvxGrafToolBoxControl : public SfxToolBoxControl
69 {
70 public:
71 
72                         SFX_DECL_TOOLBOX_CONTROL();
73                         SvxGrafToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
74                         ~SvxGrafToolBoxControl();
75 
76     virtual void        StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
77     virtual Window*     CreateItemWindow( Window *pParent );
78 };
79 
80 // ----------------------------
81 // - SvxGrafRedToolBoxControl -
82 // ----------------------------
83 
84 class SVX_DLLPUBLIC SvxGrafRedToolBoxControl : public SvxGrafToolBoxControl
85 {
86 public:
87                         SFX_DECL_TOOLBOX_CONTROL();
88                         SvxGrafRedToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
89 };
90 
91 // ------------------------------
92 // - SvxGrafGreenToolBoxControl -
93 // ------------------------------
94 
95 class SVX_DLLPUBLIC SvxGrafGreenToolBoxControl : public SvxGrafToolBoxControl
96 {
97 public:
98                         SFX_DECL_TOOLBOX_CONTROL();
99                         SvxGrafGreenToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
100 };
101 
102 // -----------------------------
103 // - SvxGrafBlueToolBoxControl -
104 // -----------------------------
105 
106 class SVX_DLLPUBLIC SvxGrafBlueToolBoxControl : public SvxGrafToolBoxControl
107 {
108 public:
109                         SFX_DECL_TOOLBOX_CONTROL();
110                         SvxGrafBlueToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
111 };
112 
113 // ----------------------------------
114 // - SvxGrafLuminanceToolBoxControl -
115 // ----------------------------------
116 
117 class SVX_DLLPUBLIC SvxGrafLuminanceToolBoxControl : public SvxGrafToolBoxControl
118 {
119 public:
120                         SFX_DECL_TOOLBOX_CONTROL();
121                         SvxGrafLuminanceToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
122 };
123 
124 // ---------------------------------
125 // - SvxGrafContrastToolBoxControl -
126 // ---------------------------------
127 
128 class SVX_DLLPUBLIC SvxGrafContrastToolBoxControl : public SvxGrafToolBoxControl
129 {
130 public:
131                         SFX_DECL_TOOLBOX_CONTROL();
132                         SvxGrafContrastToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
133 };
134 
135 // ------------------------------
136 // - SvxGrafGammaToolBoxControl -
137 // ------------------------------
138 
139 class SVX_DLLPUBLIC SvxGrafGammaToolBoxControl : public SvxGrafToolBoxControl
140 {
141 public:
142                         SFX_DECL_TOOLBOX_CONTROL();
143                         SvxGrafGammaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
144 };
145 
146 // -------------------------------------
147 // - SvxGrafTransparenceToolBoxControl -
148 // -------------------------------------
149 
150 class SVX_DLLPUBLIC SvxGrafTransparenceToolBoxControl : public SvxGrafToolBoxControl
151 {
152 public:
153                         SFX_DECL_TOOLBOX_CONTROL();
154                         SvxGrafTransparenceToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
155 };
156 
157 // -----------------------------
158 // - SvxGrafModeToolBoxControl -
159 // -----------------------------
160 
161 class SVX_DLLPUBLIC SvxGrafModeToolBoxControl : public SfxToolBoxControl, public SfxListener
162 {
163 public:
164                         SFX_DECL_TOOLBOX_CONTROL();
165                         SvxGrafModeToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
166                         ~SvxGrafModeToolBoxControl();
167 
168     virtual void        StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
169     virtual Window*     CreateItemWindow( Window *pParent );
170 };
171 
172 // ---------------------
173 // - SvxGrafAttrHelper -
174 // ---------------------
175 
176 class SdrView;
177 class SfxRequest;
178 
179 class SVX_DLLPUBLIC SvxGrafAttrHelper
180 {
181 public:
182 
183     static void     ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView );
184     static void     GetGrafAttrState( SfxItemSet& rSet, SdrView& rView );
185 };
186 
187 #endif // _SVX_GRAFCTRL_HXX
188