2 * Copyright 2006 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus, superstippi@gmx.de
8 #ifndef EXPRESSION_TEXT_VIEW_H
9 #define EXPRESSION_TEXT_VIEW_H
15 #include "InputTextView.h"
20 class ExpressionTextView
: public InputTextView
{
22 ExpressionTextView(BRect frame
,
24 virtual ~ExpressionTextView();
27 virtual void MakeFocus(bool focused
= true);
28 virtual void KeyDown(const char* bytes
, int32 numBytes
);
30 virtual void MouseDown(BPoint where
);
33 virtual void GetDragParameters(BMessage
* dragMessage
,
34 BBitmap
** bitmap
, BPoint
* point
,
36 void SetTextRect(BRect rect
);
39 virtual void RevertChanges();
40 virtual void ApplyChanges();
43 void AddKeypadLabel(const char* label
);
45 void SetExpression(const char* expression
);
46 void SetValue(BString value
);
51 void AddExpressionToHistory(const char* expression
);
52 void PreviousExpression();
53 void NextExpression();
55 void LoadSettings(const BMessage
* archive
);
56 status_t
SaveSettings(BMessage
* archive
) const;
60 BString fKeypadLabels
;
62 BList fPreviousExpressions
;
64 BString fCurrentExpression
;
65 BString fCurrentValue
;
70 #endif // EXPRESSION_TEXT_VIEW_H