| Class TFileOpener (unit OxOFile) |
TIExpert
For Debug
| Constructors |
constructor Create;| Functions |
destructor Destroy;
function GetAuthor: string;
function GetIDString: string;
function GetName: string;
function GetStyle: TExpertStyle;
Function InEditControl: Boolean;
Procedure KeyDown(var Key: Word; Shift: TShiftState);
Procedure OnMessage(Var Msg: TMsg; Var Handled: Boolean);
Function Open(FileName: String): Boolean;
Function DoKeyDown(var Message: TWMKey): Boolean;
Function GetCursorFileName: String;
procedure HookEditor;
procedure UnHookEditor;
procedure Execute;
function GetComment: string;TFileOpener code } {Overriding to avoid abstract error
function GetGlyph: HICON;
function GetMenuText: string;
function GetPage: string;
function GetState: TExpertState;| Properties |
| Events |
| Variables |
OldOnMessage : TMessageEvent;| Constructors |
constructor Create;| Functions |
destructor Destroy;
function GetAuthor: string;
function GetIDString: string;
function GetName: string;
function GetStyle: TExpertStyle;author
Function InEditControl: Boolean;Only try to unhook the hook we put in} {If Application.OnMessage = OnMessage then
Procedure KeyDown(var Key: Word; Shift: TShiftState);if
Procedure OnMessage(Var Msg: TMsg; Var Handled: Boolean);Result = True, Message has been handled
Function Open(FileName: String): Boolean;If except isn't here Delphi Crashes
Function DoKeyDown(var Message: TWMKey): Boolean;KeyDown
Function GetCursorFileName: String;Search from cursor pos Forward to end for invalid char
procedure HookEditor;Destroy
procedure UnHookEditor;Procedure TFileOpener.HookEditor(Owner: TComponent); {Recursive Proc to find and Hook the editor window} {Pass Application for Owner} {Hook the popup menu for Ctrl-Enter} {This works if user selects popupmenu item, but not if user presses Ctrl-Enter} Var Ctr: Integer; Item: Integer; begin Ctr := 0; While (Ctr < Owner.ComponentCount) and (EditControl = nil) do begin If Owner.Components[Ctr].Classname = 'TEditControl' then begin EditControl := Owner.Components[Ctr] as TCustomControl; If TForm(EditControl).PopUpMenu <> nil then with TForm(EditControl).PopUpMenu do For Item := 0 to Items.Count -1 do If Items[Item].ShortCut = ShortCut(vk_return,[ssCtrl]) then begin MenuItem := Items[Item]; OldonClick := Items[Item].OnClick; Items[Item].OnClick := Self.OnClick; Break; end; end else HookEditor(Owner.Components[Ctr]); Inc(Ctr); end; end;
procedure Execute;
function GetComment: string;Overriding to avoid abstract error
TFileOpener code } {Overriding to avoid abstract error
function GetGlyph: HICON;
function GetMenuText: string;
function GetPage: string;
function GetState: TExpertState;| Properties |
| Events |
| Variables |
OldOnMessage : TMessageEvent;