home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
BUTTONS.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
8KB
|
198 lines
//----------------------------------------------------------------------------
// Buttons.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Buttons.pas
//----------------------------------------------------------------------------
#ifndef ButtonsHPP
#define ButtonsHPP
//----------------------------------------------------------------------------
#include <CommCtrl.hpp>
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <Graphics.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Buttons
{
//-- type declarations -------------------------------------------------------
enum TButtonLayout { blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom };
enum TButtonState { bsUp, bsDisabled, bsDown, bsExclusive };
enum TButtonStyle { bsAutoDetect, bsWin31, bsNew };
typedef Shortint TNumGlyphs;
class __declspec(delphiclass) TSpeedButton;
class __declspec(pascalimplementation) TSpeedButton : public Controls::TGraphicControl
{
typedef Controls::TGraphicControl inherited;
private:
int FGroupIndex;
void *FGlyph;
bool FDown;
bool FDragging;
bool FAllowAllUp;
TButtonLayout FLayout;
int FSpacing;
int FMargin;
void __fastcall GlyphChanged(System::TObject* Sender);
void __fastcall UpdateExclusive(void);
Graphics::TBitmap* __fastcall GetGlyph(void);
void __fastcall SetGlyph(Graphics::TBitmap* Value);
TNumGlyphs __fastcall GetNumGlyphs(void);
void __fastcall SetNumGlyphs(TNumGlyphs Value);
void __fastcall SetDown(bool Value);
void __fastcall SetAllowAllUp(bool Value);
void __fastcall SetGroupIndex(int Value);
void __fastcall SetLayout(TButtonLayout Value);
void __fastcall SetSpacing(int Value);
void __fastcall SetMargin(int Value);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
MESSAGE void __fastcall CMButtonPressed(Messages::TMessage &Message);
MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
MESSAGE void __fastcall CMSysColorChange(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);
public:
__fastcall virtual TSpeedButton(Classes::TComponent* AOwner);
__fastcall virtual ~TSpeedButton(void);
virtual void __fastcall Click(void);
__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 Graphics::TBitmap* Glyph = {read=GetGlyph, write=SetGlyph, nodefault};
__property TButtonLayout Layout = {read=FLayout, write=SetLayout, default=0};
__property int Margin = {read=FMargin, write=SetMargin, default=-1};
__property 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 ;
};
enum TBitBtnKind { bkCustom, bkOK, bkCancel, bkHelp, bkYes, bkNo, bkClose, bkAbort, bkRetry, bkIgnore,
bkAll };
class __declspec(delphiclass) TBitBtn;
class __declspec(pascalimplementation) TBitBtn : 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;
MESSAGE void __fastcall CNMeasureItem(Messages::TWMMeasureItem &Message);
MESSAGE void __fastcall CNDrawItem(Messages::TWMDrawItem &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
void __fastcall DrawItem(const DRAWITEMSTRUCT &DrawItemStruct);
void __fastcall SetGlyph(Graphics::TBitmap* Value);
Graphics::TBitmap* __fastcall GetGlyph(void);
TNumGlyphs __fastcall GetNumGlyphs(void);
void __fastcall SetNumGlyphs(TNumGlyphs Value);
void __fastcall GlyphChanged(System::TObject* Sender);
bool __fastcall IsCustom(void);
bool __fastcall IsCustomCaption(void);
void __fastcall SetStyle(TButtonStyle Value);
void __fastcall SetKind(TBitBtnKind Value);
TBitBtnKind __fastcall GetKind(void);
void __fastcall SetLayout(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);
public:
__fastcall virtual TBitBtn(Classes::TComponent* AOwner);
__fastcall virtual ~TBitBtn(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 TBitBtnKind Kind = {read=GetKind, write=SetKind, default=0};
__property TButtonLayout Layout = {read=FLayout, write=SetLayout, default=0};
__property int Margin = {read=FMargin, write=SetMargin, default=-1};
__property ModalResult = {stored=IsCustom, default=0};
__property TNumGlyphs NumGlyphs = {read=GetNumGlyphs, write=SetNumGlyphs, stored=IsCustom, default=1
};
__property ParentShowHint ;
__property ShowHint ;
__property 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 ;
public:
/* TWinControl.CreateParented */ __fastcall TBitBtn(HWND ParentWindow) : Stdctrls::TButton(ParentWindow
) { }
};
//-- var, const, procedure ---------------------------------------------------
extern Windows::TRect __fastcall DrawButtonFace(Graphics::TCanvas* Canvas, const Windows::TRect &Client
, int BevelWidth, TButtonStyle Style, bool IsRounded, bool IsDown, bool IsFocused);
extern void __fastcall finalization(void);
} /* namespace Buttons */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Buttons;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Buttons