• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetObjectExtra函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetObjectExtra函数的典型用法代码示例。如果您正苦于以下问题:C++ GetObjectExtra函数的具体用法?C++ GetObjectExtra怎么用?C++ GetObjectExtra使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetObjectExtra函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ApplyParams

static void ApplyParams (ButtoN b)
{
  WindoW  w;
  XOSPtr  xosp;

  SeqScrollDataPtr ssdp;

  w = ParentWindow (b);
  if ((ssdp = (SeqScrollDataPtr) GetObjectExtra (w)) != NULL)
  {
    if ((xosp = (XOSPtr) GetObjectExtra (b)) != NULL)
    {
      if (xosp->ddp != NULL)
      {
        xosp->ddp->windowsize = (Int4) ssdp->curval;
        ssdp = ssdp->next;
        xosp->ddp->percent = (FloatHi) ssdp->curval;
        xosp->ddp->level = (Int4) ssdp->curval;
        ssdp = ssdp->next;
        xosp->ddp->minwin = (Int4) ssdp->curval;
        ssdp = ssdp->next;
        xosp->ddp->linker = (Int4) ssdp->curval;
      }
    }
  }
  return;
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:27,代码来源:dustv.c


示例2: LaunchCommentRulesEditor

NLM_EXTERN void LaunchCommentRulesEditor (IteM i)
{
  BaseFormPtr         bfp;
  WindoW              w;
  DialoG              d;
  CommentSetDlgPtr    dlg;
  GrouP               h, c;
  MenU                m;
  ButtoN              b;

#ifdef WIN_MAC
  bfp = currentFormDataPtr;
#else
  bfp = GetObjectExtra (i);
#endif
  if (bfp == NULL) return;

  dlg = (CommentSetDlgPtr) MemNew (sizeof (CommentSetDlgData));
  if (dlg == NULL) return;
    
  w = FixedWindow (-50, -33, -10, -10, "Comment Rules Editor", StdCloseWindowProc);

#if 0
  m = PulldownMenu (w, "File");
  FormCommandItem (m, "Open", (BaseFormPtr)f, VIB_MSG_OPEN);
  FormCommandItem (m, "Import", (BaseFormPtr)f, VIB_MSG_IMPORT);
  FormCommandItem (m, "Save", (BaseFormPtr)f, VIB_MSG_SAVE);
  FormCommandItem (m, "Save As", (BaseFormPtr)f, VIB_MSG_SAVE_AS);
  SeparatorItem (m);
  FormCommandItem (m, "Quit", (BaseFormPtr)f, VIB_MSG_QUIT);
  m = PulldownMenu (w, "Edit");
  FormCommandItem (m, "Copy All to Clipboard", (BaseFormPtr) f, VIB_MSG_COPY);
#endif
  h = HiddenGroup (w, -1, 0, NULL);
  SetGroupSpacing (h, 10, 10);

  d = CommentSetDialog (h);
  dlg = GetObjectExtra (d);

  PointerToDialog (d, LoadCommentRuleSet());

  c = HiddenGroup (h, 3, 0, NULL);
  b = PushButton (c, "Accept", SaveRuleChanges);
  SetObjectExtra (b, d, NULL);
  PushButton (c, "Cancel", StdCancelButtonProc);

  AlignObjects (ALIGN_CENTER, (HANDLE) d, (HANDLE) c, NULL);
  Show (w);
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:49,代码来源:valdlg.c


示例3: DrawGraph

static void DrawGraph (PaneL p)
{
  XISPtr  xisp;
  WindoW  w;
  RecT    r;
  Int4    len;

  w = ParentWindow (p);
  if ((xisp = (XISPtr) GetObjectExtra (w)) == NULL)
    return;

  len = xisp->sgp->numval;

  xisp->Xscale = len / xisp->Xaxislen;
  if ((len % xisp->Xaxislen) != 0)
    (xisp->Xscale)++;

  ObjectRect (p, &r);
  xisp->dr.left   = r.left;
  xisp->dr.top    = r.top;
  xisp->dr.right  = r.right;
  xisp->dr.bottom = r.bottom - (Int2) (xisp->Ypostlen);
  DrawGraphToPanel (xisp->sgp, xisp->Xscale, xisp->Yscale,
                    xisp->Yaxislen, &(xisp->dr), 1,
                    xisp->sgp->numval);
  return;
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:27,代码来源:ccpv.c


示例4: DDV_GetCurrentDispRange

/*******************************************************************************

  Function : DDV_GetCurrentDispRange()
  
  Purpose : compute the size (row/col) of the DDV panel
  
  Return value : see arguments (zero-based values)

*******************************************************************************/
extern void DDV_GetCurrentDispRange(PaneL hWndDDV,UnDViewerGraphDataPtr GrData,
		Int4 LengthAli,Int4Ptr from_col,Int4Ptr to_col,Int4Ptr from_row,
		Int4Ptr to_row)
{

  RecT        rcP;
  DdvMainPtr  dmp;

  dmp = (DdvMainPtr) GetObjectExtra(hWndDDV);
	if (dmp==NULL) return;

	/*panel size*/
	ObjectRect(hWndDDV,&rcP);
	InsetRect(&rcP,4,4);

	/*drawing region:*/
	DDV_AdjustDrawingRect(&rcP,&(GrData->udv_font),dmp);
	
	rcP.left+=GrData->udv_panel.cxName+GrData->udv_scale.cxLeftScale;
	rcP.top+=GrData->udv_panel.cyScale;
	
	*from_col=0;
	*to_col=(rcP.right-rcP.left)/GrData->udv_font.ColWidth-1;
	*from_col+=GrData->udv_hscrl.ScrollPos;
	*to_col+=GrData->udv_hscrl.ScrollPos;
	if (*to_col>LengthAli) *to_col=LengthAli-1;
	if (*from_col>LengthAli) *from_col=LengthAli-1;
	*from_row=0;
	*to_row=(rcP.bottom-rcP.top)/GrData->udv_font.LineHeight-1;
	*from_row+=GrData->udv_vscrl.ScrollPos;
	*to_row+=GrData->udv_vscrl.ScrollPos;
	if (*from_row>(GrData->udv_panel.nTotLines-1)) *from_row=GrData->udv_panel.nTotLines-1;
	if (*to_row>(GrData->udv_panel.nTotLines-1)) *to_row=GrData->udv_panel.nTotLines-1;

}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:44,代码来源:ddvgraph.c


示例5: StandaloneFormActivated

static void     StandaloneFormActivated (WindoW w)
{
  currentFormDataPtr = (VoidPtr) GetObjectExtra (w);
  RepeatProcOnHandles (Enable,
                   (HANDLE) cutItem, (HANDLE) copyItem,
                   (HANDLE) pasteItem, (HANDLE) deleteItem, NULL);
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:7,代码来源:netentcf.c


示例6: DOT_CancelProc

static void DOT_CancelProc(ButtoN b)
{
  DOTStartDataPtr sdata;
  sdata=(DOTStartDataPtr)GetObjectExtra(ParentWindow(b));
  Remove(ParentWindow(b));
  Show(sdata->hStart);
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:7,代码来源:dotmain.c


示例7: CreateCutoffsDialog

static DialoG CreateCutoffsDialog (GrouP g, Uint2 rows, Int2 spacing,
                                   Boolean flagIsMatrix)
{
  EndPointsDialogPtr  epp;
  GrouP               g1, c, c1;
  PrompT              es, ee, em;
  TagListPtr          tlp;
  Uint2               columns;

  c = HiddenGroup (g, 0 , 0, NULL);
  epp = (EndPointsDialogPtr) MemNew (sizeof (EndPointsDialog));
  if (epp != NULL)
  {
    SetObjectExtra (c, epp, CleanupCutoffProc);
    epp->dialog = (DialoG) c;
    epp->todialog = EndPointValNodeToEndPointDialog;
    epp->fromdialog = EndPointDialogToEndPointValNode;
    epp->testdialog = NULL;
    epp->dialogmessage = NULL;

    g1 = HiddenGroup (c, -1, 0, NULL);
    SetGroupSpacing (g1, 4, 2);
    if (flagIsMatrix)
      c1 = HiddenGroup (g1, 3, 0, NULL);
    else
      c1 = HiddenGroup (g1, 2, 0, NULL);
    SetGroupSpacing (c1, spacing, spacing);
    es = StaticPrompt (c1, "Start", 0, 0, programFont, 'c');
    ee = StaticPrompt (c1, "End", 0, 0, programFont, 'c');
    if (flagIsMatrix)
    {
      em = StaticPrompt (c1, "Strand", 0, 0, programFont, 'c');
      columns = 3;
      ep_t = ep_types_m;
      ep_w = ep_width_m;
    }
    else
    {
      columns = 2;
      ep_t = ep_types_f;
      ep_w = ep_width_f;
    }
    epp->dep = CreateTagListDialog (g1, rows, columns, spacing,
                                    ep_t, ep_w, NULL,
                                    EndPointToDialog,
                                    DialogToEndPoint);
    tlp = (TagListPtr) GetObjectExtra (epp->dep);
    if (tlp != NULL)
    {
      AlignObjects (ALIGN_JUSTIFY, (HANDLE) tlp->control[0],
                                   (HANDLE) es, NULL);
      AlignObjects (ALIGN_JUSTIFY, (HANDLE) tlp->control[1],
                                   (HANDLE) ee, NULL);
      if (flagIsMatrix)
        AlignObjects (ALIGN_JUSTIFY, (HANDLE) tlp->control[2],
                                     (HANDLE) em, NULL);
    }
  }
  return (DialoG) c;
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:60,代码来源:seqgraph.c


示例8: MedlineViewFormMenus

static void MedlineViewFormMenus (WindoW w)

{
  BaseFormPtr  bfp;
  IteM         i;
  MenU         m;

  bfp = (BaseFormPtr) GetObjectExtra (w);
  if (bfp != NULL) {
    m = PulldownMenu (w, "File");
    FormCommandItem (m, "Close", bfp, VIB_MSG_CLOSE);
    SeparatorItem (m);
    i = CommandItem (m, "Duplicate View", DuplicateViewProc);
    SetObjectExtra (i, bfp, NULL);
    SeparatorItem (m);
    FormCommandItem (m, "Export...", bfp, VIB_MSG_EXPORT);
    SeparatorItem (m);
    /*
    FormCommandItem (m, "Save", bfp, VIB_MSG_SAVE);
    FormCommandItem (m, "Save As...", bfp, VIB_MSG_SAVE_AS);
    SeparatorItem (m);
    */
    FormCommandItem (m, "Print...", bfp, VIB_MSG_PRINT);

    m = PulldownMenu (w, "Edit");
    FormCommandItem (m, COPY_MENU_ITEM, bfp, VIB_MSG_COPY);
  }
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:28,代码来源:entrez.c


示例9: EntrezStdEditorFormMessage

static void EntrezStdEditorFormMessage (ForM f, Int2 mssg)

{
  BaseFormPtr  bfp;

  bfp = (BaseFormPtr) GetObjectExtra (f);
  if (bfp != NULL) {
    switch (mssg) {
      case VIB_MSG_CLOSE :
        Remove (f);
        break;
      case VIB_MSG_QUIT :
        QuitProc ();
        break;
      case VIB_MSG_CUT :
        StdCutTextProc (NULL);
        break;
      case VIB_MSG_COPY :
        StdCopyTextProc (NULL);
        break;
      case VIB_MSG_PASTE :
        StdPasteTextProc (NULL);
        break;
      case VIB_MSG_DELETE :
        StdDeleteTextProc (NULL);
        break;
      default :
        break;
    }
  }
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:31,代码来源:entrez.c


示例10: ArchiveBadgesDialog

extern void ArchiveBadgesDialog (
  DialoG d,
  FILE *fp
)

{
  IntBadgPtr  ibp;
  Int2        k, n, numItems;
  SscBadgPtr  sbp;

  sbp = (SscBadgPtr) GetObjectExtra (d);
  if (sbp == NULL || fp == NULL) return;

  GetDocParams (sbp->badglog, &numItems, NULL);
  for (k = 1, n = 0; k <= numItems; k++) {
    ibp = GetBadgInfo (sbp, k);
    if (ibp == NULL) continue;
    if (StringHasNoText (ibp->name)) continue;
    n++;
  }
  if (n < 1) return;

  fprintf (fp, "AWARDS -----\n\n%s\n\n", archiveBadgLabel);

  for (k = 1; k <= numItems; k++) {
    ibp = GetBadgInfo (sbp, k);
    if (ibp == NULL) continue;
    if (StringHasNoText (ibp->name)) continue;
    SaveDocumentItem (sbp->badglog, fp, k);
  }
  fprintf (fp, "\n");
}
开发者ID:fbtestrepo,项目名称:hw,代码行数:32,代码来源:sscawrd.c


示例11: CommentFieldsToDialog

static void CommentFieldsToDialog (DialoG d, Pointer data)
{
  TagListPtr tlp;
  ValNodePtr fields, vnp;
  CharPtr    str;

  tlp = (TagListPtr) GetObjectExtra (d);
  if (tlp == NULL) {
    return;
  }

  fields = (ValNodePtr) data;

  tlp->vnp = ValNodeFreeData (tlp->vnp);
  SendMessageToDialog (tlp->dialog, VIB_MSG_RESET);
  for (vnp = fields; vnp != NULL; vnp = vnp->next) {
    str = TagStringFromFieldRule (vnp->data.ptrvalue);
    if (str != NULL) {
      ValNodeAddPointer (&(tlp->vnp), 0, str);
    }
  }

  SendMessageToDialog (tlp->dialog, VIB_MSG_REDRAW);
  tlp->max = MAX ((Int2) 0, (Int2) (ValNodeLen (tlp->vnp) - tlp->rows));
  CorrectBarMax (tlp->bar, tlp->max);
  CorrectBarPage (tlp->bar, tlp->rows - 1, tlp->rows - 1);
  if (tlp->max > 0) {
    SafeShow (tlp->bar);
  } else {
    SafeHide (tlp->bar);
  }
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:32,代码来源:valdlg.c


示例12: ExportBadgesDialog

extern void ExportBadgesDialog (
  DialoG d,
  ValNodePtr PNTR head
)

{
  Char        buf [128], tmp [32];
  DoC         doc;
  IntBadgPtr  ibp;
  Int2        k, numItems;
  SscBadgPtr  sbp;

  sbp = (SscBadgPtr) GetObjectExtra (d);
  if (sbp == NULL || head == NULL) return;

  doc = sbp->badglog;
  GetDocParams (doc, &numItems, NULL);
  for (k = 1; k <= numItems; k++) {
    ibp = GetBadgInfo (sbp, k);
    if (ibp == NULL) continue;
    if (StringHasNoText (ibp->name)) continue;
    buf [0] = '\0';
    ExportDocCell (doc, k, 1, buf);
    TabToCol (buf, 22);
    ExportDocCell (doc, k, 3, tmp);
    StringCat (buf, tmp);
    ValNodeCopyStr (head, k + 100, buf);
  }
}
开发者ID:fbtestrepo,项目名称:hw,代码行数:29,代码来源:sscawrd.c


示例13: ChangeName

static void ChangeName (
  PopuP p
)

{
  AlistDialogPtr  adp;
  IntBadgPtr      ibp;
  SscBadgPtr      sbp;
  SscTablesPtr    stp;
  CharPtr         str;

  adp = (AlistDialogPtr) GetObjectExtra (p);
  if (adp == NULL) return;
  sbp = (SscBadgPtr) adp->userdata;
  if (sbp == NULL) return;
  stp = sbp->tables;
  if (stp == NULL) return;
  ibp = GetBadgInfo (sbp, sbp->currItem);
  if (ibp == NULL) return;

  str = GetEnumPopupByName (sbp->name, stp->payers.alist);
  if (StringCmp (str, "-") == 0) {
    str [0] = ' ';
    SetEnumPopupByName (sbp->name, stp->payers.alist, str);
  }
  ibp->name = MemFree (ibp->name);
  ibp->name = str; /* allocated by GetEnumPopupByName */
  ibp->type = GetMemberType (str, stp);

  UpdateDocument (sbp->badglog, sbp->currItem, sbp->currItem);
  Update ();

  CheckExtendTable (sbp);
}
开发者ID:fbtestrepo,项目名称:hw,代码行数:34,代码来源:sscawrd.c


示例14: ReadGIProc

static void ReadGIProc (ButtoN b)
{
  WindoW   w;
  GrouP    h, g;
  ButtoN   bt;
  TexT     pc;
  CharPtr  winprmt = "Entrez GI";
  XOSPtr   xosp;

  if ((xosp = (XOSPtr) GetObjectExtra (b)) != NULL)
  {
    w = MovableModalWindow (-60, -33, -10, -10, winprmt, CloseGIWindowProc);
    h = HiddenGroup (w, 1, 0, NULL);
    StaticPrompt (h, winprmt, StringWidth (winprmt),
                  dialogTextHeight, NULL, 'c');
    g = HiddenGroup (h, 2, 0, NULL);
    pc = DialogText (g, "", 8, NULL);
    bt = PushButton (h, "  Okay  ", SetGIProc);
    SetObjectExtra (pc, xosp, NULL);
    SetObjectExtra (bt, pc, NULL);
    Show (w);
    Select (w);
  }
  return;
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:25,代码来源:cnsgnv.c


示例15: ConfigFormMessage

static void ConfigFormMessage (ForM f, Int2 mssg)

{
  BaseFormPtr  bfp;

  bfp = (BaseFormPtr) GetObjectExtra (f);
  if (bfp != NULL) {
    switch (mssg) {
      case VIB_MSG_CUT :
        StdCutTextProc (NULL);
        break;
      case VIB_MSG_COPY :
        StdCopyTextProc (NULL);
        break;
      case VIB_MSG_PASTE :
        StdPasteTextProc (NULL);
        break;
      case VIB_MSG_DELETE :
        StdDeleteTextProc (NULL);
        break;
      default :
        break;
    }
  }
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:25,代码来源:entrez.c


示例16: ChangeConnection

static void ChangeConnection (GrouP g)

{
  NetConfigPtr  ncp;

  ncp = (NetConfigPtr) GetObjectExtra (g);
  ChangeConfigControls (ncp);
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:8,代码来源:netcnfg.c


示例17: ClearWindowFlag

static void ClearWindowFlag (ButtoN b)
{
  XOSPtr  xosp;

  if ((xosp = (XOSPtr) GetObjectExtra (b)) != NULL)
    xosp->flagParamWindow = FALSE;
  return;
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:8,代码来源:cnsgnv.c


示例18: ChangeProxy

static void ChangeProxy (TexT t)

{
  NetConfigPtr  ncp;

  ncp = (NetConfigPtr) GetObjectExtra (t);
  ChangeConfigControls (ncp);
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:8,代码来源:netcnfg.c


示例19: ConsortParamProc

static void ConsortParamProc (ButtoN b)
{
  WindoW           w;
  GrouP            h, h1, g, g1;
  ButtoN           b1, b2, b3;
  XOSPtr           xosp;

  SeqScrollDataPtr ssdp = NULL;

  if ((xosp = (XOSPtr) GetObjectExtra (b)) == NULL)
    return;
  if (xosp->flagParamWindow)
    return;

  w = FixedWindow (-75, -10, -10, -10,
                   "Consort Parameters", CloseParamWindowProc);
  h = HiddenGroup (w, 1, 0, NULL);
  h1 = HiddenGroup (h, 2, 0, NULL);

  g1 = HiddenGroup (h1, 1, 0, NULL);
  g = HiddenGroup (g1, 1, 0, NULL);
  StaticPrompt (g, "xdelta", StringWidth ("1234567890"), dialogTextHeight,
                NULL, 'c');
  g = HiddenGroup (g1, 2, 0, NULL);
  AddScrollControl (&ssdp, g, (Int2) xosp->xdeltaval,
                    (Int2) xosp->xdeltamin, (Int2) xosp->xdeltamax, 24);

  g1 = HiddenGroup (h1, 1, 0, NULL);
  g = HiddenGroup (g1, 1, 0, NULL);
  StaticPrompt (g, "ydelta", StringWidth ("1234567890"), dialogTextHeight,
                NULL, 'c');
  g = HiddenGroup (g1, 2, 0, NULL);
  AddScrollControl (&ssdp, g, (Int2) xosp->ydeltaval,
                    (Int2) xosp->ydeltamin, (Int2) xosp->ydeltamax, 24);

  SetObjectExtra (w, ssdp, NULL);

  h1 = HiddenGroup (h, 1, 0, NULL);
  StaticPrompt (h1, "tree style", 0, dialogTextHeight, NULL, 'l');
  g = HiddenGroup (h1, 1, 0, NULL);
  RadioButton (g, "LR");
  RadioButton (g, "TB");
  SetValue (g, 1);
  xosp->gstyle = g;

  h1 = HiddenGroup (h, 3, 0, NULL);
  b1 = PushButton (h1, "Accept", AcceptParamProc);
  SetObjectExtra (b1, xosp, NULL);
  b2 = PushButton (h1, "Apply ", UpdateParamProc);
  SetObjectExtra (b2, xosp, NULL);
  b3 = PushButton (h1, "Cancel", CancelParamProc);
  SetObjectExtra (b3, xosp, NULL);

  Show (w);
  Select (w);
  xosp->flagParamWindow = TRUE;
  return;
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:58,代码来源:cnsrtv.c


示例20: CloseParamWindowProc

static void CloseParamWindowProc (WindoW w)
{
  SeqScrollDataPtr ssdp;

  if ((ssdp = (SeqScrollDataPtr) GetObjectExtra (w)) != NULL)
    SeqScrollDataFree (ssdp);
  Remove (w);
  return;
}
开发者ID:hsptools,项目名称:hsp-wrap,代码行数:9,代码来源:cnsgnv.c



注:本文中的GetObjectExtra函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetObjectGuid函数代码示例发布时间:2022-05-30
下一篇:
C++ GetObjectA函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap