1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: actctrl.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 #ifndef _FIELD_HXX //autogen
34 #include <vcl/field.hxx>
38 /*--------------------------------------------------------------------
39 Beschreibung: numerische Eingabe
40 --------------------------------------------------------------------*/
42 class SW_DLLPUBLIC NumEditAction
: public NumericField
47 virtual void Action();
48 virtual long Notify( NotifyEvent
& rNEvt
);
50 NumEditAction( Window
* pParent
, const ResId
& rResId
) :
51 NumericField(pParent
, rResId
) {}
53 void SetActionHdl( const Link
& rLink
) { aActionLink
= rLink
;}
54 const Link
& GetActionHdl() const { return aActionLink
; }
58 /* -----------------21.04.98 08:11-------------------
59 * Edit, dass keine Spaces akzeptiert
60 * --------------------------------------------------*/
61 class SW_DLLPUBLIC NoSpaceEdit
: public Edit
63 String sForbiddenChars
;
65 virtual void KeyInput( const KeyEvent
& );
66 virtual void Modify();
69 NoSpaceEdit( Window
* pParent
, const ResId
& rResId
);
70 virtual ~NoSpaceEdit();
71 void SetForbiddenChars(const String
& rSet
){sForbiddenChars
= rSet
;}
72 const String
& GetForbiddenChars(){return sForbiddenChars
;}
75 /* -----------------21.04.98 08:33-------------------
76 * Kein Space und kein Punkt
77 * --------------------------------------------------*/
78 class TableNameEdit
: public NoSpaceEdit
81 TableNameEdit(Window
* pWin
, const ResId
& rResId
) :
82 NoSpaceEdit(pWin
, rResId
)
83 {SetForbiddenChars(String::CreateFromAscii(" .<>"));}
85 /* -----------------25.06.2003 15:55-----------------
86 call a link when KEY_RETURN is pressed
87 --------------------------------------------------*/
88 class SW_DLLPUBLIC ReturnActionEdit
: public Edit
90 Link aReturnActionLink
;
92 ReturnActionEdit( Window
* pParent
, const ResId
& rResId
)
93 : Edit(pParent
, rResId
){}
95 virtual void KeyInput( const KeyEvent
& );
97 void SetReturnActionLink(const Link
& rLink
)
98 { aReturnActionLink
= rLink
;}