?? xpmenu.hpp
字號:
// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'XPMenu.pas' rev: 6.00
#ifndef XPMenuHPP
#define XPMenuHPP
#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Buttons.hpp> // Pascal unit
#include <StdCtrls.hpp> // Pascal unit
#include <ExtCtrls.hpp> // Pascal unit
#include <CommCtrl.hpp> // Pascal unit
#include <Messages.hpp> // Pascal unit
#include <Menus.hpp> // Pascal unit
#include <Forms.hpp> // Pascal unit
#include <ComCtrls.hpp> // Pascal unit
#include <Controls.hpp> // Pascal unit
#include <Graphics.hpp> // Pascal unit
#include <Classes.hpp> // Pascal unit
#include <SysUtils.hpp> // Pascal unit
#include <Windows.hpp> // Pascal unit
#include <SysInit.hpp> // Pascal unit
#include <System.hpp> // Pascal unit
//-- user supplied -----------------------------------------------------------
namespace Xpmenu
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TXPContainer { xccForm, xccFrame, xccToolbar, xccCoolbar, xccControlbar, xccPanel, xccScrollBox, xccGroupBox, xccTabSheet, xccPageScroller };
#pragma option pop
typedef Set<TXPContainer, xccForm, xccPageScroller> TXPContainers;
#pragma option push -b-
enum TXPControl { xcMainMenu, xcPopupMenu, xcToolbar, xcControlbar, xcCombo, xcEdit, xcMaskEdit, xcMemo, xcRichEdit, xcCheckBox, xcRadioButton, xcButton, xcBitBtn, xcSpeedButton, xcPanel, xcGroupBox };
#pragma option pop
typedef Set<TXPControl, xcMainMenu, xcGroupBox> TXPControls;
class DELPHICLASS TControlSubClass;
class DELPHICLASS TXPMenu;
class PASCALIMPLEMENTATION TXPMenu : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
bool FActive;
Forms::TScrollingWinControl* FForm;
Graphics::TFont* FFont;
Graphics::TColor FColor;
Graphics::TColor FIconBackColor;
Graphics::TColor FMenuBarColor;
Graphics::TColor FCheckedColor;
Graphics::TColor FSeparatorColor;
Graphics::TColor FSelectBorderColor;
Graphics::TColor FSelectColor;
Graphics::TColor FDisabledColor;
Graphics::TColor FSelectFontColor;
int FIconWidth;
bool FDrawSelect;
bool FUseSystemColors;
Graphics::TColor FFColor;
Graphics::TColor FFIconBackColor;
Graphics::TColor FFSelectColor;
Graphics::TColor FFSelectBorderColor;
Graphics::TColor FFSelectFontColor;
Graphics::TColor FCheckedAreaColor;
Graphics::TColor FCheckedAreaSelectColor;
Graphics::TColor FFCheckedColor;
Graphics::TColor FFMenuBarColor;
Graphics::TColor FFDisabledColor;
Graphics::TColor FFSeparatorColor;
Graphics::TColor FMenuBorderColor;
Graphics::TColor FMenuShadowColor;
bool Is16Bit;
bool FOverrideOwnerDraw;
bool FGradient;
bool FFlatMenu;
bool FAutoDetect;
TXPContainers FXPContainers;
TXPControls FXPControls;
Byte FGrayLevel;
Byte FDimLevel;
void __fastcall SetActive(const bool Value);
void __fastcall SetAutoDetect(const bool Value);
void __fastcall SetForm(const Forms::TScrollingWinControl* Value);
void __fastcall SetFont(const Graphics::TFont* Value);
void __fastcall SetColor(const Graphics::TColor Value);
void __fastcall SetIconBackColor(const Graphics::TColor Value);
void __fastcall SetMenuBarColor(const Graphics::TColor Value);
void __fastcall SetCheckedColor(const Graphics::TColor Value);
void __fastcall SetDisabledColor(const Graphics::TColor Value);
void __fastcall SetSelectColor(const Graphics::TColor Value);
void __fastcall SetSelectBorderColor(const Graphics::TColor Value);
void __fastcall SetSeparatorColor(const Graphics::TColor Value);
void __fastcall SetSelectFontColor(const Graphics::TColor Value);
void __fastcall SetIconWidth(const int Value);
void __fastcall SetDrawSelect(const bool Value);
void __fastcall SetUseSystemColors(const bool Value);
void __fastcall SetOverrideOwnerDraw(const bool Value);
void __fastcall SetGradient(const bool Value);
void __fastcall SetFlatMenu(const bool Value);
void __fastcall SetXPContainers(const TXPContainers Value);
void __fastcall SetXPControls(const TXPControls Value);
protected:
void __fastcall InitItems(Controls::TWinControl* wForm, bool Enable, bool Update);
void __fastcall DrawItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, const Types::TRect &ARect, bool Selected);
void __fastcall MenueDrawItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, const Types::TRect &ARect, bool Selected);
void __fastcall ToolBarDrawButton(Comctrls::TToolBar* Sender, Comctrls::TToolButton* Button, Comctrls::TCustomDrawState State, bool &DefaultDraw);
void __fastcall ControlBarPaint(System::TObject* Sender, Controls::TControl* Control, Graphics::TCanvas* Canvas, Types::TRect &ARect, Extctrls::TBandPaintOptions &Options);
void __fastcall ActivateMenuItem(Menus::TMenuItem* MenuItem);
void __fastcall SetGlobalColor(Graphics::TCanvas* ACanvas);
void __fastcall DrawTopMenuItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, const Types::TRect &ARect, Graphics::TColor BckColor, bool IsRightToLeft);
void __fastcall DrawCheckedItem(Menus::TMenuItem* FMenuItem, bool Selected, bool Enabled, bool HasImgLstBitmap, Graphics::TCanvas* ACanvas, const Types::TRect &CheckedRect);
void __fastcall DrawTheText(System::TObject* Sender, AnsiString txt, AnsiString ShortCuttext, Graphics::TCanvas* ACanvas, const Types::TRect &TextRect, bool Selected, bool Enabled, bool Default, bool TopMenu, bool IsRightToLeft, Graphics::TFont* &TxtFont, int TextFormat);
void __fastcall DrawIcon(System::TObject* Sender, Graphics::TCanvas* ACanvas, Graphics::TBitmap* B, const Types::TRect &IconRect, bool Hot, bool Selected, bool Enabled, bool Checked, bool FTopMenu, bool IsRightToLeft);
void __fastcall MeasureItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, int &Width, int &Height);
Types::TPoint __fastcall GetImageExtent(Menus::TMenuItem* MenuItem);
Graphics::TColor __fastcall TopMenuFontColor(Graphics::TCanvas* ACanvas, Graphics::TColor Color);
void __fastcall DrawGradient(Graphics::TCanvas* ACanvas, const Types::TRect &ARect, bool IsRightToLeft);
void __fastcall DrawWindowBorder(HWND hWnd, bool IsRightToLeft);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
public:
__fastcall virtual TXPMenu(Classes::TComponent* AOwner);
__fastcall virtual ~TXPMenu(void);
__property Forms::TScrollingWinControl* Form = {read=FForm, write=SetForm};
__published:
__property Byte DimLevel = {read=FDimLevel, write=FDimLevel, nodefault};
__property Byte GrayLevel = {read=FGrayLevel, write=FGrayLevel, nodefault};
__property Graphics::TFont* Font = {read=FFont, write=SetFont};
__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
__property Graphics::TColor IconBackColor = {read=FIconBackColor, write=SetIconBackColor, nodefault};
__property Graphics::TColor MenuBarColor = {read=FMenuBarColor, write=SetMenuBarColor, nodefault};
__property Graphics::TColor SelectColor = {read=FSelectColor, write=SetSelectColor, nodefault};
__property Graphics::TColor SelectBorderColor = {read=FSelectBorderColor, write=SetSelectBorderColor, nodefault};
__property Graphics::TColor SelectFontColor = {read=FSelectFontColor, write=SetSelectFontColor, nodefault};
__property Graphics::TColor DisabledColor = {read=FDisabledColor, write=SetDisabledColor, nodefault};
__property Graphics::TColor SeparatorColor = {read=FSeparatorColor, write=SetSeparatorColor, nodefault};
__property Graphics::TColor CheckedColor = {read=FCheckedColor, write=SetCheckedColor, nodefault};
__property int IconWidth = {read=FIconWidth, write=SetIconWidth, nodefault};
__property bool DrawSelect = {read=FDrawSelect, write=SetDrawSelect, nodefault};
__property bool UseSystemColors = {read=FUseSystemColors, write=SetUseSystemColors, nodefault};
__property bool OverrideOwnerDraw = {read=FOverrideOwnerDraw, write=SetOverrideOwnerDraw, nodefault};
__property bool Gradient = {read=FGradient, write=SetGradient, nodefault};
__property bool FlatMenu = {read=FFlatMenu, write=SetFlatMenu, nodefault};
__property bool AutoDetect = {read=FAutoDetect, write=SetAutoDetect, nodefault};
__property TXPContainers XPContainers = {read=FXPContainers, write=SetXPContainers, default=1023};
__property TXPControls XPControls = {read=FXPControls, write=SetXPControls, default=65535};
__property bool Active = {read=FActive, write=SetActive, nodefault};
};
class PASCALIMPLEMENTATION TControlSubClass : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Controls::TControl* Control;
bool FBuilding;
bool FMouseInControl;
bool FLButtonBressed;
bool FBressed;
bool FIsKeyDown;
bool FIsFocused;
Classes::TWndMethod orgWindowProc;
TXPMenu* XPMenu;
bool FCtl3D;
Forms::TFormBorderStyle FBorderStyle;
unsigned FMsg;
void __fastcall ControlSubClass(Messages::TMessage &Message);
void __fastcall PaintControlXP(void);
void __fastcall PaintCombo(void);
void __fastcall PaintEdit(void);
void __fastcall PaintRichEdit(void);
void __fastcall PaintCheckBox(void);
void __fastcall PaintRadio(void);
void __fastcall PaintButton(void);
void __fastcall PaintBitButn(void);
void __fastcall PaintSpeedButton(void);
void __fastcall PaintPanel(void);
void __fastcall PaintGroupBox(void);
public:
#pragma option push -w-inl
/* TComponent.Create */ inline __fastcall virtual TControlSubClass(Classes::TComponent* AOwner) : Classes::TComponent(AOwner) { }
#pragma option pop
#pragma option push -w-inl
/* TComponent.Destroy */ inline __fastcall virtual ~TControlSubClass(void) { }
#pragma option pop
};
//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall Register(void);
extern PACKAGE void __fastcall GetSystemMenuFont(Graphics::TFont* Font);
extern PACKAGE Graphics::TColor __fastcall GetShadeColor(Graphics::TCanvas* ACanvas, Graphics::TColor clr, int Value);
extern PACKAGE Graphics::TColor __fastcall NewColor(Graphics::TCanvas* ACanvas, Graphics::TColor clr, int Value);
extern PACKAGE Graphics::TColor __fastcall GrayColor(Graphics::TCanvas* ACanvas, Graphics::TColor clr, int Value);
extern PACKAGE void __fastcall GrayBitmap(Graphics::TBitmap* ABitmap, int Value);
extern PACKAGE void __fastcall DimBitmap(Graphics::TBitmap* ABitmap, int Value);
extern PACKAGE void __fastcall DrawArrow(Graphics::TCanvas* ACanvas, int X, int Y);
extern PACKAGE void __fastcall DrawBitmapShadow(Graphics::TBitmap* B, Graphics::TCanvas* ACanvas, int X, int Y, Graphics::TColor ShadowColor);
extern PACKAGE void __fastcall DrawCheckMark(Graphics::TCanvas* ACanvas, int X, int Y);
} /* namespace Xpmenu */
using namespace Xpmenu;
#pragma option pop // -w-
#pragma option pop // -Vx
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // XPMenu
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -