当前位置: 首页>>代码示例>>C++>>正文


C++ PrintDetails函数代码示例

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


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

示例1: check_geometry

void
check_geometry()
{
  static int result_index = 0;

  static XtWidgetGeometry Expected[] =
  {
/* result test 0 */
   CWWidth | CWHeight            ,    0,    0,   70,   17, 0,0,0, /* Hello World */
   CWWidth | CWHeight | CWX | CWY,    0,  100,   42,   25, 0,0,0, /* hello */
/* result test 1 */
   CWWidth | CWHeight            ,    2,    2,   70,   17, 0,0,0, /* Hello World */
   CWWidth | CWHeight | CWX | CWY,    0,  100,   42,   25, 0,0,0, /* hello */
};

  if (result_index <= 1)
  {
     /* Only have results for two test.  Must record more results before
        doing any further testing otherwise you start looking at bogus
        memory locations.
      */
#if 0
     PrintDetails(grabshell, NULL);
#endif
     PrintDetails(grabshell, Expected);
     result_index ++;
  }
}
开发者ID:melanj,项目名称:lesstif,代码行数:28,代码来源:test5.c

示例2: main

int
main(int argc, char **argv)
{
  XtAppContext	app;
  Widget Shell;
  Widget Form;
  Widget TopLabel;
  Widget BottomLabel;

  XtSetLanguageProc(NULL, NULL, NULL);

  Shell = XtVaAppInitialize(&app, "Shell", NULL, 0, &argc, argv, FallBack, NULL);

  Form = XmCreateForm(Shell,"Form",NULL,0);

  TopLabel = XmCreateLabel(Form,"TopLabel",NULL,0);
  XtVaSetValues(TopLabel,
  	XmNtopAttachment, XmATTACH_NONE,
  	NULL);
  XtManageChild(TopLabel);

  BottomLabel = XmCreateLabel(Form,"BottomLabel",NULL,0);
  XtVaSetValues(BottomLabel,
  	XmNtopAttachment, XmATTACH_WIDGET,
  	XmNtopWidget, TopLabel,
  	XmNtopOffset, 1,
  	XmNbottomAttachment, XmATTACH_POSITION,
  	XmNbottomOffset, 2,
  	XmNbottomPosition, 50,
  	NULL);
  XtManageChild(BottomLabel);

  XtManageChild(Form);

  XtRealizeWidget(Shell);
  {
  static XtWidgetGeometry Expected[] = {
  	CWWidth | CWHeight,		0,	0,	72,	81,	0,0,0,	/* Form */
  	CWWidth | CWHeight | CWX | CWY,	0,	0,	52,	17,	0,0,0,	/* two */
  	CWWidth | CWHeight | CWX | CWY,	0,	20,	70,	17,	0,0,0,	/* two */

  	CWWidth | CWHeight,		0,	0,	144,	160,	0,0,0,	/* Form */
  	CWWidth | CWHeight | CWX | CWY,	0,	0,	52,	17,	0,0,0,	/* two */
  	CWWidth | CWHeight | CWX | CWY,	0,	20,	70,	56,	0,0,0,	/* two */
};

  PrintDetails(Shell, Expected);
      LessTifTestWaitForIt(Shell);
      LessTifTestResizeWidget(Shell, 144, 160);
  PrintDetails(Shell, Expected);
  }
      LessTifTestMainLoop(Shell);
  exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:54,代码来源:test19.c

示例3: printed_range

void CReadBlastApp::ugly_simple_overlaps_call(int& n_user_neighbors, int& n_ext_neighbors,
  TSimpleSeqs::iterator& ext_rna, 
  TSimpleSeqs::iterator& first_user_in_range, TSimpleSeqs::iterator& first_user_non_in_range, 
  TSimpleSeqs& seqs, int max_distance, 
  TSimpleSeqs::iterator& first_ext_in_range, TSimpleSeqs::iterator& first_ext_non_in_range, 
  string& bufferstr)
{
         if(PrintDetails())
           {
           if(first_user_in_range==seqs.end())
              {
              NcbiCerr << "ugly_simple_overlaps_call: first_user_in_range is already at the end" << NcbiEndl;
              }
           else
              {
              NcbiCerr << "ugly_simple_overlaps_call: first_user_in_range = " << printed_range(first_user_in_range) << NcbiEndl;
              }
           }

         n_user_neighbors = get_neighboring_sequences(ext_rna, first_user_in_range, first_user_non_in_range, 
                                                       seqs, max_distance);
         n_ext_neighbors = get_neighboring_sequences(ext_rna, first_ext_in_range, first_ext_non_in_range, 
                                                       m_extRNAtable2, max_distance);
         if(PrintDetails())
           {
           if(first_user_in_range==seqs.end())
              {
              NcbiCerr << "ugly_simple_overlaps_call: after call: first_user_in_range is already at the end" << NcbiEndl;
              }
           else
              {
              NcbiCerr << "ugly_simple_overlaps_call: after call: first_user_in_range = " << printed_range(first_user_in_range) << NcbiEndl;
              }
           }

         strstream buffer;
         addSimpleTab(buffer, "CENTER_REFERENCE", ext_rna, max_distance);
         for(TSimpleSeqs::iterator entry = first_ext_in_range; entry!= first_ext_non_in_range; entry++)
           {
           if(entry==ext_rna) continue; // addSimpleTab(buffer, "CENTER_REFERENCE", entry);
           else addSimpleTab(buffer, "REFERENCE", entry, max_distance);
           }
         for(TSimpleSeqs::iterator entry = first_user_in_range; entry!=first_user_non_in_range; entry++)
           {
           addSimpleTab(buffer, "VICINITY", entry, max_distance);
           }
         buffer << '\0';
         bufferstr=buffer.str();
}
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:49,代码来源:missing.cpp

示例4: FinishTest

static void
FinishTest(Widget W)
{
    PrintDetails(W);
    XtAppAddTimeOut(XtWidgetToApplicationContext(W), AppResources.time,
                    (XtTimerCallbackProc)DoAllTests, W);
}
开发者ID:melanj,项目名称:lesstif,代码行数:7,代码来源:test15.c

示例5: main

int
main(int argc, char **argv)
{
  XtAppContext theApp;
  Widget toplevel;

  toplevel = XtVaAppInitialize(&theApp, "drawingArea", NULL, 0,
			       &argc, argv, NULL, NULL);

  butt1= XtVaCreateManagedWidget("Button1", xmArrowButtonWidgetClass, toplevel, 
				XmNarrowDirection,dir,
				NULL);

  XtAddCallback(butt1,XmNactivateCallback,HiCB,NULL);

  XtRealizeWidget(toplevel);

  
{
    static XtWidgetGeometry Expected[] = {
   CWWidth | CWHeight            ,   50,   50,   23,   23, 0,0,0, /* Button1 */ 
    };
    PrintDetails(toplevel,Expected);
};
  LessTifTestMainLoop(toplevel);

  exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:28,代码来源:test1.c

示例6: main

int main(int argc, char **argv)
{
 XtAppContext app;
 Widget one;
 XmString s1, s2;
 int i;
 

 
 toplevel = XtVaAppInitialize(&app, "test", NULL, 0, &argc, argv, NULL, NULL);

 one = XtVaCreateManagedWidget("Push me",
        xmPushButtonWidgetClass,
        toplevel, NULL);
 
 XtAddCallback(one, XmNactivateCallback, ChangeWindefTitleParameterCB, NULL);
 XtRealizeWidget(toplevel);

 s1 = XmStringCreateLtoR("ala ma pieska", "");
 s2 = XmStringCreateLocalized("ala ma pieska");
 i = XmStringCompare(s1, s2);
 printf("%d\n", i); /* on original Motif should be 1 */

 
{
    static XtWidgetGeometry Expected[] = {
   CWWidth | CWHeight            ,   50,   50,   54,   25, 0,0,0, /* Push me */ 
    };
    PrintDetails( toplevel ,Expected);
};
   LessTifTestMainLoop( toplevel );
   
   exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:34,代码来源:test9.c

示例7: main

int
main(int argc, char **argv)
{
  XtAppContext theApp;
  Widget toplevel, drawingArea, button, m;

  toplevel = XtVaAppInitialize(&theApp, "drawingArea", NULL, 0,
			       &argc, argv, NULL, NULL);

  drawingArea= XtVaCreateManagedWidget("drawingArea", xmDrawingAreaWidgetClass, toplevel,
	NULL);

  m = XmCreatePopupMenu(drawingArea, "popup", NULL, 0);
  
  button = XtVaCreateManagedWidget("button", xmPushButtonWidgetClass, m,
	NULL);

  XtAddCallback(drawingArea, XmNinputCallback, incb, (XtPointer)m);
  XtAddCallback(button, XmNactivateCallback, print, NULL);

  XtRealizeWidget(toplevel);
  
{
static XtWidgetGeometry Expected[] = {
   CWWidth | CWHeight            ,  506,  322,    1,    1, 0,0,0, /* drawingArea */
};
/* toplevel should be replaced with to correct applicationShell */
PrintDetails(toplevel, Expected);
}

  LessTifTestMainLoop(toplevel);

  exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:34,代码来源:test4.c

示例8: main

int
main(int argc, char **argv)
{
  XtAppContext app;
  Widget toplevel, box;

  toplevel = XtVaAppInitialize(&app, "listTest", NULL, 0,
 		               &argc, argv, NULL, NULL);

  box = XmCreateSelectionBox(toplevel, "Box", NULL, 0);

  XtManageChild(box);

  XtRealizeWidget(toplevel);

  
{
    static XtWidgetGeometry Expected[] = {
   CWWidth | CWHeight            ,   56,   72,  220,  297, 0,0,0, /* Box */
   CWWidth | CWHeight | CWX | CWY,   11,   11,  198,   17, 0,0,0, /* Items */
   CWWidth | CWHeight | CWX | CWY,   11,   28,  198,  135, 0,0,0, /* ItemsListSW */
   CWWidth | CWHeight | CWX | CWY,    0,    0,  198,  135, 0,0,0, /* ItemsList */
   CWWidth | CWHeight | CWX | CWY,   11,  173,  198,   17, 0,0,0, /* Selection */
   CWWidth | CWHeight | CWX | CWY,   11,  190,  198,   31, 0,0,0, /* Text */
   CWWidth | CWHeight | CWX | CWY,    0,  231,  220,    2, 0,0,0, /* Separator */
   CWWidth | CWHeight | CWX | CWY,   11,  243,   66,   43, 0,0,0, /* OK */
   CWWidth | CWHeight | CWX | CWY,   77,  243,   66,   43, 0,0,0, /* Cancel */
   CWWidth | CWHeight | CWX | CWY,  143,  243,   66,   43, 0,0,0, /* Help */ 
    };
    PrintDetails(toplevel,Expected);
};
  LessTifTestMainLoop(toplevel);

  exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:35,代码来源:test2.c

示例9: main

int main(int argc, char *argv[])
{
	Widget	a, b;

	XtSetLanguageProc(NULL, NULL, NULL);
	toplevel = XtVaAppInitialize(&appcontext, "Test", NULL, 0, &argc, argv,
				     NULL, NULL);

/* Create main window */
	form = XtVaCreateManagedWidget("form", xmFormWidgetClass, toplevel,
		XmNfractionBase,	7,
		XmNwidth,		350,
		XmNheight,		100,
		NULL);

	a = XtVaCreateManagedWidget("label a", xmPushButtonWidgetClass, form,
		XmNx,			50,
		XmNwidth,		100,
		XmNtopAttachment,	XmATTACH_POSITION,
		XmNtopPosition,		1,
		XmNleftAttachment,	XmATTACH_SELF,
		XmNrightAttachment,	XmATTACH_SELF,
		XmNbottomAttachment,	XmATTACH_POSITION,
		XmNbottomPosition,	5,
		NULL);

	b = XtVaCreateManagedWidget("label b", xmPushButtonWidgetClass, form,
		XmNx,			200,
		XmNwidth,		100,
		XmNtopAttachment,	XmATTACH_POSITION,
		XmNtopPosition,		1,
		XmNleftAttachment,	XmATTACH_SELF,
		XmNrightAttachment,	XmATTACH_SELF,
		XmNbottomAttachment,	XmATTACH_POSITION,
		XmNbottomPosition,	5,
		NULL);
	XtManageChild(form);

	XtRealizeWidget(toplevel);

    {
/* Note: the following values are the result of
 * querying the current geometry.
 */
static XtWidgetGeometry Expected[] = {
   {CWWidth | CWHeight            ,    0,    0,  350,  100, 0,0,0, /* mainwindow */},
   {CWWidth | CWHeight | CWX | CWY,   50,   14,  100,   57, 0,0,0, /* menubar */},
   {CWWidth | CWHeight | CWX | CWY,  200,   14,  100,   57, 0,0,0, /* button_0 */},
};

	PrintDetails(toplevel, Expected);
    }

	/*
	XtAppMainLoop(appcontext);
	*/
	LessTifTestMainLoop(toplevel);

	return(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:60,代码来源:test60.c

示例10: main

int main(int argc, char *argv[])
{
  XtAppContext appContext;

  topLevel = XtAppInitialize(&appContext, "Menus", 0, 0,
					  &argc, argv, 0, 0, 0);

  layoutApplication(topLevel);
  XtRealizeWidget(topLevel);
  {
  static XtWidgetGeometry Expected[] = {
  	CWWidth | CWHeight,		0,	0,	226,	35,	0,0,0,
  	CWWidth | CWHeight | CWX | CWY,	0,	0,	134,	31,	0,0,0,
  	CWWidth | CWHeight | CWX | CWY,	3,	3,	52,	25,	0,0,0,
  	CWWidth | CWHeight | CWX | CWY,	58,	3,	73,	25,	0,0,0,
  	CWWidth | CWHeight | CWX | CWY,	134,	0,	92,	35,	0,0,0,
  	CWWidth | CWHeight | CWX | CWY,	3,	3,	4,	29,	0,0,0,
  	CWWidth | CWHeight | CWX | CWY,	10,	3,	79,	29,	0,0,0,
};

  PrintDetails(topLevel, Expected);
  }
    LessTifTestMainLoop(topLevel);
    /*
  XtAppMainLoop(appContext);
  */
  return 0;
}
开发者ID:melanj,项目名称:lesstif,代码行数:28,代码来源:test32.c

示例11: main

int
main(int argc, char **argv)
{
  XtAppContext theApp;
  Widget toplevel;

  toplevel = XtVaAppInitialize(&theApp, "toggle1", NULL, 0,
			       &argc, argv, NULL, NULL);

  butt= XtVaCreateManagedWidget("Button1Button1", xmToggleButtonWidgetClass, toplevel, 
				XmNindicatorOn, False,
				XmNshadowThickness, 5,
#if 0
				XmNfillOnSelect, True,
#endif
				NULL);

  XtAddCallback(butt,XmNvalueChangedCallback,HiCB,NULL);

  XtRealizeWidget(toplevel);

/* Note: the following values are the result of
 * querying the current geometry.
 */
{
static XtWidgetGeometry Expected[] = {
   CWWidth | CWHeight            ,    0,    0,  102,   31, 0,0,0, /* Button1Button1 */
};
/* toplevel should be replaced with to correct applicationShell */
PrintDetails(toplevel, Expected);
}
LessTifTestMainLoop(toplevel);

  exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:35,代码来源:test5.c

示例12: main

int
main(int argc, char **argv)
{
  Widget toplevel, one, two;
  XtAppContext app;
  XmFontList fontlist;
  XmString xmstr1;
  Dimension w,i,s,l,t,h;

  XtSetLanguageProc(NULL, NULL, NULL);

  toplevel = XtVaAppInitialize(&app, "Label", NULL, 0, &argc, argv, FallBack, NULL);

  fontlist = XmFontListAppendEntry(NULL,
			   XmFontListEntryCreate("MY_FONT",
						 XmFONT_IS_FONT,
						 XLoadQueryFont(XtDisplay(toplevel), 
 	                                         "-adobe-helvetica-bold-o-normal--17-0-75-75-p-*-iso8859-1")));

  xmstr1 = XmStringCreateLtoR("Here\nIs\nA\nDefault\nButton", "MY_FONT");

  two = XtVaCreateManagedWidget("Button1", xmBulletinBoardWidgetClass,
				 toplevel, NULL);

  one = XtVaCreateManagedWidget("One", 
                                xmPushButtonGadgetClass, 
                                two, 
				XmNfontList, fontlist, 
				XmNlabelString, xmstr1, 
				XmNshowAsDefault, 1,
				XmNdefaultButtonShadowThickness, 3,
				NULL);

  XtRealizeWidget(toplevel);
  XtVaGetValues(one,
		XmNhighlightThickness, &i,
		XmNshadowThickness, &s,
		XmNmarginWidth, &w,
		XmNmarginHeight, &h,
		XmNmarginLeft, &l,
		XmNmarginTop, &t,
		NULL);

printf("highlight: %d shad: %d marWid: %d marHei: %d marLeft: %d marTop: %d\n",
	 i, s, w, h, l, t);

/* Note: the following values are the result of
 * querying the current geometry.
 */
{
static XtWidgetGeometry Expected[] = {
   CWWidth | CWHeight            ,    0,    0,  113,  143, 0,0,0, /* Button1 */
   CWWidth | CWHeight | CWX | CWY,   10,   10,   92,  122, 0,0,0, /* One */
};
/* toplevel should be replaced with to correct applicationShell */
PrintDetails(toplevel, Expected);
}
LessTifTestMainLoop(toplevel);
  exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:60,代码来源:test6.c

示例13: main

int
main (int argc, char *argv[])
{
	XtSetLanguageProc ( (XtAppContext) NULL, (XtLanguageProc) NULL, (XtPointer) NULL );
	XtToolkitInitialize ();
	app_context = XtCreateApplicationContext ();
	display = XtOpenDisplay (app_context, NULL, argv[0], "XApplication",
				 NULL, 0, &argc, argv);
	if (!display)
	{
	    printf("%s: can't open display, exiting...\n", argv[0]);
	    exit (-1);
	}
	create_shell ( display, argv[0], argc, argv );
	XtRealizeWidget (shell);
	
/* Note: the following values are the result of
 * querying the current geometry.
 */
{
static XtWidgetGeometry Expected[] = {
   CWWidth | CWHeight            ,  361,  266,   74,  400, 0,0,0, /* form */
   CWWidth | CWHeight | CWX | CWY,    0,    0,   74,  260, 0,0,0, /* list1SW */
   CWWidth | CWHeight | CWX | CWY,    0,    0,   74,  260, 0,0,0, /* list1 */
   CWWidth | CWHeight | CWX | CWY,    0,  260,   74,  140, 0,0,0, /* da */
};
/* toplevel should be replaced with to correct applicationShell */
PrintDetails(shell, Expected);
}

	LessTifTestMainLoop(shell);
	exit (0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:33,代码来源:test8.c

示例14: main

int
main(int argc, char **argv)
{
	Widget toplevel, one, d;
	XtAppContext app;
	XmFontList fontlist;

	XmString xmstr1 = XmStringCreateLtoR("\n\nHere is a\n\n", "MY_FONT1");
	XmString xmstr2 = XmStringCreate("different font", "MY_FONT");
	XmString xmstr3 = XmStringCreate("accelerator", "MY_FONT");
	XmStringContext context;
	char *text;
	XmStringCharSet tag;
	XmStringDirection dir;
	Boolean sep;

	XmString xmstr = XmStringConcat(xmstr1, xmstr2);

	XtSetLanguageProc(NULL, NULL, NULL);

	toplevel = XtVaAppInitialize(&app, "Label", NULL, 0, &argc, argv, NULL, NULL);

	d = XmGetXmDisplay(XtDisplay(toplevel));
	XtAddCallback(d, XmNnoFontCallback, NoFontCB, NULL);
	XtAddCallback(d, XmNnoRenditionCallback, NoRenditionCB, NULL);

	fontlist = XmFontListAppendEntry(NULL,
		XmFontListEntryCreate("MY_FONT",
			XmFONT_IS_FONT,
			XLoadQueryFont(XtDisplay(toplevel),
			"-adobe-helvetica-bold-o-normal--17-0-75-75-p-*-iso8859-1")));
	fontlist = XmFontListAppendEntry(fontlist,
		XmFontListEntryCreate("MY_FONT1",
			XmFONT_IS_FONT,
			XLoadQueryFont(XtDisplay(toplevel),
			"-adobe-helvetica-bold-r-normal--17-0-75-75-p-*-iso8859-1")));

	one = XtVaCreateManagedWidget("One", xmLabelWidgetClass, toplevel,
		XmNfontList, fontlist,
		XmNlabelString, xmstr,
		XmNacceleratorText, xmstr3,
		NULL);

	XtRealizeWidget(toplevel);

/* Note: the following values are the result of
 * querying the current geometry.
 */
{
static XtWidgetGeometry Expected[] = {
   {CWWidth | CWHeight            ,    0,    0,  112,   58, 0,0,0}, /* One */
};
/* toplevel should be replaced with to correct applicationShell */
	PrintDetails(toplevel, Expected);
}

	LessTifTestMainLoop(toplevel);
	exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:59,代码来源:test2.c

示例15: main

int
main(int argc, char **argv)
{
	Widget		toplevel, one, d;
	XtAppContext	app;
	XmFontList	fontlist;
	XmString	xms;
	Arg           args[10];
	XmTab         tabs[MAX_COLUMNS];
	XmTabList     tablist;
	XmRendition   renditions[MAX_COLUMNS];
	XmRenderTable rendertable;
	XmStringTable xmstring_table;
	int           xmstring_count;
	Pixel         pixels[MAX_COLUMNS];
	int           n, i;

	XtSetLanguageProc(NULL, NULL, NULL);
	toplevel = XtVaAppInitialize(&app, "Label", NULL, 0, &argc, argv,
		fallback, NULL);

	d = XmGetXmDisplay(XtDisplay(toplevel));

	/* Create the multi-column data for the list */

	xmstring_table = CreateListData(&xmstring_count) ;

	xms = xmstring_table[0];
	for (i=1; i<xmstring_count; i++) {
		XmString	s, x;
		s = XmStringSeparatorCreate();
		x = XmStringConcat(xms, s);
		xms = XmStringConcat(x, xmstring_table[i]);
	}

	one = XtVaCreateManagedWidget("One", xmLabelWidgetClass, toplevel,
		XmNalignment,	XmALIGNMENT_BEGINNING,
		XmNlabelString, xms,
		NULL);

	XtRealizeWidget(toplevel);

#if 0
/* Note: the following values are the result of
 * querying the current geometry.
 */
{
static XtWidgetGeometry Expected[] = {
   {CWWidth | CWHeight            ,    0,    0,  112,   58, 0,0,0}, /* One */
};
/* toplevel should be replaced with to correct applicationShell */
PrintDetails(toplevel, Expected);
}
#endif

	LessTifTestMainLoop(toplevel);
	exit(0);
}
开发者ID:melanj,项目名称:lesstif,代码行数:58,代码来源:test4.c


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