CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  VCL组件开发及应用

那位大虾研究过ToolsAPI,烦请资料相送

楼主csntgao(小高)2003-12-04 10:53:54 在 Delphi / VCL组件开发及应用 提问

那位大虾研究过ToolsAPI,烦请资料相送 问题点数:0、回复次数:1Top

1 楼hongqi162(失踪的月亮)回复于 2003-12-04 11:04:19 得分 0

Some   code   from   Delphi's   ToolsAPI   Demo.    
   
  Attention:    
  This   software   is   provided   'as-is',   without   any   express   or    
  implied   warranty.   In   no   event   will   the   author   be   held   liable    
  for   any   damages   arising   from   the   use   of   this   software.    
   
  This   unit   is   free   to   use   but   the   origin   of   this   software    
  must   not   be   misrepresented,   you   must   not   claim   that   you    
  wrote   the   original   software.    
   
  Feel   free   to   use   this   component   in   your   product   including    
  commercial   applications.    
   
  If   You   alert   this   component's   code   to   make   it   better,    
  please   remember   to   tell   me   about   it   ,   let's   to   make   it   better    
  together.    
   
  This   attention   may   not   be   removed   or   altered   from   any   source    
  distribution.    
   
   
  Feedback:    
  E-Mail:   panying@sina.com    
  HomePage:http://myzeroworld.yeah.net    
   
  Version   1.1    
  Remove   some   useless   code.    
  Version   1.0    
  Initial   Version.    
  }    
   
  unit   EagleBufferList;    
   
  interface    
   
  procedure   Register;    
   
  implementation    
   
  uses   Windows,   Classes,   SysUtils,Menus,   ToolsAPI,   Controls   ;    
   
  type    
      TBufferList   =   class(TNotifierObject,   IUnknown,   IOTANotifier,    
          IOTAKeyboardBinding)            
          function   GetBindingType:   TBindingType;    
          function   GetDisplayName:   string;    
          function   GetName:   string;    
          procedure   BindKeyboard(const   BindingServices:   IOTAKeyBindingServices);    
      protected            
          procedure   CodeCompletion(const   Context:   IOTAKeyContext;   KeyCode:   TShortcut;    
              var   BindingResult:   TKeyBindingResult);    
      end;    
         
  resourcestring    
      sBufferList   =   'Eagle''s   Buffer   List';        
   
  //register   this   key   binding    
  procedure   Register;    
  begin    
      (BorlandIDEServices   as   IOTAKeyBoardServices).AddKeyboardBinding(TBufferList.Create);        
  end;    
   
  {   TBufferList   }    
   
   
  //the   code   to   bind   key    
  procedure   TBufferList.BindKeyboard(const   BindingServices:   IOTAKeyBindingServices);    
  begin    
      BindingServices.AddKeyBinding([ShortCut(Ord('P'),   [ssShift,   ssCtrl,   ssAlt])],   CodeCompletion,   Pointer(csCodeList   or   csManual));    
      BindingServices.AddKeyBinding([ShortCut(Ord('O'),   [ssShift,   ssCtrl,   ssAlt])],   CodeCompletion,   Pointer(csParamList   or   csManual));        
  end;    
   
  //do   code   completion    
  procedure   TBufferList.CodeCompletion(const   Context:   IOTAKeyContext;    
      KeyCode:   TShortcut;   var   BindingResult:   TKeyBindingResult);    
  begin    
   
      (Context.EditBuffer.TopView   as   IOTAEditActions).CodeCompletion(Byte(Context.Context));    
      BindingResult   :=   krHandled;    
   
  end;    
   
  function   TBufferList.GetBindingType:   TBindingType;    
  begin    
      Result   :=   btPartial;    
  end;    
   
  function   TBufferList.GetDisplayName:   string;    
  begin    
      Result   :=   sBufferList;    
  end;    
   
  function   TBufferList.GetName:   string;    
  begin    
      Result   :=   'EagleKing.BufferList';     //do   not   localize    
  end;    
   
  end.    
  Top

相关问题

  • 谁有casl的资料跟高程99年2000年的试题,烦请发到cieky@163.net,发了就结帐!先谢了!
  • 小麻烦,请教一下!
  • 一点麻烦,请帮忙!
  • UltraEdit,烦,请大家帮忙
  • 烦请高手指路!!
  • 答者都有分,麻烦请快些!
  • 一个小麻烦,请帮忙看看
  • 一个小问题,烦请帮忙。
  • TR斑竹麻烦请来取分
  • 邹老大,烦请解决.........(在线等)

关键词

  • 研究
  • 资料
  • software
  • component
  • code
  • 大虾
  • 研究过toolsapi
  • 烦请资料相送
  • attention
  • original

得分解答快速导航

  • 帖主:csntgao

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo