home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // ColorGrd.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: ColorGrd.pas
- //----------------------------------------------------------------------------
- #ifndef ColorGrdHPP
- #define ColorGrdHPP
- //----------------------------------------------------------------------------
- #ifndef MenusHPP
- #include <Menus.hpp>
- #endif
-
- #ifndef ExtCtrlsHPP
- #include <ExtCtrls.hpp>
- #endif
-
- #ifndef ControlsHPP
- #include <Controls.hpp>
- #endif
-
- #ifndef FormsHPP
- #include <Forms.hpp>
- #endif
-
- #ifndef GraphicsHPP
- #include <Graphics.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef MessagesHPP
- #include <Messages.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Colorgrd
- {
- //-- type declarations -------------------------------------------------------
- enum TGridOrdering { go16x1, go8x2, go4x4, go2x8, go1x16 };
-
- class __declspec(delphiclass) TColorGrid;
- class __declspec(pascalimplementation) TColorGrid : public Controls::TCustomControl
- {
- typedef TColorGrid ThisClass;
- typedef Controls::TCustomControl inherited;
-
- private:
- Windows::TPaletteEntry FPaletteEntries[20];
- System::Boolean FClickEnablesColor;
- System::Integer FForegroundIndex;
- System::Integer FBackgroundIndex;
- System::Boolean FForegroundEnabled;
- System::Boolean FBackgroundEnabled;
- System::Integer FSelection;
- System::Integer FCellXSize;
- System::Integer FCellYSize;
- System::Integer FNumXSquares;
- System::Integer FNumYSquares;
- TGridOrdering FGridOrdering;
- System::Boolean FHasFocus;
- Classes::TNotifyEvent FOnChange;
- TMouseButton FButton;
- System::Boolean FButtonDown;
- void __fastcall DrawSquare(System::Integer Which, System::Boolean ShowSelector);
- void __fastcall DrawFgBg(void);
- void __fastcall UpdateCellSizes(System::Boolean DoRepaint);
- void __fastcall SetGridOrdering(TGridOrdering Value);
- Graphics::TColor __fastcall GetForegroundColor(void);
- Graphics::TColor __fastcall GetBackgroundColor(void);
- void __fastcall SetForegroundIndex(System::Integer Value);
- void __fastcall SetBackgroundIndex(System::Integer Value);
- void __fastcall SetSelection(System::Integer Value);
- void __fastcall EnableForeground(System::Boolean Value);
- void __fastcall EnableBackground(System::Boolean Value);
- MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
- MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
- MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
- MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
-
- protected:
- virtual void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, System::Integer
- X, System::Integer Y);
- virtual void __fastcall MouseMove( Classes::TShiftState Shift, System::Integer X, System::Integer Y
- );
- virtual void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, System::Integer
- X, System::Integer Y);
- virtual void __fastcall CreateWnd(void);
- virtual void __fastcall Paint(void);
- virtual void __fastcall Change(void);
- System::Integer __fastcall SquareFromPos(System::Integer X, System::Integer Y);
-
- public:
- __fastcall virtual TColorGrid(Classes::TComponent *AOwner);
- __property Graphics::TColor ForegroundColor = {read=GetForegroundColor, nodefault};
- __property Graphics::TColor BackgroundColor = {read=GetBackgroundColor, nodefault};
-
- __published:
- __property System::Boolean ClickEnablesColor = {read=FClickEnablesColor, write=FClickEnablesColor,
- default=0};
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property TGridOrdering GridOrdering = {read=FGridOrdering, write=SetGridOrdering, default=2};
- __property System::Integer ForegroundIndex = {read=FForegroundIndex, write=SetForegroundIndex, default=0
- };
- __property System::Integer BackgroundIndex = {read=FBackgroundIndex, write=SetBackgroundIndex, default=0
- };
- __property System::Boolean ForegroundEnabled = {read=FForegroundEnabled, write=EnableForeground, default=1
- };
- __property System::Boolean BackgroundEnabled = {read=FBackgroundEnabled, write=EnableBackground, default=1
- };
- __property Font ;
- __property ParentCtl3D ;
- __property ParentFont ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property System::Integer Selection = {read=FSelection, write=SetSelection, default=0};
- __property ShowHint ;
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- __property OnClick ;
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- public:
- /* !! TCustomControl.Destroy */ __fastcall virtual ~TColorGrid(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define NumPaletteEntries System::Byte(20)
-
- } /* namespace Colorgrd */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Colorgrd;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // ColorGrd
-