//---------------------------------------------------------------------------- // KButtons.hpp - dcc32 generated hdr (DO NOT EDIT) rev: 0 // From: KButtons.pas //---------------------------------------------------------------------------- #ifndef KButtonsHPP #define KButtonsHPP //---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include namespace Kbuttons { //-- type declarations ------------------------------------------------------- class __declspec(delphiclass) TkSpeedButton; class __declspec(pascalimplementation) TkSpeedButton : public Controls::TGraphicControl { typedef Controls::TGraphicControl inherited; private: int FGroupIndex; void *FGlyph; bool FDown; bool FDragging; bool FAllowAllUp; TButtonLayout FLayout; int FSpacing; int FMargin; Graphics::TColor FBkColor; bool FNormalButton; bool FAllowEdit; System::AnsiString FBitFileName; System::AnsiString FIniName; System::AnsiString FIniSection; void __fastcall GlyphChanged(System::TObject* Sender); void __fastcall UpdateExclusive(void); Graphics::TBitmap* __fastcall GetGlyph(void); void __fastcall SetGlyph(Graphics::TBitmap* Value); Buttons::TNumGlyphs __fastcall GetNumGlyphs(void); void __fastcall SetNumGlyphs(Buttons::TNumGlyphs Value); void __fastcall SetDown(bool Value); void __fastcall SetAllowAllUp(bool Value); void __fastcall SetGroupIndex(int Value); void __fastcall SetLayout(Buttons::TButtonLayout Value); void __fastcall SetSpacing(int Value); void __fastcall SetMargin(int Value); MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message); MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message); MESSAGE void __fastcall CMButtonPressed(Messages::TMessage &Message); MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message); MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message); MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message); MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message); MESSAGE void __fastcall CMParentColorChanged(Messages::TMessage &Message); protected: TButtonState FState; virtual HPALETTE __fastcall GetPalette(void); virtual void __fastcall Loaded(void); virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X , int Y); virtual void __fastcall MouseMove( Classes::TShiftState Shift, int X, int Y); virtual void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y); virtual void __fastcall Paint(void); virtual Graphics::TColor __fastcall GetBkColor(void); public: __fastcall virtual TkSpeedButton(Classes::TComponent* AOwner); __fastcall virtual ~TkSpeedButton(void); virtual void __fastcall Click(void); void __fastcall SetBitFileNameNoWrite(const System::AnsiString name); virtual void __fastcall SetBitFileName(const System::AnsiString name); void __fastcall ReadIniFile(void); void __fastcall WriteIniFile(void); __property Graphics::TBitmap* Glyph = {read=GetGlyph, write=SetGlyph, nodefault}; __published: __property bool AllowAllUp = {read=FAllowAllUp, write=SetAllowAllUp, default=0}; __property int GroupIndex = {read=FGroupIndex, write=SetGroupIndex, default=0}; __property bool Down = {read=FDown, write=SetDown, default=0}; __property Caption ; __property Enabled ; __property Font ; __property Buttons::TButtonLayout Layout = {read=FLayout, write=SetLayout, default=0}; __property int Margin = {read=FMargin, write=SetMargin, default=-1}; __property Buttons::TNumGlyphs NumGlyphs = {read=GetNumGlyphs, write=SetNumGlyphs, default=1}; __property ParentFont ; __property ParentShowHint ; __property ShowHint ; __property int Spacing = {read=FSpacing, write=SetSpacing, default=4}; __property Visible ; __property OnClick ; __property OnDblClick ; __property OnMouseDown ; __property OnMouseMove ; __property OnMouseUp ; __property Graphics::TColor BkColor = {read=FBkColor, write=FBkColor, default=536870911}; __property bool NormalButton = {read=FNormalButton, write=FNormalButton, default=0}; __property bool AllowEdit = {read=FAllowEdit, write=FAllowEdit, default=1}; __property System::AnsiString BitFileName = {read=FBitFileName, write=SetBitFileName, nodefault}; __property System::AnsiString IniName = {read=FIniName, write=FIniName, nodefault}; __property System::AnsiString IniSection = {read=FIniSection, write=FIniSection, nodefault}; }; class __declspec(delphiclass) TkBitBtn; class __declspec(pascalimplementation) TkBitBtn : public Stdctrls::TButton { typedef Stdctrls::TButton inherited; private: Graphics::TCanvas* FCanvas; void *FGlyph; TButtonStyle FStyle; TBitBtnKind FKind; TButtonLayout FLayout; int FSpacing; int FMargin; bool IsFocused; bool FModifiedGlyph; Graphics::TColor FBkColor; bool FNormalButton; MESSAGE void __fastcall CNMeasureItem(Messages::TWMMeasureItem &Message); MESSAGE void __fastcall CNDrawItem(Messages::TWMDrawItem &Message); MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message); MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message); MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message); void __fastcall DrawItem(const tagDRAWITEMSTRUCT &DrawItemStruct); void __fastcall SetGlyph(Graphics::TBitmap* Value); Graphics::TBitmap* __fastcall GetGlyph(void); Buttons::TNumGlyphs __fastcall GetNumGlyphs(void); void __fastcall SetNumGlyphs(Buttons::TNumGlyphs Value); void __fastcall GlyphChanged(System::TObject* Sender); bool __fastcall IsCustom(void); bool __fastcall IsCustomCaption(void); void __fastcall SetStyle(Buttons::TButtonStyle Value); void __fastcall SetKind(Buttons::TBitBtnKind Value); Buttons::TBitBtnKind __fastcall GetKind(void); void __fastcall SetLayout(Buttons::TButtonLayout Value); void __fastcall SetSpacing(int Value); void __fastcall SetMargin(int Value); protected: virtual void __fastcall CreateHandle(void); virtual void __fastcall CreateParams(Controls::TCreateParams &Params); virtual HPALETTE __fastcall GetPalette(void); virtual void __fastcall SetButtonStyle(bool ADefault); virtual Graphics::TColor __fastcall GetBkColor(void); public: __fastcall virtual TkBitBtn(Classes::TComponent* AOwner); __fastcall virtual ~TkBitBtn(void); virtual void __fastcall Click(void); __published: __property Cancel = {stored=IsCustom, default=0}; __property Caption = {stored=IsCustomCaption}; __property Default = {stored=IsCustom, default=0}; __property Enabled ; __property Graphics::TBitmap* Glyph = {read=GetGlyph, write=SetGlyph, stored=IsCustom, nodefault}; __property Buttons::TBitBtnKind Kind = {read=GetKind, write=SetKind, default=0}; __property Buttons::TButtonLayout Layout = {read=FLayout, write=SetLayout, default=0}; __property int Margin = {read=FMargin, write=SetMargin, default=-1}; __property ModalResult = {stored=IsCustom, default=0}; __property Buttons::TNumGlyphs NumGlyphs = {read=GetNumGlyphs, write=SetNumGlyphs, stored=IsCustom, default=1}; __property ParentShowHint ; __property ShowHint ; __property Buttons::TButtonStyle Style = {read=FStyle, write=SetStyle, default=0}; __property int Spacing = {read=FSpacing, write=SetSpacing, default=4}; __property TabOrder ; __property TabStop ; __property Visible ; __property OnEnter ; __property OnExit ; __property Graphics::TColor BkColor = {read=FBkColor, write=FBkColor, default=-2147483633}; __property bool NormalButton = {read=FNormalButton, write=FNormalButton, default=0}; public: /* TWinControl.CreateParented */ __fastcall TkBitBtn(HWND ParentWindow) : Stdctrls::TButton(ParentWindow ) { } }; //-- var, const, procedure --------------------------------------------------- extern Windows::TRect __fastcall kDrawButtonFace(Graphics::TCanvas* Canvas, const Windows::TRect &Client , int BevelWidth, Buttons::TButtonStyle Style, bool IsRounded, bool IsDown, bool IsFocused, bool DrawNormal ); extern void __fastcall finalization(void); } /* namespace Kbuttons */ #if !defined(NO_IMPLICIT_NAMESPACE_USE) using namespace Kbuttons; #endif //-- end unit ---------------------------------------------------------------- #endif // KButtons