Пример #1
0
static void
PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP)
{
    Arg	args[15];
    int n;
    XmString label;
    char buf[BUFSIZ];

    // Retrieve the topic from the doc
    // The retrieve function will send a UAS_DocumentRetrievedMsg to the
    // print manager which will render the canvas with the appropriate topic

    doc->retrieve((void *)1);

    // set print orientation to either landscape or portrait (if set)

    if (f_printOrientation != NULL) {
	snprintf(buf, sizeof(buf),
			"*content-orientation: %s\n", f_printOrientation);
	XpSetAttributes(XtDisplay(pshell), XpGetContext(XtDisplay(pshell)),
			XPPageAttr, buf, XPAttrMerge);
    }
    
    for (gHelpDisplayArea->firstVisible = gHelpDisplayArea->nextNonVisible = 0;
	 gHelpDisplayArea->nextNonVisible >= 0;
	 gHelpDisplayArea->firstVisible = gHelpDisplayArea->nextNonVisible + 1)
    {
	(*cur_pageP)++;

	XpStartPage(XtDisplay(pshell), XtWindow(pshell));

	snprintf(buf, sizeof(buf), "%d", *cur_pageP);
	label = XmStringCreateLocalized(buf);

	n = 0;
	XtSetArg(args[n], XmNlabelString, label); n++;
	XtSetValues(footer_page_no, args, n);
	XmStringFree(label);

	// Process exposures so label is updated.
	XmUpdateDisplay(footer_page_no);

	// _DtHelpCleanAndDrawWholeCanvas((XtPointer)gHelpDisplayArea);

	XpEndPage(XtDisplay(pshell));
    }

    // Print chidren if appropriate
    if (print_hierarchy)
    {
	unsigned int i;
	UAS_List<UAS_Common> kids = doc->children();

	for (i = 0; i < kids.length(); i++)
	{
	    PrintOneUASCommon(kids[i], pshell, cur_pageP);
	}
    }
}
Пример #2
0
void
MapButton::activate()
{
  f_doc_ptr->retrieve();
}