bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / actctrl.hxx
blob223516670c72e0ca4450e551f066f6f9c6c9251d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _ACTCTRL_HXX
20 #define _ACTCTRL_HXX
22 #include <vcl/field.hxx>
23 #include "swdllapi.h"
25 /*--------------------------------------------------------------------
26 Description: numerical input
27 --------------------------------------------------------------------*/
28 class SW_DLLPUBLIC NumEditAction: public NumericField
30 Link aActionLink;
32 protected:
33 virtual void Action();
34 virtual long Notify( NotifyEvent& rNEvt );
35 public:
36 NumEditAction( Window* pParent, const ResId& rResId ) :
37 NumericField(pParent, rResId) {}
39 void SetActionHdl( const Link& rLink ) { aActionLink = rLink;}
40 const Link& GetActionHdl() const { return aActionLink; }
44 /* --------------------------------------------------
45 * Edit that doesn't accept spaces
46 * --------------------------------------------------*/
47 class SW_DLLPUBLIC NoSpaceEdit : public Edit
49 String sForbiddenChars;
50 protected:
51 virtual void KeyInput( const KeyEvent& );
52 virtual void Modify();
54 public:
55 NoSpaceEdit( Window* pParent, const ResId& rResId);
56 NoSpaceEdit( Window* pParent );
57 virtual ~NoSpaceEdit();
58 void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
59 const String& GetForbiddenChars(){return sForbiddenChars;}
62 /* --------------------------------------------------
63 * No space and no full stop
64 * --------------------------------------------------*/
65 class TableNameEdit : public NoSpaceEdit
67 public:
68 TableNameEdit(Window* pWin, const ResId& rResId)
69 : NoSpaceEdit(pWin, rResId)
71 SetForbiddenChars(OUString(" .<>"));
73 TableNameEdit(Window* pWin)
74 : NoSpaceEdit(pWin)
76 SetForbiddenChars(OUString(" .<>"));
80 /* --------------------------------------------------
81 call a link when KEY_RETURN is pressed
82 --------------------------------------------------*/
83 class SW_DLLPUBLIC ReturnActionEdit : public Edit
85 Link aReturnActionLink;
86 public:
87 ReturnActionEdit( Window* pParent, const ResId& rResId)
88 : Edit(pParent, rResId){}
89 ~ReturnActionEdit();
90 virtual void KeyInput( const KeyEvent& );
92 void SetReturnActionLink(const Link& rLink)
93 { aReturnActionLink = rLink;}
96 #endif
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */