C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
분야별 포럼
C++빌더
델파이
파이어몽키
C/C++
프리파스칼
파이어버드
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

자유게시판
세상 살아가는 이야기들을 나누는 사랑방입니다.
[3361] [만해] Tools Api 관련 기사
만해 [greenuri] 4548 읽음    2002-02-01 15:08
15343.zip 325.8KB Api Borwser라는 빌더 AddOn 프로그램입니다.
안녕하세요 만해 입니다.

어제 밤 꼴딱 새면서

볼랜드 커뮤니티를 뒤지다 찾은 기사입니다.

접번에 오프때 페페루님이 관심이 있으신것 같았는데

혹 도움이 될까 싶어서 올립니다.

영어 입니다.

The Open Tools API is the interface with which experts communicate with the IDE. You will find yourself using the Open Tools API when you write your own experts. This utility is designed to help you familiarise yourself with their behaviour and functionality.

The Open Tools API are not well documented within C++Builder. The
concepts are similar to the Tools Services in Delphi3 -- to learn
about them, you should buy the book "Hidden Paths of Delphi3" by Ray
Lischner. But the organization has changed a lot. You should visit
Ray's web site to see how it was changed for Delphi4 (which is similar
to BCB5). Or, you can look at the pascal file (cbuilder5\source\
toolsapi\toolapi.pas) yourself to try to figure out what they are doing. Most programmers of the OpenToolsAPI do it in Delphi.

With documentation so sparse and incomplete and Pascalised, it's very
useful to be able to see directly what facilities are available, and to play around with them interactively, and to have a complete C++ source code base to copy. This Open Tools API Browser aims to provide these things.

This Browser also adds some extra tools services, including a property
editor for a property that is the name of some other form in the project. (and if you rename or delete that other project, this property updates itself automatically). There is a sample component to demonstrate how to use these extra featres.



USING OPEN TOOLS API BROWSER

Generally, each form corresponds to an interface, and each button
corresponds to a function. Thus, when you click the ModuleServices
button and it brings up a new form, then there in the code there is
a function call GetModuleServices() which returns an interface to them.

Generally, you first have to supply the arguments to a function in the
fields to the left of the button; if it gives an answer, that answer
is generally displayed to the right of the button.

Some forms contain lists of things. For instance, the ModuleServices
form contains a list of all currently open modules. This corresponds
to the pair of functions GetModuleCount() and GetModule(i); they have
been called already so you can see what's there. Double-click on one
of the modules to open up its interface form.

Note that you are instructed not to keep posession of the various
interfaces for too long. I suspect that if you try to edit in the
buffers while having the Browser up, bizarre things might happen.
(The exception is that you can keep Notifier windows up!)

There's lots of stuff in here! The following diagram shows most of
the forms that have been implemented so far. For instance, to display
and edit the properties of a component, you start with the OTABrowser.
ModuleServices. Open a form module. GetModuleFileEditor. (In fact there are three module file editors - for file.h, file.cpp and file.dfm. Try each of them. You want the editor for file.dfm). Then open a component to see its properties, and you can set them.

OTABrowser
+-ActionServices (close file, open file, ...)
+-PackageServices (list all installed packages and components)
+-Services (information about the app itself)
| +-AddNotifier (add a project notifier)
| +-ProjectNotifier
+-ModuleServices (list all modules, get a module, create a module, file-menu ops)
| +-CreateModule, CreateProject, CreateProjectGroup
| +-GetModule
| +-GenericModuleOperations (close, save, set filename)
| +-Notifiers (add a module notifier)
| | +-ModuleNotifier
| +-Constituents (get module file editor for files in this module, get owning project)
| | +-GenericModuleEditor (get filename, mark modified, show)
| | +-ResourceEditor (list of resources, get resource, create resource)
| | | +-Resource Entry (display the resource, change name, type, contents)
| | +-FormEditor (displays all components on form, get, create component, add notifier)
| | +-Component (displays all properties of component, set any property)
| | +-FormNotifier
| +-Project (list modules that make up this project, add, remove file)
| +-ProjectGroup (list projects that make up group, add, remove projects, get active proj)
+-WatcherServices (keeps track of all live components in the IDE)
+-General (notifications of all component and form renames/deletions)
+-Specific (keep track of a single specified component on any form)
+-Plonks (be alerted when a component is plonked down on a form)
+-Props (keep track of every single instance of a property)


TOOLS API PLUS

A couple of useful functions have been included to extend the Tools API:
- create/delete bitmaps or icons in the project resources
- set the "Picture" property of a TImage
- get or set the text value for any property
- handy navigation functions between the various IOTA interfaces
- RegisterPlonkVerb, to execute a particular verb whenever a component is inserted
- RegisterPropertyWatcher, to be told of every instance of a property anywhere
- NameNotification, to be told when a form or component anywhere is renamed
- TFormScanner, to scan through all modules, forms, components in the project
- TFormNamePropertyEditor, for text properties that are the names of forms in the project
- TFormTypePropertyEditor, for text properties like "TForm1"
- TComponentNamePropertyEditor, for text properties that are component names on any form
- TSwappingComponentEditor, for a component that can substitute another one for itself



DEMONSTRATES

The source code demonstrates, among other things, use of the following OTA interfaces:

IOTANotifier, IOTAModuleNotifier, IOTAFormNotifier, IOTAIDENotifier, IOTADebuggerNotifier, IOTAModuleServices, IOTADebuggerServices (briefly), IOTAMessageServices, IOTAProjectOptions, IOTAModule, IOTAProject, IOTAComponent, IOTAFormEditor

--
Lucian

http://www.wischik.com/lu/programmer/index.html#experts

여기에 설명이 좀 잘되어 있는것 같네요

그리고 첨부 파일이 있는데 올립니다.

이걸 설치하면 빌더에 한개의 창이 추가 되는데

전 이게 뭔지 모르곘네요



+ -

관련 글 리스트
3361 [만해] Tools Api 관련 기사 만해 4548 2002/02/01
3364     오오옷!!! ^^ 대어를 낚으셨군요.. 김상구.패패루 3532 2002/02/01
3365         URL Moniker에 대한 조언 부탁 드립니다. 만해 3862 2002/02/01
3366             Re:URL Moniker하구 COM은 새더군이 훨씬 잘합니다. 김상구.패패루 3364 2002/02/01
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.