Added Calculator to the build, and fixed build for Dano.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17685 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-06-01 09:27:37 +00:00
parent f883a05a74
commit 9427e13a87
2 changed files with 50 additions and 52 deletions
+1
View File
@@ -2,6 +2,7 @@ SubDir HAIKU_TOP src apps ;
SubInclude HAIKU_TOP src apps abouthaiku ; SubInclude HAIKU_TOP src apps abouthaiku ;
SubInclude HAIKU_TOP src apps bemail ; SubInclude HAIKU_TOP src apps bemail ;
SubInclude HAIKU_TOP src apps calculator ;
SubInclude HAIKU_TOP src apps cdplayer ; SubInclude HAIKU_TOP src apps cdplayer ;
SubInclude HAIKU_TOP src apps clock ; SubInclude HAIKU_TOP src apps clock ;
SubInclude HAIKU_TOP src apps codycam ; SubInclude HAIKU_TOP src apps codycam ;
+49 -52
View File
@@ -5,71 +5,68 @@
* Authors: * Authors:
* Peter Wagner <[email protected]> * Peter Wagner <[email protected]>
*/ */
#ifndef __CALC_VIEW__ #ifndef CALC_VIEW_H
#define __CALC_VIEW__ #define CALC_VIEW_H
#include <View.h> #include <View.h>
#include <Message.h> #include <Message.h>
#include "FrameView.h" #include "FrameView.h"
#include "CalcEngine.h" #include "CalcEngine.h"
class _EXPORT CalcView : public BView class BStringView;
{
public:
static void About(void);
static float TheWidth() { return 272; } class _EXPORT CalcView : public BView {
static float TheHeight() { return 284; } public:
static BRect TheRect() { return TheRect(0,0); } CalcView(BRect frame);
static BRect TheRect(const BPoint &pt) { return TheRect(pt.x,pt.y); } CalcView(BMessage *msg);
static BRect TheRect(float x, float y) { return BRect(x,y,x+TheWidth(),y+TheHeight()); } virtual ~CalcView();
static float ExtraHeight() { return 43; }
virtual status_t Archive(BMessage *msg, bool deep) const;
static BArchivable* Instantiate(BMessage *msg);
virtual void AttachedToWindow();
virtual void AllAttached();
virtual void Draw(BRect updateRect);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void MouseDown(BPoint where);
virtual void WindowActivated(bool state);
virtual void MakeFocus(bool focusState = true);
virtual void MessageReceived(BMessage *message);
void SendKeystroke(ulong key);
virtual bool TextWidthOK(const char *str);
BView *AddExtra();
CalcView(BRect frame); static void About();
virtual ~CalcView();
static float TheWidth() { return 272; }
static float TheHeight() { return 284; }
static BRect TheRect() { return TheRect(0,0); }
static BRect TheRect(const BPoint &pt) { return TheRect(pt.x,pt.y); }
static BRect TheRect(float x, float y) { return BRect(x,y,x+TheWidth(),y+TheHeight()); }
static float ExtraHeight() { return 43; }
private:
void Init();
// replicant CalcEngine calc;
CalcView(BMessage *msg); bool is_replicant;
virtual status_t Archive(BMessage *msg, bool deep) const;
static BArchivable* Instantiate(BMessage *msg);
virtual void AttachedToWindow(); int current_highlight;
virtual void AllAttached(); enum { state_unknown=0, state_active, state_inactive };
void ChangeHighlight();
virtual void Draw(BRect updateRect);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void MouseDown(BPoint where);
virtual void WindowActivated(bool state);
virtual void MakeFocus(bool focusState = true);
virtual void MessageReceived(BMessage *message);
void SendKeystroke(ulong key);
virtual bool TextWidthOK(const char *str);
BView *AddExtra();
private:
void Init(void);
CalcEngine calc;
bool is_replicant;
int current_highlight;
enum { state_unknown=0, state_active, state_inactive };
void ChangeHighlight();
FrameView *lcd_frame;
BStringView *lcd;
BStringView *binary_sign_view;
BStringView *binary_exponent_view;
BStringView *binary_number_view;
FrameView *lcd_frame;
BStringView *lcd;
BStringView *binary_sign_view;
BStringView *binary_exponent_view;
BStringView *binary_number_view;
}; };
#endif #endif // CALC_VIEW_H