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