home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'EsCalc.pas' rev: 3.00
-
- #ifndef EsCalcHPP
- #define EsCalcHPP
- #include <EsUtil.hpp>
- #include <EsData.hpp>
- #include <EsConst.hpp>
- #include <EsBase.hpp>
- #include <SysUtils.hpp>
- #include <StdCtrls.hpp>
- #include <Messages.hpp>
- #include <Menus.hpp>
- #include <Graphics.hpp>
- #include <Forms.hpp>
- #include <ExtCtrls.hpp>
- #include <Controls.hpp>
- #include <Clipbrd.hpp>
- #include <Classes.hpp>
- #include <Buttons.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Escalc
- {
- //-- type declarations -------------------------------------------------------
- enum TEsCalculatorButton { ccNone, ccBack, ccClearEntry, ccClear, ccAdd, ccSub, ccMul, ccDiv, cc0, cc1,
- cc2, cc3, cc4, cc5, cc6, cc7, cc8, cc9, ccDecimal, ccEqual, ccInvert, ccChangeSign, ccPercent, ccSqrt,
- ccMemClear, ccMemRecall, ccMemStore, ccMemAdd, ccMemSub };
-
- #pragma pack(push, 1)
- struct TEsButtonInfo
- {
- Windows::TRect Position;
- System::SmallString<10> Caption;
- bool Visible;
- } ;
- #pragma pack(pop)
-
- typedef TEsButtonInfo TEsButtonArray[28];
-
- enum TEsCalcState { csValid, csLocked, csClear };
-
- typedef Graphics::TColor TEsCalcColorArray[8];
-
- enum TEsCalcColorScheme { csCustom, csWindows, csDark, csOcean, csPlain };
-
- typedef Graphics::TColor TEsCalcSchemeArray[5][8];
-
- class DELPHICLASS TEsCalcColors;
- class PASCALIMPLEMENTATION TEsCalcColors : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- bool FUpdating;
- Classes::TNotifyEvent FOnChange;
- bool SettingScheme;
- void __fastcall DoOnChange(void);
- Graphics::TColor __fastcall GetColor(int Index);
- void __fastcall SetColor(int Index, Graphics::TColor Value);
- void __fastcall SetColorScheme(TEsCalcColorScheme Value);
- void __fastcall SetDisplayText(Graphics::TColor Value);
-
- public:
- Graphics::TColor FCalcColors[8];
- TEsCalcColorScheme FColorScheme;
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- void __fastcall BeginUpdate(void);
- void __fastcall EndUpdate(void);
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
-
- __published:
- __property TEsCalcColorScheme ColorScheme = {read=FColorScheme, write=SetColorScheme, nodefault};
- __property Graphics::TColor DisabledMemoryButtons = {read=GetColor, write=SetColor, index=0, nodefault
- };
- __property Graphics::TColor Display = {read=GetColor, write=SetColor, index=1, nodefault};
- __property Graphics::TColor DisplayText = {read=FCalcColors[7], write=SetDisplayText, nodefault};
- __property Graphics::TColor EditButtons = {read=GetColor, write=SetColor, index=3, nodefault};
- __property Graphics::TColor FunctionButtons = {read=GetColor, write=SetColor, index=4, nodefault};
- __property Graphics::TColor MemoryButtons = {read=GetColor, write=SetColor, index=5, nodefault};
- __property Graphics::TColor NumberButtons = {read=GetColor, write=SetColor, index=6, nodefault};
- __property Graphics::TColor OperatorButtons = {read=GetColor, write=SetColor, index=7, nodefault};
- public:
-
- /* TPersistent.Destroy */ __fastcall virtual ~TEsCalcColors(void) { }
-
- public:
- /* TObject.Create */ __fastcall TEsCalcColors(void) : Classes::TPersistent() { }
-
- };
-
- class DELPHICLASS TEsCalcPanel;
- class PASCALIMPLEMENTATION TEsCalcPanel : public Extctrls::TPanel
- {
- typedef Extctrls::TPanel inherited;
-
- protected:
- DYNAMIC void __fastcall Click(void);
- public:
- /* TCustomPanel.Create */ __fastcall virtual TEsCalcPanel(Classes::TComponent* AOwner) : Extctrls::
- TPanel(AOwner) { }
-
- public:
- /* TCustomControl.Destroy */ __fastcall virtual ~TEsCalcPanel(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TEsCalcPanel(HWND ParentWindow) : Extctrls::TPanel(ParentWindow
- ) { }
-
- };
-
- typedef void __fastcall (__closure *TButtonPressedEvent)(System::TObject* Sender, TEsCalculatorButton
- Button);
-
- class DELPHICLASS TEsCustomCalculator;
- class PASCALIMPLEMENTATION TEsCustomCalculator : public Esbase::TEsBase
- {
- typedef Esbase::TEsBase inherited;
-
- protected:
- TFormBorderStyle FBorderStyle;
- TEsCalcColors* FColors;
- bool FShowMemoryButtons;
- TButtonPressedEvent FOnButtonPressed;
- TEsButtonInfo cButtons[28];
- Extended cDisplay;
- System::AnsiString cDisplayStr;
- TEsCalculatorButton cDownButton;
- TEsCalculatorButton cLastButton;
- int cMargin;
- Extended cMemory;
- Extended cOperand;
- TEsCalculatorButton cOperation;
- TEsCalcPanel* cPanel;
- System::Set<TEsCalcState, csValid, csClear> cState;
- bool cPopup;
- void __fastcall cAdjustHeight(void);
- void __fastcall cCalculateLook(void);
- void __fastcall cClearAll(void);
- void __fastcall cColorChange(System::TObject* Sender);
- void __fastcall cDisplayError(void);
- void __fastcall cDisplayValue(const Extended Value);
- void __fastcall cDrawCalcButton(const TEsButtonInfo &Button, bool Pressed);
- void __fastcall cDrawFocusState(void);
- void __fastcall cEvaluate(void);
- void __fastcall cInvalidateIndicator(void);
- void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
- void __fastcall SetShowMemoryButtons(bool Value);
- HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Msg);
- HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TMessage &Msg);
- HIDESBASE MESSAGE void __fastcall CMExit(Messages::TMessage &Msg);
- HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Msg);
- HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Msg);
- MESSAGE void __fastcall WMGetText(Messages::TWMGetText &Msg);
- MESSAGE void __fastcall WMGetTextLength(Messages::TWMNoParams &Msg);
- HIDESBASE MESSAGE void __fastcall WMKeyDown(Messages::TWMKey &Msg);
- MESSAGE void __fastcall WMSetText(Messages::TWMSetText &Msg);
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall CreateWnd(void);
- DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
- DYNAMIC void __fastcall KeyPress(char &Key);
- DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
- Y);
- virtual void __fastcall Paint(void);
- __property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=0};
- __property bool ShowMemoryButtons = {read=FShowMemoryButtons, write=SetShowMemoryButtons, default=1
- };
- __property TButtonPressedEvent OnButtonPressed = {read=FOnButtonPressed, write=FOnButtonPressed};
-
- public:
- __fastcall virtual TEsCustomCalculator(Classes::TComponent* AOwner);
- __fastcall virtual TEsCustomCalculator(Classes::TComponent* AOwner, bool AsPopup);
- __fastcall virtual ~TEsCustomCalculator(void);
- virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
- void __fastcall CopyToClipboard(void);
- void __fastcall PasteFromClipboard(void);
- void __fastcall PressButton(TEsCalculatorButton Button);
- __property TEsCalcColors* Colors = {read=FColors, write=FColors};
- __property Extended Memory = {read=cMemory, write=cMemory};
- __property Text ;
- __property Extended Value = {read=cDisplay};
- public:
- /* TWinControl.CreateParented */ __fastcall TEsCustomCalculator(HWND ParentWindow) : Esbase::TEsBase(
- ParentWindow) { }
-
- };
-
- class DELPHICLASS TEsCalculator;
- class PASCALIMPLEMENTATION TEsCalculator : public Escalc::TEsCustomCalculator
- {
- typedef Escalc::TEsCustomCalculator inherited;
-
- __published:
- __property Font ;
- __property Align ;
- __property BorderStyle ;
- __property Ctl3D ;
- __property Colors ;
- __property Cursor ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property EsLabelInfo ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property ShowHint ;
- __property ShowMemoryButtons ;
- __property TabOrder ;
- __property TabStop ;
- __property Version ;
- __property Visible ;
- __property OnButtonPressed ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property OnStartDrag ;
- public:
- /* TEsCustomCalculator.Create */ __fastcall virtual TEsCalculator(Classes::TComponent* AOwner) : Escalc::
- TEsCustomCalculator(AOwner) { }
- /* TEsCustomCalculator.CreateEx */ __fastcall virtual TEsCalculator(Classes::TComponent* AOwner, bool
- AsPopup) : Escalc::TEsCustomCalculator(AOwner, AsPopup) { }
- /* TEsCustomCalculator.Destroy */ __fastcall virtual ~TEsCalculator(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TEsCalculator(HWND ParentWindow) : Escalc::TEsCustomCalculator(
- ParentWindow) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define calcDefBorderStyle (Forms::TFormBorderStyle)(0)
- #define calcDefColor (int)(-2147483633)
- #define calcDefHeight (Byte)(140)
- #define calcDefShowMemoryButtons (bool)(1)
- #define calcDefTabStop (bool)(1)
- #define calcDefWidth (Byte)(200)
- extern PACKAGE Graphics::TColor CalcScheme[5][8];
-
- } /* namespace Escalc */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Escalc;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // EsCalc
-