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


C++ UAS_Pointer::title方法代码示例

本文整理汇总了C++中UAS_Pointer::title方法的典型用法代码示例。如果您正苦于以下问题:C++ UAS_Pointer::title方法的具体用法?C++ UAS_Pointer::title怎么用?C++ UAS_Pointer::title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UAS_Pointer的用法示例。


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

示例1: fprintf

void
printTitles (UAS_Pointer<UAS_Common> doc, int level) {
    int i;
    for (i = 0; i < level; i ++)
	fprintf (stderr, "    ");
    fprintf (stderr, "%s\n", (char *) doc->title ());
    UAS_Pointer<UAS_Common> curDoc;
    if (doc->type() == UAS_BOOK) {
	curDoc = doc->next();
	while (curDoc != 0) {
	    fprintf (stderr, "********** %s \n", (char *) curDoc->title ());
	    curDoc = curDoc->next();
	}
    } else {
	UAS_List<UAS_Common> theList = doc->children ();
	for (i = 0; i < theList.length(); i ++)
	    printTitles (theList[i], level + 1);
    }
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例2: LocalHistoryEntry

void
LocalHistoryMgr::append (UAS_Pointer<UAS_Common> &doc_ptr)
{
    ON_DEBUG (printf ("&&&&& APPENDING <%s> to history\n", doc_ptr->title()));
    LocalHistoryEntry *entry = new LocalHistoryEntry (doc_ptr);
    truncate();
    entry->f_previous = f_current;
    if (f_current != NULL)
        f_current = f_current->f_next = entry;
    else
    {
        // Once the first element is set it can never be truncated.
        f_first = f_current = entry;
    }
    entry->f_next = NULL;
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例3: sprintf

void
printLocs (UAS_Pointer<UAS_Common> doc, int level) {
    for (int i = 0; i < level; i ++)
	cerr << "    ";
    UAS_String theLoc = doc->locator();
    if (level >= 2) {
	char buf[1024];
	UAS_String loc = doc->id();
	(void) sprintf (buf, "mmdb:LOCATOR=%s", (char *) loc);
	UAS_Pointer<UAS_Common> theDoc = UAS_Common::create(buf);
	cerr << (char *) theLoc << ", " << (char *) theDoc->title() << endl;
    } else {
	cerr << (char *) theLoc << endl;
    }
    UAS_List<UAS_Common> kids = doc->children();
    for (i = 0; i < kids.length(); i ++) {
	printLocs (kids[i], level + 1);
    }
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例4: out

UAS_Pointer<UAS_List<UAS_TextRun> >
DtSR_SearchResultsEntry::create_matches()
{

#ifdef DEBUG
    fprintf(stderr, "(DEBUG) UAS_Common is being created from id=\"%s\"\n",
							(char*)f_id);
#endif
    UAS_Pointer<UAS_Common> doc = UAS_Common::create(f_id);

#ifdef DEBUG
    fprintf(stderr,
		"(DEBUG) id=%s\n\t"
		"book_name=%s title=%s\n",
		(char*)(doc->id()),
		(char*)(doc->book_name()), (char*)(doc->title()));
#endif

#ifdef DUMP_NODES
    {
	ofstream out("OriginalText");
	out << (char *) doc->data();
    }
#endif

    mtry
	{
	    style_sheet_mgr().initOnlineStyleSheet(doc);
	}
//  catch_noarg (StyleSheetSyntaxError)
    mcatch_any()
	{
#ifdef JOE_HATES_THIS
	    message_mgr().error_dialog(
		(char*)UAS_String(CATGETS(Set_Messages, 39, "File a Bug")));
#else
	    throw(CASTEXCEPT Exception());
#endif
	}
    end_try;

    istringstream input((char *)doc->data());
    ostringstream output;
    
    mtry
	{
	    Tml_TextRenderer	renderer(output, f_search_res->search_zones());
	    Resolver resolver(*gPathTab, renderer);
	    DocParser docparser(resolver);

	    docparser.parse(input);
	}
    mcatch_any()
	{
	    ON_DEBUG(cerr << "DtSR_SearchResultsEntry::create_matches...exception thrown" << '\n' << flush);
	    rethrow;
	}
    end_try;

    string outpstr = output.str();
    char* text = (char*)outpstr.c_str();

#ifdef DUMP_NODES
    {
	ofstream out("ParsedText");
	out << text;
    }
#endif

#ifdef DEBUG
    fprintf(stderr, "(DEBUG) stems=0x%p, count=%d\n",
			(char*)f_search_res->stems(f_dbn)->stems(),
			f_search_res->stems(f_dbn)->count());

    int n_of_stems = 0;
    for (; n_of_stems < f_search_res->stems(f_dbn)->count(); n_of_stems++) {
	fprintf(stderr, "(DEBUG) %dth stem = %s\n", n_of_stems,
			(f_search_res->stems(f_dbn)->stems())[n_of_stems]);
    }
#endif

    int stype = f_search_res->search_type();

    DtSrHitword* kwics = NULL;
    long n_kwics = 0;

    char* parseout = NULL;

    // hack! overwrite f_language, since austext's value is wrong
    // In future, the next lines should be removed.
    const char* lang = getenv("LANG");
    if (lang && !strncmp(lang, "ja", strlen("ja")))
	f_language = DtSrLaJPN;
    else
	f_language = DtSrLaENG;
	
    if (f_language == DtSrLaJPN) { // do not trust DtSearchHighlight!
	int count        = f_search_res->stems(f_dbn)->count();

	ostringstream stemsbuf;
//.........这里部分代码省略.........
开发者ID:juddy,项目名称:edcde,代码行数:101,代码来源:DtSR_SearchResultsEntry.C

示例5: MapButton


//.........这里部分代码省略.........
	      status = window_system().get_color (s, highlight_bg);
	      // On failure to allocate, just invert. 
	      if (status == 0)
		{
		  highlight_bg = this_button->f_button.Foreground();
		  highlight_fg = this_button->f_button.Background();
		}
	      // Got bg, so now try for fg. 
	      else
		{
	          s = window_system().
		        get_string_default ("MapHighlightForeground");
		  if (s == NULL || *s == '\0')
		    {
		      highlight_fg =this_button->f_button.Background();
		    }
		  else
		    {
		      status = window_system().get_color (s, highlight_fg);
		      // If we cant get both colors, just invert the button. 
		      if (status == 0)
			{
			  Display *dpy = window_system().display();
			  XFreeColors (dpy,
				       DefaultColormap(dpy,DefaultScreen(dpy)),
				       &highlight_bg, 1, 0);
			  highlight_bg = this_button->f_button.Foreground();
			  highlight_fg = this_button->f_button.Background();
			}
		    }
		}
	    }
	  if (highlight_fg == this_button->f_button.Foreground() ||
	      highlight_bg == this_button->f_button.Background() ||
	      highlight_fg == highlight_bg)
	    {
	      highlight_bg = this_button->f_button.Foreground();
	      highlight_fg = this_button->f_button.Background();
	    }
	  first_time = FALSE;
	}
      this_button->f_button.Background (highlight_bg);
      this_button->f_button.Foreground (highlight_fg);
      //  this_button->expand();
    }

  /* -------- Create a button for each child. -------- */

  if (toc_this != (UAS_Pointer<UAS_Common>)NULL)
    {
      UAS_List<UAS_Common> myKids = toc_this->children();
      num_children = myKids.length();
      for (i = 0; i < num_children; i++)
	child_button =
	  new MapButton (*f_tree, myKids[i], this_button);

#if 0
  if (!XtIsRealized(*f_shell))
    {
      f_tree->Manage();
      f_shell->Realize();
    }
#endif

    }
  // Manage all the children.
  MapButton::ManageKids();

  UAS_String buffer = CATGETS(Set_MapAgent, 2, "Dtinfo: ");
  buffer = buffer + doc_ptr->title();
  f_shell->Title ((char*)buffer);

  if (!XtIsRealized (*f_shell))
    f_shell->Realize();

  f_tree->Realize();
  f_tree->ForceLayout();

  f_min_tree_width = f_tree->Width();
  f_min_tree_height = f_tree->Height();
  ON_DEBUG (printf ("+++++ Tree min dims: %d x %d\n",
		    f_min_tree_width, f_min_tree_height));

  center_on (this_button);
  f_tree->Manage();

  if (popup)
    {
      if (first_time)
	{
  	  WXmForm form (XtParent (XtParent (*f_panner)));
	  form.Height (50);
	  first_time = False;
	}
      f_shell->Popup();
      XMapRaised(XtDisplay(*f_shell), XtWindow(*f_shell));
    }

  f_onscreen = TRUE;
}
开发者ID:juddy,项目名称:edcde,代码行数:101,代码来源:MapAgentMotif.C


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