1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <config_options.h>
23 #include <toolkit/dllapi.h>
25 #include <com/sun/star/awt/XTextArea.hpp>
26 #include <com/sun/star/awt/XTextComponent.hpp>
27 #include <com/sun/star/awt/XListBox.hpp>
28 #include <com/sun/star/awt/XNumericField.hpp>
29 #include <com/sun/star/awt/XScrollBar.hpp>
30 #include <com/sun/star/awt/XTextEditField.hpp>
31 #include <com/sun/star/awt/XSpinField.hpp>
32 #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
33 #include <com/sun/star/awt/XButton.hpp>
34 #include <com/sun/star/awt/XToggleButton.hpp>
35 #include <com/sun/star/awt/XFixedHyperlink.hpp>
36 #include <com/sun/star/awt/XFixedText.hpp>
37 #include <com/sun/star/awt/XRadioButton.hpp>
38 #include <com/sun/star/awt/XComboBox.hpp>
39 #include <com/sun/star/awt/XCheckBox.hpp>
40 #include <com/sun/star/awt/XItemListListener.hpp>
41 #include <cppuhelper/implbase.hxx>
43 #include <svl/numuno.hxx>
44 #include <toolkit/awt/vclxwindow.hxx>
45 #include <toolkit/helper/listenermultiplexer.hxx>
46 #include <tools/lineend.hxx>
48 #include <vcl/image.hxx>
50 // class VCLXGraphicControl
51 // deriving from VCLXWindow, drawing the graphic which exists as "Graphic" at the model
53 class VCLXGraphicControl
: public VCLXWindow
56 /// the image we currently display
60 const Image
& GetImage() const { return maImage
; }
64 void SAL_CALL
setPosSize( sal_Int32 X
, sal_Int32 Y
, sal_Int32 Width
, sal_Int32 Height
, sal_Int16 Flags
) override
;
66 // css::awt::VclWindowPeer
67 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
68 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
71 /** forward our bitmap to our window
75 GetWindow is not <NULL/>
78 virtual void ImplSetNewImage();
81 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
82 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
89 typedef cppu::ImplInheritanceHelper
< VCLXGraphicControl
,
91 css::awt::XToggleButton
93 class VCLXButton final
: public VCLXButton_Base
96 OUString maActionCommand
;
97 ActionListenerMultiplexer maActionListeners
;
98 ItemListenerMultiplexer maItemListeners
;
100 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
101 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
105 virtual ~VCLXButton() override
;
107 // css::lang::XComponent
108 void SAL_CALL
dispose( ) override
;
111 void SAL_CALL
addActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
112 void SAL_CALL
removeActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
113 void SAL_CALL
setLabel( const OUString
& Label
) override
;
114 void SAL_CALL
setActionCommand( const OUString
& Command
) override
;
116 // css::awt::XToggleButton
117 // css::awt::XItemEventBroadcaster
118 void SAL_CALL
addItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
119 void SAL_CALL
removeItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
121 // css::awt::XLayoutConstrains
122 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
123 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
124 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
126 // css::awt::VclWindowPeer
127 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
128 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
130 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
131 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
134 // class VCLXCheckBox
136 class UNLESS_MERGELIBS_MORE(TOOLKIT_DLLPUBLIC
) VCLXCheckBox final
: public cppu::ImplInheritanceHelper
<
142 ActionListenerMultiplexer maActionListeners
;
143 OUString maActionCommand
;
144 ItemListenerMultiplexer maItemListeners
;
146 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
147 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
153 // css::lang::XComponent
154 void SAL_CALL
dispose( ) override
;
156 // css::awt::XCheckBox
157 void SAL_CALL
addItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
158 void SAL_CALL
removeItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
159 sal_Int16 SAL_CALL
getState( ) override
;
160 void SAL_CALL
setState( sal_Int16 n
) override
;
161 void SAL_CALL
setLabel( const OUString
& Label
) override
;
162 void SAL_CALL
enableTriState( sal_Bool b
) override
;
164 // css::awt::XButton:
165 void SAL_CALL
addActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
166 void SAL_CALL
removeActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
167 void SAL_CALL
setActionCommand( const OUString
& Command
) override
;
169 // css::awt::XLayoutConstrains
170 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
171 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
172 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
174 // css::awt::VclWindowPeer
175 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
176 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
178 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
179 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
183 // class VCLXRadioButton
185 class UNLESS_MERGELIBS_MORE(TOOLKIT_DLLPUBLIC
) VCLXRadioButton final
: public cppu::ImplInheritanceHelper
<
187 css::awt::XRadioButton
,
191 ItemListenerMultiplexer maItemListeners
;
192 ActionListenerMultiplexer maActionListeners
;
193 OUString maActionCommand
;
195 void ImplClickedOrToggled( bool bToggled
);
196 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
197 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
202 // css::lang::XComponent
203 void SAL_CALL
dispose( ) override
;
205 // css::awt::XRadioButton
206 void SAL_CALL
addItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
207 void SAL_CALL
removeItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
208 sal_Bool SAL_CALL
getState( ) override
;
209 void SAL_CALL
setState( sal_Bool b
) override
;
210 void SAL_CALL
setLabel( const OUString
& Label
) override
;
212 // css::awt::XButton:
213 void SAL_CALL
addActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
214 void SAL_CALL
removeActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
215 void SAL_CALL
setActionCommand( const OUString
& Command
) override
;
217 // css::awt::XLayoutConstrains
218 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
219 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
220 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
222 // css::awt::VclWindowPeer
223 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
224 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
226 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
227 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
231 // class VCLXFixedHyperlink
232 class VCLXFixedHyperlink final
:
233 public cppu::ImplInheritanceHelper
<VCLXWindow
, css::awt::XFixedHyperlink
>
236 ActionListenerMultiplexer maActionListeners
;
238 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
240 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
>
241 CreateAccessibleContext() override
;
244 VCLXFixedHyperlink();
245 virtual ~VCLXFixedHyperlink() override
;
247 // css::lang::XComponent
248 void SAL_CALL
dispose( ) override
;
250 // css::awt::XFixedHyperlink
251 void SAL_CALL
setText( const OUString
& Text
) override
;
252 OUString SAL_CALL
getText( ) override
;
253 void SAL_CALL
setURL( const OUString
& URL
) override
;
254 OUString SAL_CALL
getURL( ) override
;
255 void SAL_CALL
setAlignment( sal_Int16 nAlign
) override
;
256 sal_Int16 SAL_CALL
getAlignment( ) override
;
257 void SAL_CALL
addActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
258 void SAL_CALL
removeActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
260 // css::awt::XLayoutConstrains
261 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
262 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
263 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
265 // css::awt::VclWindowPeer
266 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
267 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
269 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
270 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
274 // class VCLXFixedText
276 class VCLXFixedText final
: public cppu::ImplInheritanceHelper
<VCLXWindow
, css::awt::XFixedText
>
278 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
282 virtual ~VCLXFixedText() override
;
284 // css::awt::XFixedText
285 void SAL_CALL
setText( const OUString
& Text
) override
;
286 OUString SAL_CALL
getText( ) override
;
287 void SAL_CALL
setAlignment( sal_Int16 nAlign
) override
;
288 sal_Int16 SAL_CALL
getAlignment( ) override
;
290 // css::awt::XLayoutConstrains
291 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
292 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
293 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
295 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
296 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
300 // class VCLXScrollBar
302 class UNLESS_MERGELIBS_MORE(TOOLKIT_DLLPUBLIC
) VCLXScrollBar final
:
303 public cppu::ImplInheritanceHelper
<VCLXWindow
, css::awt::XScrollBar
>
306 AdjustmentListenerMultiplexer maAdjustmentListeners
;
308 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
309 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
315 // css::lang::XComponent
316 void SAL_CALL
dispose( ) override
;
318 // css::awt::XScrollbar
319 void SAL_CALL
addAdjustmentListener( const css::uno::Reference
< css::awt::XAdjustmentListener
>& l
) override
;
320 void SAL_CALL
removeAdjustmentListener( const css::uno::Reference
< css::awt::XAdjustmentListener
>& l
) override
;
321 void SAL_CALL
setValue( sal_Int32 n
) override
;
322 void SAL_CALL
setValues( sal_Int32 nValue
, sal_Int32 nVisible
, sal_Int32 nMax
) override
;
323 sal_Int32 SAL_CALL
getValue( ) override
;
324 void SAL_CALL
setMaximum( sal_Int32 n
) override
;
325 sal_Int32 SAL_CALL
getMaximum( ) override
;
326 void SAL_CALL
setLineIncrement( sal_Int32 n
) override
;
327 sal_Int32 SAL_CALL
getLineIncrement( ) override
;
328 void SAL_CALL
setBlockIncrement( sal_Int32 n
) override
;
329 sal_Int32 SAL_CALL
getBlockIncrement( ) override
;
330 void SAL_CALL
setVisibleSize( sal_Int32 n
) override
;
331 sal_Int32 SAL_CALL
getVisibleSize( ) override
;
332 void SAL_CALL
setOrientation( sal_Int32 n
) override
;
333 sal_Int32 SAL_CALL
getOrientation( ) override
;
335 // why isn't this part of the XScrollbar?
336 /// @throws css::uno::RuntimeException
337 void setMinimum( sal_Int32 n
);
338 /// @throws css::uno::RuntimeException
339 sal_Int32
getMinimum( ) const;
341 // css::awt::VclWindowPeer
342 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
343 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
345 // css::awt::XLayoutConstrains
346 css::awt::Size SAL_CALL
getMinimumSize() override
;
347 /// @throws css::uno::RuntimeException
348 static css::awt::Size
implGetMinimumSize( vcl::Window
const * p
);
350 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
351 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
357 class SAL_DLLPUBLIC_RTTI VCLXEdit
: public cppu::ImplInheritanceHelper
<
359 css::awt::XTextComponent
,
360 css::awt::XTextEditField
,
361 css::awt::XTextLayoutConstrains
>
364 TextListenerMultiplexer maTextListeners
;
367 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
368 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
374 TextListenerMultiplexer
& GetTextListeners() { return maTextListeners
; }
377 // css::lang::XComponent
378 void SAL_CALL
dispose( ) override
;
380 // css::awt::XTextComponent
381 void SAL_CALL
addTextListener( const css::uno::Reference
< css::awt::XTextListener
>& l
) override
;
382 void SAL_CALL
removeTextListener( const css::uno::Reference
< css::awt::XTextListener
>& l
) override
;
383 void SAL_CALL
setText( const OUString
& aText
) override
;
384 void SAL_CALL
insertText( const css::awt::Selection
& Sel
, const OUString
& Text
) override
;
385 OUString SAL_CALL
getText( ) override
;
386 OUString SAL_CALL
getSelectedText( ) override
;
387 void SAL_CALL
setSelection( const css::awt::Selection
& aSelection
) override
;
388 css::awt::Selection SAL_CALL
getSelection( ) override
;
389 sal_Bool SAL_CALL
isEditable( ) override
;
390 void SAL_CALL
setEditable( sal_Bool bEditable
) override
;
391 void SAL_CALL
setMaxTextLen( sal_Int16 nLen
) override
;
392 sal_Int16 SAL_CALL
getMaxTextLen( ) override
;
394 // css::awt::XTextEditField:
395 void SAL_CALL
setEchoChar( sal_Unicode cEcho
) override
;
397 // css::awt::XLayoutConstrains
398 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
399 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
400 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
402 // css::awt::XTextLayoutConstrains
403 css::awt::Size SAL_CALL
getMinimumSize( sal_Int16 nCols
, sal_Int16 nLines
) override
;
404 void SAL_CALL
getColumnsAndLines( sal_Int16
& nCols
, sal_Int16
& nLines
) override
;
406 // css::awt::VclWindowPeer
407 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
408 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
410 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
411 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
414 class VCLXMultiLineEdit final
: public cppu::ImplInheritanceHelper
<
416 css::awt::XTextComponent
,
418 css::awt::XTextLayoutConstrains
>
421 TextListenerMultiplexer maTextListeners
;
422 LineEnd meLineEndType
;
424 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
428 virtual ~VCLXMultiLineEdit() override
;
430 // css::awt::XTextComponent
431 void SAL_CALL
addTextListener( const css::uno::Reference
< css::awt::XTextListener
>& l
) override
;
432 void SAL_CALL
removeTextListener( const css::uno::Reference
< css::awt::XTextListener
>& l
) override
;
433 void SAL_CALL
setText( const OUString
& aText
) override
;
434 void SAL_CALL
insertText( const css::awt::Selection
& Sel
, const OUString
& Text
) override
;
435 OUString SAL_CALL
getText( ) override
;
436 OUString SAL_CALL
getSelectedText( ) override
;
437 void SAL_CALL
setSelection( const css::awt::Selection
& aSelection
) override
;
438 css::awt::Selection SAL_CALL
getSelection( ) override
;
439 sal_Bool SAL_CALL
isEditable( ) override
;
440 void SAL_CALL
setEditable( sal_Bool bEditable
) override
;
441 void SAL_CALL
setMaxTextLen( sal_Int16 nLen
) override
;
442 sal_Int16 SAL_CALL
getMaxTextLen( ) override
;
445 OUString SAL_CALL
getTextLines( ) override
;
447 // css::awt::XLayoutConstrains
448 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
449 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
450 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& aNewSize
) override
;
452 // css::awt::XTextLayoutConstrains
453 css::awt::Size SAL_CALL
getMinimumSize( sal_Int16 nCols
, sal_Int16 nLines
) override
;
454 void SAL_CALL
getColumnsAndLines( sal_Int16
& nCols
, sal_Int16
& nLines
) override
;
456 // css::awt::XVclWindowPeer
457 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
458 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
461 void SAL_CALL
setFocus( ) override
;
463 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
464 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
467 virtual css::uno::Reference
<css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
470 // class VCLXSpinField
471 class VCLXSpinField
: public cppu::ImplInheritanceHelper
<VCLXEdit
, css::awt::XSpinField
>
474 SpinListenerMultiplexer maSpinListeners
;
477 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
483 // css::awt::XSpinField
484 void SAL_CALL
addSpinListener( const css::uno::Reference
< css::awt::XSpinListener
>& l
) override
;
485 void SAL_CALL
removeSpinListener( const css::uno::Reference
< css::awt::XSpinListener
>& l
) override
;
486 void SAL_CALL
up( ) override
;
487 void SAL_CALL
down( ) override
;
488 void SAL_CALL
first( ) override
;
489 void SAL_CALL
last( ) override
;
490 void SAL_CALL
enableRepeat( sal_Bool bRepeat
) override
;
492 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
493 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
496 class SVTXFormattedField
: public VCLXSpinField
498 rtl::Reference
<SvNumberFormatsSupplierObj
> m_xCurrentSupplier
;
499 bool bIsStandardSupplier
;
500 sal_Int32 nKeyToSetDelayed
;
503 SVTXFormattedField();
504 virtual ~SVTXFormattedField() override
;
506 // css::awt::XVclWindowPeer
507 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
508 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
511 void setFormatsSupplier(const css::uno::Reference
< css::util::XNumberFormatsSupplier
> & xSupplier
);
512 sal_Int32
getFormatKey() const;
513 void setFormatKey(sal_Int32 nKey
);
515 void SetValue(const css::uno::Any
& rValue
);
516 css::uno::Any
GetValue() const;
518 void SetTreatAsNumber(bool bSet
);
519 bool GetTreatAsNumber() const;
521 void SetDefaultValue(const css::uno::Any
& rValue
);
522 css::uno::Any
GetDefaultValue() const;
524 void SetMinValue(const css::uno::Any
& rValue
);
525 css::uno::Any
GetMinValue() const;
527 void SetMaxValue(const css::uno::Any
& rValue
);
528 css::uno::Any
GetMaxValue() const;
530 void NotifyTextListeners();
531 css::uno::Any
convertEffectiveValue(const css::uno::Any
& rValue
) const;
533 virtual void SetWindow( const VclPtr
< vcl::Window
> &_pWindow
) override
;
535 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
536 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
539 class UNLESS_MERGELIBS_MORE(TOOLKIT_DLLPUBLIC
) SVTXNumericField final
: public cppu::ImplInheritanceHelper
<SVTXFormattedField
, css::awt::XNumericField
>
543 virtual ~SVTXNumericField() override
;
545 // css::awt::XNumericField
546 void SAL_CALL
setValue( double Value
) override
;
547 double SAL_CALL
getValue( ) override
;
548 void SAL_CALL
setMin( double Value
) override
;
549 double SAL_CALL
getMin( ) override
;
550 void SAL_CALL
setMax( double Value
) override
;
551 double SAL_CALL
getMax( ) override
;
552 void SAL_CALL
setFirst( double Value
) override
;
553 double SAL_CALL
getFirst( ) override
;
554 void SAL_CALL
setLast( double Value
) override
;
555 double SAL_CALL
getLast( ) override
;
556 void SAL_CALL
setSpinSize( double Value
) override
;
557 double SAL_CALL
getSpinSize( ) override
;
558 void SAL_CALL
setDecimalDigits( sal_Int16 nDigits
) override
;
559 sal_Int16 SAL_CALL
getDecimalDigits( ) override
;
560 void SAL_CALL
setStrictFormat( sal_Bool bStrict
) override
;
561 sal_Bool SAL_CALL
isStrictFormat( ) override
;
563 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
;
565 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
570 typedef cppu::ImplInheritanceHelper
< VCLXWindow
,
572 css::awt::XTextLayoutConstrains
,
573 css::awt::XItemListListener
575 class VCLXListBox final
: public VCLXListBox_Base
578 ActionListenerMultiplexer maActionListeners
;
579 ItemListenerMultiplexer maItemListeners
;
581 virtual void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
582 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
>
583 CreateAccessibleContext() override
;
584 void ImplCallItemListeners();
589 // css::lang::XComponent
590 void SAL_CALL
dispose( ) override
;
592 // css::awt::XListBox
593 void SAL_CALL
addItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
594 void SAL_CALL
removeItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
595 void SAL_CALL
addActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
596 void SAL_CALL
removeActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
597 void SAL_CALL
addItem( const OUString
& aItem
, sal_Int16 nPos
) override
;
598 void SAL_CALL
addItems( const css::uno::Sequence
< OUString
>& aItems
, sal_Int16 nPos
) override
;
599 void SAL_CALL
removeItems( sal_Int16 nPos
, sal_Int16 nCount
) override
;
600 sal_Int16 SAL_CALL
getItemCount( ) override
;
601 OUString SAL_CALL
getItem( sal_Int16 nPos
) override
;
602 css::uno::Sequence
< OUString
> SAL_CALL
getItems( ) override
;
603 sal_Int16 SAL_CALL
getSelectedItemPos( ) override
;
604 css::uno::Sequence
< sal_Int16
> SAL_CALL
getSelectedItemsPos( ) override
;
605 OUString SAL_CALL
getSelectedItem( ) override
;
606 css::uno::Sequence
< OUString
> SAL_CALL
getSelectedItems( ) override
;
607 void SAL_CALL
selectItemPos( sal_Int16 nPos
, sal_Bool bSelect
) override
;
608 void SAL_CALL
selectItemsPos( const css::uno::Sequence
< sal_Int16
>& aPositions
, sal_Bool bSelect
) override
;
609 void SAL_CALL
selectItem( const OUString
& aItem
, sal_Bool bSelect
) override
;
610 sal_Bool SAL_CALL
isMutipleMode( ) override
;
611 void SAL_CALL
setMultipleMode( sal_Bool bMulti
) override
;
612 sal_Int16 SAL_CALL
getDropDownLineCount( ) override
;
613 void SAL_CALL
setDropDownLineCount( sal_Int16 nLines
) override
;
614 void SAL_CALL
makeVisible( sal_Int16 nEntry
) override
;
616 // css::awt::XLayoutConstrains
617 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
618 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
619 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
621 // css::awt::XTextLayoutConstrains
622 css::awt::Size SAL_CALL
getMinimumSize( sal_Int16 nCols
, sal_Int16 nLines
) override
;
623 void SAL_CALL
getColumnsAndLines( sal_Int16
& nCols
, sal_Int16
& nLines
) override
;
625 // css::awt::VclWindowPeer
626 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
627 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
630 virtual void SAL_CALL
listItemInserted( const css::awt::ItemListEvent
& Event
) override
;
631 virtual void SAL_CALL
listItemRemoved( const css::awt::ItemListEvent
& Event
) override
;
632 virtual void SAL_CALL
listItemModified( const css::awt::ItemListEvent
& Event
) override
;
633 virtual void SAL_CALL
allItemsRemoved( const css::lang::EventObject
& Event
) override
;
634 virtual void SAL_CALL
itemListChanged( const css::lang::EventObject
& Event
) override
;
637 virtual void SAL_CALL
disposing( const css::lang::EventObject
& i_rEvent
) override
;
639 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
640 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
644 // class VCLXComboBox
646 typedef cppu::ImplInheritanceHelper
< VCLXEdit
,
648 css::awt::XItemListListener
650 class VCLXComboBox final
: public VCLXComboBox_Base
653 ActionListenerMultiplexer maActionListeners
;
654 ItemListenerMultiplexer maItemListeners
;
656 void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
657 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
662 virtual ~VCLXComboBox() override
;
664 // css::lang::XComponent
665 void SAL_CALL
dispose( ) override
;
667 // css::awt::XComboBox
668 void SAL_CALL
addItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
669 void SAL_CALL
removeItemListener( const css::uno::Reference
< css::awt::XItemListener
>& l
) override
;
670 void SAL_CALL
addActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
671 void SAL_CALL
removeActionListener( const css::uno::Reference
< css::awt::XActionListener
>& l
) override
;
672 void SAL_CALL
addItem( const OUString
& aItem
, sal_Int16 nPos
) override
;
673 void SAL_CALL
addItems( const css::uno::Sequence
< OUString
>& aItems
, sal_Int16 nPos
) override
;
674 void SAL_CALL
removeItems( sal_Int16 nPos
, sal_Int16 nCount
) override
;
675 sal_Int16 SAL_CALL
getItemCount( ) override
;
676 OUString SAL_CALL
getItem( sal_Int16 nPos
) override
;
677 css::uno::Sequence
< OUString
> SAL_CALL
getItems( ) override
;
678 sal_Int16 SAL_CALL
getDropDownLineCount( ) override
;
679 void SAL_CALL
setDropDownLineCount( sal_Int16 nLines
) override
;
681 // css::awt::XLayoutConstrains
682 css::awt::Size SAL_CALL
getMinimumSize( ) override
;
683 css::awt::Size SAL_CALL
getPreferredSize( ) override
;
684 css::awt::Size SAL_CALL
calcAdjustedSize( const css::awt::Size
& rNewSize
) override
;
686 // css::awt::XTextLayoutConstrains
687 css::awt::Size SAL_CALL
getMinimumSize( sal_Int16 nCols
, sal_Int16 nLines
) override
;
688 void SAL_CALL
getColumnsAndLines( sal_Int16
& nCols
, sal_Int16
& nLines
) override
;
690 // css::awt::VclWindowPeer
691 void SAL_CALL
setProperty( const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
692 css::uno::Any SAL_CALL
getProperty( const OUString
& PropertyName
) override
;
695 virtual void SAL_CALL
listItemInserted( const css::awt::ItemListEvent
& Event
) override
;
696 virtual void SAL_CALL
listItemRemoved( const css::awt::ItemListEvent
& Event
) override
;
697 virtual void SAL_CALL
listItemModified( const css::awt::ItemListEvent
& Event
) override
;
698 virtual void SAL_CALL
allItemsRemoved( const css::lang::EventObject
& Event
) override
;
699 virtual void SAL_CALL
itemListChanged( const css::lang::EventObject
& Event
) override
;
701 virtual void SAL_CALL
disposing( const css::lang::EventObject
& i_rEvent
) override
;
703 static void ImplGetPropertyIds( std::vector
< sal_uInt16
> &aIds
);
704 virtual void GetPropertyIds( std::vector
< sal_uInt16
> &aIds
) override
{ return ImplGetPropertyIds( aIds
); }
708 class VCLXToolBox final
: public VCLXWindow
710 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
>
711 CreateAccessibleContext() override
;
715 virtual ~VCLXToolBox() override
;
718 class VCLXHeaderBar final
: public VCLXWindow
722 virtual ~VCLXHeaderBar() override
;
724 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> CreateAccessibleContext() override
;
728 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */