bump product version to 7.6.3.2-android
[LibreOffice.git] / include / toolkit / awt / vclxwindows.hxx
blobbffddf6fd63eeaeaf40a55c9ec6b9a1f024257cd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #pragma once
22 #include <toolkit/dllapi.h>
24 #include <com/sun/star/awt/XTextComponent.hpp>
25 #include <com/sun/star/awt/XListBox.hpp>
26 #include <com/sun/star/awt/XNumericField.hpp>
27 #include <com/sun/star/awt/XScrollBar.hpp>
28 #include <com/sun/star/awt/XTextEditField.hpp>
29 #include <com/sun/star/awt/XSpinField.hpp>
30 #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
31 #include <com/sun/star/awt/XButton.hpp>
32 #include <com/sun/star/awt/XToggleButton.hpp>
33 #include <com/sun/star/awt/XFixedHyperlink.hpp>
34 #include <com/sun/star/awt/XFixedText.hpp>
35 #include <com/sun/star/awt/XRadioButton.hpp>
36 #include <com/sun/star/awt/XComboBox.hpp>
37 #include <com/sun/star/awt/XCheckBox.hpp>
38 #include <com/sun/star/awt/XItemListListener.hpp>
39 #include <cppuhelper/implbase.hxx>
41 #include <svl/numuno.hxx>
42 #include <toolkit/awt/vclxwindow.hxx>
43 #include <toolkit/helper/listenermultiplexer.hxx>
45 #include <vcl/image.hxx>
47 // class VCLXGraphicControl
48 // deriving from VCLXWindow, drawing the graphic which exists as "Graphic" at the model
50 class VCLXGraphicControl : public VCLXWindow
52 private:
53 /// the image we currently display
54 Image maImage;
56 protected:
57 const Image& GetImage() const { return maImage; }
59 protected:
60 // css::awt::XWindow
61 void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) override;
63 // css::awt::VclWindowPeer
64 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
65 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
67 protected:
68 /** forward our bitmap to our window
69 @precond
70 our mutex is locked
71 @precond
72 GetWindow is not <NULL/>
73 @see GetBitmap
75 virtual void ImplSetNewImage();
77 public:
78 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
79 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
84 // class VCLXButton
86 typedef cppu::ImplInheritanceHelper< VCLXGraphicControl,
87 css::awt::XButton,
88 css::awt::XToggleButton
89 > VCLXButton_Base;
90 class VCLXButton final : public VCLXButton_Base
92 private:
93 OUString maActionCommand;
94 ActionListenerMultiplexer maActionListeners;
95 ItemListenerMultiplexer maItemListeners;
97 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
98 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
100 public:
101 VCLXButton();
102 virtual ~VCLXButton() override;
104 // css::lang::XComponent
105 void SAL_CALL dispose( ) override;
107 // css::awt::XButton
108 void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
109 void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
110 void SAL_CALL setLabel( const OUString& Label ) override;
111 void SAL_CALL setActionCommand( const OUString& Command ) override;
113 // css::awt::XToggleButton
114 // css::awt::XItemEventBroadcaster
115 void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
116 void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
118 // css::awt::XLayoutConstrains
119 css::awt::Size SAL_CALL getMinimumSize( ) override;
120 css::awt::Size SAL_CALL getPreferredSize( ) override;
121 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
123 // css::awt::VclWindowPeer
124 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
125 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
127 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
128 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
131 // class VCLXCheckBox
133 class TOOLKIT_DLLPUBLIC VCLXCheckBox final : public cppu::ImplInheritanceHelper<
134 VCLXGraphicControl,
135 css::awt::XCheckBox,
136 css::awt::XButton>
138 private:
139 ActionListenerMultiplexer maActionListeners;
140 OUString maActionCommand;
141 ItemListenerMultiplexer maItemListeners;
143 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
144 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
146 public:
147 VCLXCheckBox();
150 // css::lang::XComponent
151 void SAL_CALL dispose( ) override;
153 // css::awt::XCheckBox
154 void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
155 void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
156 sal_Int16 SAL_CALL getState( ) override;
157 void SAL_CALL setState( sal_Int16 n ) override;
158 void SAL_CALL setLabel( const OUString& Label ) override;
159 void SAL_CALL enableTriState( sal_Bool b ) override;
161 // css::awt::XButton:
162 void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
163 void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
164 void SAL_CALL setActionCommand( const OUString& Command ) override;
166 // css::awt::XLayoutConstrains
167 css::awt::Size SAL_CALL getMinimumSize( ) override;
168 css::awt::Size SAL_CALL getPreferredSize( ) override;
169 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
171 // css::awt::VclWindowPeer
172 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
173 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
175 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
176 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
180 // class VCLXRadioButton
182 class TOOLKIT_DLLPUBLIC VCLXRadioButton final : public cppu::ImplInheritanceHelper<
183 VCLXGraphicControl,
184 css::awt::XRadioButton,
185 css::awt::XButton>
187 private:
188 ItemListenerMultiplexer maItemListeners;
189 ActionListenerMultiplexer maActionListeners;
190 OUString maActionCommand;
192 void ImplClickedOrToggled( bool bToggled );
193 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
194 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
196 public:
197 VCLXRadioButton();
199 // css::lang::XComponent
200 void SAL_CALL dispose( ) override;
202 // css::awt::XRadioButton
203 void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
204 void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
205 sal_Bool SAL_CALL getState( ) override;
206 void SAL_CALL setState( sal_Bool b ) override;
207 void SAL_CALL setLabel( const OUString& Label ) override;
209 // css::awt::XButton:
210 void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
211 void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
212 void SAL_CALL setActionCommand( const OUString& Command ) override;
214 // css::awt::XLayoutConstrains
215 css::awt::Size SAL_CALL getMinimumSize( ) override;
216 css::awt::Size SAL_CALL getPreferredSize( ) override;
217 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
219 // css::awt::VclWindowPeer
220 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
221 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
223 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
224 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
228 // class VCLXFixedHyperlink
229 class VCLXFixedHyperlink final :
230 public cppu::ImplInheritanceHelper<VCLXWindow, css::awt::XFixedHyperlink>
232 private:
233 ActionListenerMultiplexer maActionListeners;
235 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
237 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
238 CreateAccessibleContext() override;
240 public:
241 VCLXFixedHyperlink();
242 virtual ~VCLXFixedHyperlink() override;
244 // css::lang::XComponent
245 void SAL_CALL dispose( ) override;
247 // css::awt::XFixedHyperlink
248 void SAL_CALL setText( const OUString& Text ) override;
249 OUString SAL_CALL getText( ) override;
250 void SAL_CALL setURL( const OUString& URL ) override;
251 OUString SAL_CALL getURL( ) override;
252 void SAL_CALL setAlignment( sal_Int16 nAlign ) override;
253 sal_Int16 SAL_CALL getAlignment( ) override;
254 void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
255 void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
257 // css::awt::XLayoutConstrains
258 css::awt::Size SAL_CALL getMinimumSize( ) override;
259 css::awt::Size SAL_CALL getPreferredSize( ) override;
260 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
262 // css::awt::VclWindowPeer
263 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
264 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
266 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
267 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
271 // class VCLXFixedText
273 class VCLXFixedText final : public cppu::ImplInheritanceHelper<VCLXWindow, css::awt::XFixedText>
275 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
277 public:
278 VCLXFixedText();
279 virtual ~VCLXFixedText() override;
281 // css::awt::XFixedText
282 void SAL_CALL setText( const OUString& Text ) override;
283 OUString SAL_CALL getText( ) override;
284 void SAL_CALL setAlignment( sal_Int16 nAlign ) override;
285 sal_Int16 SAL_CALL getAlignment( ) override;
287 // css::awt::XLayoutConstrains
288 css::awt::Size SAL_CALL getMinimumSize( ) override;
289 css::awt::Size SAL_CALL getPreferredSize( ) override;
290 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
292 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
293 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
297 // class VCLXScrollBar
299 class TOOLKIT_DLLPUBLIC VCLXScrollBar final :
300 public cppu::ImplInheritanceHelper<VCLXWindow, css::awt::XScrollBar>
302 private:
303 AdjustmentListenerMultiplexer maAdjustmentListeners;
305 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
306 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
308 public:
309 VCLXScrollBar();
312 // css::lang::XComponent
313 void SAL_CALL dispose( ) override;
315 // css::awt::XScrollbar
316 void SAL_CALL addAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& l ) override;
317 void SAL_CALL removeAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& l ) override;
318 void SAL_CALL setValue( sal_Int32 n ) override;
319 void SAL_CALL setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 nMax ) override;
320 sal_Int32 SAL_CALL getValue( ) override;
321 void SAL_CALL setMaximum( sal_Int32 n ) override;
322 sal_Int32 SAL_CALL getMaximum( ) override;
323 void SAL_CALL setLineIncrement( sal_Int32 n ) override;
324 sal_Int32 SAL_CALL getLineIncrement( ) override;
325 void SAL_CALL setBlockIncrement( sal_Int32 n ) override;
326 sal_Int32 SAL_CALL getBlockIncrement( ) override;
327 void SAL_CALL setVisibleSize( sal_Int32 n ) override;
328 sal_Int32 SAL_CALL getVisibleSize( ) override;
329 void SAL_CALL setOrientation( sal_Int32 n ) override;
330 sal_Int32 SAL_CALL getOrientation( ) override;
332 // why isn't this part of the XScrollbar?
333 /// @throws css::uno::RuntimeException
334 void setMinimum( sal_Int32 n );
335 /// @throws css::uno::RuntimeException
336 sal_Int32 getMinimum( ) const;
338 // css::awt::VclWindowPeer
339 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
340 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
342 // css::awt::XLayoutConstrains
343 css::awt::Size SAL_CALL getMinimumSize() override;
344 /// @throws css::uno::RuntimeException
345 static css::awt::Size implGetMinimumSize( vcl::Window const * p );
347 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
348 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
352 // class VCLXEdit
354 class SAL_DLLPUBLIC_RTTI VCLXEdit : public cppu::ImplInheritanceHelper<
355 VCLXWindow,
356 css::awt::XTextComponent,
357 css::awt::XTextEditField,
358 css::awt::XTextLayoutConstrains>
360 private:
361 TextListenerMultiplexer maTextListeners;
363 protected:
364 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
365 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
368 public:
369 VCLXEdit();
371 TextListenerMultiplexer& GetTextListeners() { return maTextListeners; }
374 // css::lang::XComponent
375 void SAL_CALL dispose( ) override;
377 // css::awt::XTextComponent
378 void SAL_CALL addTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override;
379 void SAL_CALL removeTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override;
380 void SAL_CALL setText( const OUString& aText ) override;
381 void SAL_CALL insertText( const css::awt::Selection& Sel, const OUString& Text ) override;
382 OUString SAL_CALL getText( ) override;
383 OUString SAL_CALL getSelectedText( ) override;
384 void SAL_CALL setSelection( const css::awt::Selection& aSelection ) override;
385 css::awt::Selection SAL_CALL getSelection( ) override;
386 sal_Bool SAL_CALL isEditable( ) override;
387 void SAL_CALL setEditable( sal_Bool bEditable ) override;
388 void SAL_CALL setMaxTextLen( sal_Int16 nLen ) override;
389 sal_Int16 SAL_CALL getMaxTextLen( ) override;
391 // css::awt::XTextEditField:
392 void SAL_CALL setEchoChar( sal_Unicode cEcho ) override;
394 // css::awt::XLayoutConstrains
395 css::awt::Size SAL_CALL getMinimumSize( ) override;
396 css::awt::Size SAL_CALL getPreferredSize( ) override;
397 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
399 // css::awt::XTextLayoutConstrains
400 css::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) override;
401 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) override;
403 // css::awt::VclWindowPeer
404 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
405 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
407 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
408 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
412 // class VCLXSpinField
413 class VCLXSpinField : public cppu::ImplInheritanceHelper<VCLXEdit, css::awt::XSpinField>
415 private:
416 SpinListenerMultiplexer maSpinListeners;
418 protected:
419 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
421 public:
422 VCLXSpinField();
425 // css::awt::XSpinField
426 void SAL_CALL addSpinListener( const css::uno::Reference< css::awt::XSpinListener >& l ) override;
427 void SAL_CALL removeSpinListener( const css::uno::Reference< css::awt::XSpinListener >& l ) override;
428 void SAL_CALL up( ) override;
429 void SAL_CALL down( ) override;
430 void SAL_CALL first( ) override;
431 void SAL_CALL last( ) override;
432 void SAL_CALL enableRepeat( sal_Bool bRepeat ) override;
434 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
435 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
438 class SVTXFormattedField : public VCLXSpinField
440 rtl::Reference<SvNumberFormatsSupplierObj> m_xCurrentSupplier;
441 bool bIsStandardSupplier;
442 sal_Int32 nKeyToSetDelayed;
444 public:
445 SVTXFormattedField();
446 virtual ~SVTXFormattedField() override;
448 // css::awt::XVclWindowPeer
449 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
450 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
452 protected:
453 void setFormatsSupplier(const css::uno::Reference< css::util::XNumberFormatsSupplier > & xSupplier);
454 sal_Int32 getFormatKey() const;
455 void setFormatKey(sal_Int32 nKey);
457 void SetValue(const css::uno::Any& rValue);
458 css::uno::Any GetValue() const;
460 void SetTreatAsNumber(bool bSet);
461 bool GetTreatAsNumber() const;
463 void SetDefaultValue(const css::uno::Any& rValue);
464 css::uno::Any GetDefaultValue() const;
466 void SetMinValue(const css::uno::Any& rValue);
467 css::uno::Any GetMinValue() const;
469 void SetMaxValue(const css::uno::Any& rValue);
470 css::uno::Any GetMaxValue() const;
472 void NotifyTextListeners();
473 css::uno::Any convertEffectiveValue(const css::uno::Any& rValue) const;
475 virtual void SetWindow( const VclPtr< vcl::Window > &_pWindow) override;
477 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
478 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
481 class TOOLKIT_DLLPUBLIC SVTXNumericField final : public cppu::ImplInheritanceHelper<SVTXFormattedField, css::awt::XNumericField>
483 public:
484 SVTXNumericField();
485 virtual ~SVTXNumericField() override;
487 // css::awt::XNumericField
488 void SAL_CALL setValue( double Value ) override;
489 double SAL_CALL getValue( ) override;
490 void SAL_CALL setMin( double Value ) override;
491 double SAL_CALL getMin( ) override;
492 void SAL_CALL setMax( double Value ) override;
493 double SAL_CALL getMax( ) override;
494 void SAL_CALL setFirst( double Value ) override;
495 double SAL_CALL getFirst( ) override;
496 void SAL_CALL setLast( double Value ) override;
497 double SAL_CALL getLast( ) override;
498 void SAL_CALL setSpinSize( double Value ) override;
499 double SAL_CALL getSpinSize( ) override;
500 void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) override;
501 sal_Int16 SAL_CALL getDecimalDigits( ) override;
502 void SAL_CALL setStrictFormat( sal_Bool bStrict ) override;
503 sal_Bool SAL_CALL isStrictFormat( ) override;
505 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
507 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
510 // class VCLXListBox
512 typedef cppu::ImplInheritanceHelper< VCLXWindow,
513 css::awt::XListBox,
514 css::awt::XTextLayoutConstrains,
515 css::awt::XItemListListener
516 > VCLXListBox_Base;
517 class VCLXListBox final : public VCLXListBox_Base
519 private:
520 ActionListenerMultiplexer maActionListeners;
521 ItemListenerMultiplexer maItemListeners;
523 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
524 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
525 CreateAccessibleContext() override;
526 void ImplCallItemListeners();
528 public:
529 VCLXListBox();
531 // css::lang::XComponent
532 void SAL_CALL dispose( ) override;
534 // css::awt::XListBox
535 void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
536 void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
537 void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
538 void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
539 void SAL_CALL addItem( const OUString& aItem, sal_Int16 nPos ) override;
540 void SAL_CALL addItems( const css::uno::Sequence< OUString >& aItems, sal_Int16 nPos ) override;
541 void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) override;
542 sal_Int16 SAL_CALL getItemCount( ) override;
543 OUString SAL_CALL getItem( sal_Int16 nPos ) override;
544 css::uno::Sequence< OUString > SAL_CALL getItems( ) override;
545 sal_Int16 SAL_CALL getSelectedItemPos( ) override;
546 css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos( ) override;
547 OUString SAL_CALL getSelectedItem( ) override;
548 css::uno::Sequence< OUString > SAL_CALL getSelectedItems( ) override;
549 void SAL_CALL selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) override;
550 void SAL_CALL selectItemsPos( const css::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect ) override;
551 void SAL_CALL selectItem( const OUString& aItem, sal_Bool bSelect ) override;
552 sal_Bool SAL_CALL isMutipleMode( ) override;
553 void SAL_CALL setMultipleMode( sal_Bool bMulti ) override;
554 sal_Int16 SAL_CALL getDropDownLineCount( ) override;
555 void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) override;
556 void SAL_CALL makeVisible( sal_Int16 nEntry ) override;
558 // css::awt::XLayoutConstrains
559 css::awt::Size SAL_CALL getMinimumSize( ) override;
560 css::awt::Size SAL_CALL getPreferredSize( ) override;
561 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
563 // css::awt::XTextLayoutConstrains
564 css::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) override;
565 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) override;
567 // css::awt::VclWindowPeer
568 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
569 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
571 // XItemListListener
572 virtual void SAL_CALL listItemInserted( const css::awt::ItemListEvent& Event ) override;
573 virtual void SAL_CALL listItemRemoved( const css::awt::ItemListEvent& Event ) override;
574 virtual void SAL_CALL listItemModified( const css::awt::ItemListEvent& Event ) override;
575 virtual void SAL_CALL allItemsRemoved( const css::lang::EventObject& Event ) override;
576 virtual void SAL_CALL itemListChanged( const css::lang::EventObject& Event ) override;
578 // XEventListener
579 virtual void SAL_CALL disposing( const css::lang::EventObject& i_rEvent ) override;
581 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
582 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
586 // class VCLXComboBox
588 typedef cppu::ImplInheritanceHelper< VCLXEdit,
589 css::awt::XComboBox,
590 css::awt::XItemListListener
591 > VCLXComboBox_Base;
592 class VCLXComboBox final : public VCLXComboBox_Base
594 private:
595 ActionListenerMultiplexer maActionListeners;
596 ItemListenerMultiplexer maItemListeners;
598 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
599 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
602 public:
603 VCLXComboBox();
604 virtual ~VCLXComboBox() override;
606 // css::lang::XComponent
607 void SAL_CALL dispose( ) override;
609 // css::awt::XComboBox
610 void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
611 void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) override;
612 void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
613 void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) override;
614 void SAL_CALL addItem( const OUString& aItem, sal_Int16 nPos ) override;
615 void SAL_CALL addItems( const css::uno::Sequence< OUString >& aItems, sal_Int16 nPos ) override;
616 void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) override;
617 sal_Int16 SAL_CALL getItemCount( ) override;
618 OUString SAL_CALL getItem( sal_Int16 nPos ) override;
619 css::uno::Sequence< OUString > SAL_CALL getItems( ) override;
620 sal_Int16 SAL_CALL getDropDownLineCount( ) override;
621 void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) override;
623 // css::awt::XLayoutConstrains
624 css::awt::Size SAL_CALL getMinimumSize( ) override;
625 css::awt::Size SAL_CALL getPreferredSize( ) override;
626 css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
628 // css::awt::XTextLayoutConstrains
629 css::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) override;
630 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) override;
632 // css::awt::VclWindowPeer
633 void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
634 css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
636 // XItemListListener
637 virtual void SAL_CALL listItemInserted( const css::awt::ItemListEvent& Event ) override;
638 virtual void SAL_CALL listItemRemoved( const css::awt::ItemListEvent& Event ) override;
639 virtual void SAL_CALL listItemModified( const css::awt::ItemListEvent& Event ) override;
640 virtual void SAL_CALL allItemsRemoved( const css::lang::EventObject& Event ) override;
641 virtual void SAL_CALL itemListChanged( const css::lang::EventObject& Event ) override;
642 // XEventListener
643 virtual void SAL_CALL disposing( const css::lang::EventObject& i_rEvent ) override;
645 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
646 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
649 // class VCLXToolBox
650 class VCLXToolBox final : public VCLXWindow
652 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
653 CreateAccessibleContext() override;
655 public:
656 VCLXToolBox();
657 virtual ~VCLXToolBox() override;
660 class VCLXHeaderBar final : public VCLXWindow
662 public:
663 VCLXHeaderBar();
664 virtual ~VCLXHeaderBar() override;
666 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
670 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */