1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _TOOLKIT_AWT_VCLXWINDOWS_HXX_ 25 #define _TOOLKIT_AWT_VCLXWINDOWS_HXX_ 26 27 #include <toolkit/dllapi.h> 28 29 #include <com/sun/star/beans/PropertyValues.hpp> 30 #include <com/sun/star/beans/XPropertySet.hpp> 31 #include <com/sun/star/beans/PropertyValue.hpp> 32 #include <com/sun/star/beans/PropertyState.hpp> 33 #include <com/sun/star/beans/XPropertySetInfo.hpp> 34 #include <com/sun/star/beans/XMultiPropertySet.hpp> 35 #include <com/sun/star/beans/XFastPropertySet.hpp> 36 #include <com/sun/star/beans/XVetoableChangeListener.hpp> 37 #include <com/sun/star/beans/XPropertyState.hpp> 38 #include <com/sun/star/beans/PropertyAttribute.hpp> 39 #include <com/sun/star/beans/XPropertiesChangeListener.hpp> 40 #include <com/sun/star/beans/XPropertyChangeListener.hpp> 41 #include <com/sun/star/beans/XPropertyAccess.hpp> 42 #include <com/sun/star/beans/XPropertyContainer.hpp> 43 #include <com/sun/star/beans/PropertyStateChangeEvent.hpp> 44 #include <com/sun/star/beans/PropertyChangeEvent.hpp> 45 #include <com/sun/star/awt/XFileDialog.hpp> 46 #include <com/sun/star/awt/XTextComponent.hpp> 47 #include <com/sun/star/awt/XListBox.hpp> 48 #include <com/sun/star/awt/XProgressMonitor.hpp> 49 #include <com/sun/star/awt/TextAlign.hpp> 50 #include <com/sun/star/awt/XScrollBar.hpp> 51 #include <com/sun/star/awt/XVclContainerPeer.hpp> 52 #include <com/sun/star/awt/XTabControllerModel.hpp> 53 #include <com/sun/star/awt/XMessageBox.hpp> 54 #include <com/sun/star/awt/XTextEditField.hpp> 55 #include <com/sun/star/awt/Style.hpp> 56 #include <com/sun/star/awt/XTimeField.hpp> 57 #include <com/sun/star/awt/XVclWindowPeer.hpp> 58 #include <com/sun/star/awt/XControlModel.hpp> 59 #include <com/sun/star/awt/XSpinField.hpp> 60 #include <com/sun/star/awt/XUnoControlContainer.hpp> 61 #include <com/sun/star/awt/XTextLayoutConstrains.hpp> 62 #include <com/sun/star/awt/XNumericField.hpp> 63 #ifndef _COM_SUN_STAR_AWT_XMetricFIELD_HPP_ 64 #include <com/sun/star/awt/XMetricField.hpp> 65 #endif 66 #include <com/sun/star/awt/XButton.hpp> 67 #include <com/sun/star/awt/XToggleButton.hpp> 68 #include <com/sun/star/awt/XPointer.hpp> 69 #include <com/sun/star/awt/XTextArea.hpp> 70 #include <com/sun/star/awt/XImageButton.hpp> 71 #include <com/sun/star/awt/XFixedHyperlink.hpp> 72 #include <com/sun/star/awt/XFixedText.hpp> 73 #include <com/sun/star/awt/XControlContainer.hpp> 74 #include <com/sun/star/awt/XDialog2.hpp> 75 #include <com/sun/star/awt/XRadioButton.hpp> 76 #include <com/sun/star/awt/XCurrencyField.hpp> 77 #include <com/sun/star/awt/XPatternField.hpp> 78 #include <com/sun/star/awt/XDateField.hpp> 79 #include <com/sun/star/awt/XComboBox.hpp> 80 #include <com/sun/star/awt/XCheckBox.hpp> 81 #include <com/sun/star/awt/XItemListListener.hpp> 82 #include <cppuhelper/weak.hxx> 83 #include <cppuhelper/implbase3.hxx> 84 #include <cppuhelper/implbase2.hxx> 85 86 #include "toolkit/awt/vclxwindow.hxx" 87 #include "toolkit/awt/vclxtopwindow.hxx" 88 #include <cppuhelper/implbase1.hxx> 89 90 #include <vcl/pointr.hxx> 91 #include <vcl/image.hxx> 92 93 class Button; 94 class CheckBox; 95 class RadioButton; 96 class ListBox; 97 class ScrollBar; 98 class Edit; 99 class Menu; 100 class ComboBox; 101 class FormatterBase; 102 class SpinField; 103 class ToolBox; 104 class VclSimpleEvent; 105 class VclMenuEvent; 106 107 // ---------------------------------------------------- 108 // class VCLXGraphicControl 109 // deriving from VCLXWindow, drawing the graphic which exists as "Graphic" at the model 110 // ---------------------------------------------------- 111 112 113 class TOOLKIT_DLLPUBLIC VCLXGraphicControl : public VCLXWindow 114 { 115 private: 116 /// the image we currently display 117 Image maImage; 118 119 protected: GetImage() const120 const Image& GetImage() const { return maImage; } 121 122 protected: 123 // ::com::sun::star::awt::XWindow 124 void SAL_CALL setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ); 125 126 // ::com::sun::star::awt::VclWindowPeer 127 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 128 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 129 130 protected: 131 /** forward our bitmap to our window 132 @precond 133 our mutex is locked 134 @precond 135 GetWindow is not <NULL/> 136 @see GetBitmap 137 */ 138 virtual void ImplSetNewImage(); 139 140 public: 141 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)142 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 143 144 }; 145 146 // ---------------------------------------------------- 147 // class VCLXButton 148 // ---------------------------------------------------- 149 typedef ::cppu::ImplInheritanceHelper2 < VCLXGraphicControl 150 , ::com::sun::star::awt::XButton 151 , ::com::sun::star::awt::XToggleButton 152 > VCLXButton_Base; 153 class VCLXButton :public VCLXButton_Base 154 { 155 private: 156 ::rtl::OUString maActionCommand; 157 ActionListenerMultiplexer maActionListeners; 158 ItemListenerMultiplexer maItemListeners; 159 160 protected: 161 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 162 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 163 164 public: 165 VCLXButton(); 166 ~VCLXButton(); 167 168 // ::com::sun::star::lang::XComponent 169 void SAL_CALL dispose( ); 170 171 // ::com::sun::star::awt::XButton 172 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 173 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 174 void SAL_CALL setLabel( const ::rtl::OUString& Label ); 175 void SAL_CALL setActionCommand( const ::rtl::OUString& Command ); 176 177 // ::com::sun::star::awt::XToggleButton 178 // ::com::sun::star::awt::XItemEventBroadcaster 179 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 180 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 181 182 // ::com::sun::star::awt::XLayoutConstrains 183 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 184 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 185 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 186 187 // ::com::sun::star::awt::VclWindowPeer 188 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 189 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 190 191 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)192 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 193 }; 194 195 // ---------------------------------------------------- 196 // class VCLXImageControl 197 // ---------------------------------------------------- 198 class VCLXImageControl : public VCLXGraphicControl 199 { 200 public: 201 VCLXImageControl(); 202 ~VCLXImageControl(); 203 204 // ::com::sun::star::awt::XLayoutConstrains 205 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 206 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 207 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 208 209 // ::com::sun::star::awt::VclWindowPeer 210 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 211 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 212 213 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)214 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 215 216 protected: 217 virtual void ImplSetNewImage(); 218 }; 219 220 // ---------------------------------------------------- 221 // class VCLXCheckBox 222 // ---------------------------------------------------- 223 class VCLXCheckBox : public ::com::sun::star::awt::XCheckBox, 224 public ::com::sun::star::awt::XButton, 225 public VCLXGraphicControl 226 { 227 private: 228 ActionListenerMultiplexer maActionListeners; 229 ::rtl::OUString maActionCommand; 230 ItemListenerMultiplexer maItemListeners; 231 232 protected: 233 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 234 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 235 236 public: 237 VCLXCheckBox(); 238 239 // ::com::sun::star::uno::XInterface 240 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()241 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()242 void SAL_CALL release() throw() { OWeakObject::release(); } 243 244 // ::com::sun::star::lang::XTypeProvider 245 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 246 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 247 248 249 // ::com::sun::star::lang::XComponent 250 void SAL_CALL dispose( ); 251 252 // ::com::sun::star::awt::XCheckBox 253 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 254 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 255 sal_Int16 SAL_CALL getState( ); 256 void SAL_CALL setState( sal_Int16 n ); 257 void SAL_CALL setLabel( const ::rtl::OUString& Label ); 258 void SAL_CALL enableTriState( sal_Bool b ); 259 260 // ::com::sun::star::awt::XButton: 261 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 262 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 263 void SAL_CALL setActionCommand( const ::rtl::OUString& Command ); 264 265 // ::com::sun::star::awt::XLayoutConstrains 266 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 267 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 268 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 269 270 // ::com::sun::star::awt::VclWindowPeer 271 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 272 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 273 274 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)275 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 276 }; 277 278 // ---------------------------------------------------- 279 // class VCLXRadioButton 280 // ---------------------------------------------------- 281 class VCLXRadioButton : public ::com::sun::star::awt::XRadioButton, 282 public ::com::sun::star::awt::XButton, 283 public VCLXGraphicControl 284 { 285 private: 286 ItemListenerMultiplexer maItemListeners; 287 ActionListenerMultiplexer maActionListeners; 288 ::rtl::OUString maActionCommand; 289 290 protected: 291 void ImplClickedOrToggled( sal_Bool bToggled ); 292 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 293 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 294 295 public: 296 VCLXRadioButton(); 297 298 // ::com::sun::star::uno::XInterface 299 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()300 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()301 void SAL_CALL release() throw() { OWeakObject::release(); } 302 303 // ::com::sun::star::lang::XTypeProvider 304 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 305 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 306 307 // ::com::sun::star::lang::XComponent 308 void SAL_CALL dispose( ); 309 310 // ::com::sun::star::awt::XRadioButton 311 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 312 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 313 sal_Bool SAL_CALL getState( ); 314 void SAL_CALL setState( sal_Bool b ); 315 void SAL_CALL setLabel( const ::rtl::OUString& Label ); 316 317 // ::com::sun::star::awt::XButton: 318 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 319 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 320 void SAL_CALL setActionCommand( const ::rtl::OUString& Command ); 321 322 // ::com::sun::star::awt::XLayoutConstrains 323 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 324 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 325 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 326 327 // ::com::sun::star::awt::VclWindowPeer 328 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 329 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 330 331 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)332 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 333 334 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getFirstActionListener (); 335 }; 336 337 // ---------------------------------------------------- 338 // class VCLXMessageBox 339 // ---------------------------------------------------- 340 class VCLXMessageBox : public ::com::sun::star::awt::XMessageBox, 341 public VCLXTopWindow 342 { 343 public: 344 VCLXMessageBox(); 345 ~VCLXMessageBox(); 346 347 // ::com::sun::star::uno::XInterface 348 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()349 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()350 void SAL_CALL release() throw() { OWeakObject::release(); } 351 352 // ::com::sun::star::lang::XTypeProvider 353 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 354 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 355 356 357 // ::com::sun::star::awt::XMessageBox 358 void SAL_CALL setCaptionText( const ::rtl::OUString& aText ); 359 ::rtl::OUString SAL_CALL getCaptionText( ); 360 void SAL_CALL setMessageText( const ::rtl::OUString& aText ); 361 ::rtl::OUString SAL_CALL getMessageText( ); 362 sal_Int16 SAL_CALL execute( ); 363 364 // ::com::sun::star::awt::XLayoutConstrains 365 ::com::sun::star::awt::Size SAL_CALL getMinimumSize(); 366 367 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)368 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 369 }; 370 371 372 373 // ---------------------------------------------------- 374 // class VCLXDialog 375 // ---------------------------------------------------- 376 class TOOLKIT_DLLPUBLIC VCLXDialog : public ::com::sun::star::awt::XDialog2, 377 public VCLXTopWindow 378 { 379 public: 380 VCLXDialog(); 381 ~VCLXDialog(); 382 383 // ::com::sun::star::uno::XInterface 384 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()385 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()386 void SAL_CALL release() throw() { OWeakObject::release(); } 387 388 // ::com::sun::star::lang::XTypeProvider 389 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 390 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 391 392 // ::com::sun::star::awt::XDialog2 393 virtual void SAL_CALL endDialog( ::sal_Int32 Result ); 394 virtual void SAL_CALL setHelpId( const rtl::OUString& Id ); 395 396 // ::com::sun::star::awt::XDialog 397 void SAL_CALL setTitle( const ::rtl::OUString& Title ); 398 ::rtl::OUString SAL_CALL getTitle( ); 399 sal_Int16 SAL_CALL execute( ); 400 void SAL_CALL endExecute( ); 401 402 // ::com::sun::star::awt::XView 403 void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ); 404 405 // ::com::sun::star::awt::XDevice, 406 ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo(); 407 408 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)409 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 410 411 // ::com::sun::star::awt::XVclWindowPeer 412 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 413 414 }; 415 416 // ---------------------------------------------------- 417 // class VCLXTabPage 418 // ---------------------------------------------------- 419 class VCLXTabPage : public VCLXContainer 420 { 421 public: 422 VCLXTabPage(); 423 ~VCLXTabPage(); 424 425 // ::com::sun::star::uno::XInterface 426 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()427 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()428 void SAL_CALL release() throw() { OWeakObject::release(); } 429 430 // ::com::sun::star::lang::XTypeProvider 431 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 432 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 433 434 // ::com::sun::star::awt::XView 435 void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ); 436 437 // ::com::sun::star::awt::XDevice, 438 ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo(); 439 440 // ::com::sun::star::awt::XVclWindowPeer 441 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 442 443 }; 444 445 // ---------------------------------------------------- 446 // class VCLXFixedHyperlink 447 // ---------------------------------------------------- 448 class TOOLKIT_DLLPUBLIC VCLXFixedHyperlink : 449 public ::com::sun::star::awt::XFixedHyperlink, 450 public VCLXWindow 451 { 452 private: 453 ActionListenerMultiplexer maActionListeners; 454 455 protected: 456 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 457 458 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > 459 CreateAccessibleContext(); 460 461 public: 462 VCLXFixedHyperlink(); 463 ~VCLXFixedHyperlink(); 464 465 // ::com::sun::star::uno::XInterface 466 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()467 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()468 void SAL_CALL release() throw() { OWeakObject::release(); } 469 470 // ::com::sun::star::lang::XComponent 471 void SAL_CALL dispose( ); 472 473 // ::com::sun::star::lang::XTypeProvider 474 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 475 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 476 477 // ::com::sun::star::awt::XFixedHyperlink 478 void SAL_CALL setText( const ::rtl::OUString& Text ); 479 ::rtl::OUString SAL_CALL getText( ); 480 void SAL_CALL setURL( const ::rtl::OUString& URL ); 481 ::rtl::OUString SAL_CALL getURL( ); 482 void SAL_CALL setAlignment( sal_Int16 nAlign ); 483 sal_Int16 SAL_CALL getAlignment( ); 484 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 485 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 486 487 // ::com::sun::star::awt::XLayoutConstrains 488 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 489 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 490 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 491 492 // ::com::sun::star::awt::VclWindowPeer 493 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 494 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 495 496 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)497 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 498 }; 499 500 // ---------------------------------------------------- 501 // class VCLXFixedText 502 // ---------------------------------------------------- 503 class VCLXFixedText : public ::com::sun::star::awt::XFixedText, 504 public VCLXWindow 505 { 506 protected: 507 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 508 509 public: 510 VCLXFixedText(); 511 ~VCLXFixedText(); 512 513 // ::com::sun::star::uno::XInterface 514 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()515 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()516 void SAL_CALL release() throw() { OWeakObject::release(); } 517 518 // ::com::sun::star::lang::XTypeProvider 519 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 520 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 521 522 // ::com::sun::star::awt::XFixedText 523 void SAL_CALL setText( const ::rtl::OUString& Text ); 524 ::rtl::OUString SAL_CALL getText( ); 525 void SAL_CALL setAlignment( sal_Int16 nAlign ); 526 sal_Int16 SAL_CALL getAlignment( ); 527 528 // ::com::sun::star::awt::XLayoutConstrains 529 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 530 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 531 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 532 533 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)534 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 535 }; 536 537 // ---------------------------------------------------- 538 // class VCLXScrollBar 539 // ---------------------------------------------------- 540 class VCLXScrollBar : public ::com::sun::star::awt::XScrollBar, 541 public VCLXWindow 542 { 543 private: 544 AdjustmentListenerMultiplexer maAdjustmentListeners; 545 546 protected: 547 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 548 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 549 550 public: 551 VCLXScrollBar(); 552 // ::com::sun::star::uno::XInterface 553 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()554 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()555 void SAL_CALL release() throw() { OWeakObject::release(); } 556 557 // ::com::sun::star::lang::XTypeProvider 558 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 559 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 560 561 562 // ::com::sun::star::lang::XComponent 563 void SAL_CALL dispose( ); 564 565 // ::com::sun::star::awt::XScrollbar 566 void SAL_CALL addAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& l ); 567 void SAL_CALL removeAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& l ); 568 void SAL_CALL setValue( sal_Int32 n ); 569 void SAL_CALL setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 nMax ); 570 sal_Int32 SAL_CALL getValue( ); 571 void SAL_CALL setMaximum( sal_Int32 n ); 572 sal_Int32 SAL_CALL getMaximum( ); 573 void SAL_CALL setLineIncrement( sal_Int32 n ); 574 sal_Int32 SAL_CALL getLineIncrement( ); 575 void SAL_CALL setBlockIncrement( sal_Int32 n ); 576 sal_Int32 SAL_CALL getBlockIncrement( ); 577 void SAL_CALL setVisibleSize( sal_Int32 n ); 578 sal_Int32 SAL_CALL getVisibleSize( ); 579 void SAL_CALL setOrientation( sal_Int32 n ); 580 sal_Int32 SAL_CALL getOrientation( ); 581 582 // why isn't this part of the XScrollbar? 583 void SAL_CALL setMinimum( sal_Int32 n ); 584 sal_Int32 SAL_CALL getMinimum( ); 585 586 // ::com::sun::star::awt::VclWindowPeer 587 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 588 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 589 590 // ::com::sun::star::awt::XLayoutConstrains 591 ::com::sun::star::awt::Size SAL_CALL getMinimumSize(); 592 static ::com::sun::star::awt::Size SAL_CALL implGetMinimumSize( Window* p ); 593 594 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)595 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 596 }; 597 598 // ---------------------------------------------------- 599 // class VCLXEdit 600 // ---------------------------------------------------- 601 class TOOLKIT_DLLPUBLIC VCLXEdit : public ::com::sun::star::awt::XTextComponent, 602 public ::com::sun::star::awt::XTextEditField, 603 public ::com::sun::star::awt::XTextLayoutConstrains, 604 public VCLXWindow 605 { 606 private: 607 TextListenerMultiplexer maTextListeners; 608 609 protected: 610 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 611 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 612 613 614 public: 615 VCLXEdit(); 616 GetTextListeners()617 TextListenerMultiplexer& GetTextListeners() { return maTextListeners; } 618 619 // ::com::sun::star::uno::XInterface 620 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()621 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()622 void SAL_CALL release() throw() { OWeakObject::release(); } 623 624 // ::com::sun::star::lang::XTypeProvider 625 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 626 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 627 628 629 // ::com::sun::star::lang::XComponent 630 void SAL_CALL dispose( ); 631 632 // ::com::sun::star::awt::XTextComponent 633 void SAL_CALL addTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ); 634 void SAL_CALL removeTextListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextListener >& l ); 635 void SAL_CALL setText( const ::rtl::OUString& aText ); 636 void SAL_CALL insertText( const ::com::sun::star::awt::Selection& Sel, const ::rtl::OUString& Text ); 637 ::rtl::OUString SAL_CALL getText( ); 638 ::rtl::OUString SAL_CALL getSelectedText( ); 639 void SAL_CALL setSelection( const ::com::sun::star::awt::Selection& aSelection ); 640 ::com::sun::star::awt::Selection SAL_CALL getSelection( ); 641 sal_Bool SAL_CALL isEditable( ); 642 void SAL_CALL setEditable( sal_Bool bEditable ); 643 void SAL_CALL setMaxTextLen( sal_Int16 nLen ); 644 sal_Int16 SAL_CALL getMaxTextLen( ); 645 646 // ::com::sun::star::awt::XTextEditField: 647 void SAL_CALL setEchoChar( sal_Unicode cEcho ); 648 649 // ::com::sun::star::awt::XLayoutConstrains 650 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 651 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 652 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 653 654 // ::com::sun::star::awt::XTextLayoutConstrains 655 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ); 656 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ); 657 658 // ::com::sun::star::awt::VclWindowPeer 659 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 660 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 661 662 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)663 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 664 }; 665 666 // ---------------------------------------------------- 667 // class VCLXListBox 668 // ---------------------------------------------------- 669 typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow 670 , ::com::sun::star::awt::XListBox 671 , ::com::sun::star::awt::XTextLayoutConstrains 672 , ::com::sun::star::awt::XItemListListener 673 > VCLXListBox_Base; 674 class VCLXListBox : public VCLXListBox_Base 675 { 676 private: 677 ActionListenerMultiplexer maActionListeners; 678 ItemListenerMultiplexer maItemListeners; 679 680 protected: 681 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 682 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > 683 CreateAccessibleContext(); 684 void ImplCallItemListeners(); 685 686 public: 687 VCLXListBox(); 688 689 // ::com::sun::star::lang::XComponent 690 void SAL_CALL dispose( ); 691 692 // ::com::sun::star::awt::XListBox 693 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 694 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 695 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 696 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 697 void SAL_CALL addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ); 698 void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, sal_Int16 nPos ); 699 void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ); 700 sal_Int16 SAL_CALL getItemCount( ); 701 ::rtl::OUString SAL_CALL getItem( sal_Int16 nPos ); 702 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ); 703 sal_Int16 SAL_CALL getSelectedItemPos( ); 704 ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos( ); 705 ::rtl::OUString SAL_CALL getSelectedItem( ); 706 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedItems( ); 707 void SAL_CALL selectItemPos( sal_Int16 nPos, sal_Bool bSelect ); 708 void SAL_CALL selectItemsPos( const ::com::sun::star::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect ); 709 void SAL_CALL selectItem( const ::rtl::OUString& aItem, sal_Bool bSelect ); 710 sal_Bool SAL_CALL isMutipleMode( ); 711 void SAL_CALL setMultipleMode( sal_Bool bMulti ); 712 sal_Int16 SAL_CALL getDropDownLineCount( ); 713 void SAL_CALL setDropDownLineCount( sal_Int16 nLines ); 714 void SAL_CALL makeVisible( sal_Int16 nEntry ); 715 716 // ::com::sun::star::awt::XLayoutConstrains 717 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 718 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 719 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 720 721 // ::com::sun::star::awt::XTextLayoutConstrains 722 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ); 723 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ); 724 725 // ::com::sun::star::awt::VclWindowPeer 726 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 727 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 728 729 // XItemListListener 730 virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ); 731 virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ); 732 virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ); 733 virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ); 734 virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ); 735 736 // XEventListener 737 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_rEvent ); 738 739 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)740 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 741 }; 742 743 // ---------------------------------------------------- 744 // class VCLXComboBox 745 // ---------------------------------------------------- 746 typedef ::cppu::ImplInheritanceHelper2 < VCLXEdit 747 , ::com::sun::star::awt::XComboBox 748 , ::com::sun::star::awt::XItemListListener > VCLXComboBox_Base; 749 class VCLXComboBox : public VCLXComboBox_Base 750 { 751 private: 752 ActionListenerMultiplexer maActionListeners; 753 ItemListenerMultiplexer maItemListeners; 754 755 protected: 756 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 757 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 758 759 760 public: 761 VCLXComboBox(); 762 ~VCLXComboBox(); 763 764 // ::com::sun::star::lang::XComponent 765 void SAL_CALL dispose( ); 766 767 // ::com::sun::star::awt::XComboBox 768 void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 769 void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ); 770 void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 771 void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ); 772 void SAL_CALL addItem( const ::rtl::OUString& aItem, sal_Int16 nPos ); 773 void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, sal_Int16 nPos ); 774 void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ); 775 sal_Int16 SAL_CALL getItemCount( ); 776 ::rtl::OUString SAL_CALL getItem( sal_Int16 nPos ); 777 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ); 778 sal_Int16 SAL_CALL getDropDownLineCount( ); 779 void SAL_CALL setDropDownLineCount( sal_Int16 nLines ); 780 781 // ::com::sun::star::awt::XLayoutConstrains 782 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ); 783 ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ); 784 ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ); 785 786 // ::com::sun::star::awt::XTextLayoutConstrains 787 ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ); 788 void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ); 789 790 // ::com::sun::star::awt::VclWindowPeer 791 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 792 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 793 794 // XItemListListener 795 virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ); 796 virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ); 797 virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ); 798 virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ); 799 virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ); 800 // XEventListener 801 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_rEvent ); 802 803 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)804 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 805 }; 806 807 // ---------------------------------------------------- 808 // class VCLXSpinField 809 // ---------------------------------------------------- 810 class TOOLKIT_DLLPUBLIC VCLXSpinField : public ::com::sun::star::awt::XSpinField, 811 public VCLXEdit 812 { 813 private: 814 SpinListenerMultiplexer maSpinListeners; 815 816 protected: 817 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); 818 819 public: 820 VCLXSpinField(); 821 822 // ::com::sun::star::uno::XInterface 823 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()824 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()825 void SAL_CALL release() throw() { OWeakObject::release(); } 826 827 // ::com::sun::star::lang::XTypeProvider 828 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 829 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 830 831 832 // ::com::sun::star::awt::XSpinField 833 void SAL_CALL addSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ); 834 void SAL_CALL removeSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener >& l ); 835 void SAL_CALL up( ); 836 void SAL_CALL down( ); 837 void SAL_CALL first( ); 838 void SAL_CALL last( ); 839 void SAL_CALL enableRepeat( sal_Bool bRepeat ); 840 841 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)842 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 843 }; 844 845 // ---------------------------------------------------- 846 // class VCLXFormattedSpinField 847 // ---------------------------------------------------- 848 class VCLXFormattedSpinField : public VCLXSpinField 849 { 850 private: 851 FormatterBase* mpFormatter; 852 853 protected: GetFormatter() const854 FormatterBase* GetFormatter() const { return GetWindow() ? mpFormatter : NULL; } 855 856 public: 857 VCLXFormattedSpinField(); 858 ~VCLXFormattedSpinField(); 859 SetFormatter(FormatterBase * pFormatter)860 void SetFormatter( FormatterBase* pFormatter ) { mpFormatter = pFormatter; } 861 862 void setStrictFormat( sal_Bool bStrict ); 863 sal_Bool isStrictFormat(); 864 865 // ::com::sun::star::awt::VclWindowPeer 866 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 867 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 868 869 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)870 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 871 }; 872 873 // ---------------------------------------------------- 874 // class VCLXDateField 875 // ---------------------------------------------------- 876 class TOOLKIT_DLLPUBLIC VCLXDateField : public ::com::sun::star::awt::XDateField, 877 public VCLXFormattedSpinField 878 { 879 protected: 880 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 881 public: 882 VCLXDateField(); 883 ~VCLXDateField(); 884 885 // ::com::sun::star::uno::XInterface 886 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()887 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()888 void SAL_CALL release() throw() { OWeakObject::release(); } 889 890 // ::com::sun::star::lang::XTypeProvider 891 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 892 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 893 894 895 // ::com::sun::star::awt::XDateField 896 void SAL_CALL setDate( sal_Int32 Date ); 897 sal_Int32 SAL_CALL getDate( ); 898 void SAL_CALL setMin( sal_Int32 Date ); 899 sal_Int32 SAL_CALL getMin( ); 900 void SAL_CALL setMax( sal_Int32 Date ); 901 sal_Int32 SAL_CALL getMax( ); 902 void SAL_CALL setFirst( sal_Int32 Date ); 903 sal_Int32 SAL_CALL getFirst( ); 904 void SAL_CALL setLast( sal_Int32 Date ); 905 sal_Int32 SAL_CALL getLast( ); 906 void SAL_CALL setLongFormat( sal_Bool bLong ); 907 sal_Bool SAL_CALL isLongFormat( ); 908 void SAL_CALL setEmpty( ); 909 sal_Bool SAL_CALL isEmpty( ); 910 void SAL_CALL setStrictFormat( sal_Bool bStrict ); 911 sal_Bool SAL_CALL isStrictFormat( ); 912 913 // ::com::sun::star::awt::VclWindowPeer 914 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 915 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 916 917 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)918 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 919 }; 920 921 // ---------------------------------------------------- 922 // class VCLXTimeField 923 // ---------------------------------------------------- 924 class VCLXTimeField : public ::com::sun::star::awt::XTimeField, 925 public VCLXFormattedSpinField 926 { 927 protected: 928 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); 929 public: 930 VCLXTimeField(); 931 ~VCLXTimeField(); 932 933 // ::com::sun::star::uno::XInterface 934 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()935 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()936 void SAL_CALL release() throw() { OWeakObject::release(); } 937 938 // ::com::sun::star::lang::XTypeProvider 939 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 940 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 941 942 // ::com::sun::star::awt::XTimeField 943 void SAL_CALL setTime( sal_Int32 Time ); 944 sal_Int32 SAL_CALL getTime( ); 945 void SAL_CALL setMin( sal_Int32 Time ); 946 sal_Int32 SAL_CALL getMin( ); 947 void SAL_CALL setMax( sal_Int32 Time ); 948 sal_Int32 SAL_CALL getMax( ); 949 void SAL_CALL setFirst( sal_Int32 Time ); 950 sal_Int32 SAL_CALL getFirst( ); 951 void SAL_CALL setLast( sal_Int32 Time ); 952 sal_Int32 SAL_CALL getLast( ); 953 void SAL_CALL setEmpty( ); 954 sal_Bool SAL_CALL isEmpty( ); 955 void SAL_CALL setStrictFormat( sal_Bool bStrict ); 956 sal_Bool SAL_CALL isStrictFormat( ); 957 958 // ::com::sun::star::awt::VclWindowPeer 959 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 960 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 961 962 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)963 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 964 }; 965 966 // ---------------------------------------------------- 967 // class VCLXNumericField 968 // ---------------------------------------------------- 969 class VCLXNumericField : public ::com::sun::star::awt::XNumericField, 970 public VCLXFormattedSpinField 971 { 972 public: 973 VCLXNumericField(); 974 ~VCLXNumericField(); 975 976 // ::com::sun::star::uno::XInterface 977 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()978 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()979 void SAL_CALL release() throw() { OWeakObject::release(); } 980 981 // ::com::sun::star::lang::XTypeProvider 982 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 983 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 984 985 // ::com::sun::star::awt::XNumericField 986 void SAL_CALL setValue( double Value ); 987 double SAL_CALL getValue( ); 988 void SAL_CALL setMin( double Value ); 989 double SAL_CALL getMin( ); 990 void SAL_CALL setMax( double Value ); 991 double SAL_CALL getMax( ); 992 void SAL_CALL setFirst( double Value ); 993 double SAL_CALL getFirst( ); 994 void SAL_CALL setLast( double Value ); 995 double SAL_CALL getLast( ); 996 void SAL_CALL setSpinSize( double Value ); 997 double SAL_CALL getSpinSize( ); 998 void SAL_CALL setDecimalDigits( sal_Int16 nDigits ); 999 sal_Int16 SAL_CALL getDecimalDigits( ); 1000 void SAL_CALL setStrictFormat( sal_Bool bStrict ); 1001 sal_Bool SAL_CALL isStrictFormat( ); 1002 1003 // ::com::sun::star::awt::VclWindowPeer 1004 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 1005 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 1006 1007 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)1008 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 1009 }; 1010 1011 // ---------------------------------------------------- 1012 // class VCLXMetricField 1013 // ---------------------------------------------------- 1014 class MetricFormatter; 1015 class MetricField; 1016 class VCLXMetricField : public ::com::sun::star::awt::XMetricField, 1017 public VCLXFormattedSpinField 1018 { 1019 MetricFormatter *GetMetricFormatter(); 1020 MetricField *GetMetricField(); 1021 void CallListeners(); 1022 public: 1023 VCLXMetricField(); 1024 ~VCLXMetricField(); 1025 1026 // ::com::sun::star::uno::XInterface 1027 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()1028 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()1029 void SAL_CALL release() throw() { OWeakObject::release(); } 1030 1031 // ::com::sun::star::lang::XTypeProvider 1032 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 1033 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 1034 1035 // ::com::sun::star::awt::XMetricField 1036 virtual void SAL_CALL setValue( ::sal_Int64 Value, ::sal_Int16 Unit ); 1037 virtual void SAL_CALL setUserValue( ::sal_Int64 Value, ::sal_Int16 Unit ); 1038 virtual ::sal_Int64 SAL_CALL getValue( ::sal_Int16 Unit ); 1039 virtual ::sal_Int64 SAL_CALL getCorrectedValue( ::sal_Int16 Unit ); 1040 virtual void SAL_CALL setMin( ::sal_Int64 Value, ::sal_Int16 Unit ); 1041 virtual ::sal_Int64 SAL_CALL getMin( ::sal_Int16 Unit ); 1042 virtual void SAL_CALL setMax( ::sal_Int64 Value, ::sal_Int16 Unit ); 1043 virtual ::sal_Int64 SAL_CALL getMax( ::sal_Int16 Unit ); 1044 virtual void SAL_CALL setFirst( ::sal_Int64 Value, ::sal_Int16 Unit ); 1045 virtual ::sal_Int64 SAL_CALL getFirst( ::sal_Int16 Unit ); 1046 virtual void SAL_CALL setLast( ::sal_Int64 Value, ::sal_Int16 Unit ); 1047 virtual ::sal_Int64 SAL_CALL getLast( ::sal_Int16 Unit ); 1048 virtual void SAL_CALL setSpinSize( ::sal_Int64 Value ); 1049 virtual ::sal_Int64 SAL_CALL getSpinSize( ); 1050 virtual void SAL_CALL setDecimalDigits( ::sal_Int16 nDigits ); 1051 virtual ::sal_Int16 SAL_CALL getDecimalDigits( ); 1052 virtual void SAL_CALL setStrictFormat( ::sal_Bool bStrict ); 1053 virtual ::sal_Bool SAL_CALL isStrictFormat( ); 1054 1055 // ::com::sun::star::awt::VclWindowPeer 1056 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 1057 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 1058 1059 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)1060 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 1061 }; 1062 1063 // ---------------------------------------------------- 1064 // class VCLXCurrencyField 1065 // ---------------------------------------------------- 1066 class VCLXCurrencyField : public ::com::sun::star::awt::XCurrencyField, 1067 public VCLXFormattedSpinField 1068 { 1069 public: 1070 VCLXCurrencyField(); 1071 ~VCLXCurrencyField(); 1072 1073 // ::com::sun::star::uno::XInterface 1074 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()1075 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()1076 void SAL_CALL release() throw() { OWeakObject::release(); } 1077 1078 // ::com::sun::star::lang::XTypeProvider 1079 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 1080 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 1081 1082 1083 // ::com::sun::star::awt::XCurrencyField 1084 void SAL_CALL setValue( double Value ); 1085 double SAL_CALL getValue( ); 1086 void SAL_CALL setMin( double Value ); 1087 double SAL_CALL getMin( ); 1088 void SAL_CALL setMax( double Value ); 1089 double SAL_CALL getMax( ); 1090 void SAL_CALL setFirst( double Value ); 1091 double SAL_CALL getFirst( ); 1092 void SAL_CALL setLast( double Value ); 1093 double SAL_CALL getLast( ); 1094 void SAL_CALL setSpinSize( double Value ); 1095 double SAL_CALL getSpinSize( ); 1096 void SAL_CALL setDecimalDigits( sal_Int16 nDigits ); 1097 sal_Int16 SAL_CALL getDecimalDigits( ); 1098 void SAL_CALL setStrictFormat( sal_Bool bStrict ); 1099 sal_Bool SAL_CALL isStrictFormat( ); 1100 1101 // ::com::sun::star::awt::VclWindowPeer 1102 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 1103 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 1104 1105 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)1106 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 1107 }; 1108 1109 // ---------------------------------------------------- 1110 // class VCLXPatternField 1111 // ---------------------------------------------------- 1112 class VCLXPatternField : public ::com::sun::star::awt::XPatternField, 1113 public VCLXFormattedSpinField 1114 { 1115 public: 1116 VCLXPatternField(); 1117 ~VCLXPatternField(); 1118 1119 // ::com::sun::star::uno::XInterface 1120 ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ); acquire()1121 void SAL_CALL acquire() throw() { OWeakObject::acquire(); } release()1122 void SAL_CALL release() throw() { OWeakObject::release(); } 1123 1124 // ::com::sun::star::lang::XTypeProvider 1125 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(); 1126 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(); 1127 1128 1129 // ::com::sun::star::awt::XPatternField 1130 void SAL_CALL setMasks( const ::rtl::OUString& EditMask, const ::rtl::OUString& LiteralMask ); 1131 void SAL_CALL getMasks( ::rtl::OUString& EditMask, ::rtl::OUString& LiteralMask ); 1132 void SAL_CALL setString( const ::rtl::OUString& Str ); 1133 ::rtl::OUString SAL_CALL getString( ); 1134 void SAL_CALL setStrictFormat( sal_Bool bStrict ); 1135 sal_Bool SAL_CALL isStrictFormat( ); 1136 1137 // ::com::sun::star::awt::VclWindowPeer 1138 void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ); 1139 ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ); 1140 1141 static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); GetPropertyIds(std::list<sal_uInt16> & aIds)1142 virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } 1143 }; 1144 1145 // ---------------------------------------------------- 1146 // class VCLXToolBox 1147 // ---------------------------------------------------- 1148 class VCLXToolBox : public VCLXWindow 1149 { 1150 private: 1151 1152 protected: 1153 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > 1154 CreateAccessibleContext(); 1155 1156 public: 1157 VCLXToolBox(); 1158 ~VCLXToolBox(); 1159 }; 1160 1161 #endif // _TOOLKIT_AWT_VCLXWINDOWS_HXX_ 1162