home *** CD-ROM | disk | FTP | other *** search
- //if Borland compiler
-
- #ifndef _SPREAD_H
- #define _SPREAD_H
-
- #ifdef _MSC_VER
- #include "stdafx.h"
- #endif
-
- #include <owl\vbxctl.h>
- #include <string.h>
-
- //MACROS FOR EXTRACTING PARAMETERS OUT OF THE DATA ARRAY FOR VBX EVENTS
- #ifndef AFX_NUM_EVENTPARAM
- #define AFX_NUM_EVENTPARAM(type, lpParams) (type FAR&)(**(type FAR* FAR*)lpParams)
- #define AFX_HLSTR_EVENTPARAM(lpParams) (HLSTR FAR&)(*(HLSTR FAR*)lpParams)
- #define AFX_NUM_EVENTPARAMINDEX(type, lpParams, index) (short FAR&)(**((type FAR* FAR*)(lpParams) + index))
- #define AFX_HLSTR_EVENTPARAMINDEX(lpParams, index) (HLSTR FAR&)(*((HLSTR FAR*)(lpParams) + index))
- #endif
-
- #define VBAPI FAR PASCAL
- typedef signed short SHORT; // s
- typedef unsigned short USHORT; // u
- typedef unsigned int FSHORT; // fs
- typedef signed char CHAR; // ch
- typedef unsigned char ENUM; // enum
- typedef unsigned long ULONG; // ul
- typedef unsigned long FLONG; // fl
- typedef SHORT FAR *LPSHORT; // lps
- typedef USHORT FAR *LPUSHORT; // lpu
- typedef USHORT IPROP; // iprop
- typedef HANDLE HFORMFILE; // hformfile
- typedef USHORT ERR; // err
- typedef HPIC FAR *LPHPIC; // lphpic
- typedef LPVOID HLSTR; // hlstr
- typedef HLSTR FAR *LPHLSTR; // lphlstr
- typedef LPVOID HAD; // hAD - handle to Basic array desc.
- typedef LPVOID HCTL; // hctl
-
-
- extern "C"
- {
- extern void FAR PASCAL SpreadSaveDesignInfo(int,int,BOOL);
- LPSTR VBAPI VBDerefHlstrLen(HLSTR hlstr, LPUSHORT lpcbLen);
- };
-
- //if Borland compiler
- #ifndef _MSC_VER
-
- #define NO_INDEX -1
- #define CString char*
-
- class CVBControl: public TVbxControl
- {
- public:
-
- long GetNumProperty(int propIndex, int index=NO_INDEX)
- {
- int ret;
- long value;
-
- ret = GetProp(propIndex, value);
- return value;
- }
-
- float GetFloatProperty(int propIndex, int index=NO_INDEX)
- {
- int ret;
- float value;
-
- ret = GetProp(propIndex, value);
- return value;
- }
-
- char *GetStrProperty(int propIndex, int index=NO_INDEX)
- {
- int ret;
- char *value;
-
- ret = GetProp(propIndex, value);
- return value;
- }
-
- HPIC GetPictureProperty(int propIndex, int index=NO_INDEX)
- {
- int ret;
- HPIC value;
-
- ret = GetProp(propIndex, value);
- return value;
- }
-
- BOOL SetNumProperty(int propIndex, int value, int index=NO_INDEX)
- {
- return SetProp(propIndex, value, -1);
- }
-
- BOOL SetNumProperty(int propIndex, long value, int index=NO_INDEX)
- {
- return SetProp(propIndex, value, -1);
- }
-
- BOOL SetFloatProperty(int propIndex, float value, int index=NO_INDEX)
- {
- return SetProp(propIndex, value, -1);
- }
-
- BOOL SetStrProperty(int propIndex, const char *value, int index=NO_INDEX)
- {
- return SetProp(propIndex, value, -1);
- }
-
- BOOL SetPictureProperty(int propIndex, HPIC value, int index=NO_INDEX)
- {
- return SetProp(propIndex, value, -1);
- }
- };
- //if Microsoft compiler
- #else
- #define NO_INDEX 0
- #endif
-
- class BaseSpreadSheet
- {
- public:
- CVBControl *m_pVBControl;
- int Index;
- int m_nID;
-
- BaseSpreadSheet(CVBControl *pVBControl, int nID, int I=NO_INDEX)
- {
- m_pVBControl = pVBControl;
- m_nID = nID;
- Index = I;
- };
- };
-
- class CHszProperty : public BaseSpreadSheet
- {
- public://methods
- CHszProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index) {};
-
- void operator =(LPCSTR lpszValue)
- {
- m_pVBControl->SetStrProperty(m_nID, lpszValue, Index);
- };
-
- operator CString()
- {
- return m_pVBControl->GetStrProperty(m_nID, Index);
- };
- };
-
- class CShortProperty : public BaseSpreadSheet
- {
- public:
- CShortProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index) {};
-
- short operator=(short nValue)
- {
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator += (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) + nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator -= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) - nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator *= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) * nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator /= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) / nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator %= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) % nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator ^= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) ^ nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator &= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) & nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator |= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) | nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator <<= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) << nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator >>= (short nValue)
- {
- nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) >> nValue;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator ++ (int)
- {
- short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) + 1;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator -- (int)
- {
- short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) - 1;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator ++ ()
- {
- short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) + 1;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- short operator -- ()
- {
- short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) - 1;
- m_pVBControl->SetNumProperty(m_nID, nValue, Index);
- return nValue;
- };
- operator short()
- {
- return (short)m_pVBControl->GetNumProperty(m_nID, Index);
- };
- };
-
- class CLongProperty : public BaseSpreadSheet
- {
- public:
- CLongProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index){};
-
- long operator = (LONG lValue)
- {
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator += (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) + lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator -= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) - lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator *= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) * lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator /= (LONG lValue)
- {
- lValue =m_pVBControl->GetNumProperty(m_nID) / lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator %= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) % lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator ^= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) ^ lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator &= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) & lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator |= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) | lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator <<= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) << lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- long operator >>= (LONG lValue)
- {
- lValue = m_pVBControl->GetNumProperty(m_nID) >> lValue;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- LONG operator ++ (int)
- {
- LONG lValue = m_pVBControl->GetNumProperty(m_nID) + 1;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- LONG operator -- (int)
- {
- LONG lValue = m_pVBControl->GetNumProperty(m_nID) + 1;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- LONG operator ++ ()
- {
- LONG lValue = m_pVBControl->GetNumProperty(m_nID) + 1;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- LONG operator -- ()
- {
- LONG lValue = m_pVBControl->GetNumProperty(m_nID) - 1;
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- return lValue;
- };
- operator LONG()
- {
- MessageBox(NULL,"LONG","Index",MB_OK);
- return m_pVBControl->GetNumProperty(m_nID, Index);
- };
- };
-
- class CBoolProperty : public CShortProperty
- {
- public:
- CBoolProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CShortProperty(pVBControl, nID, Index){};
- void operator = (int nValue)
- {
- m_pVBControl->SetNumProperty(m_nID, nValue);
- };
- };
-
- class CColorProperty : public CLongProperty
- {
- public:
- CColorProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
- void operator=(LONG lValue)
- {
- m_pVBControl->SetNumProperty(m_nID, lValue);
- };
- };
-
- class CEnumProperty : public CShortProperty
- {
- public:
- CEnumProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CShortProperty(pVBControl, nID, Index){};
- void operator = (int nValue)
- {
- m_pVBControl->SetNumProperty(m_nID, nValue);
- };
- };
-
- class CRealProperty : public BaseSpreadSheet
- {
- public:
- CRealProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index){};
- float operator=(float flValue)
- {
- m_pVBControl->SetFloatProperty(m_nID, flValue, Index);
- return flValue;
- };
- operator float()
- {
- return m_pVBControl->GetFloatProperty(m_nID, Index);
- };
- };
-
- class CPictureProperty : public BaseSpreadSheet
- {
- public:
- CPictureProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index){};
- void operator = (HPIC hPic)
- {
- m_pVBControl->SetPictureProperty(m_nID, hPic, Index);
- };
- operator HPIC()
- {
- return m_pVBControl->GetPictureProperty(m_nID, Index);
- };
- };
-
- class CXPosProperty : public CLongProperty
- {
- public:
- CXPosProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
- void operator = (LONG lValue)
- {
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- };
- };
-
- class CXSizeProperty : public CLongProperty
- {
- public:
- CXSizeProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
- void operator = (LONG lValue)
- {
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- };
- };
-
- class CYPosProperty : public CLongProperty
- {
- public:
- CYPosProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
- void operator = (LONG lValue)
- {
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- };
- };
-
- class CYSizeProperty : public CLongProperty
- {
- public:
- CYSizeProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
- void operator = (LONG lValue)
- {
- m_pVBControl->SetNumProperty(m_nID, lValue, Index);
- };
- };
-
- class CSpreadSheet
- {
- public:
- CVBControl *Ctrl;
- int DesignWindow;
-
- CSpreadSheet(CVBControl *c)
- {
- Ctrl = c;
- DesignWindow = NULL;
- };
-
- CSpreadSheet()
- {
- Ctrl = NULL;
- DesignWindow = NULL;
- };
-
- #ifndef _MSC_VER
- void ProcessEvent(const VBXEVENT *ptrEvent);
- void Set(TVbxControl *c){Ctrl = (CVBControl*)c;};
- #else
- void ProcessEvent(int , const CVBControl *, LPVOID);
- void Set(CVBControl *c){Ctrl = c;};
- #endif
-
- void CallEvent(int, LPVOID);
-
- //Borland's coustom control events
- //FarPoint's products:Grid/VBX, Spread/VBX, Spread/VBX++ and Aware/VBX
- //have much more functionality
- //Call FarPoint TODAY for details for a low cost upgrade!!!
- virtual void Advance(int AdvanceNext){};
- virtual void BlockSelected(long BlockCol, long BlockRow, long BlockCol2, long BlockRow2){};
- virtual void Change(long Col, long Row){};
- virtual void Click(long Col, long Row){};
- virtual void DblClick(long Col, long Row){};
- virtual void EditError(long Col, long Row, int EditError){};
- virtual void EditMode(long Col, long Row, int Mode, int ChangeMade){};
- virtual void LeaveCell(long Col, long Row, long NewCol, long NewRow, int *Cancel){};
- virtual void QueryAdvance(int AdvanceNext, int Cancel){};
- virtual void RightClick(int ClickType, long Col, long Row, long MouseX, long MouseY){};
- virtual void SelChange(long BlockCol, long BlockRow, long BlockCol2, long BlockRow2, long CurCol, long CurRow){};
-
- //Default Visual Basic events
- virtual void DragDrop(long Source, float X, float Y){};
- virtual void DragOver (long Source, float X, float Y, int State){};
- virtual void GotFocus(){};
- virtual void KeyDown(int KeyCode, int Shift){};
- virtual void KeyPress(int *KeyAscii){};
- virtual void KeyUp(int KeyCode, int Shift){};
- virtual void LostFocus(){};
- virtual void MouseDown(int Button, int Shift, float X, float Y){};
- virtual void MouseMove(int Button, int Shift, float X, float Y){};
- virtual void MouseUp(int Button, int Shift, float X, float Y){};
-
- //Borland's control properties
- CEnumProperty Action() { return CEnumProperty(Ctrl, 21); }
- CLongProperty ActiveCol() { return CLongProperty(Ctrl, 22); }
- CLongProperty ActiveRow() { return CLongProperty(Ctrl, 23); }
- CBoolProperty AllowUserFormulas() { return CBoolProperty(Ctrl, 150); }
- CBoolProperty ArrowsExitEditMode() { return CBoolProperty(Ctrl, 143); }
- CBoolProperty AutoCalc() { return CBoolProperty(Ctrl, 26); }
- CColorProperty BackColor() { return CColorProperty(Ctrl, 27); }
- CBoolProperty CalcDependencies() { return CBoolProperty(Ctrl, 28); }
- CEnumProperty CellType() { return CEnumProperty(Ctrl, 29); }
- CHszProperty Clip() { return CHszProperty(Ctrl, 30); }
- CLongProperty Col() { return CLongProperty(Ctrl, 31); }
- CLongProperty Col2() { return CLongProperty(Ctrl, 32); }
- CRealProperty ColWidth(long Index) { return CRealProperty(Ctrl, 33,Index); }
- CLongProperty DataColCnt() { return CLongProperty(Ctrl, 165); }
- CLongProperty DataRowCnt() { return CLongProperty(Ctrl, 166); }
- CBoolProperty DisplayColHeaders() { return CBoolProperty(Ctrl, 34); }
- CBoolProperty DisplayRowHeaders() { return CBoolProperty(Ctrl, 35); }
- CBoolProperty EditMode() { return CBoolProperty(Ctrl, 36); }
- CBoolProperty EditModePermanent() { return CBoolProperty(Ctrl, 97); }
- CBoolProperty EditModeReplace() { return CBoolProperty(Ctrl, 156); }
- CColorProperty ForeColor() { return CColorProperty(Ctrl, 38); }
- CHszProperty Formula() { return CHszProperty(Ctrl, 39); }
- CColorProperty GrayAreaBackColor() { return CColorProperty(Ctrl, 141); }
- CColorProperty GridColor() { return CColorProperty(Ctrl, 171); }
- CBoolProperty GridShowHoriz() { return CBoolProperty(Ctrl, 186); }
- CBoolProperty GridShowVert() { return CBoolProperty(Ctrl, 187); }
- CBoolProperty GridSolid() { return CBoolProperty(Ctrl, 172); }
- CShortProperty hWnd() { return CShortProperty(Ctrl, 159); }
- CBoolProperty IsBlockSelected() { return CBoolProperty(Ctrl, 93); }
- CLongProperty LeftCol() { return CLongProperty(Ctrl, 41); }
- CBoolProperty Lock() { return CBoolProperty(Ctrl, 42); }
- CLongProperty MaxCols() { return CLongProperty(Ctrl, 43); }
- CLongProperty MaxRows() { return CLongProperty(Ctrl, 44); }
- CBoolProperty MoveActiveOnFocus() { return CBoolProperty(Ctrl, 144); }
- CBoolProperty ProcessTab() { return CBoolProperty(Ctrl, 114); }
- CBoolProperty Protect() { return CBoolProperty(Ctrl, 46); }
- CBoolProperty ReDraw() { return CBoolProperty(Ctrl, 47); }
- CBoolProperty RetainSelBlock() { return CBoolProperty(Ctrl, 149); }
- CLongProperty Row() { return CLongProperty(Ctrl, 50); }
- CLongProperty Row2() { return CLongProperty(Ctrl, 51); }
- CRealProperty RowHeight(long index) { return CRealProperty(Ctrl, 52, index); }
- CEnumProperty ScrollBars() { return CEnumProperty(Ctrl, 92); }
- CLongProperty SelBlockCol() { return CLongProperty(Ctrl, 53); }
- CLongProperty SelBlockCol2() { return CLongProperty(Ctrl, 54); }
- CLongProperty SelBlockRow() { return CLongProperty(Ctrl, 55); }
- CLongProperty SelBlockRow2() { return CLongProperty(Ctrl, 56); }
- CShortProperty SelectBlockOptions() { return CShortProperty(Ctrl, 176); }
- CColorProperty ShadowColor() { return CColorProperty(Ctrl, 60); }
- CColorProperty ShadowDark() { return CColorProperty(Ctrl, 61); }
- CColorProperty ShadowText() { return CColorProperty(Ctrl, 62); }
- CHszProperty Text() { return CHszProperty(Ctrl, 63); }
- CLongProperty TopRow() { return CLongProperty(Ctrl, 64); }
- CShortProperty TypeEditLen() { return CShortProperty(Ctrl, 73); }
- CShortProperty TypeFloatDecimalPlaces() { return CShortProperty(Ctrl, 74); }
- CBoolProperty TypeFloatMoney() { return CBoolProperty(Ctrl, 77); }
- CBoolProperty TypeFloatSeparator() { return CBoolProperty(Ctrl, 78); }
- CShortProperty TypeFloatSepChar() { return CShortProperty(Ctrl, 203); }
- CEnumProperty TypeHAlign() { return CEnumProperty(Ctrl, 233); }
- CBoolProperty TypePictCenter() { return CBoolProperty(Ctrl, 146); }
- CBoolProperty TypePictMaintainScale() { return CBoolProperty(Ctrl, 148); }
- CPictureProperty TypePictPicture() { return CPictureProperty(Ctrl, 145); }
- CBoolProperty TypePictStretch() { return CBoolProperty(Ctrl, 147); }
- CBoolProperty TypeTextShadow() { return CBoolProperty(Ctrl, 84); }
- CBoolProperty TypeTextWordWrap() { return CBoolProperty(Ctrl, 85); }
- CShortProperty UserResize() { return CShortProperty(Ctrl, 174); }
- CHszProperty Value() { return CHszProperty(Ctrl, 95); }
-
- //Native control properties
- CEnumProperty BorderStyle() { return CEnumProperty(Ctrl, 0); }
- CHszProperty CtlName() { return CHszProperty(Ctrl, 1); }
- CShortProperty DragIcon() { return CShortProperty(Ctrl, 2); }
- CEnumProperty DragMode() { return CEnumProperty(Ctrl, 3); }
- CBoolProperty Enabled() { return CBoolProperty(Ctrl, 4); }
- CBoolProperty FontBold() { return CBoolProperty(Ctrl, 5); }
- CBoolProperty FontItalic() { return CBoolProperty(Ctrl, 6); }
- CHszProperty FontName() { return CHszProperty(Ctrl, 7); }
- CRealProperty FontSize() { return CRealProperty(Ctrl, 8); }
- CBoolProperty FontStrikethru() { return CBoolProperty(Ctrl, 9); }
- CBoolProperty FontUnderline() { return CBoolProperty(Ctrl, 10); }
- CYSizeProperty Height() { return CYSizeProperty(Ctrl, 11); }
- CXPosProperty Left() { return CXPosProperty(Ctrl, 13); }
- CShortProperty TabIndex() { return CShortProperty(Ctrl, 15); }
- CBoolProperty TabStop() { return CBoolProperty(Ctrl, 16); }
- CHszProperty Tag() { return CHszProperty(Ctrl, 17); }
- CYPosProperty Top() { return CYPosProperty(Ctrl, 18); }
- CBoolProperty Visible() { return CBoolProperty(Ctrl, 19); }
- CXSizeProperty Width() { return CXSizeProperty(Ctrl, 20); }
-
- };
-
- //spreadsheet actions
- #define SS_ACTION_ACTIVE_CELL 0
- #define SS_ACTION_GOTO_CELL 1
- #define SS_ACTION_SELECT_BLOCK 2
- #define SS_ACTION_CLEAR 3
- #define SS_ACTION_DELETE_COL 4
- #define SS_ACTION_DELETE_ROW 5
- #define SS_ACTION_INSERT_COL 6
- #define SS_ACTION_INSERT_ROW 7
- #define SS_ACTION_RECALC 11
- #define SS_ACTION_CLEAR_TEXT 12
- #define SS_ACTION_DESELECT_BLOCK 14
- #define SS_ACTION_RESET 28
-
- //SelectBlockOptions
- #define SS_SELBLOCKOPT_COLS 1
- #define SS_SELBLOCKOPT_ROWS 2
- #define SS_SELBLOCKOPT_BLOCKS 4
- #define SS_SELBLOCKOPT_ALL 8
-
- //cell type
- #define SS_CELL_TYPE_EDIT 1
- #define SS_CELL_TYPE_FLOAT 2
- #define SS_CELL_TYPE_STATIC_TEXT 5
- #define SS_CELL_TYPE_PICTURE 9
-
- //user resize row and columns
- #define SS_USER_RESIZE_COL 1
- #define SS_USER_RESIZE_ROW 2
-
- //scroll bar
- #define SS_SCROLLBAR_NONE 0
- #define SS_SCROLLBAR_H_ONLY 1
- #define SS_SCROLLBAR_V_ONLY 2
- #define SS_SCROLLBAR_BOTH 3
-
- //horizontal align
- #define SS_CELL_H_ALIGN_LEFT 0
- #define SS_CELL_H_ALIGN_RIGHT 1
- #define SS_CELL_H_ALIGN_CENTER 2
-
- //event id numbers
- #define Event_Advance 0
- #define Event_BlockSelected 1
- #define Event_Change 2
- #define Event_Click 3
- #define Event_DblClick 4
- #define Event_DragDrop 5
- #define Event_DragOver 6
- #define Event_EditError 7
- #define Event_EditMode 8
- #define Event_GotFocus 9
- #define Event_KeyDown 10
- #define Event_KeyPress 11
- #define Event_KeyUp 12
- #define Event_LeaveCell 13
- #define Event_LostFocus 14
- #define Event_MouseDown 15
- #define Event_MouseMove 16
- #define Event_MouseUp 17
-
- //#define Event_QueryAdvance 18
- #define Event_RightClick 18
- #define Event_SelChange 19
-
- #endif
-