is not half as bad... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17768 a95241bf-73f2-0310-859d-f6bbb57e9c96
57 lines
1.2 KiB
C++
57 lines
1.2 KiB
C++
/*
|
|
* Copyright 2006 Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Stephan Aßmus <[email protected]>
|
|
*/
|
|
|
|
#ifndef EXPRESSION_TEXT_VIEW_H
|
|
#define EXPRESSION_TEXT_VIEW_H
|
|
|
|
#include <List.h>
|
|
#include <String.h>
|
|
|
|
#include "InputTextView.h"
|
|
|
|
class CalcView;
|
|
|
|
class ExpressionTextView : public InputTextView {
|
|
public:
|
|
ExpressionTextView(BRect frame,
|
|
CalcView* calcView);
|
|
virtual ~ExpressionTextView();
|
|
|
|
// BView
|
|
virtual void MakeFocus(bool focused = true);
|
|
virtual void KeyDown(const char* bytes, int32 numBytes);
|
|
|
|
virtual void MouseDown(BPoint where);
|
|
|
|
// InputTextView
|
|
virtual void RevertChanges();
|
|
virtual void ApplyChanges();
|
|
|
|
// ExpressionTextView
|
|
void AddKeypadLabel(const char* label);
|
|
|
|
void SetExpression(const char* expression);
|
|
|
|
void BackSpace();
|
|
void Clear();
|
|
|
|
void AddExpressionToHistory(const char* expression);
|
|
void PreviousExpression();
|
|
void NextExpression();
|
|
|
|
private:
|
|
CalcView* fCalcView;
|
|
BString fKeypadLabels;
|
|
|
|
BList fPreviousExpressions;
|
|
int32 fHistoryPos;
|
|
BString fCurrentExpression;
|
|
};
|
|
|
|
#endif // EXPRESSION_TEXT_VIEW_H
|