home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 October
/
Chip_2001-10_cd1.bin
/
zkuste
/
delphi
/
kompon
/
d123456
/
CHEMPLOT.ZIP
/
Misc
/
Switch.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
2000-10-11
|
5KB
|
126 lines
// Borland C++ Builder
// Copyright (c) 1995, 1998 by Borland International
// All rights reserved
// (DO NOT EDIT: machine generated header) 'Switch.pas' rev: 3.00
#ifndef SwitchHPP
#define SwitchHPP
#include <Graphics.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>
//-- user supplied -----------------------------------------------------------
namespace Switch
{
//-- type declarations -------------------------------------------------------
typedef tagPOINT RectArray[4];
typedef tagPOINT TriArray[3];
enum TSwitchType { stHor_Rocker, stVert_Rocker, stButton };
class DELPHICLASS TSwitch;
class PASCALIMPLEMENTATION TSwitch : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
tagPOINT TopShape[3];
tagPOINT OnShape[4];
tagPOINT OffShape[4];
tagPOINT SideShape[4];
Classes::TNotifyEvent FOnChanged;
Classes::TNotifyEvent FOnChecked;
Classes::TNotifyEvent FOnUnChecked;
System::AnsiString FCaptionOn;
System::AnsiString FCaptionOff;
bool FChecked;
bool FCheckedLeft;
Byte FSlope;
Byte FSideLength;
Graphics::TColor FOnColor;
Graphics::TColor FOffColor;
Graphics::TColor FTopColor;
Graphics::TColor FSideColor;
TSwitchType FSwitchType;
int ALeft;
int ATop;
int AHeight;
int AWidth;
int LabelLen;
int LabelOfs;
int Side;
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
void __fastcall CallNotifyEvent(void);
void __fastcall Setup(void);
void __fastcall SetupVert(void);
void __fastcall Draw_Hor_Rocker(void);
void __fastcall Draw_Vert_Rocker(void);
void __fastcall Draw_Button(void);
void __fastcall SetCaptionOn(System::AnsiString Value);
void __fastcall SetCaptionOff(System::AnsiString Value);
void __fastcall SetChecked(bool Value);
void __fastcall SetCheckedLeft(bool Value);
void __fastcall SetSlope(Byte Value);
void __fastcall SetSideLength(Byte Value);
void __fastcall SetOnColor(Graphics::TColor Value);
void __fastcall SetOffColor(Graphics::TColor Value);
void __fastcall SetTopColor(Graphics::TColor Value);
void __fastcall SetSideColor(Graphics::TColor Value);
void __fastcall SetSwitchType(TSwitchType Value);
public:
__fastcall virtual TSwitch(Classes::TComponent* AOwner);
virtual void __fastcall Paint(void);
DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
__published:
__property System::AnsiString CaptionOn = {read=FCaptionOn, write=SetCaptionOn};
__property System::AnsiString CaptionOff = {read=FCaptionOff, write=SetCaptionOff};
__property bool Checked = {read=FChecked, write=SetChecked, default=0};
__property bool CheckedLeft = {read=FCheckedLeft, write=SetCheckedLeft, default=1};
__property Byte Slope = {read=FSlope, write=SetSlope, default=6};
__property Byte SideLength = {read=FSideLength, write=SetSideLength, default=6};
__property Graphics::TColor OnColor = {read=FOnColor, write=SetOnColor, default=255};
__property Graphics::TColor OffColor = {read=FOffColor, write=SetOffColor, default=128};
__property Graphics::TColor TopColor = {read=FTopColor, write=SetTopColor, default=12632256};
__property Graphics::TColor SideColor = {read=FSideColor, write=SetSideColor, default=12632256};
__property TSwitchType SwitchType = {read=FSwitchType, write=SetSwitchType, nodefault};
__property Font ;
__property TabStop ;
__property TabOrder ;
__property ShowHint ;
__property Visible ;
__property OnClick ;
__property OnMouseDown ;
__property Classes::TNotifyEvent OnChanged = {read=FOnChanged, write=FOnChanged};
__property Classes::TNotifyEvent OnChecked = {read=FOnChecked, write=FOnChecked};
__property Classes::TNotifyEvent OnUnChecked = {read=FOnUnChecked, write=FOnUnChecked};
public:
/* TCustomControl.Destroy */ __fastcall virtual ~TSwitch(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TSwitch(HWND ParentWindow) : Controls::TCustomControl(ParentWindow
) { }
};
//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall Register(void);
} /* namespace Switch */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Switch;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Switch