www.pudn.com > 1.rar > i2curve.h
// I2Curve.h: interface for the CI2WBCurve class.
#ifndef _IASP2WHITEBOARDWHITEBOARDCURVEINCLUDEFILE_H_
#define _IASP2WHITEBOARDWHITEBOARDCURVEINCLUDEFILE_H_
class CI2WBBaseWB;
#include "I2BaseCtrl.h"
#include "I2ControlSet.h"
#include "I2BaseCSet.h"
#include "I2BaseWB.h"
#define CURVE_WIDTH 230
#define CURVE_HEIGHT 230
#define CURVE_MARGIN 15
typedef enum tagCurveTypes
{
dtCurve
}CurveTypes;
//LRESULT CALLBACK FuncDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
class CFuncDlg : public I2Dialog
{
public:
BOOL m_pressok;
CString Expression;
CI2WBBaseCtrl* m_pawc;
CFuncDlg(CI2WBBaseCtrl*);
protected:
void onInitliaze(const I2Dialog& dlg);
virtual void onCommand(const I2Dialog& dlg,WORD wID,WORD wNotifyCode);
};
class CI2WBCurve : public CI2WBBaseCtrl
{
#define CLASSNAME_CI2WBCURVE "CI2WBCurve"
public:
VOID readFromStream(I2MemoryFileStream *stm,INT len,const I2Rect& r);
VOID writeToStream(I2MemoryFileStream *stm,BOOL fdata);
VOID OnRButtonUp(DWORD fwKeys,SHORT x,SHORT y,HWND hwnd,INT* fend);
VOID OnRButtonDown(DWORD fwKeys,SHORT x,SHORT y,HWND hwnd,INT* fend);
BOOL OnLButtonUp(DWORD fwKeys,SHORT x,SHORT y,HWND hwnd,INT* fend);
VOID OnMouseMove(DWORD fwKeys,SHORT x,SHORT y,HWND hwnd,INT* fend);
VOID OnLButtonDown(DWORD fwKeys,SHORT x,SHORT y,HWND hwnd,INT* fend);
BOOL OnLButtonDBLCLK(DWORD fwKeys,SHORT x,SHORT y,HWND hwnd);
VOID moveControl(INT xoffset,INT yoffset);
VOID paintControl(HDC hdc);
VOID getControlRect(I2Rect& r);
VOID OnAttribChange(INT type,INT mask,BOOL flocal);
VOID OnInplaceEditorNeedText(LPWB32FONT pfont,LPSTR* ptext);
VOID OnInplaceEditorReturnText(POINT pos,LPSTR text);
VOID set_Font(WB32FONT* pfont,INT mask);
BOOL OnDragFile(LPSTR filename,POINT p,CHAR* ptr,HWND hwnd);
VOID OnChangeData(RECT& rect);
CI2WBCurve();
CI2WBCurve(INT cid,VOID* wb);
~CI2WBCurve();
//inherit from i2Object
EMPTY_I2OBJECT_IMPLEMENT(CI2WBControl,CLASSNAME_CI2WBCONTROL,CI2WBBaseCtrl)
char* toString(void)
{
return strdup("iasp2 white board draw curve object");
}
protected:
CurveTypes m_type;
VOID paintCurve(HDC hdc,INT cx,INT cy);
CString m_Expression;
// INT m_xstep,m_ystep;
INT m_xstart,m_xend;
INT m_ystart,m_yend;
VOID moveTo(INT xoffset,INT yoffset);
CI2WBBaseWB* m_wb;
};
//template class I2List;
class CI2WBCurveSet : public CI2WBBaseCSet
{
#define CLASSNAME_CI2WBCURVESET "CI2WBCurveSet"
public:
CI2WBCurveSet();
~CI2WBCurveSet();
VOID enumControlInfo(I2List& m_infolist);
VOID getControlCursor(INT cid,HCURSOR* pcur);
VOID getControlSetID(GUID* Value);
VOID createControl(INT cid,VOID* pwb,VOID** ppawc,HWND hwnd);
//inherit from object
EMPTY_I2OBJECT_IMPLEMENT(CI2WBControlSet,CLASSNAME_CI2WBCONTROLSET,CI2WBBaseCSet)
char* toString(void)
{
return strdup("iasp2 white board control object");
}
protected:
I2List m_infolist;
INT m_infopos;
HINSTANCE m_hInst;
};
#endif