LibreOffice Module toolkit (master) 1
include/toolkit/awt/vclxwindows.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <toolkit/dllapi.h>
23
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>
40
41#include <svl/numuno.hxx>
44
45#include <vcl/image.hxx>
46
47// class VCLXGraphicControl
48// deriving from VCLXWindow, drawing the graphic which exists as "Graphic" at the model
49
51{
52private:
55
56protected:
57 const Image& GetImage() const { return maImage; }
58
59protected:
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;
62
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;
66
67protected:
75 virtual void ImplSetNewImage();
76
77public:
78 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
79 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
80
81};
82
83
84// class VCLXButton
85
86typedef cppu::ImplInheritanceHelper< VCLXGraphicControl,
87 css::awt::XButton,
88 css::awt::XToggleButton
90class VCLXButton final : public VCLXButton_Base
91{
92private:
94 ActionListenerMultiplexer maActionListeners;
95 ItemListenerMultiplexer maItemListeners;
96
97 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
98 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
99
100public:
101 VCLXButton();
102 virtual ~VCLXButton() override;
103
104 // css::lang::XComponent
105 void SAL_CALL dispose( ) override;
106
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;
112
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;
117
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;
122
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;
126
127 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
128 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
129};
130
131// class VCLXCheckBox
132
133class TOOLKIT_DLLPUBLIC VCLXCheckBox final : public cppu::ImplInheritanceHelper<
134 VCLXGraphicControl,
135 css::awt::XCheckBox,
136 css::awt::XButton>
137{
138private:
139 ActionListenerMultiplexer maActionListeners;
141 ItemListenerMultiplexer maItemListeners;
142
143 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
144 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
145
146public:
147 VCLXCheckBox();
148
149
150 // css::lang::XComponent
151 void SAL_CALL dispose( ) override;
152
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;
160
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;
165
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;
170
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;
174
175 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
176 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
177};
178
179
180// class VCLXRadioButton
181
182class TOOLKIT_DLLPUBLIC VCLXRadioButton final : public cppu::ImplInheritanceHelper<
183 VCLXGraphicControl,
184 css::awt::XRadioButton,
185 css::awt::XButton>
186{
187private:
188 ItemListenerMultiplexer maItemListeners;
189 ActionListenerMultiplexer maActionListeners;
191
192 void ImplClickedOrToggled( bool bToggled );
193 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
194 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
195
196public:
198
199 // css::lang::XComponent
200 void SAL_CALL dispose( ) override;
201
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;
208
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;
213
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;
218
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;
222
223 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
224 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
225
226};
227
228// class VCLXFixedHyperlink
230 public cppu::ImplInheritanceHelper<VCLXWindow, css::awt::XFixedHyperlink>
231{
232private:
233 ActionListenerMultiplexer maActionListeners;
234
235 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
236
237 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
238 CreateAccessibleContext() override;
239
240public:
242 virtual ~VCLXFixedHyperlink() override;
243
244 // css::lang::XComponent
245 void SAL_CALL dispose( ) override;
246
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;
256
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;
261
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;
265
266 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
267 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
268};
269
270
271// class VCLXFixedText
272
273class VCLXFixedText final : public cppu::ImplInheritanceHelper<VCLXWindow, css::awt::XFixedText>
274{
275 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
276
277public:
279 virtual ~VCLXFixedText() override;
280
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;
286
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;
291
292 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
293 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
294};
295
296
297// class VCLXScrollBar
298
300 public cppu::ImplInheritanceHelper<VCLXWindow, css::awt::XScrollBar>
301{
302private:
303 AdjustmentListenerMultiplexer maAdjustmentListeners;
304
305 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
306 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
307
308public:
310
311
312 // css::lang::XComponent
313 void SAL_CALL dispose( ) override;
314
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;
331
332 // why isn't this part of the XScrollbar?
334 void setMinimum( sal_Int32 n );
336 sal_Int32 getMinimum( ) const;
337
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;
341
342 // css::awt::XLayoutConstrains
343 css::awt::Size SAL_CALL getMinimumSize() override;
345 static css::awt::Size implGetMinimumSize( vcl::Window const * p );
346
347 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
348 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
349};
350
351
352// class VCLXEdit
353
354class SAL_DLLPUBLIC_RTTI VCLXEdit : public cppu::ImplInheritanceHelper<
355 VCLXWindow,
356 css::awt::XTextComponent,
357 css::awt::XTextEditField,
358 css::awt::XTextLayoutConstrains>
359{
360private:
361 TextListenerMultiplexer maTextListeners;
362
363protected:
364 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
365 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
366
367
368public:
369 VCLXEdit();
370
371 TextListenerMultiplexer& GetTextListeners() { return maTextListeners; }
372
373
374 // css::lang::XComponent
375 void SAL_CALL dispose( ) override;
376
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;
390
391 // css::awt::XTextEditField:
392 void SAL_CALL setEchoChar( sal_Unicode cEcho ) override;
393
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;
398
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;
402
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;
406
407 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
408 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
409};
410
411
412// class VCLXSpinField
413class VCLXSpinField : public cppu::ImplInheritanceHelper<VCLXEdit, css::awt::XSpinField>
414{
415private:
416 SpinListenerMultiplexer maSpinListeners;
417
418protected:
419 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
420
421public:
423
424
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;
433
434 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
435 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
436};
437
439{
443
444public:
446 virtual ~SVTXFormattedField() override;
447
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;
451
452protected:
453 void setFormatsSupplier(const css::uno::Reference< css::util::XNumberFormatsSupplier > & xSupplier);
454 sal_Int32 getFormatKey() const;
455 void setFormatKey(sal_Int32 nKey);
456
457 void SetValue(const css::uno::Any& rValue);
458 css::uno::Any GetValue() const;
459
460 void SetTreatAsNumber(bool bSet);
461 bool GetTreatAsNumber() const;
462
463 void SetDefaultValue(const css::uno::Any& rValue);
464 css::uno::Any GetDefaultValue() const;
465
466 void SetMinValue(const css::uno::Any& rValue);
467 css::uno::Any GetMinValue() const;
468
469 void SetMaxValue(const css::uno::Any& rValue);
470 css::uno::Any GetMaxValue() const;
471
472 void NotifyTextListeners();
473 css::uno::Any convertEffectiveValue(const css::uno::Any& rValue) const;
474
475 virtual void SetWindow( const VclPtr< vcl::Window > &_pWindow) override;
476
477 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
478 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
479};
480
481class TOOLKIT_DLLPUBLIC SVTXNumericField final : public cppu::ImplInheritanceHelper<SVTXFormattedField, css::awt::XNumericField>
482{
483public:
485 virtual ~SVTXNumericField() override;
486
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;
504
505 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
506
507 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
508};
509
510// class VCLXListBox
511
512typedef cppu::ImplInheritanceHelper< VCLXWindow,
513 css::awt::XListBox,
514 css::awt::XTextLayoutConstrains,
515 css::awt::XItemListListener
517class VCLXListBox final : public VCLXListBox_Base
518{
519private:
520 ActionListenerMultiplexer maActionListeners;
521 ItemListenerMultiplexer maItemListeners;
522
523 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
524 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
525 CreateAccessibleContext() override;
527
528public:
529 VCLXListBox();
530
531 // css::lang::XComponent
532 void SAL_CALL dispose( ) override;
533
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;
557
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;
562
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;
566
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;
570
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;
577
578 // XEventListener
579 virtual void SAL_CALL disposing( const css::lang::EventObject& i_rEvent ) override;
580
581 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
582 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
583};
584
585
586// class VCLXComboBox
587
588typedef cppu::ImplInheritanceHelper< VCLXEdit,
589 css::awt::XComboBox,
590 css::awt::XItemListListener
592class VCLXComboBox final : public VCLXComboBox_Base
593{
594private:
595 ActionListenerMultiplexer maActionListeners;
596 ItemListenerMultiplexer maItemListeners;
597
598 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
599 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
600
601
602public:
603 VCLXComboBox();
604 virtual ~VCLXComboBox() override;
605
606 // css::lang::XComponent
607 void SAL_CALL dispose( ) override;
608
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;
622
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;
627
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;
631
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;
635
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;
644
645 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
646 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
647};
648
649// class VCLXToolBox
650class VCLXToolBox final : public VCLXWindow
651{
652 virtual css::uno::Reference< css::accessibility::XAccessibleContext >
653 CreateAccessibleContext() override;
654
655public:
656 VCLXToolBox();
657 virtual ~VCLXToolBox() override;
658};
659
660class VCLXHeaderBar final : public VCLXWindow
661{
662public:
664 virtual ~VCLXHeaderBar() override;
665
666 virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
667
668};
669
670/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetTreatAsNumber(bool bSet)
void setFormatKey(sal_Int32 nKey)
sal_Int32 getFormatKey() const
rtl::Reference< SvNumberFormatsSupplierObj > m_xCurrentSupplier
virtual void SetWindow(const VclPtr< vcl::Window > &_pWindow) override
virtual ~SVTXFormattedField() override
css::uno::Any GetMaxValue() const
void SAL_CALL setProperty(const OUString &PropertyName, const css::uno::Any &Value) override
css::uno::Any GetMinValue() const
void SetMinValue(const css::uno::Any &rValue)
void SetValue(const css::uno::Any &rValue)
void setFormatsSupplier(const css::uno::Reference< css::util::XNumberFormatsSupplier > &xSupplier)
css::uno::Any convertEffectiveValue(const css::uno::Any &rValue) const
css::uno::Any SAL_CALL getProperty(const OUString &PropertyName) override
css::uno::Any GetDefaultValue() const
void SetDefaultValue(const css::uno::Any &rValue)
static void ImplGetPropertyIds(std::vector< sal_uInt16 > &aIds)
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
css::uno::Any GetValue() const
bool GetTreatAsNumber() const
void SetMaxValue(const css::uno::Any &rValue)
void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
void SAL_CALL setActionCommand(const OUString &Command) override
void SAL_CALL dispose() override
css::awt::Size SAL_CALL getMinimumSize() override
css::awt::Size SAL_CALL getPreferredSize() override
void SAL_CALL setLabel(const OUString &Label) override
css::uno::Any SAL_CALL getProperty(const OUString &PropertyName) override
void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
static void ImplGetPropertyIds(std::vector< sal_uInt16 > &aIds)
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
ActionListenerMultiplexer maActionListeners
css::awt::Size SAL_CALL calcAdjustedSize(const css::awt::Size &rNewSize) override
void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
void SAL_CALL setProperty(const OUString &PropertyName, const css::uno::Any &Value) override
ItemListenerMultiplexer maItemListeners
virtual ~VCLXButton() override
void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override
ActionListenerMultiplexer maActionListeners
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
ItemListenerMultiplexer maItemListeners
ActionListenerMultiplexer maActionListeners
css::uno::Any SAL_CALL getProperty(const OUString &PropertyName) override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override
void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
css::awt::Size SAL_CALL getPreferredSize() override
void SAL_CALL setProperty(const OUString &PropertyName, const css::uno::Any &Value) override
void SAL_CALL dispose() override
static void ImplGetPropertyIds(std::vector< sal_uInt16 > &aIds)
ItemListenerMultiplexer maItemListeners
void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
OUString SAL_CALL getItem(sal_Int16 nPos) override
sal_Int16 SAL_CALL getItemCount() override
void SAL_CALL getColumnsAndLines(sal_Int16 &nCols, sal_Int16 &nLines) override
void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override
virtual void SAL_CALL disposing(const css::lang::EventObject &i_rEvent) override
void SAL_CALL addItem(const OUString &aItem, sal_Int16 nPos) override
virtual ~VCLXComboBox() override
virtual void SAL_CALL listItemModified(const css::awt::ItemListEvent &Event) override
virtual void SAL_CALL listItemRemoved(const css::awt::ItemListEvent &Event) override
void SAL_CALL addItems(const css::uno::Sequence< OUString > &aItems, sal_Int16 nPos) override
virtual void SAL_CALL itemListChanged(const css::lang::EventObject &Event) override
virtual void SAL_CALL listItemInserted(const css::awt::ItemListEvent &Event) override
void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override
void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
css::awt::Size SAL_CALL getMinimumSize() override
virtual void SAL_CALL allItemsRemoved(const css::lang::EventObject &Event) override
css::uno::Sequence< OUString > SAL_CALL getItems() override
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
sal_Int16 SAL_CALL getDropDownLineCount() override
void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
css::awt::Size SAL_CALL calcAdjustedSize(const css::awt::Size &rNewSize) override
TextListenerMultiplexer & GetTextListeners()
TextListenerMultiplexer maTextListeners
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
void SAL_CALL setAlignment(sal_Int16 nAlign) override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override
css::awt::Size SAL_CALL calcAdjustedSize(const css::awt::Size &rNewSize) override
OUString SAL_CALL getText() override
css::awt::Size SAL_CALL getPreferredSize() override
static void ImplGetPropertyIds(std::vector< sal_uInt16 > &aIds)
css::awt::Size SAL_CALL getMinimumSize() override
void SAL_CALL setText(const OUString &Text) override
sal_Int16 SAL_CALL getAlignment() override
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
virtual ~VCLXFixedText() override
void SAL_CALL setProperty(const OUString &PropertyName, const css::uno::Any &Value) override
Image maImage
the image we currently display
static void ImplGetPropertyIds(std::vector< sal_uInt16 > &aIds)
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
virtual void ImplSetNewImage()
forward our bitmap to our window @precond our mutex is locked @precond GetWindow is not <NULL>
css::uno::Any SAL_CALL getProperty(const OUString &PropertyName) override
void SAL_CALL setPosSize(sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags) override
virtual ~VCLXHeaderBar() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override
void SAL_CALL getColumnsAndLines(sal_Int16 &nCols, sal_Int16 &nLines) override
void SAL_CALL selectItem(const OUString &aItem, sal_Bool bSelect) override
sal_Bool SAL_CALL isMutipleMode() override
void SAL_CALL removeItems(sal_Int16 nPos, sal_Int16 nCount) override
void SAL_CALL addItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
css::uno::Sequence< OUString > SAL_CALL getSelectedItems() override
void SAL_CALL removeItemListener(const css::uno::Reference< css::awt::XItemListener > &l) override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override
css::uno::Any SAL_CALL getProperty(const OUString &PropertyName) override
virtual void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
css::awt::Size SAL_CALL calcAdjustedSize(const css::awt::Size &rNewSize) override
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
virtual void SAL_CALL listItemModified(const css::awt::ItemListEvent &Event) override
void SAL_CALL setDropDownLineCount(sal_Int16 nLines) override
void SAL_CALL addItems(const css::uno::Sequence< OUString > &aItems, sal_Int16 nPos) override
ActionListenerMultiplexer maActionListeners
void SAL_CALL setMultipleMode(sal_Bool bMulti) override
css::awt::Size SAL_CALL getPreferredSize() override
OUString SAL_CALL getSelectedItem() override
css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos() override
virtual void SAL_CALL itemListChanged(const css::lang::EventObject &Event) override
virtual void SAL_CALL allItemsRemoved(const css::lang::EventObject &Event) override
void SAL_CALL selectItemPos(sal_Int16 nPos, sal_Bool bSelect) override
sal_Int16 SAL_CALL getDropDownLineCount() override
void SAL_CALL removeActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
ItemListenerMultiplexer maItemListeners
void SAL_CALL makeVisible(sal_Int16 nEntry) override
void SAL_CALL setProperty(const OUString &PropertyName, const css::uno::Any &Value) override
void SAL_CALL addItem(const OUString &aItem, sal_Int16 nPos) override
virtual void SAL_CALL listItemRemoved(const css::awt::ItemListEvent &Event) override
OUString SAL_CALL getItem(sal_Int16 nPos) override
virtual void SAL_CALL disposing(const css::lang::EventObject &i_rEvent) override
sal_Int16 SAL_CALL getSelectedItemPos() override
void SAL_CALL addActionListener(const css::uno::Reference< css::awt::XActionListener > &l) override
css::uno::Sequence< OUString > SAL_CALL getItems() override
virtual void SAL_CALL listItemInserted(const css::awt::ItemListEvent &Event) override
void ImplCallItemListeners()
sal_Int16 SAL_CALL getItemCount() override
css::awt::Size SAL_CALL getMinimumSize() override
void SAL_CALL dispose() override
void SAL_CALL selectItemsPos(const css::uno::Sequence< sal_Int16 > &aPositions, sal_Bool bSelect) override
static void ImplGetPropertyIds(std::vector< sal_uInt16 > &aIds)
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
ItemListenerMultiplexer maItemListeners
ActionListenerMultiplexer maActionListeners
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
AdjustmentListenerMultiplexer maAdjustmentListeners
void SAL_CALL last() override
void SAL_CALL removeSpinListener(const css::uno::Reference< css::awt::XSpinListener > &l) override
void SAL_CALL first() override
void SAL_CALL down() override
void SAL_CALL enableRepeat(sal_Bool bRepeat) override
SpinListenerMultiplexer maSpinListeners
static void ImplGetPropertyIds(std::vector< sal_uInt16 > &aIds)
void SAL_CALL addSpinListener(const css::uno::Reference< css::awt::XSpinListener > &l) override
virtual void GetPropertyIds(std::vector< sal_uInt16 > &aIds) override
void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
void SAL_CALL up() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override
virtual ~VCLXToolBox() override
#define TOOLKIT_DLLPUBLIC
Definition: dllapi.h:29
cppu::ImplInheritanceHelper< VCLXGraphicControl, css::awt::XButton, css::awt::XToggleButton > VCLXButton_Base
cppu::ImplInheritanceHelper< VCLXWindow, css::awt::XListBox, css::awt::XTextLayoutConstrains, css::awt::XItemListListener > VCLXListBox_Base
cppu::ImplInheritanceHelper< VCLXEdit, css::awt::XComboBox, css::awt::XItemListListener > VCLXComboBox_Base
B2VectorOrientation getOrientation(const B2DPolygon &rCandidate)
Value
css::beans::Optional< css::uno::Any > getValue(std::u16string_view id)
SVX_DLLPUBLIC OUString getProperty(css::uno::Reference< css::beans::XPropertyContainer > const &rxPropertyContainer, OUString const &rName)
void dispose()
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
unsigned char sal_Bool
sal_uInt16 sal_Unicode