home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
MNUBUILD.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
15KB
|
343 lines
//----------------------------------------------------------------------------
// Mnubuild.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Mnubuild.pas
//----------------------------------------------------------------------------
#ifndef MnubuildHPP
#define MnubuildHPP
//----------------------------------------------------------------------------
#include <Dialogs.hpp>
#include <LibMain.hpp>
#include <LibIntf.hpp>
#include <DsgnIntf.hpp>
#include <MenuTmpl.hpp>
#include <Menus.hpp>
#include <Controls.hpp>
#include <Forms.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Mnubuild
{
//-- type declarations -------------------------------------------------------
enum Mnubuild_1 { svVertical, svHorizontal };
typedef Set<Mnubuild_1, svVertical, svHorizontal> TScrollVisibility;
enum Mnubuild_2 { fwHomeVert, fwHomeHorz };
typedef Set<Mnubuild_2, fwHomeVert, fwHomeHorz> THomeValue;
class __declspec(delphiclass) TMenuItemWin;
class __declspec(pascalimplementation) TMenuItemWin : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
int FCaptionExtent;
Menus::TMenuItem* FMenuItem;
bool FSelected;
int FShortCutExtent;
void __fastcall DoSetColor(bool IsSelected);
int __fastcall GetCaptionExtent(void);
Menus::TMenuItem* __fastcall GetMenuItem(void);
void __fastcall PaintItemFocusRect(void);
void __fastcall PaintItemGlyph(bool OnLeft, int bmpID);
void __fastcall PaintItemShortcut(Word DrawFmt);
void __fastcall PaintItemText(Word DrawFmt);
void __fastcall PaintSeparator(void);
void __fastcall SetMenuItem(Menus::TMenuItem* Value);
void __fastcall SetSelected(bool Value);
protected:
virtual void __fastcall Paint(void);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
public:
__fastcall virtual TMenuItemWin(Classes::TComponent* AOwner);
__fastcall virtual ~TMenuItemWin(void);
bool __fastcall SetExtentValues(void);
__property int CaptionExtent = {read=GetCaptionExtent, nodefault};
__property Menus::TMenuItem* MenuItem = {read=GetMenuItem, write=SetMenuItem, nodefault};
__property bool Selected = {read=FSelected, write=SetSelected, nodefault};
__property int ShortCutExtent = {read=FShortCutExtent, nodefault};
public:
/* TWinControl.CreateParented */ __fastcall TMenuItemWin(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
};
class __declspec(delphiclass) TMenuWin;
class __declspec(pascalimplementation) TMenuWin : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
bool FDoingDelete;
int FLastBlockIndex;
int FItemMargin;
bool FMouseDownOnSelected;
TMenuWin* FNextLevel;
TMenuWin* FPrevLevel;
Classes::TShiftState FShiftState;
Menus::TMenuItem* FWorkMenu;
TMenuItemWin* __fastcall CreateAndPositionNewItem(void);
int __fastcall FindControlIndex(TMenuItemWin* ItemCtl);
int __fastcall GetItemsSelected(void);
int __fastcall GetLongestCaption(void);
int __fastcall GetLongestShortCut(void);
void __fastcall HideNextLevels(void);
void __fastcall ItemDblClick(System::TObject* Sender);
void __fastcall ItemGotFocus(Controls::TWinControl* Sender);
void __fastcall ItemKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
void __fastcall ItemKeyPress(System::TObject* Sender, char &Key);
void __fastcall ItemOnMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState
Shift, int X, int Y);
void __fastcall NewMenuItem(TMenuItemWin* Sender, Classes::TShiftState Shift);
void __fastcall NewSubMenu(TMenuItemWin* Sender);
void __fastcall RemoveMenuItem(TMenuItemWin* Sender);
void __fastcall SetItemProperties(TMenuItemWin* ItemCtl);
void __fastcall SizeItemWindows(void);
bool __fastcall VerifyWindowsMatchMenu(Menus::TMenuItem* Item);
void __fastcall WidenItems(int NewWidth);
HIDESBASE MESSAGE void __fastcall CMFocusChanged(Controls::TCMFocusChanged &Message);
void __fastcall DoDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y);
void __fastcall DoDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y, Controls::TDragState
State, bool &Accept);
HIDESBASE void __fastcall DoEndDrag(System::TObject* Sender, System::TObject* Target, int X, int Y)
;
void __fastcall InitDragDrop(void);
protected:
virtual void __fastcall Paint(void);
bool __fastcall TreatAsMenuBar(void);
public:
__fastcall virtual TMenuWin(Classes::TComponent* AOwner);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
void __fastcall AdjustAfterParentSize(void);
TMenuItemWin* __fastcall GetActiveItem(TMenuWin* MenuWin);
TMenuItemWin* __fastcall GetWindowForItem(Menus::TMenuItem* Item);
void __fastcall InsertMenuTemplate(TMenuItemWin* Sender, Menutmpl::TMenuTemplate* Template);
bool __fastcall IsAncestorLevel(TMenuWin* MenuWin);
bool __fastcall IsLastItemEmpty(void);
bool __fastcall IsParentLevel(TMenuWin* MenuWin, TMenuItemWin* ItemCtl);
void __fastcall MenuInvalidNotification(void);
void __fastcall NavItemUD(TMenuItemWin* Sender, Word Key, Classes::TShiftState Shift);
void __fastcall NavItemLR(TMenuItemWin* Sender, Word Key, Classes::TShiftState Shift);
void __fastcall NavItemIncrement(TMenuItemWin* Sender, bool Forward, Classes::TShiftState Shift);
void __fastcall PositionAfterParentSize(TMenuWin* AMenuWin);
void __fastcall ResetAllSelections(void);
void __fastcall SetPosition(bool DoPosition);
void __fastcall SetWorkMenu(Menus::TMenuItem* Value);
void __fastcall StreamSelections(Classes::TMemoryStream* S, Classes::TComponent* Root);
void __fastcall UpdateMenuAssignments(void);
void __fastcall UpdateNotification(void);
void __fastcall UpdatePropertyInspector(void);
__property int ItemMargin = {read=FItemMargin, nodefault};
__property int ItemsSelected = {read=GetItemsSelected, nodefault};
__property int LastBlockIndex = {read=FLastBlockIndex, write=FLastBlockIndex, nodefault};
__property int LongestCaption = {read=GetLongestCaption, nodefault};
__property Classes::TShiftState MouseDownShiftState = {read=FShiftState, write=FShiftState, nodefault
};
__property bool MouseDownOnSelected = {read=FMouseDownOnSelected, write=FMouseDownOnSelected, nodefault
};
__property Menus::TMenuItem* WorkMenu = {read=FWorkMenu, write=SetWorkMenu, nodefault};
public:
/* TCustomControl.Destroy */ __fastcall virtual ~TMenuWin(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TMenuWin(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
};
class __declspec(delphiclass) TMenuBuilder;
class __declspec(pascalimplementation) TMenuBuilder : public Forms::TForm
{
typedef Forms::TForm inherited;
__published:
Menus::TPopupMenu* PopupMenu1;
Menus::TMenuItem* PopupMenu1SelectMenu;
Menus::TMenuItem* PopupMenu1SaveAsTemplate;
Menus::TMenuItem* PopupMenu1InsertFromTemplate;
Menus::TMenuItem* PopupMenu1DeleteTemplates;
Menus::TMenuItem* InsertItem;
Menus::TMenuItem* DeleteItem;
Menus::TMenuItem* CreateSubmenu1;
Menus::TMenuItem* N1;
Menus::TMenuItem* InsertResourceItem;
Dialogs::TOpenDialog* LoadMenuDlg;
void __fastcall FormResize(System::TObject* Sender);
void __fastcall FormActivate(System::TObject* Sender);
void __fastcall FormDeactivate(System::TObject* Sender);
void __fastcall FormMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState
Shift, int X, int Y);
void __fastcall FormCreate(System::TObject* Sender);
void __fastcall FormDestroy(System::TObject* Sender);
void __fastcall PopupMenu1SelectMenuClick(System::TObject* Sender);
void __fastcall PopupMenu1SaveAsTemplateClick(System::TObject* Sender);
void __fastcall PopupMenu1InsertFromTemplateClick(System::TObject* Sender);
void __fastcall PopupMenu1DeleteTemplatesClick(System::TObject* Sender);
void __fastcall PopupMenu1Popup(System::TObject* Sender);
void __fastcall InsertItemClick(System::TObject* Sender);
void __fastcall DeleteItemClick(System::TObject* Sender);
void __fastcall CreateSubmenu1Click(System::TObject* Sender);
void __fastcall InsertResourceItemClick(System::TObject* Sender);
private:
System::AnsiString FCaptionMenu;
System::AnsiString FCaptionOwner;
int FMenuHeight;
int FBitMapWidth;
Libmain::TLibForm* FLibForm;
bool FDoingPopup;
bool FDragAny;
TMenuItemWin* FDragControl;
Classes::TList* FDragList;
TMenuWin* FFirstWin;
bool FMainMenu;
bool FSelectCaption;
Classes::TComponent* FMenuOwner;
TMenuItemWin* FSpecialActive;
Menutmpl::TMenuTemplateManager* FTemplateManager;
Menus::TMenuItem* FWorkMenu;
int FStateFlags;
bool FActive;
TScrollVisibility __fastcall GetScrollVisibility(void);
THomeValue __fastcall IsFirstWindowHome(void);
bool __fastcall IsInDDList(TMenuWin* MenuWin);
HIDESBASE MESSAGE void __fastcall WMActivate(Messages::TWMActivate &Message);
HIDESBASE MESSAGE void __fastcall WMWinIniChange(Messages::TMessage &Message);
protected:
virtual void __fastcall ActiveChanged(void);
public:
HIDESBASE void __fastcall Activate(void);
void __fastcall AdjustScrollBars(void);
void __fastcall BuildCaptionFromPieces(void);
void __fastcall ClearWorkMenu(Menus::TMenuItem* AMenu);
TMenuItemWin* __fastcall GetActiveItem(TMenuWin* MenuWin);
Menus::TMenuItem* __fastcall GetANewMenu(bool ItemOnly);
TMenuWin* __fastcall GetSubWinForItem(TMenuItemWin* ItemCtl);
void __fastcall ItemGotFocus(TMenuWin* MenuWin, TMenuItemWin* MenuCtl);
void __fastcall NewPopup(TMenuWin* MenuWin, TMenuItemWin* MenuCtl);
void __fastcall ResetAllSelections(TMenuWin* Sender);
void __fastcall SetSelection(Libmain::TLibForm* Form, Dsgnintf::TComponentList* Selection);
void __fastcall UpdatePropertyInspector(Dsgnintf::TComponentList* Selection);
bool __fastcall CheckDragAcceptance(TMenuWin* StartWin, TMenuItemWin* StartCtl);
void __fastcall ClearDragState(void);
void __fastcall HandleAltF10(Classes::TShiftState Shift, Word &Key);
void __fastcall ReConstructDDList(void);
void __fastcall RemovalNotification(Classes::TComponent* AComponent);
void __fastcall SetDragState(TMenuWin* StartWin, TMenuItemWin* StartControl);
HIDESBASE void __fastcall SetMenu(Menus::TMenuItem* AMenu, Libmain::TLibForm* ALibForm);
void __fastcall SetWorkMenu(Menus::TMenuItem* Value, bool SetActiveControl);
void __fastcall UpdateNotification(void);
void __fastcall PerformUpdate(void);
void __fastcall Cut(void);
void __fastcall Copy(void);
void __fastcall Paste(void);
void __fastcall Delete(void);
Libintf::TEditState __fastcall GetEditState(void);
void __fastcall EditAction(Libintf::TEditAction Action);
__property int BitMapWidth = {read=FBitMapWidth, nodefault};
__property bool DragAny = {read=FDragAny, write=FDragAny, nodefault};
__property TMenuItemWin* DragControl = {read=FDragControl, write=FDragControl, nodefault};
__property TMenuWin* FirstWindow = {read=FFirstWin, nodefault};
__property int StateFlags = {read=FStateFlags, write=FStateFlags, nodefault};
__property int MenuHeight = {read=FMenuHeight, nodefault};
__property Libmain::TLibForm* LibForm = {read=FLibForm, nodefault};
__property bool MainMenu = {read=FMainMenu, nodefault};
__property Classes::TComponent* MenuOwner = {read=FMenuOwner, write=FMenuOwner, nodefault};
__property TScrollVisibility ScrollVisibility = {read=GetScrollVisibility, nodefault};
__property bool SelectCaption = {read=FSelectCaption, write=FSelectCaption, nodefault};
__property TMenuItemWin* SpecialActive = {read=FSpecialActive, write=FSpecialActive, nodefault};
__property bool Active = {read=FActive, nodefault};
__property Menus::TMenuItem* WorkMenu = {read=FWorkMenu, nodefault};
public:
/* TForm.Create */ __fastcall virtual TMenuBuilder(Classes::TComponent* AOwner) : Forms::TForm(AOwner
) { }
/* TForm.CreateNew */ __fastcall TMenuBuilder(Classes::TComponent* AOwner, int Dummy) : Forms::TForm(
AOwner, Dummy) { }
/* TForm.Destroy */ __fastcall virtual ~TMenuBuilder(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TMenuBuilder(HWND ParentWindow) : Forms::TForm(ParentWindow
) { }
};
class __declspec(delphiclass) TMenuItemProperty;
class __declspec(pascalimplementation) TMenuItemProperty : public Dsgnintf::TPropertyEditor
{
typedef Dsgnintf::TPropertyEditor inherited;
public:
virtual System::AnsiString __fastcall GetValue(void);
virtual Dsgnintf::TPropertyAttributes __fastcall GetAttributes(void);
virtual void __fastcall Edit(void);
public:
/* TPropertyEditor.Destroy */ __fastcall virtual ~TMenuItemProperty(void) { }
public:
/* TObject.Create */ __fastcall TMenuItemProperty(void) : Dsgnintf::TPropertyEditor() { }
};
class __declspec(delphiclass) TMenuEditor;
class __declspec(pascalimplementation) TMenuEditor : public Dsgnintf::TComponentEditor
{
typedef Dsgnintf::TComponentEditor inherited;
public:
virtual void __fastcall Edit(void);
virtual void __fastcall ExecuteVerb(int Index);
virtual System::AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
public:
/* TComponentEditor.Create */ __fastcall virtual TMenuEditor(Classes::TComponent* AComponent, Dsgnintf::TFormDesigner*
ADesigner) : Dsgnintf::TComponentEditor(AComponent, ADesigner) { }
public:
/* TObject.Destroy */ __fastcall virtual ~TMenuEditor(void) { }
};
//-- var, const, procedure ---------------------------------------------------
#define obm_MnArrow (Word)(32739)
#define obm_Check (Word)(32760)
#define hcMenuDesigner (Word)(1275)
#define sfNoState (Byte)(0)
#define sfInUpdate (Byte)(1)
#define sfOISetSel (Byte)(2)
#define sfChicago (Byte)(4)
#define sfSBAdjust (Byte)(8)
#define adjDelta (Byte)(4)
extern TMenuBuilder* MenuEditor;
extern void __fastcall InitMenuBuilder(void);
extern void __fastcall DoneMenuBuilder(void);
//-- template instantiations -------------------------------------------------
template class Classes::TShiftState ;
template class THomeValue ;
template class TScrollVisibility ;
} /* namespace Mnubuild */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Mnubuild;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Mnubuild