L5869enx-Latin1frRapportïRapportPPParagrapheï¢ParagraphPFichierƒFichierP L2EN L39DF L40DF L41 L4490 L4491Thot Application Generation Language L4493 L4494Quint & Vatton L42 L43LibThot 2.1.a L44 L45Draft - September 4, 1997 L46 L47The Thot Application Generation Language L48 L49 L50 L51Vincent Quint L52 L53 L54Irène Vatton L55 L56 L57INRIA L58' L59( L60) L61 L62Principles* L63 L64 L65 L66The Thot application generation language enables applications based on the  L67active document L68 concept. An active document is an electronic document which transforms itself or acts on its computing environment when certain editing commands are issued by the user. This concept is used to build different types of applications including access to databases, user interface construction and technical document processing. L69 L70 L71The Thot application generation language is used to define a graphic interface (a set of menus) to which the application designer can associate functions. These functions are either Thot standard functions or new specific functions. L2548 L2547 L2546The language and its associated mechanisms also allow application designers to modify or extend standard Thot editing functions. The application can receive control during the execution of a standard function, by asking for an  L4668event L4669. These events are also specified in the application generation language. L2551 L2550 L2549Consequently, an application is constituted by two different sets of functions: L2495 L2497 L2498 L2499 L2504 L72SICommands L73 are run when the user selects a menu item. These commands can be standard commands provided by the Thot toolkit or new, specific commands written by the application developer. L2500 L2501 L2508 L2512SIActions L2513 are run when certain events occur during standard editing commands. L2491 L2490 L2494 Commands and actions can use the Thot API in order to modify the documents being handled (refer to  L4672SIThe Thot Tool Kit API) L5734CF L76 L77 L78Application generation is based on  L79SIapplication schema L80s written in a specific language, the  L81A language L82. Menus and associated specific commands are declared in the main application schema, called  L4639FCT PEDITOR.A L4640. This application schema can refer to other application schemas that define shared components reusable in different applications. These application schemas are based on a generic logical structure and are related to a structure schema. These application schemas have the same name as the corresponding structure schema and the  L4641FCT P.A L4642 suffix.' L2473( L2474) L2475 L2476Menus and specific commands* L2477 L2478 L2516 L2515The  L4643FCT PEDITOR.A L4644 application schema defines the menus of the main window (if this main window exists) and those attached to the menu bar of each document window. The app application allows one to define different menus for different document types (identified by their structure names). For a specific document type, menus can differ form one view to another (the range in presentation schema identified the view when the menu is specific to one view). L4919 L4918 L4917The application schema associates a command with each item in these menus. Each item is located within a menu or a cascade submenu of a menu. The cascade is limited to one level.  L2521 L2520 L2519When the user selects a menu item, the corresponding command is called, with the current document and view as parameters. L2524 L2523 L2522There are different menu sections in the  L4645FCT PEDITOR.A L4646 application schema: L2525 L2527 L2528 L2529 L2534 L2533The Main Window section is optional. It defines the menus attached to the main window. L2530 L2531 L2537 L2536The Document Windows section is mandatory. It defines the menu bar of all document windows. L2538 L2539 L2542 L2541The Structure_name Windows sections are optional. They specify the menu bar for specific document types.( L2479) L2480 L2481Events and actions* L2482 L2483 L86 L87An event is raised by the editor whenever a Thot  L4682standard L4683 editing command perform some treatment that the application needs to complement or replace. For example, an event can be raised when the user selects an element, modifies a  L5736CF L5735character string, creates or deletes a logical element, associates an attribute with an element, opens or closes a document view, saves a document, etc. L4686 L4685 L4684Only standard editing commands raise events.  L4694Specific L4687 commands associated with menu items in an application schema  L4690do not L4692 raise any event.  L4681 L4680 L4679Each event raised by Thot is associated with the object concerned by the Thot editing command that triggers the event: element, attribute, view, document, etc. L4675 L4674 L4673Whenever an event is raised, Thot calls the corresponding actions that is associated with the event and the corresponding object in the application schemas in use. L88 L89 L2543The user and the programs (commands and actions) can access the same functions, but through different interfaces: standard Thot commands for the user, API for programs. The operations performed on documents by an application programs using the Thot API do not create events. However, there are some exceptions to this rule; they are mentioned below. L92 L93 L94The Thot standard editing commands generally produce two events with the same name but with different suffixes: L95 L96 L97 L98 L99 L100.Pre L101: this event is raised (and the action is executed) when the standard command is called by the user, before being processed by the editor. It allows the application to perform some processing,  L102SIbefore L103 the editor executes the standard command  L104SIor instead of L105 the normal processing of the editor. The action called in the application by the event returns a boolean value to indicate whether or not the performed action replaces the standard processing of the editor. If it is a replacement ( L106FCTrue L107 is returned by the action), the editor does not perform the normal processing. L108 L109 L110 L111.Post L112: this event is raised (and the action is executed)  L113SIafter L114 the editor has performed the standadrd command normally. L115 L116 L117When an action performed on a  L118.Pre L119 event has replaced the normal processing of the standard command, there is no corresponding  L120.Pos L121t event since the editor has not processed the command. L125 L126 L127Each time an action of the application is called by an event, it receives a context as a parameter, which allows the application to identify the conditions in  L5738CF L5737which the event has been raised. This context varies from an event to the other because it only provides information significant for the event in question. L128 L129 L130Here is a list of all items that can be found in the context (for each event, only a subset of this list is present): L131 L132 L133 L134 L135 L136the standard editing command which triggered the event (this information is always present because it permits the identification of the event and it determines the other items present in the context); L137 L138 L139 L140the document in question; L141 L142 L143 L144the element in question; L145 L146 L147 L148the element type in question; L149 L150 L151 L152the target element of the editing operation. It may be different from the element in question, for instance in the case of a reference; L153 L154 L155 L156the type of the presentation rule in question; L157 L158 L159 L160the attribute in question; L161 L162 L163 L164the attribute type in question. L165 L166 L167Section > L4648rV L500 L4647 lists all the events that can be raised, with the name of the event, the parameters received by the action which handles this event and the conditions in which it is raised.( L169) L170 L171The A language* L172 L2555 L2556 L2557Application generation is based  L2558SIapplication schema L2559s written in a specific language, the  L2560A language L2561. Menus and associated specific commands are declared in the main application schema,  L4650FCT PEDITOR.A L4651. This application schema can refer to other application schemas related to different structure schemas. L181 L182 L183Any application schema starts with the  L184APPLICATION L185 keyword followed by the  L186EDITOR L187 word or the structure schema name. L2564 L2563 L2562The main application schema of the application contains two sections that do not appear in other application schemas. L2565 L2567 L2568 L2569 L2574 L2573The  L4654USES L4655 section appears just after the  L4652APPLICATION L4653 statement. This section is optional and when it is present, it declares the other structure schemas used by the application as well as the modules needed. A module  L5740CF L5739is a set of standard editing functions that each application may decide to use or not. L2570 L2571 L2577 L2576The  L4656MENUS L4657 section is a mandatory section in the  L4658FCT PEDITOR.A L4659 schema and appears at the end of the schema. L188 L189 L190Three other sections can appear in any application schema:  L2342DEFAULT L2343,  L2344ELEMENTS L2345 and  L2346ATTRIBUTES L2347. These sections are optional but at least one of them must be present in an application schema associated with a structure schema. L2696 L2695 L2694The schema must end with the  L199END L200 keyword. L2581 L2582x-Latin1T PLRC- L2583 L2584ASchema = 'APPLICATION' ElemIdent ';' L2585 L2586 [ 'USES' SchemaAndModules ] L2587 L2588 [ 'DEFAULT' EvtActionList ] L2589 L2590 [ 'ELEMENTS' < ElemActionList > ] L2591 L2592                  [ 'ATTRIBUTES' < AttrActionList > ]  L2593 L2594 [ 'MENUS' Menus ] L2595 L2596 'END' .' L220( L3106) L3107 L3108Application integration* L3109 L213 L214 L215A single application can use several application schemas: one per structure schema for which specific commands or actions must be performed (for instance, Report and Paragraph) and one general application schema (the EDITOR schema). When an event is raised for a given element, the editor consults first the application schema of the structure defining this element in order to check whether an action has been attached to this event. If it is not the case, the editor consults sequentially the application schemas of the parent elements and finally the  L218FCEDITOR L219 application schema. L2597 L2599 L2600The  L4660FCT PEDITOR.A L4661 schema lists the names of other application schemas involved in the application, in its USES section. The A compiler uses this list to load the corresponding commands and actions. L4699 L4698 L4697The USES section lists also all the modules needed by the application. L2605 L2606T PLRC- L2607x-Latin1 L2608SchemasAndModules = SchemaOrModule < ',' SchemaOrModule > ';' . L4696x-Latin1 L4695SchemaOrModule = DocumentType | Module . L2710 L2708 L2709The Thot library provides optional modules which can be used or not by an application. As an example, a document reader application does not need editing functions. The USES section allows application developer to explicitly load the needed Thot modules. The available modules are: L5741CF L2712 L2714 L2715 L2716 L2721 L2720Editing: This module provides basic editing functions. It is automatically loaded when at least one standard editing command is used in the MENUS section (TtcCutSelection, etc.) L2717 L2718 L2724 L2723StructEditing: This module has to be loaded explicitly. It provides restructuring functions and handles the Thot standard insertion menu. L4020 L4021 L4028 L4027StructSelect: This module has to be loaded explicitly. It provides a structural selection instead of the standard one (no automatic replacement, ability to select directly structured elements, etc.) L2725 L2726 L2729 L2728Search: This module provides search and replace functions. It is automatically loaded when a Thot search command is used. L4501 L4502 L4505 L4504StructSearch: This module has to be loaded explicitly. It allows a combination of structural search with textual search and replace. L4496 L4497 L4500 L4499Index: This module has to be loaded explicitly. It provides the Thot index capability. L4022 L4023 L4031 L4030DisplayEmptyBox: This module has to be loaded explicitly. It displays empty elements as grey rectangles. L4024 L4025 L4034 L4033Lookup: This module has to be loaded explicitly. It provides an  L4035FCT PXLookupString L4036 function that allows users to insert composed characters into Motif widget. L5860 L5861 L5864 L5863Keyboards: This module has to be loaded explicitly. It allows Thot to display the Symbols and Greek keyboards when needed.  L5865 L5866 L5869 L5868Graphics: This module has to be loaded explicitly. It allows Thot to display the Graphics keyboard when needed. ( L2688) L2689 L2690Menus declaration* L2691 L2692 L2611 L2612The MENUS section defines the menus contituting a menu bar (see example in > L4915rV L1741 L4914): L4703 L4704 L4705 L4706 L4707 L4708The  L4723FCT PMain Window L4724 section is optional. It defines the menu bar of the main window. L4709 L4710 L4711 L4712The  L4725FCT PDocument Windows L4726 section is mandatory. It defines the menu bar of all document windows. L4713 L4714 L4715 L4716The  L4727FCT PSIStructure_name L4729FCT P Windows L4728 sections are optional. They specify the menu bar for specific document types. L4037T P L4038 L4039Menus = [ 'Main' 'Window' ':' MenuList ] L4040 L4041 [ 'Document' 'Windows' ':' MenuList ] L4042 L4043 < DocumentType 'Windows' ':' MenuList > . L4718 L4717  L4044 L4045MenuList = 'BEGIN' NewMenu < NewMenu > 'END' ';' / L4046 L4047 NewMenu . L5742CF L4720 L4719  L4048 L4049NewMenu = [ 'view' ':' ViewNum ] MenuIdent L4050 L4051 [ '.' SubmenuIdent] [ ItemCascade ] ';' . L4052 L4053ItemCascade = 'Separator' / 'Button' ':' ItemAction / L4054 L4055 'Toggle' ':' ItemAction / L4056 L4057 'Dynamic' ':' ItemIdent . L4058 L4059ItemAction = ItemIdent '->' ActionIdent . L4722 L4721  L4060 L4061DocumentType = NAME . L4062 L4063MenuIdent = NAME . L4064 L4065SubmenuIdent = NAME . L4066 L4067ItemIdent = NAME . L4068 L4069IdentAction = NAME . L2614 L2615 L2616ENFor each menu item, the application schema associates a specific command, except for the standard menus, composed by the Thot editor. For these menus neither items nor actions have to be specified. There are two such menus: "Attributes_" and "Selection_". L2663 L2665 L2666The Thot toolkit allows application designers to declare one-level cascade menus (menu and submenu). L4072 L4071 L4070A menu item can be: L2673 L2675 L2676 L2677 L2682 L2681a simple push button: "Button", L2678 L2679 L2685 L2684a toggle button: "Toggle", L4073 L4074 L4077 L4076a separator: "Separator" (there is no action in this case), L4078 L4079 L4082 L4081or a dynamic entry: "Dynamic" (allows dynamic extension of the dialogue). L2697 L2699 L2700The Thot toolkit is designed to support multilingual dialogue. Names of menus, submenus and menu items declared in the application schema are considered as generic names. When the application starts, the editor looks for a dialogue table:Šconfig/$LANG-'name'dialogue ('name' represents the application name)Što substitute generic names by localized name adapted to the current language $LANG. L2704 L2702 L2703The A compiler automatically generates a  L2706FCT PEDITORdialogue L2707 file that can be used as a model to construct dialogue tables for each supported language. L5743CF( L221) L222 L223Associating actions with events* L224 L225 L226 L227Actions that must be executed when certain events are raised, are specified in sections  L228DEFAULT L229,  L230ELEMENTS L231 and  L232ATTRIBUTES L233. Association of actions with events is simply expressed by the name of the event (see the list of events in section > L234rV L500 L235) followed by an arrow (the two characters '-' and '>') and the name of the action. L236 L237 L238The name of the event contains the suffix  L239.Pre L240 or  L241.Post L242 depending on whether the action must be performed before or after normal processing by the editor. If no suffix is present the event is assumed to have the  L243.Pre L244 suffix. L245 L246 L247The name of the action is the name of the procedure written by the programmer and called by the event. L249 L250x-Latin1T PLRC- L251 L252EvtAction =  EvtIdent [ '.' PostPre ] '->' ActionIdent ';' . L253 L254PostPre =    'Post' / 'Pre' . L255 L256EvtIdent =    NAME . L257 L258ActionIdent =  NAME .( L259) L260 L261Default actions* L262 L263 L264 L265The  L266DEFAULT L267 section includes the event/action associations which, by default, apply to all element types and all the attributes defined in the structure schema corresponding to the application schema. L268 L269 L270For a given element type and for a given event, when the  L271ELEMENTS L272 section does not contain an event/action association, the association of the  L273DEFAULT L274 section is taken into account if it exits. The  L275DEFAULT L276 section can be absent. It can also contain only a subset of the events listed in section > L277rV L500 L278. When the  L279ELEMENTS L280 section for a given element type and the  L281DEFAULT L282 section do not define any action for a given event, this event has no effect for the elements of that type. L283 L284 L285The same principle applies to attributes: the  L286DEFAULT L287 section specifies the event/action associations which apply to all attributes for which the  L288ATTRIBUTE L289 section does not include these events. L290 L291 L292The  L293DEFAULT L294 section is composed of the  L295DEFAULT L296 keyword followed by an event/action association, if there is a single default association, or by a sequence of associations between the keywords  L297SRT PBEGIN L298 and  L299SREND L300, if there are several. The  L301SREND L302 keyword must be followed by a semicolon. The event/action  L5745 CF L5744associations can be either for element types (see section > L303rV L317 L304) or for attributes (see section > L305rV L350 L306).  L307 L308x-Latin1T PLRC- L309 L310               'DEFAULT' EvtActionList L343 L344EvtActionList =  EvtAction / L345 L346               'BEGIN' EvtAction < EvtAction > 'END' ';' .( L317) L318 L319Actions associated with elements* L320 L321 L322 L323The actions to be called for elements of a given type are defined in the  L324ELEMENTS L325 section. In this section, the name of each element type requiring actions is followed by a colon and by the event/action association to be applied (if there is only one) or the list of associations (if there are several) between the keywords  L326SRBEGIN L327 and  L328SREND L329. The  L330SREND L331 keyword is followed by a semicolon. L2322 L2320 L2321In the case where the element type is a mark pair, but only in this case, the type name can be preceded by the keywords  L2324First L2325 or  L2326Second L2327. These keywords indicate whether the associations that follow apply to the first or second mark of the pair. L332 L333 L334Each event/action association for an element type is composed in the same way as described in section > L335rV L221 L336. L337 L338T PLRC- L339 L340                 'ELEMENTS' < ElemActionList > L4731 L4730ElemActionList = ElemActions < ElemActions > . L341 L342ElemActions =  L2316FR[ FirstSec ]  L2317ElemIdent ':' EvtActionList . L2318 L2319FirstSec =       'First' / 'Second' . L347 L348ElemIdent =       NAME . L2329 L2330EvtActionList =  EvtAction / L2331 L2332                 'BEGIN' EvtAction < EvtAction > 'END' ';' .( L350) L351 L352Actions associated with attributes* L353 L354 L355 L356The actions to be called for given attributes are defined in the  L357ATTRIBUTES L358 section. In this section, the name of each attribute requiring actions is followed by a colon and by the event/action association to be applied (if there is only one) or the list of associations (if there are several) between the keywords  L359SRBEGIN L360 and  L361SREND L362; the  L363SREND L364 keyword is followed by a semicolon. L365 L366 L367Each event/action association for an attribute is composed in the same way as indicated in section > L368rV L221 L369, but only certain events are allowed for attributes, those beginning with  L370Attr L381 (see section > L382rV L525 L383 for the definition of these events). L5746 CF L384 L385T PLRC- L386 L387                 'ATTRIBUTES' < AttrActionList > L4733 L4732AttrActionList = AttrActions < AttrActions > . L388 L389AttrActions =  AttrIdent ':' EvtActionList . L420 L421AttrIdent =      NAME .( L2730) L2731 L2732Thot standard commands* L2733 L2734 L2738 L2737The Thot toolkit provides a set of standard commands. The commands parameters are always the document identification and the view number. L3715 L3716 L3717 L3718TtcChangeCharacters (Document, View): L3719 L3720 L3723 L3722Display the form that allows user to change font family, character style and character size. L3384 L3386 L3387 L3388TtcChangeColors (Document, View): L3389 L3390 L3726 L3725Display the form that allows user to change background and foreground colors. L3394 L3395 L3396 L3397TtcChangeFormat (Document, View): L3398 L3399 L3729 L3728Display the form that allows user to change indentation, alignment, justification and line spacing. L3403 L3404 L3405 L3406TtcChangeGraphics (Document, View): L3407 L3408 L3732 L3731Display the form that allows user to change line weight,  L3412 L3413 L3414 L3415TtcChangePresentation (Document, View): L3416 L3417 L3822 L3821Display the menu that allows user to change presentation schema of document and its natures. L3879 L3874 L3875 L3876TtcChildElement (Document, View): L3877 L3878 L3883 L3882Move the selection to the first enclosed element. L3427 L3428 L3429 L3430TtcCloseDocument (Document, View): L3431 L3432 L3777 L3776Close the current document after acknowledgement if the document was previously modified. L3433 L3434 L3435 L3436TtcCloseView (Document, View): L3437 L3438 L3780 L3779Close the current view of the document and the document if it is the last opened view. Close the document if that view is the last opened view. L5747 CF L3439 L3440 L3441 L3442TtcCopySelection (Document, View): L3443 L3444 L3783 L3782Copy the current selection into the Thot clipboard. L3445 L3446 L3447 L3448TtcCopyToClipboard (Document, View): L3449 L3450 L3789 L3788Copy the current selection into the X clipboard. L3451 L3452 L3453 L3454TtcCreateDocument (Document, View): L3455 L3456 L3786 L3785Display the form that allows user to create a new document. L3457 L3458 L3459 L3460TtcCutSelection (Document, View): L3461 L3462 L3834 L3833Delete the current selection and save it in the Thot clipboard. L3790 L3791 L3792 L3793TtcDeletePreviousChar (Document, View): L3794 L3795 L3837 L3836Delete the previous character. L3463 L3464 L3465 L3466TtcDeleteSelection (Document, View): L3467 L3468 L3840 L3839Delete the current selection. L3469 L3470 L3471 L3472TtcDisplayGraphicsKeyboard (Document, View): L3473 L3474 L3843 L3842Display the graphic keyboard. L3475 L3476 L3477 L3478TtcDisplayGreekKeyboard (Document, View): L3479 L3480 L3846 L3845Display the greek keyboard. L3481 L3482 L3483 L3484TtcDisplayLatinKeyboard (Document, View): L3485 L3486 L3849 L3848Display the ISO Latin-1 keyboard. L3487 L3488 L3489 L3490TtcDisplayMathKeyboard (Document, View): L3491 L3492 L3852 L3851Display the math-symbol keyboard. L4222 L4217 L4218 L4219TtcEndOfLine(Document, View): L4220 L4221 L4226 L4225Move the cursor to the end of the line. L3493 L3494 L3495 L3496TtcGotoPage (Document, View): L3497 L3498 L3819 L3818Not implemented yet.... L3499 L3500 L3501 L3502TtcHolophrast (Document, View): L3503 L3504 L4159 L4158Not implemented yet.... L5748 CF L3505 L3506 L3507 L3508TtcInclude (Document, View): L3509 L3510 L4164 L4163Obtain a live copy, i.e. a copy which is automatically updated each time you modify the copied element. The  L4165FCT PTtcInclude L4166 command presents the same menu as that offered by the  L4167FCT PTtcInsert L4168 command, i.e. the list of elements that can be created before or after the selected part. Once you have selected the type and the position of the copy, click with the left mouse button on the element to be copied. You can click in any Thot window of a document provided that you click on an element of the required type. You can move throughout the document by using the scroll bars in order to display the desired element before clicking on it. L4511 L4506 L4507 L4508TtcIndex (Document, View): L4509 L4510 L4515 L4514Activate the Thot index application. If the document does not already include index marks, that function initializes the Thot index application and allows insertion of index marks in the insert menu. After that, the function computes index marks to provide index table. L3511 L3512 L3513 L3514TtcInsert (Document, View): L3515 L3516 L4160 L4161Display the insert menu. This menu is built according to the current selection and the document structure schema. Thus, it may vary. It displays all element types that can be created before or after the current selection. By selecting an item from this menu, you choose the element to be created and its structural position. L3517 L3518 L3519 L3520TtcInsertPageBreak (Document, View): L3521 L3522 L3804 L3803Not implemented yet.... L4194 L4189 L4190 L4191TtcNextChar (Document, View): L4192 L4193 L4229 L4228Move the cursor to the next character. L3872 L3867 L3868 L3869TtcNextElement (Document, View): L3870 L3871 L3886 L3885Move the selection to the next element. L4208 L4203 L4204 L4205TtcNextLine (Document, View): L4206 L4207 L4238 L4237Move the cursor one line down. L3523 L3524 L3525 L3526TtcOpenDocument (Document, View): L3527 L3528 L4171 L4170Display the form that allows user to open a new document. L5749 CF L3529 L3530 L3531 L3532TtcOpenView (Document, View): L3533 L3534 L4156 L4155Allow to open one of the available views of the document. L4244 L4239 L4240 L4241TtcPageDown (Document, View): L4242 L4243 L4248 L4247Move the current view one page down. L4252 L4253 L4254 L4255TtcPageEnd (Document, View): L4256 L4257 L4258 L4259Move the current view to the bottom of the document. L4263 L4264 L4265 L4266TtcPageTop (Document, View): L4267 L4268 L4269 L4270Move the current view to the top of the document. L4274 L4275 L4276 L4277TtcPageUp (Document, View): L4278 L4279 L4280 L4281Move the current view one page up. L3535 L3536 L3537 L3538TtcPaginateDocument (Document, View): L3539 L3540 L3807 L3806Not implemented yet.... L3541 L3542 L3543 L3544TtcPaginateView (Document, View): L3545 L3546 L3810 L3809Not implemented yet.... L3858 L3853 L3854 L3855TtcParentElement (Document, View): L3856 L3857 L3889 L3888Move the selection to the enclosing element. L3569 L3570 L3571 L3572TtcPaste (Document, View): L3573 L3574 L3895 L3894Insert the content of the Thot clipboard. L3575 L3576 L3577 L3578TtcPasteFromClipboard (Document, View): L3579 L3580 L3898 L3897Insert the content of the X clipboard. L4187 L4182 L4183 L4184TtcPreviousChar (Document, View): L4185 L4186 L4232 L4231Move the cursor to the previous L3865 L3860 L3861 L3862TtcPreviousElement (Document, View): L3863 L3864 L3892 L3891Move the selection to the previous element. L4201 L4196 L4197 L4198TtcPreviousLine (Document, View): L4199 L4200 L4235 L4234Move the cursor one line up. L5750CF L3581 L3582 L3583 L3584TtcPrint (Document, View): L3585 L3586 L4127 L4126Start the printing process using options defined by the  L4128FCT PTtcPrintSetup L4129 command. L3587 L3588 L3589 L3590TtcPrintSetup (Document, View): L3591 L3592 L4132 L4131Display the form that allows user to change printing options. L4519 L4520 L4521 L4522TtcSetupAndPrint (Document, View): L4523 L4524 L4525 L4526Display the form that allows user to change printing options. With option to print. L3593 L3594 L3595 L3596TtcQuit (Document, View): L3597 L3598 L4135 L4134Close all documents and quit the application. L3599 L3600 L3601 L3602TtcSaveDocument (Document, View): L3603 L3604 L3813 L3812Save the document at the same place. L3605 L3606 L3607 L3608TtcSaveDocumentAs (Document, View): L3609 L3610 L3816 L3815Display the save or export dialogue. L3611 L3612 L3613 L3614TtcSearchEmptyElement (Document, View): L3615 L3616 L4138 L4137Display the form that allows user to search empty elements in the current document. L3617 L3618 L3619 L3620TtcSearchEmptyReference (Document, View): L3621 L3622 L4141 L4140Display the form that allows user to search empty references in the current document. L3623 L3624 L3625 L3626TtcSearchReference (Document, View): L3627 L3628 L4144 L4143Display the form that allows user to search internal and external (located in other documents) references to the current selected part of the document. L3629 L3630 L3631 L3632TtcSearchText (Document, View): L3633 L3634 L4147 L4146Display the form that allows user to search and replace text in the current document. L3635 L3636 L3637 L3638TtcSetBackupInterval (Document, View): L3639 L3640 L3831 L3830Not implemented yet.... L5751CF L3641 L3642 L3643 L3644TtcSetDocumentPath (Document, View): L3645 L3646 L3825 L3824Not implemented yet.... L3647 L3648 L3649 L3650TtcSetSchemaPath (Document, View): L3651 L3652 L3828 L3827Not implemented yet.... L3653 L3654 L3655 L3656TtcSetVisibilityView (Document, View): L3657 L3658 L4150 L4149Allow user to filter what elements are displayed in the document view. L3659 L3660 L3661 L3662TtcSetZoomView (Document, View): L3663 L3664 L4153 L4152Allow user to grow or shrink character sizes in the document view. L4177 L4172 L4173 L4174TtcSpellCheck (Document, View): L4175 L4176 L4181 L4180Allow the user to check the spelling of a document being processed. Checking is based on dictionaries. The checker compares the words of the text with those in the available dictionaries. It suggests several replacements for each word which has not been found in the dictionaries. The user can then choose the correct word from the list of suggested words (or can type another word). The replacement operation is performed by the checker. L5797 L5792 L5793 L5794TtcStandardGeometry (Document,View): L5795 L5796 L5801 L5800Allow user to restore the standard geometry of selected elements. L4215 L4210 L4211 L4212TtcStartOfLine (Document, View): L4213 L4214 L4328 L4327Move the cursor to the beginning of the line. L3964 L3959 L3960 L3961TtcSwitchButtonBar (Document, View): L3962 L3963 L3975 L3974Alternatively, map an unmap the button bar in the document view. L3971 L3966 L3967 L3968TtcSwitchCommands (Document, View): L3969 L3970 L3978 L3977Alternatively, map and unmap the command zone (logo and textual commands) in the document view. L3899 L3901 L3902The Thot standard commands  L3904SBT PTtcInsertChar L3905 and  L4538SBT PTtcInsertGraph L4539 need an extra parameter: the character to be inserted. These commands can be called by application specific commands, but cannot appear in the menus defined by the application schema EDITOR.A. L3796 L3797 L3798 L3799TtcInsertChar (Document, View, char): L3800 L3801 L3908 L3907This command inserts the character 'c' at the current insertion point. L5752CF L4530 L4531 L4532 L4533TtcInsertGraph (Document, View, char): L4534 L4535 L4536 L4537This command inserts the graphics 'c' at the current insertion point.( L3913) L3914 L3915Keyboard shortcuts* L3916 L3917 L4331 L4330It is convenient to be able to invoke menu commands from the keyboard. The Thot toolkit provides a facility that let user accomplish this. When the application starts, the Thot toolkit looks for the keyboard shortcuts file for the application. This file defines a list of associations between a keyboard sequence an the corresponding command. L4359 L4357 L4358The syntax used to define association is: L4364x-Latin1 L4367 L4368Directive = KeySeq ':' IdentCommand ; L4370 L4369KeysSeq = KeySet [ ',' KeySet ] ; L4371 L4372KeySet = [ Modifier ] [ 'Shift' ] Key ; L4374 L4373Key = '' KeyValue / '' SpecialKey ; L4376 L4375Modifier = 'Ctrl' / 'Alt' / 'Meta' ; L4377 L4378KeyValue = 'a' / 'b' / ... ; L4385 L4386SpecialKey = 'Escape' / 'Delete' / 'Space' / 'BackSpace' / 'Return' / 'Up' / 'Down' / 'Left' / 'Right' / 'Home' / 'End' / 'F1' / ... / 'L1' / ... / 'R1' / ... ; L4379 L4380IdentCommand = 'TtcInsertChar(' Char ')' / NAME '()' ; L4382 L4381Char = KeyValue / OctalValue ;  L4384 L4383OctalValue = '\' NUMBER ;  L4363 L4362 L4361An  L4443x-Latin1FCT PIdentCommand L4444 can be either a standard Thot command or an application specific command. We give below the example of the  L4445x-Latin1FCT Pamaya.keyboard L4446 file. L4390x-Latin1 L4391 L4392#Amaya example L4393 L4394Ctrl 1: CreateHeading1() L4395 L4396Ctrl 2: CreateHeading2() L4397 L4398Ctrl 3: CreateHeading3() L4399 L4400Ctrl Space: TtcInsertChar("\240") L4401 L4402Ctrl Return: TtcInsertChar("\212") L4403 L4404Ctrl x , Ctrl s: SaveDocument() L4405 L4406Ctrl x , Ctrl p: TtcPrint() L4407 L4408Ctrl x , Ctrl c: TtcCloseDocument() L4409 L4410Ctrl x , Ctrl f: TtcSearchText() L4411 L4412Ctrl c: TtcCopySelection() L5753CF L4413 L4414Ctrl y: TtcPaste() L4415 L4416Ctrl w: TtcCutSelection() L4417 L4418Ctrl d: TtcDeleteSelection() L4419 L4420Delete: TtcDeleteSelection() L4421 L4422Escape: TtcParentElement() L4423 L4424Ctrl -: TtcChildElement() L4425 L4426Ctrl a: TtcStartOfLine() L4427 L4428Ctrl e: TtcEndOfLine() L4429 L4430Return: TtcCreateElement() L4431 L4432Home: TtcStartOfLine() L4433 L4434End: TtcEndOfLine() L4435 L4436Ctrl b: TtcPreviousElement() L4437 L4438Ctrl f: TtcNextElement() L4439 L4440L6: TtcCopyToClipboard() L4441 L4442L8: TtcPasteFromClipboard() L4389 L4388 L4387The keyboard shortcuts file can be located either in the user's  L4352FCT PHOME L4353 directory or in the  L4350FCT Pbin L4351 directory within the Thot hierarchy. L4356 L4355 L4354File paths are: L4337 L4339 L4340 L4341 L4346 L4345$HOME/'name'.keyboard L4342 L4343 L4349 L4348$THOTDIR/bin/'name'.keyboard L4336 L4335 L4334 where 'name' represents the application name.( L500) L501 L502Events* L503 L504 L505 L506Events can take two different forms:  L507.Pre L508 or  L509.Post L510. The actions called by the  L511.Pre L512 events must return a boolean value which is  L513True L514 if the action replaces the standard processing of the editor. The actions called by the  L515.Post L516 events have no return value. The  L517.Pre L518 and  L519.Post L520 forms of the same event generally call the corresponding actions with different parameters. L521 L522 L523Events are grouped in several categories depending on the objects to which they are transmitted: attributes, elements, specific presentation rules, documents, views, application. L5754CF' L524( L525) L526 L527Events for attributes* L528 L529 L530 L531The following events only appear in the  L532FCDEFAULT L533 section or in the  L534FCATTRIBUTES L535 section of an application schema. L536 L537 L538If they appear in the  L539FCDEFAULT L540 section, they are raised each time an attribute of any type is created, modified, deleted, saved or read (according to the event), whatever the element in question. L541 L542 L543In the  L544FCATTRIBUTES L545 section, these events are associated with an attribute type and raised by the editor when attributes of this type are created, deleted, modified, saved or read (according to the event), whatever the element in question. L546 L547 L548Each attribute's event is accompanied with a pointer to the subsequent structure (this structure is defined in the  L549appaction.h L550 file): L551 L552 L553typedef struct { L554 L555  TTEevent event; L556 L557  Document document; L559 L560  Element element; L561 L562  Attribute attribute; L563 L564  AttributeType attributeType; L565 L566} NotifyAttribute; L567 L568  L569 L570 L571 L572AttrMenu.Pre (NotifyElement): L573 L574 L575 L576The editor is composing the ``Attributes'' menu and will add to this menu an item which allows the user to create an attribute of type  L577FCattributeType L578 for element  L579FCelement L580. The  L581attribute L582 field is not filled since the attribute has not yet been created. L583 L584 L585If the action called by the event returns  L586True L587, the corresponding item is not included in the menu; if it returns  L588False L589, the item is normally included in the menu.ŠThere is no  L590FCAttrMenu.Post L2337 event. L592 L593 L594 L595AttrCreate.Pre (NotifyAttribute): L596 L597 L598 L599The editor is going to create for the element  L600FCelement L601 indicated an attribute of type  L602FCattributeType L603. The  L604attribute L605 field is not filled since the attribute has not yet been created.ŠIf it deals with a mandatory attribute (preceded by an exclamation mark in  L5756CF L5755the structure schema), the attribute is always created by the editor, whether the action returns  L606True L607 or  L608False L609 and the editor raises the events  L610FCAttrCreate.Pre L611 (before creating the attribute) and  L612FCAttrModify.Pre L613 (before requiring the user to assign a value to the attribute).ŠAttributes with an imposed value (entered with the  L614FCWITH L615 keyword in the structure schema), do not raise  L616FCAttrCreate.Pre L617 event when created. L618 L619 L620 L621AttrCreate.Post (NotifyAttribute): L622 L623 L624 L625The editor has created the attribute of type  L626FCattributeType L627 for the element  L628FCelement L629.ŠAttributes with imposed value (entered with the  L630FCWITH L631 keyword in the structure schema) do not raise a  L632FCAttrCreate.Post L633 event. L634 L635 L636 L637AttrModify.Pre (NotifyAttribute): L638 L639 L640 L641The editor is going to change the value of the indicated attribute  L642FCattribute L643 for the element  L644FCelement L645.ŠIf this is a mandatory attribute (i.e. an attribute preceded by an exclamation mark in the structure schema) and if the action gives a value to the attribute and returns  L646True L647, the editor will not require the user to give a value. L649 L650 L651 L652AttrModify.Post (NotifyAttribute): L653 L654 L655 L656The editor has changed the value of the attribute  L657FCattribute L658 for the element  L659FCelement L660. The attribute then has the new value. L661 L662 L663 L664AttrDelete.Pre (NotifyAttribute): L665 L666 L667 L668The editor is going to delete the attribute  L669FCattribute L670 for the element in question. The attribute is still attached to the element and its value is still accessible. L671 L672 L673 L674AttrDelete.Post (NotifyAttribute): L675 L676 L677 L678The editor has removed an attribute of type  L679FCattributeType L680 for the indicated element. The attribute field is not filled since the attribute no longer exists. L5757CF L681 L682 L683 L684AttrRead.Pre (NotifyAttribute): L685 L686 L687 L688This event occurs when a document file is read and even if this is required by the API (exception to the rule). The editor starts reading an attribute of type  L689FCattributeType L690. The attribute field is not significant. If the action returns  L691True L692, the attribute is not included in the abstract tree. L693 L694 L695 L696AttrRead.Post (NotifyAttribute): L697 L698 L699 L700The editor has read the attribute attribute of the element element and has inserted it into the abstract tree. L701 L702 L703 L704AttrSave.Pre (NotifyAttribute): L705 L706 L707 L708This event occurs when a document is saved to a file and even if the backup is required by the API (exception to the rule). The editor writes the attribute L709FC attribute L710 of the element  L711FCelement L712. If the action returns  L713True L714, the attribute is not written in the file. L715 L716 L717 L718AttrSave.Post (NotifyAttribute): L719 L720 L721 L722The editor has written in the file the attribute  L723FCattribute L724 of the element  L725FCelement L726. L2081 L2082 L2083 L2084AttrExport.Pre (NotifyAttribute): L2085 L2086 L2087 L2088This event occurs when a document is exported in a format that is not the standard Thot format (pivot format), and even if export is required by an application through the API (exception to the rule). The editor is going to generate the translation of the attribute L2089FC attribute L2090 of the element  L2091FCelement L2092. If the action returns  L2093True L2094, the attribute is not exported in the output file. L2095 L2096 L2097 L2098AttrExport.Post (NotifyAttribute): L2099 L2100 L2101 L2102The editor has exported in the output file the attribute  L2103FCattribute L2104 of the element  L2105FCelement L2106. L5758CF( L727) L728 L729Events for elements* L730 L731 L732 L733The following events only appear in the DEFAULT or ELEMENTS section of an application schema. L734 L735 L736In the DEFAULT section, they are raised as soon as any element is affected by the relevant event. L737 L738 L739In the  L740FCELEMENTS L741 section, they are associated with an element type and raised as soon as an element of this type is affected by the relevant event. L742 L743 L744Three different structures can accompany the events on elements (see the structure specified for each event. These structures are defined in the  L5787FCT Pappaction.h L5788 file): L748 L749 L750typedef struct { L751 L752  TTEevent event; L753 L754  Document document; L755 L756  Element element; L757 L758  ElementType elementType; L759 L760  int position; L761 L762} NotifyElement; L4596 L4595  L4593 L4594typedef struct { L4591 L4592  TTEevent event; L4589 L4590  Document document; L4587 L4588  Element element; L4585 L4586  ElementType elementType; L4600 L4599 ElementType targetElementType; L4598 L4597} NotifyOnElementType; L763 L764  L765 L766typedef struct { L767 L768  TTEevent event; L769 L770  Document document; L771 L772  Element element; L773 L774  Element target; L775 L776  Document targetdocument; L777 L778} NotifyOnTarget; L779 L780  L781 L782typedef struct { L783 L784  TTEevent event; L785 L786  Document document; L787 L788  Element element; L5759CF L789 L790  Element target; L791 L792  int value; L793 L794} NotifyOnValue; L795 L796  L797 L798 L799 L800ElemMenu.Pre (NotifyElement): L801 L802 L803 L804The editor is composing the ``Insert'' or the ``Paste'' menu and will add to this menu an item which allows the user to create or paste an element of type  L805FCelementType L806 (with its descent) as the child of the element  L807FCelement L808. The  L809FCposition L810 field gives the position of the element that will be created or pasted (when the user chooses the item of the menu) in the list of the children of  L811FCelement L812 (0 before the first child or as the first child if element has no child, 1 after the first child, 2 after the second one, etc.).ŠIf the event is in the  L813FCELEMENTS L814 section, it is only raised when the editor includes in the menu the item regarding an element of the corresponding type.ŠIf the event is in the  L815FCDEFAULT L816 section, it is raised as soon as the editor includes an item in the ``Insert'' menu, whatever the element type in question.ŠIf the action called by the event returns  L817True L818, the corresponding item is not included in the menu; if it returns  L819False L820, the item is normally included in the menu.ŠThere is no  L821FCElemMenu.Post event L822. L4606 L4601 L4602 L4603ElemTransform.Pre (NotifyOnElementType): L4604 L4605 L4610 L4609The editor is changing the type of selected elements. The event is raised if the editor could not transform the whole selection into  L4623FCT PtargetElementType L4624, and before it tries to change individually each selected element. L4613 L4612 L4611If the event is in the  L4625FCT PELEMENTS L4626 section, it is raised only if all the selected elements belong to the corresponding type. L4616 L4615 L4614If the event is in the section  L4627FCT PDEFAULT L4628, it is sent whatever the type of selected elements is. L5760CF L4619 L4618 L4617If the action called by the event returns  L4629SIT PTrue L4630, the editor will not try to change individually the type of selected elements, if it returns  L4631SIT PFalse L4632, the editor will try. L4622 L4621 L4620There is no ElemTransorm.Post event. L824 L825 L826 L827ElemNew.Pre (NotifyElement): L828 L829 L830 L831The user is going to create a new element of type  L832FCelementType L833 (with its descent) as the child of the element  L834FCelement L835. The  L836FCposition L837 field gives the position of the element which will be created in the list of the children of  L838FCelement L839 (0 before the first child or as the first child if the element has no child, 1 after the first child, 2 after the second one, etc.).ŠIf the event is in the  L840FCELEMENTS L841 section, it is raised only when the user wants to create an element of the corresponding type.ŠIf the event is in the  L842FCDEFAULT L843 section, it is raised as soon as the user creates a new element, whatever its type.ŠIn all cases, this event is only raised for the root of a subtree that will be created and not for each element of this subtree. L844 L845 L846 L847ElemNew.Pre (NotifyElement): L848 L849 L850 L851The user is going to create a new element of type  L852FCelementType L853 (with its descent) as the child of the element  L854FCelement L855. The  L856FCposition L857 field gives the position of the element which will be created in the list of the children of  L858FCelement L859 (0 before the first child or as the first child if the element has no child, 1 after the first child, 2 after the second one, etc.).ŠIf the event is in the  L860FCELEMENTS L861 section, it is raised only when the user wants to create an element of the corresponding type.ŠIf the event is in the  L862FCDEFAULT L863 section, it is raised as soon as the user creates a new element, whatever its type.ŠIn all cases, this event is only raised for the root of a subtree that will be created and not for each element of this subtree. L864 L865 L866 L867ElemNew.Post (NotifyElement): L868 L869 L870 L871The element  L872FCelement L873 has just been created and placed into the abstract tree of its document. The  L874FCposition L875 field has no meaning.ŠIf the event is in the  L876FCELEMENTS L877 section, it is only raised when the user has created an element of the corresponding type.ŠIf the event is in the  L878FCDEFAULT L879 section, it is raised each time the user  L5762CF L5761creates a new element, whatever its type.ŠWhen the event has created a subtree, this event can only be raised for the root of the subtree newly created or on the contrary to each element of this subtree, depending on the notification mode in which the document can be found (see the  L880FCTtaSetNotificationMode L881 of the API). However, even when the document is included in the full notification mode, the event is only raised for the elements which require it. L883 L884 L885 L886ElemRead.Pre (NotifyElement): L887 L888 L889 L890This event occurs when a document file is read and even if this is required by the API (exception to the rule). The editor starts reading an element of type  L891FCelementType L892 which must be the last child of  L893FCelement L894. The  L895FCposition L896 field has no meaning. If the action returns  L897True L898, the element (and the whole subtree) is not included in the abstract tree. L899 L900 L901 L902ElemRead.Post (NotifyElement): L903 L904 L905 L906The editor has read the element  L907FCelement L908 and the whole subtree and has inserted it into the abstract tree. The  L909FCposition L910 field has no meaning. L911 L912 L913 L914ElemSave.Pre (NotifyElement): L915 L916 L917 L918This event occurs when a document is saved to a file and even if the backup is required by the API (exception to the rule). The editor is going to write the element  L919FCelement L920. The  L921FCposition L922 field has no meaning. If the action returns  L923True L924, the subtree is not written in the file. L925 L926 L927 L928ElemSave.Post (NotifyElement): L929 L930 L931 L932The editor has written the element  L933FCelement L934. The  L935FCposition L936 field has no meaning. L2107 L2108 L2109 L2110ElemExport.Pre (NotifyElement): L2111 L2112 L2113 L2114This event occurs when a document is exported, and even if export is required by the API (exception to the rule). The editor is going to generate the translation of the element  L2115FCelement L2116. The  L2117FCposition L2118 field has no meaning. If the action returns  L2119True L2120, the subtree is not exported in the output file. L5763CF L2121 L2122 L2123 L2124ElemExport.Post (NotifyElement): L2125 L2126 L2127 L2128The editor has exported the element  L2129FCelement L2130. The  L2131FCposition L2132 field has no meaning. L937 L938 L939 L940ElemDelete.Pre (NotifyElement): L941 L942 L943 L944The element  L945FCelement L946 will be removed from its abstract tree if a  L5672FR«  L5674Delete L5675FR » or « Cut »  L5673command is issued by the user, or if the Thot kernel has detected two Text elements that may be merged. This element is still included in the abstract tree when the event is raised. L5623 L5622 L5621The  L947FCposition L948 field may take different values depending on the three following cases: L5627 L5628 L5629 L5630Case 1:  L5671FR« Delete » or « Cut » L5631 L5632 L5657 L5656This event signals the deletion of an item of a delete sequence that depends on the selection. This functionnality allows the application, if such treatment is requested, to postpone its treatment until the full delete sequence is obtained. L5660 L5659 L5658Values of the position field maty be the following: L5663EN L5662 L5661FRTTE_STANDARD_DELETE_FIRST_ITEMS:  L5677the element is among the first items of the delete sequence: the event delete sequence is not complete, and next event(s) will follow this one. L5666EN L5664 L5665FRTTE_STANDARD_DELETE_LAST_ITEM: this is the last item of the delete sequence. L5638 L5633 L5634 L5635Case 2: Two Text units may be merged L5636 L5637 L5670 L5669Two Text elements own the same caracteristics, and may be merged. The content of the second element will be merged into the first one, and this element will be deleted from the abstract tree if the application authorizes this deletion. Otherwise, these two elements will come apart. L5680 L5678 L5679The position field value is: TTE_MERGE_DELETE_ITEM L5764CF L5644 L5639 L5640 L5641Case 3: Requested deleting (must be suppressed) L5642 L5643 L5650 L5649The element will be necessarily deleted independent of the value returned by the event treatment. This event goal is simply indicative. L5653 L5652 L5651Value of the position field is:  L5654FRTTE_TOOLKIT_DELETE L5626 L5625 L5624When the event must remove a whole subtree, this event can only be raised for the root of the subtree to be removed or on the contrary, to each element of this subtree, depending on which notification mode the document is in (see the  L949FCTtaSetNotificationMode L950 function of the API). However, even when the document is in the full notification mode, the event is only raised for the elements which require it. L951 L952 L953 L954ElemDelete.Post (NotifyElement): L955 L956 L957 L958An element of type  L959FCelementType L960, child of element, has been removed from the abstract tree. The  L961FCposition L962 field gives the position of the removed element in the list of the children of  L963FCelement L964 (0 for the first child, 1 for the second, etc.). If a subtree has been deleted, the event is only raised for the root of this subtree and not to each element of the subtree, even if the document is included in the full notification mode. L966 L967 L968 L969ElemSelect.Pre (NotifyElement): L970 L971 L972 L973The user wants to select the element  L974FCelement L975. The selection has not been already made. This event is also raised before a double-click and when the editor follows a hypertext link. The  L976FCposition L977 field has no meaning. L978 L979 L980 L981ElemSelect.Post (NotifyElement): L982 L983 L984 L985The element  L986FCelement L987 has just been selected by the user. The  L988FCposition L989 field has no meaning. L990 L991 L992 L993ElemExtendSelect.Pre (NotifyElement): L994 L995 L996 L997The user wants to extend the selection to the element  L998FCelement L999. This event is only raised when the selection implies at least two elements. The  L1000FCposition L1001 field has no meaning. L5765CF L1002 L1003 L1004 L1005ElemExtend.Post (NotifyElement): L1006 L1007 L1008 L1009The selection has just been extended to the element  L1010FCelement L1011. The  L1012FCposition L1013 field has no meaning. L1014 L1015 L1016 L1017ElemActivate.Pre (NotifyElement): L1018 L1019 L1020 L1021The user has just double-clicked on the element  L1022FCelement L1023. The selection has not already changed. This event is accepted for all elements (references or not). The  L1024FCposition L1025 field has no meaning. L1026 L1027 L1028 L1029ElemActivate.Post (NotifyElement): L1030 L1031 L1032 L1033The selection has been moved once the user has double-clicked on the element  L1034FCelement L1035. You can ask the API where the new selection is if is the  L1036FCElemSelect L1037 event has not been retrieved. The  L1038FCposition L1039 field has no meaning. L1040 L1041 L1042 L1043ElemSetReference.Pre (NotifyOnTarget): L1044 L1045 L1046 L1047The user requires that the reference  L1048FTelement L1049  L1050FCelement L1051 points to the element  L1052FCtarget L1053 belonging to the  L1054FCtargetdocument L1055 document. The link is not already established and the reference element still points its old target (or nothing at all). In the  L1056FCELEMENTS L1057 section, this event is only valid for the elements of type reference (this is checked by the compiler). If this event is included in the  L1058FCDEFAULT L1059 section, it will only apply to the reference elements. This event is not accepted in the  L1060FCATTRIBUTES L1061 section even for reference attributes (see the  L1062FCAttrModify L1063 event). L1064 L1065 L1066 L1067ElemSetReference.Post (NotifyOnTarget): L1068 L1069 L1070 L1071The reference element  L1072FCelement L1073 has just changed its target upon the user's request. It now points to the element  L1074FCtarget L1075 belonging to the  L1076FCtargetdocument L1077 document. L1079 L1080 L1081 L1082ElemInclude.Pre (NotifyElement): L1083 L1084 L1085 L1086The user is going to include a new element of type  L1087FCelementType L1088 as the child of the element  L1089FCelement L1090. The  L1091FCposition L1092 field gives the position of the element which will be included in the list of the children of  L1093FCelement L1094 (0 before the first child, 1 after the first child, 2 after the second one, etc.).Š L5767CF L5766If a whole subtree is to be included, the event is only raised for the root of the subtree. L1095 L1096 L1097 L1098ElemInclude.Post (NotifyElement): L1099 L1100 L1101 L1102The element  L1103FCelement L1104 has just been included. The  L1105FCposition L1106 field has no meaning.ŠIf a whole subtree has been included, the event is only raised for the root of this subtree.Š L5807 L5802 L5803 L5804ElemFetchInclude.Pre (NotifyOnTarget) L5805 L5806 L5819 L5820The user requires that the copy  L5824FTelement L5825  L5826FCelement  L5827FTbe up to date with the value of its source element L5830FT. L5837 L5836 L5835FTIn any case the source element are not accessible (for example when this is placed in a non loaded document), so the  L5831FCelement target L5832FT and  L5833FCtargetdocument L5834FT components are equal to NULL. Otherwise,  L5838FTthe element L5849FC target L5839FT and  L5840FCtargetdocument L5841FT point to the source element and document where this is placed, respectively.  L5828FC  L5814 L5809 L5810 L5811ElemFetchInclude.Post (NotifyOnTarget) L5812 L5813 L5844 L5843If the document where the source element is placed is accessible, the copy element  L5845FCelement L5846 was up to dated with the value of element  L5847FCtarget L5848. L1107 L1108 L1109 L1110ElemCopy.Pre (NotifyElement): L1111 L1112 L1113 L1114The user is going to copy the element  L1115FCelement  L1116contained in the abstract tree. The  L1117FCposition L1118 field has no meaning.ŠWhen the event must copy a whole subtree, this event can only be raised for the root of the subtree to be copied or to each element of the subtree, depending on the notification mode in which the document is placed (see the  L1119FCTtaSetNotificationMode L1120 function of the API). However, even when the document is in the full notification mode, the event is only raised for the elements which require it.  L1121 L1122 L1123 L1124ElemCopy.Post (NotifyElement): L1125 L1126 L1127 L1128The element  L1129FCelement L1130 has just been copied. It is placed in the abstract tree. The  L1131FCposition L1132 field has no meaning.ŠWhen the event has copied a subtree, this event can only be raised for the root of the copied subtree or on the contrary to each element of the subtree, depending on the notification mode of the document (see the  L1133FCTtaSetNotificationMode L1134 function of the API). However, even when the document is in the full notification mode, the event is only raised for the elements which have required it. L1135 L1136 L1137 L1138ElemPaste.Pre (NotifyOnValue): L1139 L1140 L1141 L1142The user is going to paste the element  L1143FCtarget L1144 as the descendant of the element  L1145FCelement L1146. The element  L1147FCtarget L1148 is not already pasted at the position required by the user. The  L1149FCvalue L1150 field gives the position of the element to be pasted in the list of the children of  L1151FCelement L1152 (0 before the first child, 1 after the first child, 2 after the second child, etc.).Š L5769CF L5768In all cases, this event is only raised for the root of a subtree which will be pasted and not to each element of the subtree. L1154 L1155 L1156 L1157ElemPaste.Post (NotifyElement): L1158 L1159 L1160 L1161The element  L1162FCelement L1163 has just been pasted. It is placed into the abstract tree. The  L1164FCposition L1165 field contains the document from which the element has been copied or cut.ŠWhen the event has pasted a subtree, this event can only be raised for the root of the pasted subtree or on the contrary to each element of the subtree, depending on the notification mode of the document (see the  L1166FCTtaSetNotificationMode L1167 function of the API). However, even when the document is in the full notification mode, the event is only raised for the elements which have required it. L2350 L2351 L2352 L2353ElemChange.Pre (NotifyElement): L2354 L2355 L2356 L2357The user is going to change the type of element  L2358FCelement L2361. The element has still its old type. The  L2364FCelementType L2365 field indicates the new type that will be given to the element. The  L2389FCposition L2390 field has no meaning. L2368 L2369 L2370 L2371ElemChange.Post (NotifyElement): L2372 L2373 L2374 L2375The element  L2376FCelement L2377 has just changed type. The  L2378FCelementType L2379 field indicates the previous type of the element. The  L2399FCposition L2400 field has no meaning. L2401 L2402 L2403 L2404ElemMove.Pre (NotifyElement): L2405 L2406 L2407 L2408The user is going to create a surrounding element for element  L2409FCelement L2410. The  L2413FCposition L2414 field has no meaning. L2415 L2416 L2417 L2418ElemMove.Post (NotifyElement): L2419 L2420 L2421 L2422The element  L2423FCelement L2424 has just been surrounded by a new element. The  L2427FCposition L2428 field has no meaning. L1168 L1169 L1170 L1171ElemTextModify.Pre (NotifyOnTarget): L1172 L1173 L1174 L1175The user starts modifying the contents of the text or image leaf (modification of the name of the image file)  L1176FCtarget L1177 in the element  L1178FCelement L1179. The  L1180FCelement L1181 parameter is the element of the type which has requested the event and which is an ascendant of the  L1182FCtarget L1183 leaf. The text leaf still has its previous contents.Š L5771CF L5770If this event is in the  L1184FCELEMENTS L1185 section, it is only raised if one of the ascendants (at any level) of the text leaf in question has the type with which the event is associated. If several ascendants require the event, it is raised for each one and first to the ones at the lowest level.ŠIf this event is in the  L1186FCDEFAULT L1187 section, it is raised as soon as any text leaf is affected. In this case, both parameters  L1188FCelement  L1189and  L1190FCtarget L1191 have the same value: the affected text leaf.ŠThe return of the function called in the application is indifferent: whether it returns True or False, the behaviour of the editor is not modified. L1192 L1193 L1194 L1195ElemTextModify.Post (NotifyOnTarget): L1196 L1197 L1198 L1199The user has finished modifying the contents of the text or image leaf (modification of the name of the image file)  L1200FCtarget L1201 within element  L1202FCelement L1203. Several changes can have been made since the corresponding  L1204FCElemTextModify.Pre L1205 event has been raised: inserted, pasted, deleted characters, etc. When the event is raised, the text leaf has its new contents. This event is raised in the same way as the  L1206FCElemTextModify.Pre L1207 event. L1208 L1209 L1210 L1211ElemGraphModify.Pre (NotifyOnValue): L1212 L1213 L1214 L1215The user wants to replace by  L1216FCvalue L1217 the contents of the graphic or symbol leaf  L1218FCtarget L1219 which has an ascendant  L1220FCelement L1221.  L1222FCElement L1223 is the element of the type with which the event is associated. If the event is defined in the  L1224FCDEFAULT L1225 section then  L1226FCelement L1227 is equal to  L1228FCtarget L1229. L1230 L1231 L1232 L1233ElemGraphModify.Post (NotifyOnValue): L1234 L1235 L1236 L1237The user has just replaced the contents of the graphic or symbol leaf  L1238FCtarget L1239 which has an ascendant  L1240FCelement L1241.( L1243) L1244 L1245Events for the specific presentation* L1246 L1247 L1248 L1249The following events can only appear in the  L1250FCDEFAULT L1251 or  L1252FCELEMENTS L1253 section of an application schema. L1254 L1255 L1256In the  L1257FCDEFAULT L1258 section, they are raised each time a specific presentation rule is created, modified or deleted (depending on the event), whatever the element in question. L5772CF L1259 L1260 L1261In the  L1262FCELEMENTS L1263 section, they are associated with an element type and raised by the editor when the specific rule concerns an element of the type in question. L1264 L1265 L1266A single type of context is associated with the events for the specific presentation (this structure is defined in the  L1267FCappaction.h L1268 file): L1269 L1270 L1271typedef struct { L1272 L1273  TTEevent event; L1274 L1275  Document document; L1276 L1277  Element element; L1278 L1279  PRule pRule; L1280 L1281  int pRuleType; L1282 L1283} NotifyPresentation; L1284 L1285  L1286 L1287 L1288 L1289PRuleCreate.Pre (NotifyPresentation): L1290 L1291 L1292 L1293The user requires a specific presentation rule of type  L1294FCtypePRule L1295 to be added for the element  L1296FCelement L1297. The rule is not already added. The  L1298FCpRule L1299 field has no significant value. L1300 L1301 L1302 L1303PRuleCreate.Post (NotifyPresentation): L1304 L1305 L1306 L1307The  L1308FCpRule L1309 rule has just been added to the element  L1310FCelement L1311. L1312 L1313 L1314 L1315PRuleModify.Pre (NotifyPresentation): L1316 L1317 L1318 L1319The user wants to change the value of the  L1320FCpRule L1321 specific presentation rule associated with the element  L1322FCelement L1323. L1324 L1325 L1326 L1327PRuleModify.Post (NotifyPresentation): L1328 L1329 L1330 L1331The user has just changed the value of the  L1332FCpRule L1333 specific presentation rule associated with the element  L1334FCelement L1335. L1336 L1337 L1338 L1339PRuleDelete.Pre (NotifyPresentation): L1340 L1341 L1342 L1343The user wants to remove a  L1344FCpRule L1345 specific presentation rule associated with the element  L1346FCelement L1347. L1348 L1349 L1350 L1351PRuleDelete.Post (NotifyPresentation): L1352 L1353 L1354 L1355The user has removed a specific presentation rule of type  L1356FCpRuleType L1357 associated with the element  L1358FCelement L1359. The  L1360FCpRule L1361 field has no significant value. L5773 CF( L1363) L1364 L1365Events for documents* L1366 L1367 L1368 L1369The following events are intended for documents. They can only appear in the  L1370FCDEFAULT L1371 section of an application schema. If it is an application schema associated with a type of document, they are raised each time a document of this type is (respectively) opened, created, closed or saved. If they are included in the  L1372FCDEFAULT L1373 section of the  L1374FCEDITOR.A L1375 schema, these events are raised whatever the type of document. L1376 L1377 L1378Only one type of context accompanies the events for documents. The  L1379FCview L1380 field is not significant for any event on documents (this structure is defined in the  L1381FCappaction.h L1382 file): L1383 L1384x-Latin1 L1385typedef struct { L1386x-Latin1 L1387  TTEevent event; L1388x-Latin1 L1389  Document document; L1390x-Latin1 L1391  View view; L1392x-Latin1 L1393} NotifyDialog; L1394 L1395 L1396 L1397DocOpen.Pre (NotifyDialog): L1398 L1399 L1400 L1401The user requires a document to be opened. The document is not already opened but the  L1402FCdocument L1403 field already contains the identifier to be associated with the document if the application accepts to open it. L1404 L1405 L1406 L1407DocOpen.Post (NotifyDialog): L1408 L1409 L1410 L1411The user has opened the document designated by the  L1412FCdocument L1413 field. L1414 L1415 L1416 L1417DocCreate.Pre (NotifyDialog): L1418 L1419 L1420 L1421The user requires a new document to be created. The document is not already created but the  L1422FCdocument L1423 field already contains the identifier to be associated with the document if the application accepts its creation. L1424 L1425 L1426 L1427DocCreate.Post (NotifyDialog): L1428 L1429 L1430 L1431The user has created the document designated by the  L1432FCdocument L1433 field. L1434 L1435 L1436 L1437DocClose.Pre (NotifyDialog): L1438 L1439 L1440 L1441The user requires the document designated by the  L1442FCdocument L1443 field to be closed. The document is still open. L5774!CF L1444 L1445 L1446 L1447DocClose.Post (NotifyDialog): L1448 L1449 L1450 L1451The user has closed the document designated by the  L1452FCdocument L1453 field. This document identifier is no longer used. L1454 L1455 L1456 L1457DocSave.Pre (NotifyDialog): L1458 L1459 L1460 L1461The user requires the document designated by the  L1462FCdocument L1463 field to be saved. The document is not saved yet. L1465 L1466 L1467 L1468DocSave.Post (NotifyDialog): L1469 L1470 L1471 L1472The user has saved the document designated by the  L1473FCdocument L1474 field. L2133 L2134 L2135 L2136DocExport.Pre (NotifyDialog): L2137 L2138 L2139 L2140The user requires the document designated by the  L2141FCdocument L2142 field to be exported. The document is not exported yet. L2143 L2144 L2145 L2146DocExport.Post (NotifyDialog): L2147 L2148 L2149 L2150The user has exported the document designated by the  L2151FCdocument L2152 field.( L1475) L1476 L1477Events for views* L1478 L1479 L1480 L1481The following events are intended for views. They can only appear in the  L1482FCDEFAULT L1483 section of an application schema and concern all views of a given document (if they are in an application schema associated with this type of document) or all views of all types of documents (if they are in the  L1484FCEDITOR.A L1485 schema). L1486 L1487 L1488Two types of context can accompany the events for views (these structures are defined in the  L1489FCappaction.h L1490 file): L1491 L1492x-Latin1 L1493typedef struct { L1494x-Latin1 L1495  TTEevent event; L1496x-Latin1 L1497  Document document; L1498x-Latin1 L1499  View view; L1500x-Latin1 L1501} NotifyDialog; L2193 L2194  L2195 L2196typedef struct { L2197 L2198  TTEevent event; L2199 L2200  Document document; L2201 L2202 int verticalValue; L2203 L2204 int horizontalValue; L5775"CF L2205 L2206} NotifyWindow; L1502 L1503 L1504 L1505ViewOpen.Pre (NotifyDialog): L1506 L1507 L1508 L1509The editor is going to open a view for the document designated by the  L1510FCdocument L1511 field. The  L1512FCview L1513 field is the view which will open. L1514 L1515 L1516 L1517ViewOpen.Post (NotifyDialog): L1518 L1519 L1520 L1521The editor has just opened the view for the document  L1522FCdocument L1523. The view field is the view which is opened. L1524 L1525 L1526 L1527ViewClose.Pre (NotifyDialog): L1528 L1529 L1530 L1531The editor is going to close the view  L1532FCview L1533 for the document  L1534FCdocument L1535. L1536 L1537 L1538 L1539ViewClose.Post (NotifyDialog): L1540 L1541 L1542 L1543The editor has just closed the view  L1544FCview L1545 for the document  L1546FCdocument L1547. L2207 L2208 L2209 L2210ViewResize.Pre (NotifyWindow): L2211 L2212 L2213 L2214The editor is going to resize the view  L2215FCview L2216 for the document  L2217FCdocument L2218. The parameters  L2261FCT PverticalValue L2262 and  L2263FCT PhorizontalValue L2264 give the vertical and horizontal variations of the window. These values are expressed in pixels and can be positive or negative numbers. A negative value expresses a shrinking of the window. L2219 L2220 L2221 L2222ViewResize.Post (NotifyWindow): L2223 L2224 L2225 L2226The editor has just resized the view  L2227FCview L2228 for the document  L2229FCdocument L2230.. The parameters  L2267FCT PverticalValue L2268 and  L2269FCT PhorizontalValue L2270 give the vertical and horizontal variations of the window. These values are expressed in pixels and can be positive or negative numbers. A negative value expresses a shrinking of the window. L2231 L2232 L2233 L2234ViewScroll.Pre (NotifyWindow): L2235 L2236 L2237 L2238The editor is going to scroll the view  L2239FCview L2240 for the document  L2241FCdocument L2242. The parameters  L2272FCT PverticalValue L2273 and  L2274FCT PhorizontalValue L2275 give the vertical or horizontal scrolling value (one of them is nul). The scrolling value is expressed in pixels and can be a positive or negative number. When the scroll is done by a jump to a specific point within the document, the editor cannot compute the scrolling value; the value 65535 is returned in that case. L5776#CF L2243 L2244 L2245 L2246ViewScroll.Post (NotifyWindow): L2247 L2248 L2249 L2250The editor has just scrolled the view  L2251FCview L2252 for the document  L2253FCdocument L2254. The parameters  L2278FCT PverticalValue L2279 and  L2280FCT PhorizontalValue L2281 give the vertical or horizontal scrolling value (one of them is nul). The scrolling value is expressed in pixels and can be a positive or negative number. When the scroll is done by a jump to a specific point within the document, the editor cannot compute the scrolling value; the value 65535 is returned in that case.( L1548) L1549 L1550Events for the application* L1551 L1552 L1553 L1554The events described in this section do not concern a particular object but the whole application. They appear when the editor is launched and closed. L1555 L1556 L1557As they are not intended for a particular type of document, these events can only appear in the  L1558FCEDITOR.A L1559 schema. They are independent of any element or attribute. As a result, they can only appear in the  L1560FCDEFAULT L1561 section of this schema. L1562 L1563 L1564Each event for the application is accompanied with a pointer to the subsequent structure (this structure is defined in the  L1565FCappaction.h L1566 file): L1567 L1568x-Latin1 L1569typedef struct { L1570x-Latin1 L1571  TTEevent event; L1572x-Latin1 L1573} NotifyEvent; L1575 L1576 L1577 L1578Init.Pre (NotifyEvent): L1579 L1580 L1581 L1582The editor is going to start. This event (and the next one) allows the application to carry out initializations. If the action triggered off by the event returns  L1583FCTrue L1584, the editor does not start and the application immediately ends. L1585 L1586 L1587 L1588Init.Post (NotifyEvent): L1589 L1590 L1591 L1592The editor has just started. It can now receive the events issued by the user and the calls made by the application through the API. L1593 L1594 L1595 L1596Exit.Pre (NotifyEvent): L1597 L1598 L1599 L1600The editor is going to stop once the ``Quit'' command has been issued by the user. No operation has been already performed. In particular, all  L5778$CF L5777opened documents and views are still opened. If the action triggered off by this event returns  L1601FCTrue L1602, the editor does not do anything and the editing session carries on. L1603 L1604 L1605 L1606Exit.Post (NotifyEvent): L1607 L1608 L1609 L1610The editor stops. The application can still use the API but all the documents which were opened at the end of the session are already closed.( L1611) L1612 L1613Defining actions* L1614 L1615 L1616 L1617The actions of the application always receive a parameter which is a pointer to a context whose structure depends on the processed event. If the action knows the processed event, it can directly handle the parameter with the correct structure (NotifyEvent, NotifyDialog, etc.). Conversely, if the action is able to process several events, it can use the subsequent declaration in order to sign the parameter and test the value of the event field in order to analyze the rest of the context (these definitions can be found in the  L1618FCappaction.h L1619 file): L1620 L1621 L1622typedef union { L1623 L1624  NotifyEvent notifyevent; L1625 L1626  NotifyDialog notifydialog; L2255 L2256  NotifyWindow notifywindow; L1627 L1628  NotifyAttribute notifyattribute; L1629 L1630  NotifyElement notifyelement; L4635 L4636  NotifyOnElementType notifyonelementtype; L1631 L1632  NotifyOnTarget notifyontarget; L4637 L4638  NotifyOnValue notifyonvalue; L1633 L1634  NotifyPresentation notifypresentation; L1635 L1636} Notify; L1637 L1638  L1639 L1640 L1641The list of events is defined as follows (only internal events are listed): L1642 L1643 L1644typedef enum { L1645 L1646  TteAttrMenu, L1647 L1648  TteAttrCreate, L1649 L1650  TteAttrModify, L1652 L1653  TteAttrRead, L1654 L1655  TteAttrSave, L2153 L2154  TteAttrExport, L1656 L1657  TteAttrDelete, L5779%CF L1658 L1659  L1660 L1661  TteElemMenu, L4634 L4633 TteElemTransform, L1662 L1663  TteElemNew, L1664 L1665  TteElemRead, L1666 L1667  TteElemSave, L2155 L2156  TteElemExport, L1668 L1669  TteElemDelete, L1670 L1671  TteElemSelect, L1672 L1673  TteElemExtendSelect, L1674 L1675  TteElemActivate, L1676 L1677  TteElemSetReference, L1678 L1679  TteElemInclude, L5852 L5853 TteElemFetchInclude, L1680 L1681  TteElemPaste, L3909 L3910 TteElemChange, L3912 L3911 TteElemMove, L1682 L1683  TteElemTextModify, L1684 L1685  TteElemGraphModify, L5855 L5854 TteElemMouseOver, L5857 L5856 TteElemMouseOut, L1686 L1687  L1688 L1689  TtePRuleCreate, L1690 L1691  TtePRuleModify, L1692 L1693  TtePRuleDelete, L1694 L1695  L1696 L1697  TteDocOpen, L5859 L5858 TteDocTmpOpen, L1698 L1699  TteDocCreate, L1700 L1701  TteDocClose, L1702 L1703  TteDocSave, L2157 L2158  TteDocExport, L1704 L1705  L1706 L1707  TteViewOpen, L1708 L1709  TteViewClose, L2257 L2258  TteViewResize, L2259 L2260  TteViewScroll, L1710 L1711  L1712 L1713  TteInit, L1714 L1715  TteExit L1716 L1717} TteEvent; L1718 L1719  L1720 L1721 L1722The type signature of a  L1723FC.Pre L1724 action of the application is: L1725 L1726 L1727boolean Action(notify) L5780&CF L1728 L1729   Notify *notify; L1730 L1731 L1732The type signature of a  L1733FC.Post L1734 action of the application is: L1735 L1736 L1737void Action(notify) L1738 L1739   Notify *notify;( L1741) L1742 L1743Example* L1744 L1745 L1746 L1747Amaya is an example of appplication built on Thot library. We just explain here how this application declares a subset of its user interface and a subset of Thot events using  L4790FCT PEDITOR.A L4791 and  L4792FCT PHTML.A L4793 files. These complete files can be found in the amaya directory. L1760 L1761 L1762APPLICATION EDITOR; L4897 L4898USES L4895 L4896 HTML, Lookup, NoStructSelect; L4893 L4894DEFAULT L4891 L4892 Init.Post -> InitAmaya; L4889 L4890 L4887 L4888MENUS L4885 L4886 HTML Windows: L4883 L4884 BEGIN L4899 L4900....... L4831 L4832 view:1 Style button:BCreateClass -> ChangeClass; L4833 L4834 view:1 Style button:BApplyClass -> ApplyClass; L4835 L4836 view:1 Style Separator; L4837 L4838 view:1 Style button:BCSS -> InitCSSDialog; L4839 L4840 view:1 Style Separator; L4841 L4842 view:1 Style.Phrase toggle:TEmphasis -> CreateElemEmphasis; L4857 L4858.......  L4859 L4860 view:1 Style.Font toggle:TItalic -> CreateElemItalic; L4861 L4862 view:1 Style.Font toggle:TBold -> CreateElemBold; L4863 L4864 view:1 Style.Font toggle:TTeletype -> CreateElemTeletype; L4865 L4866 view:1 Style.Font toggle:TStrikeOut -> CreateElemStrikeOut; L4867 L4868 view:1 Style.Font toggle:TBig -> CreateElemBig; L5781'CF L4869 L4870 view:1 Style.Font toggle:TSmall -> CreateElemSmall; L4871 L4872 view:1 Style.Font button:BSub -> CreateSub; L4873 L4874 view:1 Style.Font button:BSup -> CreateSup; L4875 L4876 view:1 Style.Font button:BFont -> CreateElemFont; L4877 L4878 L4879 L4880 Attributes_; L4881 L4882 L4901 L4902 view:1 Help_ button:BInformation -> HelpAmaya; L4903 L4904 L4905 L4906 END; L4907 L4908END L1763 L1764  L4909 L4911 L4912This  L5504FCT PEDITOR.A L5505 file declares in  L5506FCT PUSES L5507 section that Amaya loads the other application schema  L5508FCT PHTML.A L5509 and the Thot modules: Lookup, NoStructSelect. L4926 L4925 L4924The  L5500FCT PDEFAULT L5501 section allows Amaya to execute the  L5502FCT PInitAmaya L5503 function as initial function. L4929 L4928 L4927The  L5498FCT PMENUS L5499 section declares only menus specific to HTML documents. The Style menu is only defined for the view 1 of the HTML presentation schema. L4935 L4934 L4933It contains: L4936 L4938 L4939 L4940 L4945 L4944simple buttons like  L5494FCT PBCreateClass L5495 and  L5496FCT PBApplyClass L5497, etc., L4941 L4942 L4948 L4947separators, L4949 L4950 L4953 L4952cascade submenus like  L5510FCT PFont L5511 submenu which contains simple buttons and toggle buttons. L5616 L5618 L5619  L5782(CF L4794 L4796 L4797 L4798 L4801 L4802PSLAP+HAP+button.gif L4799 L4808 L4809 L4810<- Menu Style in View 1 L4958 L4956 L4957<- Simple buttons L4962 L4960! L4961 L4965 L4963 L4964<- Separator L4968 L4966! L4967 L4971 L4969! L4970 L4974 L4972 L4973<- Cascade submenu Font L4978 L4977 L4976<- Toggles L4981 L4983 L4984 L4989 L4990 L4991APPLICATION HTML; L4992 L4993 L4994 L4995DEFAULT L4996 L4997 BEGIN L4998 L4999 ElemActivate.Pre -> DoubleClick; L5022 L5023..... L5483 L5482 END; L5024 L5025 L5026 L5027ELEMENTS L5028 L5029 L5030 L5031 PICTURE_UNIT: L5032 L5033 BEGIN L5034 L5035 ElemNew.Post -> UpdateSRCattribute; L5036 L5037 ElemTextModify.Post -> UpdateSRCattribute; L5038 L5039 END; L5040 L5041 L5170 L5171..... L5172 L5173ATTRIBUTES L5174 L5175 L5176 L5177 SRC: L5178 L5179 BEGIN L5180 L5181 AttrModify.Post -> SRCattrModified; L5182 L5183 END; L5783)CF L5484 L5485..... L5478 L5479 END; L5480 L5481END L4988 L4987 L4986The  L5488FCT PHTML.A L5489 file declares in  L5490FCT PDEFAULT L5491 section that the Amaya action  L5492FCT PDoubleClick L5493 have to be called when user double click any element in HTML documents. This action is called before Thot do anything.  L1798 L1799 L1800In section  L5514FCT PELEMENTS L5515, the  L1801FCUpdateSRCattribute L1802 function will be called after the user creates a new picture element or changes the contents of an existing one. L1812 L1813 L1814In section  L5516FCT PATTRIBUTES L5517, the  L1815FCSRCattrModified L1816 function will be called after the attribute SRC is modified.( L1819) L1820 L1821Compiling application schemas to generate application* L1822 L1823 L1824 L1825Once application schemas have been written (see example in section > L1826rV L1741 L1827), they must be compiled. To do this, corresponding structure schemas have to be previously compiled and accessible (application schema and structure schema have to be located in the same directory). L1830 L1831 L1832To compile the  L1833FCEDITOR.A L1834 schema the developer has to invoke: L1835 L1836 L1837 L1838app EDITOR L1840 L1841 L1842The compiler creates four files: L1843 L1844 L1845 L1846 L1847 L1848FCEDITOR.h L1849: a file of definitions intended to be included in modules containing actions. This file defines all menus, submenus and menu items used in EDITOR.A file. L5553 L5554 L5557 L5556EDITORdialogue: an example file of dialogue table which can be connected to substitute generic names by localized name adapted to the current language. L1856 L1857 L1858 L1859FCEDITORAPP.c L1860: a file of C code which initializes the application. This file should not be modified. L1861 L1862 L1863 L1864FCEDITORactions.proto L1865: a file containing the prototype of all application functions that have to be implemented. The first time, this file must then be renamed in  L1866FCEDITORactions.c L1867 and the body of actions must be written. Other time, the developer will take in this file only new functions to add them to its EDITORactions.c file. L5784*CF L5520 L5521 L5522To compile the  L5523FCHTML.A L5524 schema the developer has to invoke: L5525 L5526 L5527 L5528app HTML L5529 L5530 L5531The compiler creates three files: L5532 L5533 L5534 L5535 L5536 L5537FCHTML.h L5538: a file of definitions intended to be included in modules containing actions. This file defines all the element types and the attributes contained in the ( L5539FCHTML.S L5540) structure schema. L5541 L5542 L5543 L5544FCHTMLAPP.c L5545: a file of C code which initializes the application. This file should not be modified. L5546 L5547 L5548 L5549FCHTMLactions.proto L5550: a file containing the prototype of all application functions that have to be implemented. The first time, this file must then be renamed in  L5551FCEDITORactions.c L5552 and the body of actions must be written. Other time, the developer will take in this file only new functions to add them to its HTMLactions.c file.( L1903) L1904 L1905Makefile* L1906 L1907 L1908 L1909Once the code of actions has been written, it can be compiled and linked. For compiling and linking, modules generate by the app compiler have to be included. L1940 L1941 L1942We provide a Imakefile for Thot applications which can be extended or used as example (see makes/Imakefile). L5567 L5566 L5565Thot uses a set of libraries which are necessary to successfully compile and link the application. Some of them are given with the Thot environment: L5568 L5570 L5571 L5572 L5577 L5576libjpeg.a L5573 L5574 L5580 L5579libz.a L5581 L5582 L5585 L5584libpng.a L5586 L5587 L5590 L5589libwww.a (only for Amaya) L5593 L5595 L5596Other libraries have to be found in your specific environment: L5598 L5600 L5601 L5602 L5607 L5606libX11.a or libX11.so L5603 L5604 L5610 L5609libXt.a or libXt.so L5611 L5612 L5615 L5614libXm.a or libXm.so L5785+CF L5786CF