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 #include "precompiled_toolkit.hxx"
25 
26 #include "stylesettings.hxx"
27 #include <toolkit/awt/vclxwindow.hxx>
28 #include <toolkit/helper/vclunohelper.hxx>
29 
30 /** === begin UNO includes === **/
31 #include <com/sun/star/lang/DisposedException.hpp>
32 /** === end UNO includes === **/
33 
34 #include <cppuhelper/interfacecontainer.hxx>
35 #include <vos/mutex.hxx>
36 #include <osl/mutex.hxx>
37 #include <vcl/window.hxx>
38 #include <vcl/settings.hxx>
39 
40 //......................................................................................................................
41 namespace toolkit
42 {
43 //......................................................................................................................
44 
45 	/** === begin UNO using === **/
46 	using ::com::sun::star::uno::Reference;
47 	using ::com::sun::star::uno::XInterface;
48 	using ::com::sun::star::uno::UNO_QUERY;
49 	using ::com::sun::star::uno::UNO_QUERY_THROW;
50 	using ::com::sun::star::uno::UNO_SET_THROW;
51 	using ::com::sun::star::uno::Exception;
52 	using ::com::sun::star::uno::RuntimeException;
53 	using ::com::sun::star::uno::Any;
54 	using ::com::sun::star::uno::makeAny;
55 	using ::com::sun::star::uno::Sequence;
56 	using ::com::sun::star::uno::Type;
57     using ::com::sun::star::lang::DisposedException;
58     using ::com::sun::star::lang::EventObject;
59     using ::com::sun::star::awt::FontDescriptor;
60     using ::com::sun::star::awt::XStyleChangeListener;
61     using ::com::sun::star::awt::FontDescriptor;
62 	/** === end UNO using === **/
63 
64 	//==================================================================================================================
65 	//= WindowStyleSettings_Data
66 	//==================================================================================================================
67     struct WindowStyleSettings_Data
68     {
69         ::vos::IMutex&                      rMutex;
70         VCLXWindow*                         pOwningWindow;
71         ::cppu::OInterfaceContainerHelper   aStyleChangeListeners;
72 
WindowStyleSettings_Datatoolkit::WindowStyleSettings_Data73         WindowStyleSettings_Data( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
74             :rMutex( i_rWindowMutex )
75             ,pOwningWindow( &i_rOwningWindow )
76             ,aStyleChangeListeners( i_rListenerMutex )
77         {
78         }
79 
80         DECL_LINK( OnWindowEvent, const VclWindowEvent* );
81     };
82 
83 	//------------------------------------------------------------------------------------------------------------------
IMPL_LINK(WindowStyleSettings_Data,OnWindowEvent,const VclWindowEvent *,i_pEvent)84     IMPL_LINK( WindowStyleSettings_Data, OnWindowEvent, const VclWindowEvent*, i_pEvent )
85     {
86         if ( !i_pEvent || ( i_pEvent->GetId() != VCLEVENT_WINDOW_DATACHANGED ) )
87             return 0L;
88         const DataChangedEvent* pDataChangedEvent = static_cast< const DataChangedEvent* >( i_pEvent->GetData() );
89         if ( !pDataChangedEvent || ( pDataChangedEvent->GetType() != DATACHANGED_SETTINGS ) )
90             return 0L;
91         if ( ( pDataChangedEvent->GetFlags() & SETTINGS_STYLE ) == 0 )
92             return 0L;
93 
94         EventObject aEvent( *pOwningWindow );
95         aStyleChangeListeners.notifyEach( &XStyleChangeListener::styleSettingsChanged, aEvent );
96         return 1L;
97     }
98 
99 	//==================================================================================================================
100 	//= StyleMethodGuard
101 	//==================================================================================================================
102     class StyleMethodGuard
103     {
104     public:
StyleMethodGuard(WindowStyleSettings_Data & i_rData)105         StyleMethodGuard( WindowStyleSettings_Data& i_rData )
106             :m_aGuard( i_rData.rMutex )
107         {
108             if ( i_rData.pOwningWindow == NULL )
109                 throw DisposedException();
110         }
111 
~StyleMethodGuard()112         ~StyleMethodGuard()
113         {
114         }
115 
116     private:
117         ::vos::OGuard   m_aGuard;
118     };
119 
120 	//==================================================================================================================
121 	//= WindowStyleSettings
122 	//==================================================================================================================
123 	//------------------------------------------------------------------------------------------------------------------
WindowStyleSettings(::vos::IMutex & i_rWindowMutex,::osl::Mutex & i_rListenerMutex,VCLXWindow & i_rOwningWindow)124     WindowStyleSettings::WindowStyleSettings( ::vos::IMutex& i_rWindowMutex, ::osl::Mutex& i_rListenerMutex, VCLXWindow& i_rOwningWindow )
125         :m_pData( new WindowStyleSettings_Data( i_rWindowMutex, i_rListenerMutex, i_rOwningWindow ) )
126     {
127         Window* pWindow = i_rOwningWindow.GetWindow();
128         if ( !pWindow )
129             throw new RuntimeException();
130         pWindow->AddEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
131     }
132 
133 	//------------------------------------------------------------------------------------------------------------------
~WindowStyleSettings()134     WindowStyleSettings::~WindowStyleSettings()
135     {
136     }
137 
138 	//------------------------------------------------------------------------------------------------------------------
dispose()139     void WindowStyleSettings::dispose()
140     {
141         StyleMethodGuard aGuard( *m_pData );
142 
143         Window* pWindow = m_pData->pOwningWindow->GetWindow();
144         OSL_ENSURE( pWindow, "WindowStyleSettings::dispose: window has been reset before we could revoke the listener!" );
145         if ( pWindow )
146             pWindow->RemoveEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
147 
148         EventObject aEvent( *this );
149         m_pData->aStyleChangeListeners.disposeAndClear( aEvent );
150 
151         m_pData->pOwningWindow = NULL;
152     }
153 
154 	//------------------------------------------------------------------------------------------------------------------
155     namespace
156     {
lcl_getStyleColor(WindowStyleSettings_Data & i_rData,Color const & (StyleSettings::* i_pGetter)()const)157         sal_Int32 lcl_getStyleColor( WindowStyleSettings_Data& i_rData, Color const & (StyleSettings::*i_pGetter)() const )
158         {
159             const Window* pWindow = i_rData.pOwningWindow->GetWindow();
160             const AllSettings aAllSettings = pWindow->GetSettings();
161             const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
162             return (aStyleSettings.*i_pGetter)().GetColor();
163         }
164 
lcl_setStyleColor(WindowStyleSettings_Data & i_rData,void (StyleSettings::* i_pSetter)(Color const &),const sal_Int32 i_nColor)165         void lcl_setStyleColor( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Color const & ), const sal_Int32 i_nColor )
166         {
167             Window* pWindow = i_rData.pOwningWindow->GetWindow();
168             AllSettings aAllSettings = pWindow->GetSettings();
169             StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
170             (aStyleSettings.*i_pSetter)( Color( i_nColor ) );
171             aAllSettings.SetStyleSettings( aStyleSettings );
172             pWindow->SetSettings( aAllSettings );
173         }
174 
lcl_getStyleFont(WindowStyleSettings_Data & i_rData,Font const & (StyleSettings::* i_pGetter)()const)175         FontDescriptor lcl_getStyleFont( WindowStyleSettings_Data& i_rData, Font const & (StyleSettings::*i_pGetter)() const )
176         {
177             const Window* pWindow = i_rData.pOwningWindow->GetWindow();
178             const AllSettings aAllSettings = pWindow->GetSettings();
179             const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
180             return VCLUnoHelper::CreateFontDescriptor( (aStyleSettings.*i_pGetter)() );
181         }
182 
lcl_setStyleFont(WindowStyleSettings_Data & i_rData,void (StyleSettings::* i_pSetter)(Font const &),Font const & (StyleSettings::* i_pGetter)()const,const FontDescriptor & i_rFont)183         void lcl_setStyleFont( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Font const &),
184             Font const & (StyleSettings::*i_pGetter)() const, const FontDescriptor& i_rFont )
185         {
186             Window* pWindow = i_rData.pOwningWindow->GetWindow();
187             AllSettings aAllSettings = pWindow->GetSettings();
188             StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
189             const Font aNewFont = VCLUnoHelper::CreateFont( i_rFont, (aStyleSettings.*i_pGetter)() );
190             (aStyleSettings.*i_pSetter)( aNewFont );
191             aAllSettings.SetStyleSettings( aStyleSettings );
192             pWindow->SetSettings( aAllSettings );
193         }
194     }
195 
196 	//------------------------------------------------------------------------------------------------------------------
getActiveBorderColor()197     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveBorderColor() throw (RuntimeException)
198     {
199         StyleMethodGuard aGuard( *m_pData );
200         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveBorderColor );
201     }
202 
203 	//------------------------------------------------------------------------------------------------------------------
setActiveBorderColor(::sal_Int32 _activebordercolor)204     void SAL_CALL WindowStyleSettings::setActiveBorderColor( ::sal_Int32 _activebordercolor ) throw (RuntimeException)
205     {
206         StyleMethodGuard aGuard( *m_pData );
207         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveBorderColor, _activebordercolor );
208     }
209 
210 	//------------------------------------------------------------------------------------------------------------------
getActiveColor()211     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveColor() throw (RuntimeException)
212     {
213         StyleMethodGuard aGuard( *m_pData );
214         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveColor );
215     }
216 
217 	//------------------------------------------------------------------------------------------------------------------
setActiveColor(::sal_Int32 _activecolor)218     void SAL_CALL WindowStyleSettings::setActiveColor( ::sal_Int32 _activecolor ) throw (RuntimeException)
219     {
220         StyleMethodGuard aGuard( *m_pData );
221         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveColor, _activecolor );
222     }
223 
224 	//------------------------------------------------------------------------------------------------------------------
getActiveTabColor()225     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveTabColor() throw (RuntimeException)
226     {
227         StyleMethodGuard aGuard( *m_pData );
228         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveTabColor );
229     }
230 
231 	//------------------------------------------------------------------------------------------------------------------
setActiveTabColor(::sal_Int32 _activetabcolor)232     void SAL_CALL WindowStyleSettings::setActiveTabColor( ::sal_Int32 _activetabcolor ) throw (RuntimeException)
233     {
234         StyleMethodGuard aGuard( *m_pData );
235         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveTabColor, _activetabcolor );
236     }
237 
238 	//------------------------------------------------------------------------------------------------------------------
getActiveTextColor()239     ::sal_Int32 SAL_CALL WindowStyleSettings::getActiveTextColor() throw (RuntimeException)
240     {
241         StyleMethodGuard aGuard( *m_pData );
242         return lcl_getStyleColor( *m_pData, &StyleSettings::GetActiveTextColor );
243     }
244 
245 	//------------------------------------------------------------------------------------------------------------------
setActiveTextColor(::sal_Int32 _activetextcolor)246     void SAL_CALL WindowStyleSettings::setActiveTextColor( ::sal_Int32 _activetextcolor ) throw (RuntimeException)
247     {
248         StyleMethodGuard aGuard( *m_pData );
249         lcl_setStyleColor( *m_pData, &StyleSettings::SetActiveTextColor, _activetextcolor );
250     }
251 
252 	//------------------------------------------------------------------------------------------------------------------
getButtonRolloverTextColor()253     ::sal_Int32 SAL_CALL WindowStyleSettings::getButtonRolloverTextColor() throw (RuntimeException)
254     {
255         StyleMethodGuard aGuard( *m_pData );
256         return lcl_getStyleColor( *m_pData, &StyleSettings::GetButtonRolloverTextColor );
257     }
258 
259 	//------------------------------------------------------------------------------------------------------------------
setButtonRolloverTextColor(::sal_Int32 _buttonrollovertextcolor)260     void SAL_CALL WindowStyleSettings::setButtonRolloverTextColor( ::sal_Int32 _buttonrollovertextcolor ) throw (RuntimeException)
261     {
262         StyleMethodGuard aGuard( *m_pData );
263         lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonRolloverTextColor, _buttonrollovertextcolor );
264     }
265 
266 	//------------------------------------------------------------------------------------------------------------------
getButtonTextColor()267     ::sal_Int32 SAL_CALL WindowStyleSettings::getButtonTextColor() throw (RuntimeException)
268     {
269         StyleMethodGuard aGuard( *m_pData );
270         return lcl_getStyleColor( *m_pData, &StyleSettings::GetButtonTextColor );
271     }
272 
273 	//------------------------------------------------------------------------------------------------------------------
setButtonTextColor(::sal_Int32 _buttontextcolor)274     void SAL_CALL WindowStyleSettings::setButtonTextColor( ::sal_Int32 _buttontextcolor ) throw (RuntimeException)
275     {
276         StyleMethodGuard aGuard( *m_pData );
277         lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonTextColor, _buttontextcolor );
278     }
279 
280 	//------------------------------------------------------------------------------------------------------------------
getCheckedColor()281     ::sal_Int32 SAL_CALL WindowStyleSettings::getCheckedColor() throw (RuntimeException)
282     {
283         StyleMethodGuard aGuard( *m_pData );
284         return lcl_getStyleColor( *m_pData, &StyleSettings::GetCheckedColor );
285     }
286 
287 	//------------------------------------------------------------------------------------------------------------------
setCheckedColor(::sal_Int32 _checkedcolor)288     void SAL_CALL WindowStyleSettings::setCheckedColor( ::sal_Int32 _checkedcolor ) throw (RuntimeException)
289     {
290         StyleMethodGuard aGuard( *m_pData );
291         lcl_setStyleColor( *m_pData, &StyleSettings::SetCheckedColor, _checkedcolor );
292     }
293 
294 	//------------------------------------------------------------------------------------------------------------------
getDarkShadowColor()295     ::sal_Int32 SAL_CALL WindowStyleSettings::getDarkShadowColor() throw (RuntimeException)
296     {
297         StyleMethodGuard aGuard( *m_pData );
298         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDarkShadowColor );
299     }
300 
301 	//------------------------------------------------------------------------------------------------------------------
setDarkShadowColor(::sal_Int32 _darkshadowcolor)302     void SAL_CALL WindowStyleSettings::setDarkShadowColor( ::sal_Int32 _darkshadowcolor ) throw (RuntimeException)
303     {
304         StyleMethodGuard aGuard( *m_pData );
305         lcl_setStyleColor( *m_pData, &StyleSettings::SetDarkShadowColor, _darkshadowcolor );
306     }
307 
308 	//------------------------------------------------------------------------------------------------------------------
getDeactiveBorderColor()309     ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveBorderColor() throw (RuntimeException)
310     {
311         StyleMethodGuard aGuard( *m_pData );
312         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveBorderColor );
313     }
314 
315 	//------------------------------------------------------------------------------------------------------------------
setDeactiveBorderColor(::sal_Int32 _deactivebordercolor)316     void SAL_CALL WindowStyleSettings::setDeactiveBorderColor( ::sal_Int32 _deactivebordercolor ) throw (RuntimeException)
317     {
318         StyleMethodGuard aGuard( *m_pData );
319         lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveBorderColor, _deactivebordercolor );
320     }
321 
322 	//------------------------------------------------------------------------------------------------------------------
getDeactiveColor()323     ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveColor() throw (RuntimeException)
324     {
325         StyleMethodGuard aGuard( *m_pData );
326         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveColor );
327     }
328 
329 	//------------------------------------------------------------------------------------------------------------------
setDeactiveColor(::sal_Int32 _deactivecolor)330     void SAL_CALL WindowStyleSettings::setDeactiveColor( ::sal_Int32 _deactivecolor ) throw (RuntimeException)
331     {
332         StyleMethodGuard aGuard( *m_pData );
333         lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveColor, _deactivecolor );
334     }
335 
336 	//------------------------------------------------------------------------------------------------------------------
getDeactiveTextColor()337     ::sal_Int32 SAL_CALL WindowStyleSettings::getDeactiveTextColor() throw (RuntimeException)
338     {
339         StyleMethodGuard aGuard( *m_pData );
340         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDeactiveTextColor );
341     }
342 
343 	//------------------------------------------------------------------------------------------------------------------
setDeactiveTextColor(::sal_Int32 _deactivetextcolor)344     void SAL_CALL WindowStyleSettings::setDeactiveTextColor( ::sal_Int32 _deactivetextcolor ) throw (RuntimeException)
345     {
346         StyleMethodGuard aGuard( *m_pData );
347         lcl_setStyleColor( *m_pData, &StyleSettings::SetDeactiveTextColor, _deactivetextcolor );
348     }
349 
350 	//------------------------------------------------------------------------------------------------------------------
getDialogColor()351     ::sal_Int32 SAL_CALL WindowStyleSettings::getDialogColor() throw (RuntimeException)
352     {
353         StyleMethodGuard aGuard( *m_pData );
354         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDialogColor );
355     }
356 
357 	//------------------------------------------------------------------------------------------------------------------
setDialogColor(::sal_Int32 _dialogcolor)358     void SAL_CALL WindowStyleSettings::setDialogColor( ::sal_Int32 _dialogcolor ) throw (RuntimeException)
359     {
360         StyleMethodGuard aGuard( *m_pData );
361         lcl_setStyleColor( *m_pData, &StyleSettings::SetDialogColor, _dialogcolor );
362     }
363 
364 	//------------------------------------------------------------------------------------------------------------------
getDialogTextColor()365     ::sal_Int32 SAL_CALL WindowStyleSettings::getDialogTextColor() throw (RuntimeException)
366     {
367         StyleMethodGuard aGuard( *m_pData );
368         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDialogTextColor );
369     }
370 
371 	//------------------------------------------------------------------------------------------------------------------
setDialogTextColor(::sal_Int32 _dialogtextcolor)372     void SAL_CALL WindowStyleSettings::setDialogTextColor( ::sal_Int32 _dialogtextcolor ) throw (RuntimeException)
373     {
374         StyleMethodGuard aGuard( *m_pData );
375         lcl_setStyleColor( *m_pData, &StyleSettings::SetDialogTextColor, _dialogtextcolor );
376     }
377 
378 	//------------------------------------------------------------------------------------------------------------------
getDisableColor()379     ::sal_Int32 SAL_CALL WindowStyleSettings::getDisableColor() throw (RuntimeException)
380     {
381         StyleMethodGuard aGuard( *m_pData );
382         return lcl_getStyleColor( *m_pData, &StyleSettings::GetDisableColor );
383     }
384 
385 	//------------------------------------------------------------------------------------------------------------------
setDisableColor(::sal_Int32 _disablecolor)386     void SAL_CALL WindowStyleSettings::setDisableColor( ::sal_Int32 _disablecolor ) throw (RuntimeException)
387     {
388         StyleMethodGuard aGuard( *m_pData );
389         lcl_setStyleColor( *m_pData, &StyleSettings::SetDisableColor, _disablecolor );
390     }
391 
392 	//------------------------------------------------------------------------------------------------------------------
getFaceColor()393     ::sal_Int32 SAL_CALL WindowStyleSettings::getFaceColor() throw (RuntimeException)
394     {
395         StyleMethodGuard aGuard( *m_pData );
396         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFaceColor );
397     }
398 
399 	//------------------------------------------------------------------------------------------------------------------
setFaceColor(::sal_Int32 _facecolor)400     void SAL_CALL WindowStyleSettings::setFaceColor( ::sal_Int32 _facecolor ) throw (RuntimeException)
401     {
402         StyleMethodGuard aGuard( *m_pData );
403         lcl_setStyleColor( *m_pData, &StyleSettings::SetFaceColor, _facecolor );
404     }
405 
406 	//------------------------------------------------------------------------------------------------------------------
getFaceGradientColor()407     ::sal_Int32 SAL_CALL WindowStyleSettings::getFaceGradientColor() throw (RuntimeException)
408     {
409         StyleMethodGuard aGuard( *m_pData );
410         const Window* pWindow = m_pData->pOwningWindow->GetWindow();
411         const AllSettings aAllSettings = pWindow->GetSettings();
412         const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
413         return aStyleSettings.GetFaceGradientColor().GetColor();
414     }
415 
416 	//------------------------------------------------------------------------------------------------------------------
getFieldColor()417     ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldColor() throw (RuntimeException)
418     {
419         StyleMethodGuard aGuard( *m_pData );
420         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldColor );
421     }
422 
423 	//------------------------------------------------------------------------------------------------------------------
setFieldColor(::sal_Int32 _fieldcolor)424     void SAL_CALL WindowStyleSettings::setFieldColor( ::sal_Int32 _fieldcolor ) throw (RuntimeException)
425     {
426         StyleMethodGuard aGuard( *m_pData );
427         lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldColor, _fieldcolor );
428     }
429 
430 	//------------------------------------------------------------------------------------------------------------------
getFieldRolloverTextColor()431     ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldRolloverTextColor() throw (RuntimeException)
432     {
433         StyleMethodGuard aGuard( *m_pData );
434         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldRolloverTextColor );
435     }
436 
437 	//------------------------------------------------------------------------------------------------------------------
setFieldRolloverTextColor(::sal_Int32 _fieldrollovertextcolor)438     void SAL_CALL WindowStyleSettings::setFieldRolloverTextColor( ::sal_Int32 _fieldrollovertextcolor ) throw (RuntimeException)
439     {
440         StyleMethodGuard aGuard( *m_pData );
441         lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldRolloverTextColor, _fieldrollovertextcolor );
442     }
443 
444 	//------------------------------------------------------------------------------------------------------------------
getFieldTextColor()445     ::sal_Int32 SAL_CALL WindowStyleSettings::getFieldTextColor() throw (RuntimeException)
446     {
447         StyleMethodGuard aGuard( *m_pData );
448         return lcl_getStyleColor( *m_pData, &StyleSettings::GetFieldTextColor );
449     }
450 
451 	//------------------------------------------------------------------------------------------------------------------
setFieldTextColor(::sal_Int32 _fieldtextcolor)452     void SAL_CALL WindowStyleSettings::setFieldTextColor( ::sal_Int32 _fieldtextcolor ) throw (RuntimeException)
453     {
454         StyleMethodGuard aGuard( *m_pData );
455         lcl_setStyleColor( *m_pData, &StyleSettings::SetFieldTextColor, _fieldtextcolor );
456     }
457 
458 	//------------------------------------------------------------------------------------------------------------------
getGroupTextColor()459     ::sal_Int32 SAL_CALL WindowStyleSettings::getGroupTextColor() throw (RuntimeException)
460     {
461         StyleMethodGuard aGuard( *m_pData );
462         return lcl_getStyleColor( *m_pData, &StyleSettings::GetGroupTextColor );
463     }
464 
465 	//------------------------------------------------------------------------------------------------------------------
setGroupTextColor(::sal_Int32 _grouptextcolor)466     void SAL_CALL WindowStyleSettings::setGroupTextColor( ::sal_Int32 _grouptextcolor ) throw (RuntimeException)
467     {
468         StyleMethodGuard aGuard( *m_pData );
469         lcl_setStyleColor( *m_pData, &StyleSettings::SetGroupTextColor, _grouptextcolor );
470     }
471 
472 	//------------------------------------------------------------------------------------------------------------------
getHelpColor()473     ::sal_Int32 SAL_CALL WindowStyleSettings::getHelpColor() throw (RuntimeException)
474     {
475         StyleMethodGuard aGuard( *m_pData );
476         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHelpColor );
477     }
478 
479 	//------------------------------------------------------------------------------------------------------------------
setHelpColor(::sal_Int32 _helpcolor)480     void SAL_CALL WindowStyleSettings::setHelpColor( ::sal_Int32 _helpcolor ) throw (RuntimeException)
481     {
482         StyleMethodGuard aGuard( *m_pData );
483         lcl_setStyleColor( *m_pData, &StyleSettings::SetHelpColor, _helpcolor );
484     }
485 
486 	//------------------------------------------------------------------------------------------------------------------
getHelpTextColor()487     ::sal_Int32 SAL_CALL WindowStyleSettings::getHelpTextColor() throw (RuntimeException)
488     {
489         StyleMethodGuard aGuard( *m_pData );
490         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHelpTextColor );
491     }
492 
493 	//------------------------------------------------------------------------------------------------------------------
setHelpTextColor(::sal_Int32 _helptextcolor)494     void SAL_CALL WindowStyleSettings::setHelpTextColor( ::sal_Int32 _helptextcolor ) throw (RuntimeException)
495     {
496         StyleMethodGuard aGuard( *m_pData );
497         lcl_setStyleColor( *m_pData, &StyleSettings::SetHelpTextColor, _helptextcolor );
498     }
499 
500 	//------------------------------------------------------------------------------------------------------------------
getHighlightColor()501     ::sal_Int32 SAL_CALL WindowStyleSettings::getHighlightColor() throw (RuntimeException)
502     {
503         StyleMethodGuard aGuard( *m_pData );
504         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHighlightColor );
505     }
506 
507 	//------------------------------------------------------------------------------------------------------------------
setHighlightColor(::sal_Int32 _highlightcolor)508     void SAL_CALL WindowStyleSettings::setHighlightColor( ::sal_Int32 _highlightcolor ) throw (RuntimeException)
509     {
510         StyleMethodGuard aGuard( *m_pData );
511         lcl_setStyleColor( *m_pData, &StyleSettings::SetHighlightColor, _highlightcolor );
512     }
513 
514 	//------------------------------------------------------------------------------------------------------------------
getHighlightTextColor()515     ::sal_Int32 SAL_CALL WindowStyleSettings::getHighlightTextColor() throw (RuntimeException)
516     {
517         StyleMethodGuard aGuard( *m_pData );
518         return lcl_getStyleColor( *m_pData, &StyleSettings::GetHighlightTextColor );
519     }
520 
521 	//------------------------------------------------------------------------------------------------------------------
setHighlightTextColor(::sal_Int32 _highlighttextcolor)522     void SAL_CALL WindowStyleSettings::setHighlightTextColor( ::sal_Int32 _highlighttextcolor ) throw (RuntimeException)
523     {
524         StyleMethodGuard aGuard( *m_pData );
525         lcl_setStyleColor( *m_pData, &StyleSettings::SetHighlightTextColor, _highlighttextcolor );
526     }
527 
528 	//------------------------------------------------------------------------------------------------------------------
getInactiveTabColor()529     ::sal_Int32 SAL_CALL WindowStyleSettings::getInactiveTabColor() throw (RuntimeException)
530     {
531         StyleMethodGuard aGuard( *m_pData );
532         return lcl_getStyleColor( *m_pData, &StyleSettings::GetInactiveTabColor );
533     }
534 
535 	//------------------------------------------------------------------------------------------------------------------
setInactiveTabColor(::sal_Int32 _inactivetabcolor)536     void SAL_CALL WindowStyleSettings::setInactiveTabColor( ::sal_Int32 _inactivetabcolor ) throw (RuntimeException)
537     {
538         StyleMethodGuard aGuard( *m_pData );
539         lcl_setStyleColor( *m_pData, &StyleSettings::SetInactiveTabColor, _inactivetabcolor );
540     }
541 
542 	//------------------------------------------------------------------------------------------------------------------
getInfoTextColor()543     ::sal_Int32 SAL_CALL WindowStyleSettings::getInfoTextColor() throw (RuntimeException)
544     {
545         StyleMethodGuard aGuard( *m_pData );
546         return lcl_getStyleColor( *m_pData, &StyleSettings::GetInfoTextColor );
547     }
548 
549 	//------------------------------------------------------------------------------------------------------------------
setInfoTextColor(::sal_Int32 _infotextcolor)550     void SAL_CALL WindowStyleSettings::setInfoTextColor( ::sal_Int32 _infotextcolor ) throw (RuntimeException)
551     {
552         StyleMethodGuard aGuard( *m_pData );
553         lcl_setStyleColor( *m_pData, &StyleSettings::SetInfoTextColor, _infotextcolor );
554     }
555 
556 	//------------------------------------------------------------------------------------------------------------------
getLabelTextColor()557     ::sal_Int32 SAL_CALL WindowStyleSettings::getLabelTextColor() throw (RuntimeException)
558     {
559         StyleMethodGuard aGuard( *m_pData );
560         return lcl_getStyleColor( *m_pData, &StyleSettings::GetLabelTextColor );
561     }
562 
563 	//------------------------------------------------------------------------------------------------------------------
setLabelTextColor(::sal_Int32 _labeltextcolor)564     void SAL_CALL WindowStyleSettings::setLabelTextColor( ::sal_Int32 _labeltextcolor ) throw (RuntimeException)
565     {
566         StyleMethodGuard aGuard( *m_pData );
567         lcl_setStyleColor( *m_pData, &StyleSettings::SetLabelTextColor, _labeltextcolor );
568     }
569 
570 	//------------------------------------------------------------------------------------------------------------------
getLightColor()571     ::sal_Int32 SAL_CALL WindowStyleSettings::getLightColor() throw (RuntimeException)
572     {
573         StyleMethodGuard aGuard( *m_pData );
574         return lcl_getStyleColor( *m_pData, &StyleSettings::GetLightColor );
575     }
576 
577 	//------------------------------------------------------------------------------------------------------------------
setLightColor(::sal_Int32 _lightcolor)578     void SAL_CALL WindowStyleSettings::setLightColor( ::sal_Int32 _lightcolor ) throw (RuntimeException)
579     {
580         StyleMethodGuard aGuard( *m_pData );
581         lcl_setStyleColor( *m_pData, &StyleSettings::SetLightColor, _lightcolor );
582     }
583 
584 	//------------------------------------------------------------------------------------------------------------------
getMenuBarColor()585     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBarColor() throw (RuntimeException)
586     {
587         StyleMethodGuard aGuard( *m_pData );
588         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBarColor );
589     }
590 
591 	//------------------------------------------------------------------------------------------------------------------
setMenuBarColor(::sal_Int32 _menubarcolor)592     void SAL_CALL WindowStyleSettings::setMenuBarColor( ::sal_Int32 _menubarcolor ) throw (RuntimeException)
593     {
594         StyleMethodGuard aGuard( *m_pData );
595         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBarColor, _menubarcolor );
596     }
597 
598 	//------------------------------------------------------------------------------------------------------------------
getMenuBarTextColor()599     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBarTextColor() throw (RuntimeException)
600     {
601         StyleMethodGuard aGuard( *m_pData );
602         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBarTextColor );
603     }
604 
605 	//------------------------------------------------------------------------------------------------------------------
setMenuBarTextColor(::sal_Int32 _menubartextcolor)606     void SAL_CALL WindowStyleSettings::setMenuBarTextColor( ::sal_Int32 _menubartextcolor ) throw (RuntimeException)
607     {
608         StyleMethodGuard aGuard( *m_pData );
609         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBarTextColor, _menubartextcolor );
610     }
611 
612 	//------------------------------------------------------------------------------------------------------------------
getMenuBorderColor()613     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuBorderColor() throw (RuntimeException)
614     {
615         StyleMethodGuard aGuard( *m_pData );
616         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuBorderColor );
617     }
618 
619 	//------------------------------------------------------------------------------------------------------------------
setMenuBorderColor(::sal_Int32 _menubordercolor)620     void SAL_CALL WindowStyleSettings::setMenuBorderColor( ::sal_Int32 _menubordercolor ) throw (RuntimeException)
621     {
622         StyleMethodGuard aGuard( *m_pData );
623         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuBorderColor, _menubordercolor );
624     }
625 
626 	//------------------------------------------------------------------------------------------------------------------
getMenuColor()627     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuColor() throw (RuntimeException)
628     {
629         StyleMethodGuard aGuard( *m_pData );
630         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuColor );
631     }
632 
633 	//------------------------------------------------------------------------------------------------------------------
setMenuColor(::sal_Int32 _menucolor)634     void SAL_CALL WindowStyleSettings::setMenuColor( ::sal_Int32 _menucolor ) throw (RuntimeException)
635     {
636         StyleMethodGuard aGuard( *m_pData );
637         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuColor, _menucolor );
638     }
639 
640 	//------------------------------------------------------------------------------------------------------------------
getMenuHighlightColor()641     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuHighlightColor() throw (RuntimeException)
642     {
643         StyleMethodGuard aGuard( *m_pData );
644         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuHighlightColor );
645     }
646 
647 	//------------------------------------------------------------------------------------------------------------------
setMenuHighlightColor(::sal_Int32 _menuhighlightcolor)648     void SAL_CALL WindowStyleSettings::setMenuHighlightColor( ::sal_Int32 _menuhighlightcolor ) throw (RuntimeException)
649     {
650         StyleMethodGuard aGuard( *m_pData );
651         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuHighlightColor, _menuhighlightcolor );
652     }
653 
654 	//------------------------------------------------------------------------------------------------------------------
getMenuHighlightTextColor()655     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuHighlightTextColor() throw (RuntimeException)
656     {
657         StyleMethodGuard aGuard( *m_pData );
658         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuHighlightTextColor );
659     }
660 
661 	//------------------------------------------------------------------------------------------------------------------
setMenuHighlightTextColor(::sal_Int32 _menuhighlighttextcolor)662     void SAL_CALL WindowStyleSettings::setMenuHighlightTextColor( ::sal_Int32 _menuhighlighttextcolor ) throw (RuntimeException)
663     {
664         StyleMethodGuard aGuard( *m_pData );
665         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuHighlightTextColor, _menuhighlighttextcolor );
666     }
667 
668 	//------------------------------------------------------------------------------------------------------------------
getMenuTextColor()669     ::sal_Int32 SAL_CALL WindowStyleSettings::getMenuTextColor() throw (RuntimeException)
670     {
671         StyleMethodGuard aGuard( *m_pData );
672         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMenuTextColor );
673     }
674 
675 	//------------------------------------------------------------------------------------------------------------------
setMenuTextColor(::sal_Int32 _menutextcolor)676     void SAL_CALL WindowStyleSettings::setMenuTextColor( ::sal_Int32 _menutextcolor ) throw (RuntimeException)
677     {
678         StyleMethodGuard aGuard( *m_pData );
679         lcl_setStyleColor( *m_pData, &StyleSettings::SetMenuTextColor, _menutextcolor );
680     }
681 
682 	//------------------------------------------------------------------------------------------------------------------
getMonoColor()683     ::sal_Int32 SAL_CALL WindowStyleSettings::getMonoColor() throw (RuntimeException)
684     {
685         StyleMethodGuard aGuard( *m_pData );
686         return lcl_getStyleColor( *m_pData, &StyleSettings::GetMonoColor );
687     }
688 
689 	//------------------------------------------------------------------------------------------------------------------
setMonoColor(::sal_Int32 _monocolor)690     void SAL_CALL WindowStyleSettings::setMonoColor( ::sal_Int32 _monocolor ) throw (RuntimeException)
691     {
692         StyleMethodGuard aGuard( *m_pData );
693         lcl_setStyleColor( *m_pData, &StyleSettings::SetMonoColor, _monocolor );
694     }
695 
696 	//------------------------------------------------------------------------------------------------------------------
getRadioCheckTextColor()697     ::sal_Int32 SAL_CALL WindowStyleSettings::getRadioCheckTextColor() throw (RuntimeException)
698     {
699         StyleMethodGuard aGuard( *m_pData );
700         return lcl_getStyleColor( *m_pData, &StyleSettings::GetRadioCheckTextColor );
701     }
702 
703 	//------------------------------------------------------------------------------------------------------------------
setRadioCheckTextColor(::sal_Int32 _radiochecktextcolor)704     void SAL_CALL WindowStyleSettings::setRadioCheckTextColor( ::sal_Int32 _radiochecktextcolor ) throw (RuntimeException)
705     {
706         StyleMethodGuard aGuard( *m_pData );
707         lcl_setStyleColor( *m_pData, &StyleSettings::SetRadioCheckTextColor, _radiochecktextcolor );
708     }
709 
710 	//------------------------------------------------------------------------------------------------------------------
getSeparatorColor()711     ::sal_Int32 SAL_CALL WindowStyleSettings::getSeparatorColor() throw (RuntimeException)
712     {
713         StyleMethodGuard aGuard( *m_pData );
714         const Window* pWindow = m_pData->pOwningWindow->GetWindow();
715         const AllSettings aAllSettings = pWindow->GetSettings();
716         const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
717         return aStyleSettings.GetSeparatorColor().GetColor();
718     }
719 
720 	//------------------------------------------------------------------------------------------------------------------
getShadowColor()721     ::sal_Int32 SAL_CALL WindowStyleSettings::getShadowColor() throw (RuntimeException)
722     {
723         StyleMethodGuard aGuard( *m_pData );
724         return lcl_getStyleColor( *m_pData, &StyleSettings::GetShadowColor );
725     }
726 
727 	//------------------------------------------------------------------------------------------------------------------
setShadowColor(::sal_Int32 _shadowcolor)728     void SAL_CALL WindowStyleSettings::setShadowColor( ::sal_Int32 _shadowcolor ) throw (RuntimeException)
729     {
730         StyleMethodGuard aGuard( *m_pData );
731         lcl_setStyleColor( *m_pData, &StyleSettings::SetShadowColor, _shadowcolor );
732     }
733 
734 	//------------------------------------------------------------------------------------------------------------------
getWindowColor()735     ::sal_Int32 SAL_CALL WindowStyleSettings::getWindowColor() throw (RuntimeException)
736     {
737         StyleMethodGuard aGuard( *m_pData );
738         return lcl_getStyleColor( *m_pData, &StyleSettings::GetWindowColor );
739     }
740 
741 	//------------------------------------------------------------------------------------------------------------------
setWindowColor(::sal_Int32 _windowcolor)742     void SAL_CALL WindowStyleSettings::setWindowColor( ::sal_Int32 _windowcolor ) throw (RuntimeException)
743     {
744         StyleMethodGuard aGuard( *m_pData );
745         lcl_setStyleColor( *m_pData, &StyleSettings::SetWindowColor, _windowcolor );
746     }
747 
748 	//------------------------------------------------------------------------------------------------------------------
getWindowTextColor()749     ::sal_Int32 SAL_CALL WindowStyleSettings::getWindowTextColor() throw (RuntimeException)
750     {
751         StyleMethodGuard aGuard( *m_pData );
752         return lcl_getStyleColor( *m_pData, &StyleSettings::GetWindowTextColor );
753     }
754 
755 	//------------------------------------------------------------------------------------------------------------------
setWindowTextColor(::sal_Int32 _windowtextcolor)756     void SAL_CALL WindowStyleSettings::setWindowTextColor( ::sal_Int32 _windowtextcolor ) throw (RuntimeException)
757     {
758         StyleMethodGuard aGuard( *m_pData );
759         lcl_setStyleColor( *m_pData, &StyleSettings::SetWindowTextColor, _windowtextcolor );
760     }
761 
762 	//------------------------------------------------------------------------------------------------------------------
getWorkspaceColor()763     ::sal_Int32 SAL_CALL WindowStyleSettings::getWorkspaceColor() throw (RuntimeException)
764     {
765         StyleMethodGuard aGuard( *m_pData );
766         return lcl_getStyleColor( *m_pData, &StyleSettings::GetWorkspaceColor );
767     }
768 
769 	//------------------------------------------------------------------------------------------------------------------
setWorkspaceColor(::sal_Int32 _workspacecolor)770     void SAL_CALL WindowStyleSettings::setWorkspaceColor( ::sal_Int32 _workspacecolor ) throw (RuntimeException)
771     {
772         StyleMethodGuard aGuard( *m_pData );
773         lcl_setStyleColor( *m_pData, &StyleSettings::SetWorkspaceColor, _workspacecolor );
774     }
775 
776 	//------------------------------------------------------------------------------------------------------------------
getHighContrastMode()777     ::sal_Bool SAL_CALL WindowStyleSettings::getHighContrastMode() throw (RuntimeException)
778     {
779         StyleMethodGuard aGuard( *m_pData );
780         const Window* pWindow = m_pData->pOwningWindow->GetWindow();
781         const AllSettings aAllSettings = pWindow->GetSettings();
782         const StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
783         return aStyleSettings.GetHighContrastMode();
784     }
785 
786 	//------------------------------------------------------------------------------------------------------------------
setHighContrastMode(::sal_Bool _highcontrastmode)787     void SAL_CALL WindowStyleSettings::setHighContrastMode( ::sal_Bool _highcontrastmode ) throw (RuntimeException)
788     {
789         StyleMethodGuard aGuard( *m_pData );
790         Window* pWindow = m_pData->pOwningWindow->GetWindow();
791         AllSettings aAllSettings = pWindow->GetSettings();
792         StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
793         aStyleSettings.SetHighContrastMode( _highcontrastmode );
794         aAllSettings.SetStyleSettings( aStyleSettings );
795         pWindow->SetSettings( aAllSettings );
796     }
797 
798 	//------------------------------------------------------------------------------------------------------------------
getApplicationFont()799     FontDescriptor SAL_CALL WindowStyleSettings::getApplicationFont() throw (RuntimeException)
800     {
801         StyleMethodGuard aGuard( *m_pData );
802         return lcl_getStyleFont( *m_pData, &StyleSettings::GetAppFont );
803     }
804 
805 	//------------------------------------------------------------------------------------------------------------------
setApplicationFont(const FontDescriptor & _applicationfont)806     void SAL_CALL WindowStyleSettings::setApplicationFont( const FontDescriptor& _applicationfont ) throw (RuntimeException)
807     {
808         StyleMethodGuard aGuard( *m_pData );
809         lcl_setStyleFont( *m_pData, &StyleSettings::SetAppFont, &StyleSettings::GetAppFont, _applicationfont );
810     }
811 
812 	//------------------------------------------------------------------------------------------------------------------
getHelpFont()813     FontDescriptor SAL_CALL WindowStyleSettings::getHelpFont() throw (RuntimeException)
814     {
815         StyleMethodGuard aGuard( *m_pData );
816         return lcl_getStyleFont( *m_pData, &StyleSettings::GetHelpFont );
817     }
818 
819 	//------------------------------------------------------------------------------------------------------------------
setHelpFont(const FontDescriptor & _helpfont)820     void SAL_CALL WindowStyleSettings::setHelpFont( const FontDescriptor& _helpfont ) throw (RuntimeException)
821     {
822         StyleMethodGuard aGuard( *m_pData );
823         lcl_setStyleFont( *m_pData, &StyleSettings::SetHelpFont, &StyleSettings::GetHelpFont, _helpfont );
824     }
825 
826 	//------------------------------------------------------------------------------------------------------------------
getTitleFont()827     FontDescriptor SAL_CALL WindowStyleSettings::getTitleFont() throw (RuntimeException)
828     {
829         StyleMethodGuard aGuard( *m_pData );
830         return lcl_getStyleFont( *m_pData, &StyleSettings::GetTitleFont );
831     }
832 
833 	//------------------------------------------------------------------------------------------------------------------
setTitleFont(const FontDescriptor & _titlefont)834     void SAL_CALL WindowStyleSettings::setTitleFont( const FontDescriptor& _titlefont ) throw (RuntimeException)
835     {
836         StyleMethodGuard aGuard( *m_pData );
837         lcl_setStyleFont( *m_pData, &StyleSettings::SetTitleFont, &StyleSettings::GetTitleFont, _titlefont );
838     }
839 
840 	//------------------------------------------------------------------------------------------------------------------
getFloatTitleFont()841     FontDescriptor SAL_CALL WindowStyleSettings::getFloatTitleFont() throw (RuntimeException)
842     {
843         StyleMethodGuard aGuard( *m_pData );
844         return lcl_getStyleFont( *m_pData, &StyleSettings::GetFloatTitleFont );
845     }
846 
847 	//------------------------------------------------------------------------------------------------------------------
setFloatTitleFont(const FontDescriptor & _floattitlefont)848     void SAL_CALL WindowStyleSettings::setFloatTitleFont( const FontDescriptor& _floattitlefont ) throw (RuntimeException)
849     {
850         StyleMethodGuard aGuard( *m_pData );
851         lcl_setStyleFont( *m_pData, &StyleSettings::SetFloatTitleFont, &StyleSettings::GetFloatTitleFont, _floattitlefont );
852     }
853 
854 	//------------------------------------------------------------------------------------------------------------------
getMenuFont()855     FontDescriptor SAL_CALL WindowStyleSettings::getMenuFont() throw (RuntimeException)
856     {
857         StyleMethodGuard aGuard( *m_pData );
858         return lcl_getStyleFont( *m_pData, &StyleSettings::GetMenuFont );
859     }
860 
861 	//------------------------------------------------------------------------------------------------------------------
setMenuFont(const FontDescriptor & _menufont)862     void SAL_CALL WindowStyleSettings::setMenuFont( const FontDescriptor& _menufont ) throw (RuntimeException)
863     {
864         StyleMethodGuard aGuard( *m_pData );
865         lcl_setStyleFont( *m_pData, &StyleSettings::SetMenuFont, &StyleSettings::GetMenuFont, _menufont );
866     }
867 
868 	//------------------------------------------------------------------------------------------------------------------
getToolFont()869     FontDescriptor SAL_CALL WindowStyleSettings::getToolFont() throw (RuntimeException)
870     {
871         StyleMethodGuard aGuard( *m_pData );
872         return lcl_getStyleFont( *m_pData, &StyleSettings::GetToolFont );
873     }
874 
875 	//------------------------------------------------------------------------------------------------------------------
setToolFont(const FontDescriptor & _toolfont)876     void SAL_CALL WindowStyleSettings::setToolFont( const FontDescriptor& _toolfont ) throw (RuntimeException)
877     {
878         StyleMethodGuard aGuard( *m_pData );
879         lcl_setStyleFont( *m_pData, &StyleSettings::SetToolFont, &StyleSettings::GetToolFont, _toolfont );
880     }
881 
882 	//------------------------------------------------------------------------------------------------------------------
getGroupFont()883     FontDescriptor SAL_CALL WindowStyleSettings::getGroupFont() throw (RuntimeException)
884     {
885         StyleMethodGuard aGuard( *m_pData );
886         return lcl_getStyleFont( *m_pData, &StyleSettings::GetGroupFont );
887     }
888 
889 	//------------------------------------------------------------------------------------------------------------------
setGroupFont(const FontDescriptor & _groupfont)890     void SAL_CALL WindowStyleSettings::setGroupFont( const FontDescriptor& _groupfont ) throw (RuntimeException)
891     {
892         StyleMethodGuard aGuard( *m_pData );
893         lcl_setStyleFont( *m_pData, &StyleSettings::SetGroupFont, &StyleSettings::GetGroupFont, _groupfont );
894     }
895 
896 	//------------------------------------------------------------------------------------------------------------------
getLabelFont()897     FontDescriptor SAL_CALL WindowStyleSettings::getLabelFont() throw (RuntimeException)
898     {
899         StyleMethodGuard aGuard( *m_pData );
900         return lcl_getStyleFont( *m_pData, &StyleSettings::GetLabelFont );
901     }
902 
903 	//------------------------------------------------------------------------------------------------------------------
setLabelFont(const FontDescriptor & _labelfont)904     void SAL_CALL WindowStyleSettings::setLabelFont( const FontDescriptor& _labelfont ) throw (RuntimeException)
905     {
906         StyleMethodGuard aGuard( *m_pData );
907         lcl_setStyleFont( *m_pData, &StyleSettings::SetLabelFont, &StyleSettings::GetLabelFont, _labelfont );
908     }
909 
910 	//------------------------------------------------------------------------------------------------------------------
getInfoFont()911     FontDescriptor SAL_CALL WindowStyleSettings::getInfoFont() throw (RuntimeException)
912     {
913         StyleMethodGuard aGuard( *m_pData );
914         return lcl_getStyleFont( *m_pData, &StyleSettings::GetInfoFont );
915     }
916 
917 	//------------------------------------------------------------------------------------------------------------------
setInfoFont(const FontDescriptor & _infofont)918     void SAL_CALL WindowStyleSettings::setInfoFont( const FontDescriptor& _infofont ) throw (RuntimeException)
919     {
920         StyleMethodGuard aGuard( *m_pData );
921         lcl_setStyleFont( *m_pData, &StyleSettings::SetInfoFont, &StyleSettings::GetInfoFont, _infofont );
922     }
923 
924 	//------------------------------------------------------------------------------------------------------------------
getRadioCheckFont()925     FontDescriptor SAL_CALL WindowStyleSettings::getRadioCheckFont() throw (RuntimeException)
926     {
927         StyleMethodGuard aGuard( *m_pData );
928         return lcl_getStyleFont( *m_pData, &StyleSettings::GetRadioCheckFont );
929     }
930 
931 	//------------------------------------------------------------------------------------------------------------------
setRadioCheckFont(const FontDescriptor & _radiocheckfont)932     void SAL_CALL WindowStyleSettings::setRadioCheckFont( const FontDescriptor& _radiocheckfont ) throw (RuntimeException)
933     {
934         StyleMethodGuard aGuard( *m_pData );
935         lcl_setStyleFont( *m_pData, &StyleSettings::SetRadioCheckFont, &StyleSettings::GetRadioCheckFont, _radiocheckfont );
936     }
937 
938 	//------------------------------------------------------------------------------------------------------------------
getPushButtonFont()939     FontDescriptor SAL_CALL WindowStyleSettings::getPushButtonFont() throw (RuntimeException)
940     {
941         StyleMethodGuard aGuard( *m_pData );
942         return lcl_getStyleFont( *m_pData, &StyleSettings::GetPushButtonFont );
943     }
944 
945 	//------------------------------------------------------------------------------------------------------------------
setPushButtonFont(const FontDescriptor & _pushbuttonfont)946     void SAL_CALL WindowStyleSettings::setPushButtonFont( const FontDescriptor& _pushbuttonfont ) throw (RuntimeException)
947     {
948         StyleMethodGuard aGuard( *m_pData );
949         lcl_setStyleFont( *m_pData, &StyleSettings::SetPushButtonFont, &StyleSettings::GetPushButtonFont, _pushbuttonfont );
950     }
951 
952 	//------------------------------------------------------------------------------------------------------------------
getFieldFont()953     FontDescriptor SAL_CALL WindowStyleSettings::getFieldFont() throw (RuntimeException)
954     {
955         StyleMethodGuard aGuard( *m_pData );
956         return lcl_getStyleFont( *m_pData, &StyleSettings::GetFieldFont );
957     }
958 
959 	//------------------------------------------------------------------------------------------------------------------
setFieldFont(const FontDescriptor & _fieldfont)960     void SAL_CALL WindowStyleSettings::setFieldFont( const FontDescriptor& _fieldfont ) throw (RuntimeException)
961     {
962         StyleMethodGuard aGuard( *m_pData );
963         lcl_setStyleFont( *m_pData, &StyleSettings::SetFieldFont, &StyleSettings::GetFieldFont, _fieldfont );
964     }
965 
966 	//------------------------------------------------------------------------------------------------------------------
addStyleChangeListener(const Reference<XStyleChangeListener> & i_rListener)967     void SAL_CALL WindowStyleSettings::addStyleChangeListener( const Reference< XStyleChangeListener >& i_rListener ) throw (RuntimeException)
968     {
969         StyleMethodGuard aGuard( *m_pData );
970         if ( i_rListener.is() )
971             m_pData->aStyleChangeListeners.addInterface( i_rListener );
972     }
973 
974 	//------------------------------------------------------------------------------------------------------------------
removeStyleChangeListener(const Reference<XStyleChangeListener> & i_rListener)975     void SAL_CALL WindowStyleSettings::removeStyleChangeListener( const Reference< XStyleChangeListener >& i_rListener ) throw (RuntimeException)
976     {
977         StyleMethodGuard aGuard( *m_pData );
978         if ( i_rListener.is() )
979             m_pData->aStyleChangeListeners.removeInterface( i_rListener );
980     }
981 
982 //......................................................................................................................
983 } // namespace toolkit
984 //......................................................................................................................
985