• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Highlight Frames When Frames Selected C++

New Here ,
Jul 20, 2017 Jul 20, 2017

Copy link to clipboard

Copied

Hi All,

          I am new to  Building c++ plugin with IndesignCC 2015 . I am creating panel with list of text frame name when i selected the name and click on  the show button my frame getting selected  . And i decided to highlight frames while it is selected with the Stroke Weight.But Stroke weight is applyed permanently for the selected frames  but i need to apply stroke wieght only for highlighting  purpose when it is selected. Or else can any one suggest me for any other Way of Highlight.

     Screen short and Source code are attached here please Advice me.

ShowButton(IActiveContext* ac,LayerLocation location)

{

  do {

  IDocument* document = ac->GetContextDocument();

  if (document == NULL)

  break;

  InterfacePtr<IPanelControlData> panelData(this, UseDefaultIID());

  if (!panelData)

  break;

  int listSelection = WidgetUtils::SelectedIndex(panelData, kClickerListBoxWidgetID);

  if (listSelection < 0)

  break;

      

  WideString sequencename;

  if (!GetSequenceName(sequencename))

  break;

  sequenceDataPtr sdp;

  for (sdp = fDocSequenceList; sdp != nil; sdp = sdp->next)

  if (sequencename == (WideString)sdp->name)

  break;

  if (sdp == nil)

  break;

      

  clickDataPtr cdp;

        if (cdp == nil)

  break; // Find the entry corresponding to the list selection

  for (cdp = sdp->firstClick; cdp != nil; cdp = cdp->next)

        {

  if (cdp->listBoxIndex == listSelection)

            {

                UIDRef containingRef=cdp->boxClicked;               

                IDocument* doc = ac->GetContextDocument();

                if (doc == NULL)

                    return;

                IDataBase* docDB = ::GetDataBase(doc);

                if (docDB == NULL)

                    return;

                ISelectionManager* selectionManager = ac->GetContextSelection();

            ASSERT(selectionManager);

       if (selectionManager == nil)

       break;

       selectionManager->DeselectAll(nil);

                InterfacePtr<ILayoutSelectionSuite>layoutSelectionSuite(selectionManager, UseDefaultIID());

                ASSERT(layoutSelectionSuite);

                if (layoutSelectionSuite == nil)

                    break;

                if (containingRef == nil)

                    break;

                layoutSelectionSuite->SelectPageItems(containingRef, Selection::kAddTo,

                                                      Selection::kAlwaysCenterInView);

                bool16 result = kTrue;

                InterfacePtr<IStrokeAttributeSuite> strokeAttributeSuite(fCurrentSelection, UseDefaultIID());

                if (!strokeAttributeSuite) {

                    result = kTrue;

                    break;

                }

                PMReal newStrokeWeight = 5;

                strokeAttributeSuite->ApplyStrokeWeight(newStrokeWeight);

                break;

                                 

                }

            }

        }

} while (false);

ScreenShort1:

     In this screen In Clicker panel when i selected one of the name from the list box and clicked on the show button my text frame is selected in the document with stroke weight exactly what i am expecting

Screen Shot 2017-07-20 at 4.02.33 PM.png

Screen short 2:

     If again i am selecting one of the name from click panel and clicked show button the stroke apply for the currently selected frame is correct but previously selected frames stroke weight is not removing its my problem.

Screen Shot 2017-07-20 at 4.04.40 PM.png

Views

218

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 20, 2017 Jul 20, 2017

Copy link to clipboard

Copied

I would be surprised that you get a pertinent answer in the general indesign forum. Your concern can only be adressed by fellows C++ developpers and unless I am wrong they aren't any C++ indesign developer forum. You may want to enter adobe Technology Partner program to get access to specific developer forums and Adobe techs support.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 20, 2017 Jul 20, 2017

Copy link to clipboard

Copied

LATEST

Hi,

Have a look at FrmLblAdornment in the samples. Pop along to the InDesign SDK forum.

InDesign SDK

P.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines