HaikuDepot: notify work status from main window
[haiku.git] / src / apps / deskcalc / ExpressionTextView.h
blob0030a92fc5b60c88cd79af631fe18ff14db0a8eb
1 /*
2 * Copyright 2006 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus, superstippi@gmx.de
7 */
8 #ifndef EXPRESSION_TEXT_VIEW_H
9 #define EXPRESSION_TEXT_VIEW_H
12 #include <List.h>
13 #include <String.h>
15 #include "InputTextView.h"
18 class CalcView;
20 class ExpressionTextView : public InputTextView {
21 public:
22 ExpressionTextView(BRect frame,
23 CalcView* calcView);
24 virtual ~ExpressionTextView();
26 // BView
27 virtual void MakeFocus(bool focused = true);
28 virtual void KeyDown(const char* bytes, int32 numBytes);
30 virtual void MouseDown(BPoint where);
32 // TextView
33 virtual void GetDragParameters(BMessage* dragMessage,
34 BBitmap** bitmap, BPoint* point,
35 BHandler** handler);
36 void SetTextRect(BRect rect);
38 // InputTextView
39 virtual void RevertChanges();
40 virtual void ApplyChanges();
42 // ExpressionTextView
43 void AddKeypadLabel(const char* label);
45 void SetExpression(const char* expression);
46 void SetValue(BString value);
48 void BackSpace();
49 void Clear();
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;
58 private:
59 CalcView* fCalcView;
60 BString fKeypadLabels;
62 BList fPreviousExpressions;
63 int32 fHistoryPos;
64 BString fCurrentExpression;
65 BString fCurrentValue;
67 bool fChangesApplied;
70 #endif // EXPRESSION_TEXT_VIEW_H