1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifdef SOLAR_JAVA 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #ifndef _SFXSFXJS_HXX 31*cdf0e10cSrcweir #include <sfx2/sfxjs.hxx> 32*cdf0e10cSrcweir #endif 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir class VCControl; 35*cdf0e10cSrcweir class VCForm; 36*cdf0e10cSrcweir class VCManager; 37*cdf0e10cSrcweir class VCRadioManager; 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir // Basis-Klasse aller VCControl-Wrapper-Klassen 41*cdf0e10cSrcweir // Haelt Verweis auf das Control und handelt einige gemeinsame Properties 42*cdf0e10cSrcweir class ImpSjJScriptControlBase 43*cdf0e10cSrcweir { 44*cdf0e10cSrcweir protected: 45*cdf0e10cSrcweir VCControl* pControl; 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir public: 48*cdf0e10cSrcweir // Beibehalten bis zum Vollupdate 49*cdf0e10cSrcweir /* 50*cdf0e10cSrcweir String getName() const; 51*cdf0e10cSrcweir void setName( const String & aStrg ); 52*cdf0e10cSrcweir String getValue() const; 53*cdf0e10cSrcweir String getType() const; 54*cdf0e10cSrcweir */ 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 57*cdf0e10cSrcweir //-------------------------------------------- 58*cdf0e10cSrcweir String ImpGetName() const; 59*cdf0e10cSrcweir void ImpSetName( const String & aStrg ); 60*cdf0e10cSrcweir String ImpGetValue() const; 61*cdf0e10cSrcweir void ImpSetValue( const String & aStrg ); 62*cdf0e10cSrcweir String ImpGetType() const; 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir // Konstruktor 65*cdf0e10cSrcweir ImpSjJScriptControlBase::ImpSjJScriptControlBase( VCControl* _pControl ); 66*cdf0e10cSrcweir }; 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir // Button-Control 71*cdf0e10cSrcweir class ImpSjJScriptButtonObject : public SjJScriptButtonObject, ImpSjJScriptControlBase 72*cdf0e10cSrcweir { 73*cdf0e10cSrcweir public: 74*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 75*cdf0e10cSrcweir //-------------------------------------------- 76*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 77*cdf0e10cSrcweir virtual String getName() const; 78*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 79*cdf0e10cSrcweir virtual String getValue() const; 80*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 81*cdf0e10cSrcweir virtual String getType() const; 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir // Methoden des Objektes 84*cdf0e10cSrcweir virtual void click(); 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir // Events (C++ --> Java) 87*cdf0e10cSrcweir //---------------------- 88*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 89*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnClick_Fct() const; 90*cdf0e10cSrcweir virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); 91*cdf0e10cSrcweir virtual String getOnClick() const; 92*cdf0e10cSrcweir virtual void setOnClick( const String & aSourceStrg ); 93*cdf0e10cSrcweir void onClick(); 94*cdf0e10cSrcweir 95*cdf0e10cSrcweir // Konstruktor 96*cdf0e10cSrcweir ImpSjJScriptButtonObject( VCControl* _pControl, SjJSbxObject * p ); 97*cdf0e10cSrcweir }; 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir // PasswordControl (Edit-Control zur Password-Eingabe) 102*cdf0e10cSrcweir class ImpSjJScriptPasswordObject : public SjJScriptPasswordObject, ImpSjJScriptControlBase 103*cdf0e10cSrcweir { 104*cdf0e10cSrcweir public: 105*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 106*cdf0e10cSrcweir //-------------------------------------------- 107*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 108*cdf0e10cSrcweir virtual String getName() const; 109*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 110*cdf0e10cSrcweir virtual String getValue() const; 111*cdf0e10cSrcweir virtual String getType() const; 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir virtual String getDefaultValue() const; 114*cdf0e10cSrcweir virtual void setDefaultValue( const String & aStrg ); 115*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir // Methoden des Objektes 118*cdf0e10cSrcweir virtual void focus(); 119*cdf0e10cSrcweir virtual void blur(); 120*cdf0e10cSrcweir virtual void select(); 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir // Events (C++ --> Java) 123*cdf0e10cSrcweir //---------------------- 124*cdf0e10cSrcweir // keine ! 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir // Konstruktor 127*cdf0e10cSrcweir ImpSjJScriptPasswordObject( VCControl* _pControl, SjJSbxObject * p ); 128*cdf0e10cSrcweir }; 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir class ImpSjJScriptCheckboxObject : public SjJScriptCheckboxObject, ImpSjJScriptControlBase 133*cdf0e10cSrcweir { 134*cdf0e10cSrcweir public: 135*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 136*cdf0e10cSrcweir //-------------------------------------------- 137*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 138*cdf0e10cSrcweir virtual String getName() const; 139*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 140*cdf0e10cSrcweir virtual String getValue() const; 141*cdf0e10cSrcweir virtual String getType() const; 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir virtual sal_Bool getChecked() const; 144*cdf0e10cSrcweir virtual void setChecked( sal_Bool bCheck ); 145*cdf0e10cSrcweir virtual sal_Bool getDefaultChecked() const; 146*cdf0e10cSrcweir virtual void setDefaultChecked( sal_Bool bCheck ); 147*cdf0e10cSrcweir // getValue() wird in der Basisklasse definiert 148*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir // Methoden des Objektes 151*cdf0e10cSrcweir virtual void click(); 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir // Events (C++ --> Java) 154*cdf0e10cSrcweir //---------------------- 155*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 156*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnClick_Fct() const; 157*cdf0e10cSrcweir virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); 158*cdf0e10cSrcweir virtual String getOnClick() const; 159*cdf0e10cSrcweir virtual void setOnClick( const String & aSourceStrg ); 160*cdf0e10cSrcweir void onClick(); 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir // Konstruktor 163*cdf0e10cSrcweir ImpSjJScriptCheckboxObject( VCControl* _pControl, SjJSbxObject * p ); 164*cdf0e10cSrcweir }; 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir // Wrapper-Klasse fuer RadioArray 169*cdf0e10cSrcweir class ImpSjJScriptRadioArray: public SjJSbxArrayObject 170*cdf0e10cSrcweir { 171*cdf0e10cSrcweir VCRadioManager* pMgr; 172*cdf0e10cSrcweir public: 173*cdf0e10cSrcweir sal_Int32 ImpSjJScriptRadioArray::getLength() const; 174*cdf0e10cSrcweir SjJSbxObject* ImpSjJScriptRadioArray::getElement( sal_Int32 nIndex ) const; 175*cdf0e10cSrcweir SjJSbxObject* ImpSjJScriptRadioArray::getElement_String( const String & aName ) const; 176*cdf0e10cSrcweir 177*cdf0e10cSrcweir // Konstruktor 178*cdf0e10cSrcweir ImpSjJScriptRadioArray::ImpSjJScriptRadioArray( VCRadioManager* _pMgr, SjJSbxObject * p ); 179*cdf0e10cSrcweir }; 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 182*cdf0e10cSrcweir 183*cdf0e10cSrcweir class ImpSjJScriptRadioObject : public SjJScriptRadioObject, ImpSjJScriptControlBase 184*cdf0e10cSrcweir { 185*cdf0e10cSrcweir public: 186*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 187*cdf0e10cSrcweir //-------------------------------------------- 188*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 189*cdf0e10cSrcweir virtual String getName() const; 190*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 191*cdf0e10cSrcweir virtual String getValue() const; 192*cdf0e10cSrcweir virtual String getType() const; 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir // Properties von SjJScriptCheckboxObject 195*cdf0e10cSrcweir virtual sal_Bool getChecked() const; 196*cdf0e10cSrcweir virtual void setChecked( sal_Bool bCheck ); 197*cdf0e10cSrcweir virtual sal_Bool getDefaultChecked() const; 198*cdf0e10cSrcweir virtual void setDefaultChecked( sal_Bool bCheck ); 199*cdf0e10cSrcweir // getValue() wird in der Basisklasse definiert 200*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir // yyy Raus zum inkompatiblen 203*cdf0e10cSrcweir //virtual sal_Int32 getLength(); 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir // Methoden des Objektes 206*cdf0e10cSrcweir virtual void click(); 207*cdf0e10cSrcweir 208*cdf0e10cSrcweir // Events (C++ --> Java) 209*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 210*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnClick_Fct() const; 211*cdf0e10cSrcweir virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); 212*cdf0e10cSrcweir virtual String getOnClick() const; 213*cdf0e10cSrcweir virtual void setOnClick( const String & aSourceStrg ); 214*cdf0e10cSrcweir void onClick(); 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir // Konstruktor 217*cdf0e10cSrcweir ImpSjJScriptRadioObject( VCControl* _pControl, SjJSbxObject * p ); 218*cdf0e10cSrcweir }; 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir class ImpSjJScriptSelectObject : public SjJScriptSelectObject, ImpSjJScriptControlBase 223*cdf0e10cSrcweir { 224*cdf0e10cSrcweir public: 225*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 226*cdf0e10cSrcweir //-------------------------------------------- 227*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 228*cdf0e10cSrcweir virtual String getName() const; 229*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 230*cdf0e10cSrcweir virtual String getValue() const; 231*cdf0e10cSrcweir virtual String getType() const; 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir virtual sal_Int32 getLength(); 234*cdf0e10cSrcweir virtual sal_Int32 getSelectedIndex() const; 235*cdf0e10cSrcweir virtual void setSelectedIndex( sal_Int32 nNo ); 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir // liefert eine Array von Option-Objekten 238*cdf0e10cSrcweir //yyy Raus zum inkompatiblen 239*cdf0e10cSrcweir //virtual SjJSbxArrayObject * getOptions(); 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir // Methoden des Objektes 242*cdf0e10cSrcweir virtual void focus(); 243*cdf0e10cSrcweir virtual void blur(); 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir // Events (C++ --> Java) 246*cdf0e10cSrcweir //---------------------- 247*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 248*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnBlur_Fct() const; 249*cdf0e10cSrcweir virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject ); 250*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnChange_Fct() const; 251*cdf0e10cSrcweir virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject ); 252*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnFocus_Fct() const; 253*cdf0e10cSrcweir virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject ); 254*cdf0e10cSrcweir virtual String getOnBlur() const; 255*cdf0e10cSrcweir virtual void setOnBlur( const String & aSourceStrg ); 256*cdf0e10cSrcweir void onBlur(); 257*cdf0e10cSrcweir virtual String getOnChange() const; 258*cdf0e10cSrcweir virtual void setOnChange( const String & aSourceStrg ); 259*cdf0e10cSrcweir void onChange(); 260*cdf0e10cSrcweir virtual String getOnFocus() const; 261*cdf0e10cSrcweir virtual void setOnFocus( const String & aSourceStrg ); 262*cdf0e10cSrcweir void onFocus(); 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir // SjJSbxArrayObject-Methoden 265*cdf0e10cSrcweir virtual sal_Int32 getLength() const; 266*cdf0e10cSrcweir // Zugriff "uber den Index 267*cdf0e10cSrcweir virtual SjJSbxObject * getElement( sal_Int32 nIndex ) const; 268*cdf0e10cSrcweir // Zugriff "uber den Namen 269*cdf0e10cSrcweir // native Java-Methoden k"onnen (noch) nicht "uberladen werden 270*cdf0e10cSrcweir //virtual SjJSbxObject * getElement_String( const String & aName ) const; 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir // Konstruktor 273*cdf0e10cSrcweir ImpSjJScriptSelectObject( VCControl* _pControl, SjJSbxObject * p ); 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir // zum Setzen von Eintr"agen am Objket (zum Aufruf von Java aus) 15.1.1997 276*cdf0e10cSrcweir virtual void setOption( sal_Int32 nIndex, const String & aOptionText, 277*cdf0e10cSrcweir const String & aOptionValue, 278*cdf0e10cSrcweir sal_Bool bDefaultSelected, sal_Bool bSelected ); 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir // Schnittstelle fuer die Properties der Option-Objekte 281*cdf0e10cSrcweir virtual sal_Bool getOptionDefaultSelected( sal_Int32 nIndex ) const; 282*cdf0e10cSrcweir virtual void setOptionDefaultSelected( sal_Bool bSelected, sal_Int32 nIndex ); 283*cdf0e10cSrcweir virtual sal_Bool getOptionSelected( sal_Int32 nIndex ) const; 284*cdf0e10cSrcweir virtual void setOptionSelected( sal_Bool bSelected, sal_Int32 nIndex ); 285*cdf0e10cSrcweir virtual String getOptionText( sal_Int32 nIndex ) const; 286*cdf0e10cSrcweir virtual void setOptionText( const String & sText, sal_Int32 nIndex ); 287*cdf0e10cSrcweir virtual void setOptionValue( const String & sText, sal_Int32 nIndex ); 288*cdf0e10cSrcweir virtual String getOptionValue( sal_Int32 nIndex ) const; 289*cdf0e10cSrcweir }; 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 292*cdf0e10cSrcweir 293*cdf0e10cSrcweir // Wieso von Controlbase abgeleitet? 294*cdf0e10cSrcweir 295*cdf0e10cSrcweir class ImpSjJScriptOptionObject : public SjJScriptOptionObject, ImpSjJScriptControlBase 296*cdf0e10cSrcweir { 297*cdf0e10cSrcweir sal_uInt16 nListBoxIndex; 298*cdf0e10cSrcweir public: 299*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 300*cdf0e10cSrcweir //-------------------------------------------- 301*cdf0e10cSrcweir virtual sal_Bool getdefaultSelected() const; 302*cdf0e10cSrcweir virtual void setdefaultSelected( sal_Bool bSelected ); 303*cdf0e10cSrcweir virtual sal_Int32 getIndex() const; 304*cdf0e10cSrcweir virtual sal_Bool getSelected() const; 305*cdf0e10cSrcweir virtual void setSelected( sal_Bool bSelected ); 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir 308*cdf0e10cSrcweir //yyy Zum Vollupdate raus: 309*cdf0e10cSrcweir /* 310*cdf0e10cSrcweir virtual sal_Int32 getSelectedIndex() const; 311*cdf0e10cSrcweir virtual void setSelectedIndex( sal_Int32 nNo ); 312*cdf0e10cSrcweir */ 313*cdf0e10cSrcweir 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir virtual String getText() const; 316*cdf0e10cSrcweir virtual void setText( const String & sText ); 317*cdf0e10cSrcweir // getValue() wird in der Basisklasse definiert 318*cdf0e10cSrcweir virtual String getValue() const; 319*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir // DUMMY-Methoden 323*cdf0e10cSrcweir virtual String getName() const { return "";} 324*cdf0e10cSrcweir virtual void setName( const String &s) { } 325*cdf0e10cSrcweir virtual String getType() const { return "";} 326*cdf0e10cSrcweir // Methoden des Objektes 327*cdf0e10cSrcweir // keine ! 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir // Events (C++ --> Java) 330*cdf0e10cSrcweir //---------------------- 331*cdf0e10cSrcweir // keine ! 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir // Konstruktor 334*cdf0e10cSrcweir ImpSjJScriptOptionObject( VCControl* _pControl, SjJSbxObject * p, sal_uInt16 _nListBoxIndex ); 335*cdf0e10cSrcweir }; 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir // Eigene Klasse fuer forms-Array anlegen 340*cdf0e10cSrcweir class SjJSbxFormsArray: public SfxJSArray 341*cdf0e10cSrcweir { 342*cdf0e10cSrcweir VCManager* pManager; 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir public: 345*cdf0e10cSrcweir // SjJSbxArrayObject-Methoden 346*cdf0e10cSrcweir virtual sal_Int32 getLength() const; 347*cdf0e10cSrcweir // Zugriff "uber den Index 348*cdf0e10cSrcweir virtual SjJSbxObject * getElement( sal_Int32 nIndex ) const; 349*cdf0e10cSrcweir // Zugriff "uber den Namen 350*cdf0e10cSrcweir // native Java-Methoden k"onnen (noch) nicht "uberladen werden 351*cdf0e10cSrcweir virtual SjJSbxObject * getElement_String( const String & aName ) const; 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir // Konstruktor 354*cdf0e10cSrcweir SjJSbxFormsArray( VCManager * _pManager, SjJSbxObject * p ); 355*cdf0e10cSrcweir }; 356*cdf0e10cSrcweir 357*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 358*cdf0e10cSrcweir 359*cdf0e10cSrcweir class ImpSjJScriptTextObject : public SjJScriptTextObject, ImpSjJScriptControlBase 360*cdf0e10cSrcweir { 361*cdf0e10cSrcweir public: 362*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 363*cdf0e10cSrcweir //-------------------------------------------- 364*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 365*cdf0e10cSrcweir virtual String getName() const; 366*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 367*cdf0e10cSrcweir virtual String getValue() const; 368*cdf0e10cSrcweir virtual String getType() const; 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir virtual String getDefaultValue() const; 371*cdf0e10cSrcweir virtual void setDefaultValue( const String & aStrg ); 372*cdf0e10cSrcweir // getValue() wird in der Basisklasse definiert 373*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 374*cdf0e10cSrcweir 375*cdf0e10cSrcweir // Methoden des Objektes 376*cdf0e10cSrcweir virtual void focus(); 377*cdf0e10cSrcweir virtual void blur(); 378*cdf0e10cSrcweir virtual void select(); 379*cdf0e10cSrcweir 380*cdf0e10cSrcweir // Events (C++ --> Java) 381*cdf0e10cSrcweir //---------------------- 382*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 383*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnBlur_Fct() const; 384*cdf0e10cSrcweir virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject ); 385*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnChange_Fct() const; 386*cdf0e10cSrcweir virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject ); 387*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnFocus_Fct() const; 388*cdf0e10cSrcweir virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject ); 389*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnSelect_Fct() const; 390*cdf0e10cSrcweir virtual void setOnSelect_Fct( SjJScriptFunctionObject* pFunctionObject ); 391*cdf0e10cSrcweir virtual String getOnBlur() const; 392*cdf0e10cSrcweir virtual void setOnBlur( const String & aSourceStrg ); 393*cdf0e10cSrcweir void onBlur(); 394*cdf0e10cSrcweir virtual String getOnChange() const; 395*cdf0e10cSrcweir virtual void setOnChange( const String & aSourceStrg ); 396*cdf0e10cSrcweir void onChange(); 397*cdf0e10cSrcweir virtual String getOnFocus() const; 398*cdf0e10cSrcweir virtual void setOnFocus( const String & aSourceStrg ); 399*cdf0e10cSrcweir void onFocus(); 400*cdf0e10cSrcweir virtual String getOnSelect() const; 401*cdf0e10cSrcweir virtual void setOnSelect( const String & aSourceStrg ); 402*cdf0e10cSrcweir void onSelect(); 403*cdf0e10cSrcweir 404*cdf0e10cSrcweir // Konstruktor 405*cdf0e10cSrcweir ImpSjJScriptTextObject( VCControl* _pControl, SjJSbxObject * p ); 406*cdf0e10cSrcweir }; 407*cdf0e10cSrcweir 408*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 409*cdf0e10cSrcweir 410*cdf0e10cSrcweir class ImpSjJScriptTextareaObject : public SjJScriptTextareaObject, ImpSjJScriptControlBase 411*cdf0e10cSrcweir { 412*cdf0e10cSrcweir public: 413*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 414*cdf0e10cSrcweir //-------------------------------------------- 415*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 416*cdf0e10cSrcweir virtual String getName() const; 417*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 418*cdf0e10cSrcweir virtual String getValue() const; 419*cdf0e10cSrcweir virtual String getType() const; 420*cdf0e10cSrcweir 421*cdf0e10cSrcweir virtual String getDefaultValue() const; 422*cdf0e10cSrcweir virtual void setDefaultValue( const String & aStrg ); 423*cdf0e10cSrcweir // getValue() wird in der Basisklasse definiert 424*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 425*cdf0e10cSrcweir 426*cdf0e10cSrcweir // Methoden des Objektes 427*cdf0e10cSrcweir virtual void focus(); 428*cdf0e10cSrcweir virtual void blur(); 429*cdf0e10cSrcweir virtual void select(); 430*cdf0e10cSrcweir 431*cdf0e10cSrcweir // Events (C++ --> Java) 432*cdf0e10cSrcweir //---------------------- 433*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 434*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnBlur_Fct() const; 435*cdf0e10cSrcweir virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject ); 436*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnChange_Fct() const; 437*cdf0e10cSrcweir virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject ); 438*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnFocus_Fct() const; 439*cdf0e10cSrcweir virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject ); 440*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnSelect_Fct() const; 441*cdf0e10cSrcweir virtual void setOnSelect_Fct( SjJScriptFunctionObject* pFunctionObject ); 442*cdf0e10cSrcweir virtual String getOnBlur() const; 443*cdf0e10cSrcweir virtual void setOnBlur( const String & aSourceStrg ); 444*cdf0e10cSrcweir void onBlur(); 445*cdf0e10cSrcweir virtual String getOnChange() const; 446*cdf0e10cSrcweir virtual void setOnChange( const String & aSourceStrg ); 447*cdf0e10cSrcweir void onChange(); 448*cdf0e10cSrcweir virtual String getOnFocus() const; 449*cdf0e10cSrcweir virtual void setOnFocus( const String & aSourceStrg ); 450*cdf0e10cSrcweir void onFocus(); 451*cdf0e10cSrcweir virtual String getOnSelect() const; 452*cdf0e10cSrcweir virtual void setOnSelect( const String & aSourceStrg ); 453*cdf0e10cSrcweir void onSelect(); 454*cdf0e10cSrcweir 455*cdf0e10cSrcweir // Konstruktor 456*cdf0e10cSrcweir ImpSjJScriptTextareaObject( VCControl* _pControl, SjJSbxObject * p ); 457*cdf0e10cSrcweir }; 458*cdf0e10cSrcweir 459*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 460*cdf0e10cSrcweir 461*cdf0e10cSrcweir class ImpSjJScriptSubmitObject : public SjJScriptSubmitObject, ImpSjJScriptControlBase 462*cdf0e10cSrcweir { 463*cdf0e10cSrcweir // Identisch mit ButtonObject 464*cdf0e10cSrcweir public: 465*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 466*cdf0e10cSrcweir //-------------------------------------------- 467*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 468*cdf0e10cSrcweir virtual String getName() const; 469*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 470*cdf0e10cSrcweir virtual String getValue() const; 471*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 472*cdf0e10cSrcweir virtual String getType() const; 473*cdf0e10cSrcweir 474*cdf0e10cSrcweir // Methoden des Objektes 475*cdf0e10cSrcweir virtual void click(); 476*cdf0e10cSrcweir 477*cdf0e10cSrcweir // Events (C++ --> Java) 478*cdf0e10cSrcweir //---------------------- 479*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 480*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnClick_Fct() const; 481*cdf0e10cSrcweir virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); 482*cdf0e10cSrcweir virtual String getOnClick() const; 483*cdf0e10cSrcweir virtual void setOnClick( const String & aSourceStrg ); 484*cdf0e10cSrcweir void onClick(); 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir // Konstruktor 487*cdf0e10cSrcweir ImpSjJScriptSubmitObject( VCControl* _pControl, SjJSbxObject * p ); 488*cdf0e10cSrcweir }; 489*cdf0e10cSrcweir 490*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 491*cdf0e10cSrcweir 492*cdf0e10cSrcweir class ImpSjJScriptResetObject : public SjJScriptResetObject, ImpSjJScriptControlBase 493*cdf0e10cSrcweir { 494*cdf0e10cSrcweir // Identisch mit ButtonObject 495*cdf0e10cSrcweir public: 496*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 497*cdf0e10cSrcweir //-------------------------------------------- 498*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 499*cdf0e10cSrcweir virtual String getName() const; 500*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 501*cdf0e10cSrcweir virtual String getValue() const; 502*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 503*cdf0e10cSrcweir virtual String getType() const; 504*cdf0e10cSrcweir 505*cdf0e10cSrcweir // Methoden des Objektes 506*cdf0e10cSrcweir virtual void click(); 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir // Events (C++ --> Java) 509*cdf0e10cSrcweir //---------------------- 510*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 511*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnClick_Fct() const; 512*cdf0e10cSrcweir virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject ); 513*cdf0e10cSrcweir virtual String getOnClick() const; 514*cdf0e10cSrcweir virtual void setOnClick( const String & aSourceStrg ); 515*cdf0e10cSrcweir void onClick(); 516*cdf0e10cSrcweir 517*cdf0e10cSrcweir // Konstruktor 518*cdf0e10cSrcweir ImpSjJScriptResetObject( VCControl* _pControl, SjJSbxObject * p ); 519*cdf0e10cSrcweir }; 520*cdf0e10cSrcweir 521*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 522*cdf0e10cSrcweir 523*cdf0e10cSrcweir class ImpSjJScriptHiddenObject : public SjJScriptHiddenObject, ImpSjJScriptControlBase 524*cdf0e10cSrcweir { 525*cdf0e10cSrcweir public: 526*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 527*cdf0e10cSrcweir //-------------------------------------------- 528*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 529*cdf0e10cSrcweir virtual String getName() const; 530*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 531*cdf0e10cSrcweir virtual String getValue() const; 532*cdf0e10cSrcweir virtual String getType() const; 533*cdf0e10cSrcweir 534*cdf0e10cSrcweir // getValue() wird in der Basisklasse definiert 535*cdf0e10cSrcweir virtual void setValue( const String & aStrg ); 536*cdf0e10cSrcweir 537*cdf0e10cSrcweir // Methoden des Objektes 538*cdf0e10cSrcweir // keine ! 539*cdf0e10cSrcweir 540*cdf0e10cSrcweir // Events (C++ --> Java) 541*cdf0e10cSrcweir //---------------------- 542*cdf0e10cSrcweir // keine ! 543*cdf0e10cSrcweir 544*cdf0e10cSrcweir // Konstruktor 545*cdf0e10cSrcweir ImpSjJScriptHiddenObject( VCControl* _pControl, SjJSbxObject * p ); 546*cdf0e10cSrcweir }; 547*cdf0e10cSrcweir 548*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 549*cdf0e10cSrcweir 550*cdf0e10cSrcweir class ImpSjJScriptFileUploadObject : public SjJScriptFileUploadObject, ImpSjJScriptControlBase 551*cdf0e10cSrcweir { 552*cdf0e10cSrcweir public: 553*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 554*cdf0e10cSrcweir //-------------------------------------------- 555*cdf0e10cSrcweir // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht 556*cdf0e10cSrcweir virtual String getName() const; 557*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 558*cdf0e10cSrcweir virtual String getValue() const; 559*cdf0e10cSrcweir virtual String getType() const; 560*cdf0e10cSrcweir 561*cdf0e10cSrcweir // Methoden des Objektes 562*cdf0e10cSrcweir // keine ! 563*cdf0e10cSrcweir 564*cdf0e10cSrcweir // Events (C++ --> Java) 565*cdf0e10cSrcweir //---------------------- 566*cdf0e10cSrcweir // keine ! 567*cdf0e10cSrcweir 568*cdf0e10cSrcweir // Konstruktor 569*cdf0e10cSrcweir ImpSjJScriptFileUploadObject( VCControl* _pControl, SjJSbxObject * p ); 570*cdf0e10cSrcweir }; 571*cdf0e10cSrcweir 572*cdf0e10cSrcweir //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 573*cdf0e10cSrcweir 574*cdf0e10cSrcweir class ImpSjJScriptFormObject : public SjJScriptFormObject 575*cdf0e10cSrcweir { 576*cdf0e10cSrcweir VCForm* pVCForm; 577*cdf0e10cSrcweir 578*cdf0e10cSrcweir public: 579*cdf0e10cSrcweir // Methoden von Java --> C++ (f"ur Properties) 580*cdf0e10cSrcweir //-------------------------------------------- 581*cdf0e10cSrcweir virtual String getName() const; 582*cdf0e10cSrcweir virtual void setName( const String & aStrg ); 583*cdf0e10cSrcweir virtual String getValue() const; 584*cdf0e10cSrcweir virtual String getType() const; 585*cdf0e10cSrcweir 586*cdf0e10cSrcweir virtual String getAction() const; 587*cdf0e10cSrcweir virtual void setAction( const String & sValue ); 588*cdf0e10cSrcweir virtual String getEncoding() const; 589*cdf0e10cSrcweir virtual void setEncoding( const String & sValue ); 590*cdf0e10cSrcweir virtual String getMethod() const; 591*cdf0e10cSrcweir virtual void setMethod( const String & sValue ); 592*cdf0e10cSrcweir virtual String getTarget() const; 593*cdf0e10cSrcweir virtual void setTarget( const String & sValue ); 594*cdf0e10cSrcweir 595*cdf0e10cSrcweir // SjJSbxArrayObject-Methoden 596*cdf0e10cSrcweir sal_Int32 getLength() const; 597*cdf0e10cSrcweir SjJSbxObject* getElement( sal_Int32 nIndex ) const; 598*cdf0e10cSrcweir SjJSbxObject* getElement_String( const String & aName ) const; 599*cdf0e10cSrcweir 600*cdf0e10cSrcweir // liefert ein Array-Objekt mit Elementen vom Typ JScriptAbstractControlsObject 601*cdf0e10cSrcweir // yyy Raus zum inkompatiblen 602*cdf0e10cSrcweir //virtual SjJSbxArrayObject * getElements(); 603*cdf0e10cSrcweir 604*cdf0e10cSrcweir // Zugriff ueber den Namen eines Controls (falls ein Name zugeordnet ist) 605*cdf0e10cSrcweir // yyy Raus zum inkompatiblen 606*cdf0e10cSrcweir //virtual SjJSbxObject * getElement( const String & aName ); 607*cdf0e10cSrcweir 608*cdf0e10cSrcweir // Methoden des Objektes 609*cdf0e10cSrcweir virtual void submit(); 610*cdf0e10cSrcweir virtual void reset(); 611*cdf0e10cSrcweir 612*cdf0e10cSrcweir // Events (C++ --> Java) 613*cdf0e10cSrcweir //---------------------- 614*cdf0e10cSrcweir // Neue Event-Schnittstelle mit Function-Objekten 615*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnSubmit_Fct() const; 616*cdf0e10cSrcweir virtual void setOnSubmit_Fct( SjJScriptFunctionObject* pFunctionObject ); 617*cdf0e10cSrcweir virtual SjJScriptFunctionObject* getOnReset_Fct() const; 618*cdf0e10cSrcweir virtual void setOnReset_Fct( SjJScriptFunctionObject* pFunctionObject ); 619*cdf0e10cSrcweir virtual String getOnSubmit() const; 620*cdf0e10cSrcweir virtual void setOnSubmit( const String & aSourceStrg ); 621*cdf0e10cSrcweir void onSubmit(); 622*cdf0e10cSrcweir virtual String getOnReset() const; 623*cdf0e10cSrcweir virtual void setOnReset( const String & aSourceStrg ); 624*cdf0e10cSrcweir void onReset(); 625*cdf0e10cSrcweir 626*cdf0e10cSrcweir // Konstruktor 627*cdf0e10cSrcweir ImpSjJScriptFormObject( VCForm* _pVCForm, SjJSbxObject * p ); 628*cdf0e10cSrcweir }; 629*cdf0e10cSrcweir 630*cdf0e10cSrcweir #endif 631