home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
TABS.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
10KB
|
250 lines
//----------------------------------------------------------------------------
// Tabs.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Tabs.pas
//----------------------------------------------------------------------------
#ifndef TabsHPP
#define TabsHPP
//----------------------------------------------------------------------------
#include <Menus.hpp>
#include <Messages.hpp>
#include <Controls.hpp>
#include <Forms.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Tabs
{
//-- type declarations -------------------------------------------------------
enum TScrollBtn { sbLeft, sbRight };
class __declspec(delphiclass) TScroller;
class __declspec(pascalimplementation) TScroller : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
long FMin;
long FMax;
long FPosition;
Classes::TNotifyEvent FOnClick;
int FChange;
Graphics::TBitmap* Bitmap;
bool Pressed;
bool Down;
TScrollBtn Current;
int pWidth;
int pHeight;
void __fastcall SetMin(long Value);
void __fastcall SetMax(long Value);
void __fastcall SetPosition(long Value);
bool __fastcall CanScrollLeft(void);
bool __fastcall CanScrollRight(void);
HIDESBASE void __fastcall DoMouseDown(int X);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMMouseMove(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
public:
__fastcall virtual TScroller(Classes::TComponent* AOwner);
__fastcall virtual ~TScroller(void);
virtual void __fastcall Paint(void);
__published:
__property Classes::TNotifyEvent OnClick = {read=FOnClick, write=FOnClick};
__property long Min = {read=FMin, write=SetMin, default=0};
__property long Max = {read=FMax, write=SetMax, default=0};
__property long Position = {read=FPosition, write=SetPosition, default=0};
__property int Change = {read=FChange, write=FChange, default=1};
public:
/* TWinControl.CreateParented */ __fastcall TScroller(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
};
class __declspec(delphiclass) TTabList;
class __declspec(delphiclass) TTabSet;
enum TTabStyle { tsStandard, tsOwnerDraw };
typedef void __fastcall (__closure *TMeasureTabEvent)(System::TObject* Sender, int Index, int &TabWidth
);
typedef void __fastcall (__closure *TDrawTabEvent)(System::TObject* Sender, Graphics::TCanvas* TabCanvas
, const Windows::TRect &R, int Index, bool Selected);
typedef void __fastcall (__closure *TTabChangeEvent)(System::TObject* Sender, int NewTab, bool &AllowChange
);
enum TEdgeType { etNone, etFirstIsSel, etFirstNotSel, etLastIsSel, etLastNotSel, etNotSelToSel, etSelToNotSel,
etNotSelToNotSel };
class __declspec(pascalimplementation) TTabSet : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
int FStartMargin;
int FEndMargin;
Classes::TStrings* FTabs;
int FTabIndex;
int FFirstIndex;
int FVisibleTabs;
Graphics::TColor FSelectedColor;
Graphics::TColor FUnselectedColor;
Graphics::TColor FBackgroundColor;
bool FDitherBackground;
bool FAutoScroll;
TTabStyle FStyle;
int FOwnerDrawHeight;
TMeasureTabEvent FOnMeasureTab;
TDrawTabEvent FOnDrawTab;
TTabChangeEvent FOnChange;
Controls::TImageList* ImageList;
Graphics::TBitmap* MemBitmap;
Graphics::TBitmap* BrushBitmap;
Classes::TList* TabPositions;
int FTabHeight;
TScroller* Scroller;
int TabVersion;
bool FDoFix;
Byte FReserved;
void __fastcall SetSelectedColor(Graphics::TColor Value);
void __fastcall SetUnselectedColor(Graphics::TColor Value);
void __fastcall SetBackgroundColor(Graphics::TColor Value);
void __fastcall SetDitherBackground(bool Value);
void __fastcall SetAutoScroll(bool Value);
void __fastcall SetStartMargin(int Value);
void __fastcall SetEndMargin(int Value);
void __fastcall SetTabIndex(int Value);
void __fastcall SetFirstIndex(int Value);
void __fastcall SetTabList(Classes::TStrings* Value);
int __fastcall GetTabCount(void);
System::AnsiString __fastcall GetTabName(int Value);
void __fastcall SetTabName(int Value, const System::AnsiString AName);
void __fastcall SetTabStyle(TTabStyle Value);
void __fastcall SetTabHeight(int Value);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
void __fastcall PaintEdge(int X, int Y, int H, TEdgeType Edge);
void __fastcall CreateBrushPattern(Graphics::TBitmap* Bitmap);
int __fastcall CalcTabPositions(int Start, int Stop, Graphics::TCanvas* Canvas, int First);
void __fastcall CreateScroller(void);
void __fastcall InitBitmaps(void);
void __fastcall DoneBitmaps(void);
void __fastcall CreateEdgeParts(void);
void __fastcall FixTabPos(void);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
void __fastcall ScrollClick(System::TObject* Sender);
void __fastcall ReadIntData(Classes::TReader* Reader);
void __fastcall ReadBoolData(Classes::TReader* Reader);
protected:
virtual void __fastcall Paint(void);
virtual void __fastcall DrawTab(Graphics::TCanvas* TabCanvas, const Windows::TRect &R, int Index, bool
Selected);
bool __fastcall CanChange(int NewIndex);
virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);
virtual void __fastcall MeasureTab(int Index, int &TabWidth);
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
public:
__fastcall virtual TTabSet(Classes::TComponent* AOwner);
__fastcall virtual ~TTabSet(void);
int __fastcall ItemAtPos(const POINT &Pos);
Windows::TRect __fastcall ItemRect(int Item);
HIDESBASE void __fastcall SelectNext(bool Direction);
__property Canvas ;
__property int FirstIndex = {read=FFirstIndex, write=SetFirstIndex, default=0};
__published:
__property Align ;
__property bool AutoScroll = {read=FAutoScroll, write=SetAutoScroll, default=1};
__property Graphics::TColor BackgroundColor = {read=FBackgroundColor, write=SetBackgroundColor, default=-2147483633
};
__property bool DitherBackground = {read=FDitherBackground, write=SetDitherBackground, default=1};
__property DragMode ;
__property Enabled ;
__property int EndMargin = {read=FEndMargin, write=SetEndMargin, default=5};
__property Font ;
__property ParentShowHint ;
__property PopupMenu ;
__property ShowHint ;
__property int StartMargin = {read=FStartMargin, write=SetStartMargin, default=5};
__property Graphics::TColor SelectedColor = {read=FSelectedColor, write=SetSelectedColor, default=-2147483633
};
__property TTabStyle Style = {read=FStyle, write=SetTabStyle, default=0};
__property int TabHeight = {read=FOwnerDrawHeight, write=SetTabHeight, default=20};
__property Classes::TStrings* Tabs = {read=FTabs, write=SetTabList, nodefault};
__property int TabIndex = {read=FTabIndex, write=SetTabIndex, default=-1};
__property Graphics::TColor UnselectedColor = {read=FUnselectedColor, write=SetUnselectedColor, default=-2147483643
};
__property Visible ;
__property int VisibleTabs = {read=FVisibleTabs, nodefault};
__property OnClick ;
__property TTabChangeEvent OnChange = {read=FOnChange, write=FOnChange};
__property OnDragDrop ;
__property OnDragOver ;
__property TDrawTabEvent OnDrawTab = {read=FOnDrawTab, write=FOnDrawTab};
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property TMeasureTabEvent OnMeasureTab = {read=FOnMeasureTab, write=FOnMeasureTab};
__property OnStartDrag ;
public:
/* TWinControl.CreateParented */ __fastcall TTabSet(HWND ParentWindow) : Controls::TCustomControl(ParentWindow
) { }
};
class __declspec(pascalimplementation) TTabList : public Classes::TStringList
{
typedef Classes::TStringList inherited;
private:
TTabSet* Tabs;
public:
virtual void __fastcall Insert(int Index, const System::AnsiString S);
virtual void __fastcall Delete(int Index);
virtual int __fastcall Add(const System::AnsiString S);
virtual void __fastcall Put(int Index, const System::AnsiString S);
virtual void __fastcall Clear(void);
virtual void __fastcall AddStrings(Classes::TStrings* Strings);
public:
/* TStringList.Destroy */ __fastcall virtual ~TTabList(void) { }
public:
/* TObject.Create */ __fastcall TTabList(void) : Classes::TStringList() { }
};
enum TEdgePart { epSelectedLeft, epUnselectedLeft, epSelectedRight, epUnselectedRight };
//-- var, const, procedure ---------------------------------------------------
} /* namespace Tabs */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Tabs;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Tabs