summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2GuestroomTable.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
committerAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
commitc0c336500955a23e344651e5412c9d9d441ef4ee (patch)
tree790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2GuestroomTable.h
parent37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff)
downloadt2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz
t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2GuestroomTable.h77
1 files changed, 43 insertions, 34 deletions
diff --git a/src/T2DLL/T2GuestroomTable.h b/src/T2DLL/T2GuestroomTable.h
index 5b515da..621cf9d 100644
--- a/src/T2DLL/T2GuestroomTable.h
+++ b/src/T2DLL/T2GuestroomTable.h
@@ -1,57 +1,66 @@
#pragma once
#include "common.h"
+#include "LArray.h"
+#include "T2VerticalTable.h"
-class T2GuestroomTable {
-protected:
- virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+class AFX_EXT_CLASS T2GuestroomTable : T2VerticalTable {
public:
- T2GuestroomTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ T2GuestroomTable(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CPalette* inPalette);
virtual ~T2GuestroomTable();
- virtual void Add(T2GuestroomItem*);
-protected:
- virtual void DrawCellSelf(CDC*, const TableCellT&, int);
- virtual void DrawCell(CDC*, const TableCellT&);
- virtual void ClickCell(const TableCellT&, const CPoint&);
-public:
- virtual void AddList(T2Tenant*, int);
+ virtual void Add(T2GuestroomItem* inItem);
+ virtual void AddList(T2Tenant* inTenant, int inRoomNumber);
+ virtual void SetFront(unsigned int inFront) { mFront = inFront; }
+ virtual void ResetRoomList(int inRoomType);
virtual void ValidRelation();
virtual void RevertRelation();
- virtual void ResetRoomList(int);
- virtual int CountRooms(int, int);
- virtual void ToggleRelation(const TableCellT&, int);
- virtual void SetInMoneyIndex(int);
- virtual int GetInMoneyIndex(int);
- virtual int CalcInMoney(int);
- void UpdateTenantEstimation(T2TowerDoc*, int);
+ virtual int CountRooms(int inRoomType, int inRoomStatus);
+ virtual void ToggleRelation(const TableCellT& inCell, int inMoneyIndex);
+ virtual void SetInMoneyIndex(int inMoneyIndex);
+ virtual int GetInMoneyIndex(int inRoomType);
+ virtual int CalcInMoney(int inRoomType);
+ void UpdateTenantEstimation(T2TowerDoc* inDoc, int inRoomType);
+
protected:
- virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
- virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual int OnT2DlgItemCreate(CREATESTRUCT* cs);
+ virtual void DrawCellSelf(CDC* pDC, const TableCellT& inCell, BOOL inSelected);
+ virtual void DrawCell(CDC* pDC, const TableCellT& inCell);
+ virtual void ClickCell(const TableCellT& inCell, const CPoint& inPt);
+ virtual void OnT2DlgItemLButtonDown(UINT inFlags, CPoint inPt);
+ virtual BOOL OnT2DlgItemEraseBkgnd(CDC* pDC);
-public:
- virtual void SetFront(unsigned int) {}
+ unsigned int mFront;
+ LArray mArray;
+ DWORD mClickTime;
};
-class T2GuestroomItem {
+
+class AFX_EXT_CLASS T2GuestroomItem {
public:
- T2GuestroomItem(T2Tenant*, int, long);
+ T2GuestroomItem(T2Tenant* inTenant, int inSaveTenantID, long inRoomNumber);
int GetRoomNumber();
int GetRoomStatus();
int GetCapacity();
int GetRoomType();
- static int GetRoomType(T2Tenant*);
- void ToggleRelation(int);
- int IsRelation();
- int WasRelation();
+ static int GetRoomType(T2Tenant* inTenant);
+ void ToggleRelation(int inMoneyIndex);
+ BOOL IsRelation();
+ BOOL WasRelation();
void ValidRelation();
void InvalidRelation();
void RevertRelation();
- int IsFreeRelation();
- int IsStay();
- void SetInMoneyIndex(int);
+ BOOL IsFreeRelation();
+ BOOL IsStay();
+ void SetInMoneyIndex(int inIndex);
int GetInMoneyIndex();
int GetInMoney();
int GetOutMoney();
- void UpdateTenantEstimation(T2TowerDoc*);
+ void UpdateTenantEstimation(T2TowerDoc* inDoc);
- T2Tenant* GetTenant() {}
- T2GuestroomItem& operator=(const T2GuestroomItem&) {}
+ T2Tenant* GetTenant() { return mTenant; }
+
+protected:
+ T2Tenant *mTenant;
+ unsigned int mSaveTenantID;
+ int mRoomNumber;
+ BOOL mRelation;
+ int mDefaultInMoneyIndex;
};