Adobe Illustrator Engineering and C + + engineering message Delivery

Source: Internet
Author: User

recent projects, developing Adobe Illustrator's plugins under the C + + platform, and designing the UI for the Adobe application Extension created by Flash Builder Projects under the Adobe Illustrator platform in Project. This article describes how to interact with C + + engineering for messaging. first, according to my previous article, I introduced a new UI project and switched to the design interface. Drag the control into the panel as shown in. After you drag the button in, add a click event. If you drag into the text input box, give an ID number

Switch to source code mode, according to the Tutorialui Engineering sample code provided by Adobe Illustrator Development. In the initialization method, add:
    CSInterface.instance.addEventListener (Get_params_req, respondtoparams);    Dispatch Ready Event    var event:csxsevent = new Csxsevent (Dialog_ready, csxseventscope.application);    CSInterface.instance.dispatchEvent (event);

the first line represents the incoming listener for the C + + project, and the latter two lines indicate that the dialog box initiates a message event that is distributed to C + +. Among them,
   Events we dispatch   private static const Dialog_ready:string = "Com.lm.shpToAI.shpToAIDialogReady";        Events We listen out for   private static const Get_params_req:string = "Com.lm.shpToAI.shpToAIGetParamsReq";
The Respondtoparams method implements the subsequent processing of C + + incoming messages.
For button distribution events, implement the following code, write the outgoing data to a payload XML object, and then take advantage of the CSInterface.instance.dispatch event.
    var payload:xml = <payload>          <cancelled>{cancelled}</cancelled>          <edittext>{ edittext.text}</edittext>          <nextText>{nextText.text}</nextText>         </payload>;       var event:csxsevent = new Csxsevent (GET_PARAMS_RESP, csxseventscope.application, payload);    CSInterface.instance.dispatchEvent (event);

Engineering--Properties--Run Configuration (Debug configuration)
Run to show your extended UI in the AI interface.

I was only contacted, may have a lot of expression problems, hope understanding.

Adobe Illustrator Engineering and C + + engineering message Delivery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.