/delphi-ide-theme-editor/IDE PlugIn/Galileo/TPopupActionBar.pas

http://delphi-ide-theme-editor.googlecode.com/ · Pascal · 153 lines · 153 code · 0 blank · 0 comment · 0 complexity · c11e4f2d0b0c26f67ae7fffa6e811bb1 MD5 · raw file

  1. type
  2. TPopupActionBar=class(TPopupMenu)
  3. private
  4. FActionManager :TCustomActionManager;
  5. FPopupMenu :TCustomActionPopupMenuEx;
  6. FOnGetControlClass :TGetControlClassEvent;
  7. FPopupPoint :TPoint;
  8. FAlignment :TPopupAlignment;
  9. FAutoPopup :Boolean;
  10. FPopupComponent :TComponent;
  11. FTrackButton :TTrackButton;
  12. FMenuAnimation :TMenuAnimation;
  13. FOnPopup :TNotifyEvent;
  14. FBiDiMode :TBiDiMode;
  15. FItems :TMenuItem;
  16. FWindowHandle :HWND;
  17. FOwnerDraw :Boolean;
  18. FParentBiDiMode :Boolean;
  19. FImageChangeLink :TChangeLink;
  20. FImages :TCustomImageList;
  21. FOnChange :TMenuChangeEvent;
  22. FMenuImage :string;
  23. FOwner :TComponent;
  24. FName :TComponentName;
  25. FTag :NativeInt;
  26. FComponents :TList;
  27. FFreeNotifies :TList;
  28. FDesignInfo :Integer;
  29. FComponentState :TComponentState;
  30. FVCLComObject :Pointer;
  31. FObservers :TObservers;
  32. FSortedComponents :TList;
  33. function GetComponent(AIndex: Integer): TComponent;
  34. protected
  35. FComponentStyle :TComponentStyle;
  36. public
  37. constructor Create(AOwner: TComponent);
  38. procedure Popup(X: Integer; Y: Integer);
  39. constructor Create(AOwner: TComponent);
  40. class destructor Destroy;
  41. procedure CloseMenu;
  42. procedure Popup(X: Integer; Y: Integer);
  43. constructor Create(AOwner: TComponent);
  44. function CreateMenuItem: TMenuItem;
  45. class destructor Destroy;
  46. function DispatchCommand(ACommand: Word): Boolean;
  47. function DispatchPopup(AHandle: HMENU): Boolean;
  48. function FindItem(Value: NativeUInt; Kind: TFindItemKind): TMenuItem;
  49. procedure GetChildren(Proc: TGetChildProc = procedure(Child: TComponent) of object; Root: TComponent);
  50. function GetHelpContext(Value: NativeUInt; ByCommand: Boolean): THelpContext;
  51. function IsRightToLeft: Boolean;
  52. function IsShortCut(var Message: TWMKey): Boolean;
  53. procedure ParentBiDiModeChanged;
  54. procedure ParentBiDiModeChanged(AControl: TObject);
  55. procedure ProcessMenuChar(var Message: TWMMenuChar);
  56. constructor Create(AOwner: TComponent);
  57. class destructor Destroy;
  58. procedure BeforeDestruction;
  59. procedure DestroyComponents;
  60. procedure Destroying;
  61. function ExecuteAction(Action: TBasicAction): Boolean;
  62. function FindComponent(const AName: string): TComponent;
  63. procedure FreeNotification(AComponent: TComponent);
  64. procedure RemoveFreeNotification(AComponent: TComponent);
  65. procedure FreeOnRelease;
  66. function GetEnumerator: TComponentEnumerator;
  67. function GetParentComponent: TComponent;
  68. function GetNamePath: string;
  69. function HasParent: Boolean;
  70. procedure InsertComponent(AComponent: TComponent);
  71. procedure RemoveComponent(AComponent: TComponent);
  72. procedure SetSubComponent(IsSubComponent: Boolean);
  73. function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HRESULT;
  74. function UpdateAction(Action: TBasicAction): Boolean;
  75. function IsImplementorOf(const I: IInterface): Boolean;
  76. function ReferenceInterface(const I: IInterface; Operation: TOperation): Boolean;
  77. class destructor Destroy;
  78. procedure Assign(Source: TPersistent);
  79. function GetNamePath: string;
  80. constructor Create;
  81. procedure Free;
  82. class function InitInstance(Instance: Pointer): TObject;
  83. procedure CleanupInstance;
  84. function ClassType: TClass;
  85. class function ClassName: string;
  86. class function ClassNameIs(const Name: string): Boolean;
  87. class function ClassParent: TClass;
  88. class function ClassInfo: Pointer;
  89. class function InstanceSize: Integer;
  90. class function InheritsFrom(AClass: TClass): Boolean;
  91. class function MethodAddress(const Name: ShortString): Pointer;
  92. class function MethodAddress(const Name: string): Pointer;
  93. class function MethodName(Address: Pointer): string;
  94. class function QualifiedClassName: string;
  95. function FieldAddress(const Name: ShortString): Pointer;
  96. function FieldAddress(const Name: string): Pointer;
  97. function GetInterface(const IID: TGUID; out Obj): Boolean;
  98. class function GetInterfaceEntry(const IID: TGUID): PInterfaceEntry;
  99. class function GetInterfaceTable: PInterfaceTable;
  100. class function UnitName: string;
  101. class function UnitScope: string;
  102. function Equals(Obj: TObject): Boolean;
  103. function GetHashCode: Integer;
  104. function ToString: string;
  105. function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HRESULT;
  106. procedure AfterConstruction;
  107. procedure BeforeDestruction;
  108. procedure Dispatch(var Message);
  109. procedure DefaultHandler(var Message);
  110. class function NewInstance: TObject;
  111. procedure FreeInstance;
  112. class destructor Destroy;
  113. property MenuActive: Boolean;
  114. property PopupComponent: TComponent;
  115. property PopupPoint: TPoint;
  116. property Images: TCustomImageList;
  117. property AutoHotkeys: TMenuAutoFlag;
  118. property AutoLineReduction: TMenuAutoFlag;
  119. property BiDiMode: TBiDiMode;
  120. property Handle: HMENU;
  121. property OwnerDraw: Boolean;
  122. property ParentBiDiMode: Boolean;
  123. property WindowHandle: HWND;
  124. property ComObject: IInterface;
  125. property ComponentCount: Integer;
  126. property ComponentIndex: Integer;
  127. property ComponentState: TComponentState;
  128. property ComponentStyle: TComponentStyle;
  129. property DesignInfo: Integer;
  130. property Owner: TComponent;
  131. property VCLComObject: Pointer;
  132. property Observers: TObservers;
  133. published
  134. property PopupMenu: TCustomActionPopupMenuEx;
  135. property Style: TActionBarStyle;
  136. property OnGetControlClass: TGetControlClassEvent;
  137. property Alignment: TPopupAlignment;
  138. property AutoHotkeys: TMenuAutoFlag;
  139. property AutoLineReduction: TMenuAutoFlag;
  140. property AutoPopup: Boolean;
  141. property BiDiMode: TBiDiMode;
  142. property HelpContext: THelpContext;
  143. property Images: TCustomImageList;
  144. property MenuAnimation: TMenuAnimation;
  145. property OwnerDraw: Boolean;
  146. property ParentBiDiMode: Boolean;
  147. property TrackButton: TTrackButton;
  148. property OnChange: TMenuChangeEvent;
  149. property OnPopup: TNotifyEvent;
  150. property Items: TMenuItem;
  151. property Name: TComponentName;
  152. property Tag: NativeInt;
  153. end;