1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 FORMULA_CONTROL_HELPER_HXX_INCLUDED
20 #define FORMULA_CONTROL_HELPER_HXX_INCLUDED
22 #include "formula/funcutl.hxx"
23 #include <svtools/svmedit.hxx>
27 //============================================================================
29 class ValWnd
: public Window
32 ValWnd( Window
* pParent
, const ResId
& rId
);
34 void SetValue( const String
& rStrVal
);
37 virtual void Paint( const Rectangle
& rRect
);
44 //============================================================================
46 class EditBox
: public Control
50 MultiLineEdit
* pMEdit
;
54 DECL_LINK(ChangedHdl
, void *);
58 virtual long PreNotify( NotifyEvent
& rNEvt
);
59 virtual void SelectionChanged();
60 virtual void Resize();
61 virtual void GetFocus();
65 EditBox( Window
* pParent
, const ResId
& rResId
);
69 MultiLineEdit
* GetEdit() {return pMEdit
;}
71 void SetSelChangedHdl( const Link
& rLink
) { aSelChangedLink
= rLink
; }
72 const Link
& GetSelChangedHdl() const { return aSelChangedLink
; }
77 //============================================================================
80 class ArgEdit
: public RefEdit
83 ArgEdit( Window
* pParent
, const ResId
& rResId
);
85 void Init( ArgEdit
* pPrevEdit
, ArgEdit
* pNextEdit
,
86 ScrollBar
& rArgSlider
, sal_uInt16 nArgCount
);
89 virtual void KeyInput( const KeyEvent
& rKEvt
);
99 //============================================================================
118 DECL_LINK( FxBtnClickHdl
, ImageButton
* );
119 DECL_LINK( RefBtnClickHdl
,RefButton
* );
120 DECL_LINK( FxBtnFocusHdl
, ImageButton
* );
121 DECL_LINK( RefBtnFocusHdl
,RefButton
* );
122 DECL_LINK( EdFocusHdl
, ArgEdit
* );
123 DECL_LINK( EdModifyHdl
,ArgEdit
* );
127 virtual void FxClick();
128 virtual void RefClick();
129 virtual void FxFocus();
130 virtual void RefFocus();
131 virtual void EdFocus();
132 virtual void EdModify();
138 virtual ~ArgInput() {}
140 void InitArgInput ( FixedText
* pftArg
,
145 void SetArgName(const String
&aArg
);
147 void SetArgNameFont(const Font
&);
149 void SetArgVal(const String
&aVal
);
152 void SetArgSelection (const Selection
& rSel
);
153 void ReplaceSelOfArg (const String
& rStr
);
155 ArgEdit
* GetArgEdPtr() {return pEdArg
;}
158 void SetFxClickHdl( const Link
& rLink
) { aFxClickLink
= rLink
; }
159 const Link
& GetFxClickHdl() const { return aFxClickLink
; }
161 void SetRefClickHdl( const Link
& rLink
) { aRefClickLink
= rLink
; }
162 const Link
& GetRefClickHdl() const { return aRefClickLink
; }
164 void SetFxFocusHdl( const Link
& rLink
) { aFxFocusLink
= rLink
; }
165 const Link
& GetFxFocusHdl() const { return aFxFocusLink
; }
167 void SetRefFocusHdl( const Link
& rLink
) { aRefFocusLink
= rLink
; }
168 const Link
& GetRefFocusHdl() const { return aRefFocusLink
; }
170 void SetEdFocusHdl( const Link
& rLink
) { aEdFocusLink
= rLink
; }
171 const Link
& GetEdFocusHdl() const { return aEdFocusLink
; }
173 void SetEdModifyHdl( const Link
& rLink
) { aEdModifyLink
= rLink
; }
174 const Link
& GetEdModifyHdl() const { return aEdModifyLink
; }
182 #endif // FORMULA_FORMULA_HELPER_HXX_INCLUDED
184 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */