home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April
/
Chip_1997-04_cd.bin
/
prezent
/
cb
/
data.z
/
APP.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-01-16
|
9KB
|
223 lines
//----------------------------------------------------------------------------
// App.hpp - dcc32 generated hdr (DO NOT EDIT) rev: 0
// From: App.pas
//----------------------------------------------------------------------------
#ifndef AppHPP
#define AppHPP
//----------------------------------------------------------------------------
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include <StdCtrls.hpp>
#include <ToolIntf.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysUtils.hpp>
#include <System.hpp>
#include <FileCtrl.hpp>
//-- type declarations -------------------------------------------------------
enum TMoveDirection { mdPrevious, mdNext, mdNoMove };
class __declspec(delphiclass) TAppExpert;
class TAppExpert : public TForm
{
typedef TForm inherited;
__published:
TPaintBox* Sample; // SamplePaint
TButton* CancelBtn; //
TButton* PrevButton; // NextPrevClick
TButton* NextButton; // NextPrevClick
TPageControl* PageControl;//
TTabSheet* Menus; //
TLabel* Label1; //
TLabel* Label2; //
TLabel* Label3; //
TLabel* Label4; //
TLabel* Label5; //
TCheckBox* cbFileMenu; // MenuClicked
TCheckBox* cbEditMenu; // MenuClicked
TCheckBox* cbWindowMenu; // MenuClicked
TCheckBox* cbHelpMenu; // MenuClicked
TTabSheet* Extensions; //
TLabel* Label6; //
TPanel* Panel1; //
THeader* ExtHeader; // HeaderSized
TListBox* ExtListBox; // DrawExtension
TButton* AddButton; //
TButton* EditButton; // EditClick
TButton* DeleteButton; // DeleteClicked
TButton* UpButton; // MoveClick
TButton* DownButton; // MoveClick
TTabSheet* Speedbtns; //
TLabel* Label7;
TPaintBox* Speedbar; // SppedMouseDown, SpeedbarPaint
TLabel* Label8; //
TLabel* Label9; //
TListBox* MenuList; // MenuListClick
TListBox* MenuItemList; // DrawMenuItem
TButton* Button1; // InsertClick
TButton* Button2; // RemoveClick
TButton* Button3; // SpaceClick
TTabSheet* AppInfo; //
TLabel* Label13; //
TLabel* Label10; //
TLabel* Label15; //
TGroupBox* GroupBox1; //
TCheckBox* cbMDIApp; //
TCheckBox* cbStatusLine; //
TCheckBox* cbHints; //
TEdit* AppPath; //
TButton* PathBrowse; // BrowseClick
TEdit* AppName; //
void __fastcall HeaderSized(TObject* Sender,
Integer ASection,
Integer AWidth);
void __fastcall FormCreate(TObject* Sender);
void __fastcall NextPrevClick(TObject* Sender);
void __fastcall DrawExtension(TWinControl* Control,
Integer Index,
const TRect &Rect,
TOwnerDrawState State);
void __fastcall AddClick(TObject* Sender);
void __fastcall EditClick(TObject* Sender);
void __fastcall DeleteClick(TObject* Sender);
void __fastcall MoveClick(TObject* Sender);
void __fastcall SpeedbarPaint(TObject* Sender);
void __fastcall FormDestroy(TObject* Sender);
void __fastcall MenuListClick(TObject* Sender);
void __fastcall DrawMenuItem(TWinControl* Control,
Integer Index,
const TRect &Rect,
TOwnerDrawState State);
void __fastcall InsertClick(TObject* Sender);
void __fastcall SpaceClick(TObject* Sender);
void __fastcall SpeedMouseDown(TObject* Sender,
TMouseButton Button,
TShiftState Shift,
Integer X, Integer Y);
void __fastcall RemoveClick(TObject* Sender);
void __fastcall BrowseClick(TObject* Sender);
void __fastcall SamplePaint(TObject* Sender);
void __fastcall MenuClicked(TObject* Sender);
private:
TList* SpeedList;
TList* ButtonList;
int FSpeedIndex;
Graphics::TBitmap* SpeedPointer;
Graphics::TBitmap* Offscreen;
Graphics::TBitmap* SampleBmp;
void __fastcall RefreshButtons(void);
int __fastcall NextPage(TMoveDirection Direction);
TRect __fastcall SpeedButtonRect(int Index);
int __fastcall SpeedButtonAtPos(const tagPOINT &Pos);
int __fastcall GetSpeedButtonCount(void);
int __fastcall GetSpeedButtonID(int Value);
bool __fastcall ValidateInfo(void);
public:
bool __fastcall HasMenus(void);
__property int SpeedButtonCount = {read=GetSpeedButtonCount, nodefault};
__property int SpeedButtonID[int Value] = {read=GetSpeedButtonID};
__fastcall virtual TAppExpert(TComponent* AOwner);
__fastcall TAppExpert(TComponent* AOwner, int Dummy) : TForm(AOwner, Dummy) { }
__fastcall virtual ~TAppExpert(void) { }
__fastcall TAppExpert(HWND ParentWindow) : TForm(ParentWindow) { }
};
//-- var, const, procedure ---------------------------------------------------
extern TAppExpert* AppExpert;
extern void __fastcall ApplicationExpert(TIToolServices* ToolServices);
//-- end unit ----------------------------------------------------------------
void __fastcall ApplicationExpert(TIToolServices* ToolServices);
// page numbers
extern int pgMenus;
extern int pgExtensions;
extern int pgSpeedbar;
extern int pgAppInfo;
extern int FirstPage;
extern int LastPage;
extern TPoint *DefaultButtonSize;
extern int DefaultButtonSpace;
extern int MenuItemCount;
enum TMainItems { mmFile, mmEdit, mmWindow, mmHelp };
extern int MenuItemCounts[4];
extern int MenuItemOffsets[4];
extern char *SampleBitmaps[4];
/////////////////////////////////////////// TButtonImage ////////
// TButtonImage - draws the image of a TSpeedButton
class TButtonImage: public TObject {
private:
long FBitmapID;
Graphics::TBitmap *bmFBitmap;
int FNumGlyphs;
void __fastcall SetBitmapID(long Value);
public:
__fastcall TButtonImage(void);
__fastcall ~TButtonImage(void);
void __fastcall Draw(TCanvas *Canvas, int X, int Y);
__property long BitmapID = {read=FBitmapID, write=SetBitmapID};
__property int NumGlyphs = {read=FNumGlyphs, write=FNumGlyphs};
};
// Code generation support
enum TCodeSnipet {csProgram, csMainIntf, csHdr1, csHdr2, csMainImpl,
csFormCreateProc, csShowHelpProc, csFileNewProc,
csFileOpenProc, csFileSaveProc, csFileSaveAsProc,
csFilePrintProc, csFilePrintSetupProc,
csFileExitProc, csEditUndoProc, csEditCutProc,
csEditCopyProc, csEditPasteProc, csWindowTileProc,
csWindowCascadeProc, csWindowArrangeProc,
csHelpContentsProc, csHelpSearchProc,
csHelpHowToUseProc, csHelpAboutProc, csForm,
csFormMenu, csCreateMethod, csFormMDI, csHints,
csMenuObject, csFileMenuObject, csEditMenuObject,
csWindowMenuObject, csHelpMenuObject,
csOpenDialogObject,csSaveDialogObject,
csPrintDialogObject,csPrintSetupDialogObject,
csStatusLineObject, csSpeedbarObject,
csSpeedButtonObject, csLastObject};
extern int SourceBufferSize;
//extern char *cCodeSnipets[csLastObject-1];
extern THandle *hCodeResource;
extern char *cSourceBuffer;
extern char *cResourceBuffer;
// Function prototypes
void __fastcall InitCodeGeneration(void);
void __fastcall DoneCodeGeneration(void);
void __fastcall BinToHex(unsigned char *Binary, unsigned char *Text, int Count);
void __fastcall WriteBinaryAsText(TStream *Input, TStream *Output) ;
void _fastcall FmtWrite(TStream *Stream, char *Fmt,
const TVarRec *Args, const int Args_Size);
void __fastcall WriteSnipet(TStream *Stream, TCodeSnipet Snipet) ;
void __fastcall WriteIdent(TStream *Stream, long ResID, const String VarType) ;
void __fastcall WriteMenuItems(TStream *Stream, TMainItems MenuIndex) ;
void __fastcall WriteMethodDecl(TStream *Stream, long ResID);
void __fastcall WriteMethodHeader(TStream *Stream, long ResID) ;
void __fastcall WriteMenuMethodDecls(TStream *Stream, TMainItems MenuIndex) ;
void __fastcall WriteMenuMethods(TStream *Stream, TMainItems MenuIndex);
void __fastcall WriteGlyphData(TStream *Stream, long BitmapID);
TFileName* __fastcall GenerateProjectSource(TAppExpert *AppExpert);
void __fastcall GenerateHdrSourceFile(TAppExpert *AppExpert);
void __fastcall GenerateMainSourceFile(TAppExpert *AppExpert);
void __fastcall GenerateMainFormFile(TAppExpert *AppExpert);
bool __fastcall EditFilterInfo(String *Filter);
void __fastcall RemoveItems(TList &List, TMainItems MenuIndex);
#endif // App