2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 18:44:16 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:44:16 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:44:16 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:44:16 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:44:16 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:44:16 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _ACTCTRL_HXX
|
|
|
|
#define _ACTCTRL_HXX
|
|
|
|
|
|
|
|
#include <vcl/field.hxx>
|
2004-08-23 07:56:31 +00:00
|
|
|
#include "swdllapi.h"
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: numerische Eingabe
|
|
|
|
--------------------------------------------------------------------*/
|
2004-09-27 10:55:59 +00:00
|
|
|
class SW_DLLPUBLIC NumEditAction: public NumericField
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
Link aActionLink;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void Action();
|
|
|
|
virtual long Notify( NotifyEvent& rNEvt );
|
|
|
|
public:
|
|
|
|
NumEditAction( Window* pParent, const ResId& rResId ) :
|
|
|
|
NumericField(pParent, rResId) {}
|
|
|
|
|
|
|
|
void SetActionHdl( const Link& rLink ) { aActionLink = rLink;}
|
|
|
|
const Link& GetActionHdl() const { return aActionLink; }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* -----------------21.04.98 08:11-------------------
|
|
|
|
* Edit, dass keine Spaces akzeptiert
|
|
|
|
* --------------------------------------------------*/
|
2004-08-23 07:56:31 +00:00
|
|
|
class SW_DLLPUBLIC NoSpaceEdit : public Edit
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
String sForbiddenChars;
|
|
|
|
protected:
|
|
|
|
virtual void KeyInput( const KeyEvent& );
|
|
|
|
virtual void Modify();
|
|
|
|
|
|
|
|
public:
|
2009-09-11 09:17:29 +00:00
|
|
|
NoSpaceEdit( Window* pParent, const ResId& rResId);
|
|
|
|
virtual ~NoSpaceEdit();
|
2000-09-18 16:15:01 +00:00
|
|
|
void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
|
|
|
|
const String& GetForbiddenChars(){return sForbiddenChars;}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* -----------------21.04.98 08:33-------------------
|
|
|
|
* Kein Space und kein Punkt
|
|
|
|
* --------------------------------------------------*/
|
|
|
|
class TableNameEdit : public NoSpaceEdit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TableNameEdit(Window* pWin, const ResId& rResId) :
|
|
|
|
NoSpaceEdit(pWin, rResId)
|
|
|
|
{SetForbiddenChars(String::CreateFromAscii(" .<>"));}
|
|
|
|
};
|
2010-10-13 10:32:10 +05:30
|
|
|
|
2003-06-30 14:57:24 +00:00
|
|
|
/* -----------------25.06.2003 15:55-----------------
|
|
|
|
call a link when KEY_RETURN is pressed
|
|
|
|
--------------------------------------------------*/
|
2004-08-23 07:56:31 +00:00
|
|
|
class SW_DLLPUBLIC ReturnActionEdit : public Edit
|
2003-06-30 14:57:24 +00:00
|
|
|
{
|
|
|
|
Link aReturnActionLink;
|
|
|
|
public:
|
|
|
|
ReturnActionEdit( Window* pParent, const ResId& rResId)
|
|
|
|
: Edit(pParent, rResId){}
|
|
|
|
~ReturnActionEdit();
|
|
|
|
virtual void KeyInput( const KeyEvent& );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-11-16 16:00:00 +00:00
|
|
|
void SetReturnActionLink(const Link& rLink)
|
2003-06-30 14:57:24 +00:00
|
|
|
{ aReturnActionLink = rLink;}
|
|
|
|
};
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#endif
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|