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


C++ FXString::prepend方法代码示例

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


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

示例1: getItemPathname

// Return absolute pathname of item
FXString FXDirList::getItemPathname(const FXTreeItem* item) const {
  FXString path;
  if(item){
    while(1){
      path.prepend(item->getText());
      item=item->parent;
      if(!item) break;
      if(item->parent) path.prepend(PATHSEP);
      }
    }
  return path;
  }
开发者ID:gogglesguy,项目名称:fox,代码行数:13,代码来源:FXDirList.cpp

示例2: getItemPathname

// Return item path
FXString FXDirBox::getItemPathname(FXTreeItem *item) const {
  FXString string;
  if(item){
    while(item->getParent()){
      string.prepend(getItemText(item));
      item=item->getParent();
      if(item->getParent()) string.prepend(PATHSEPSTRING);
      }
    string.prepend(getItemText(item));
    }
  return string;
  }
开发者ID:gfphoenix,项目名称:tsiu,代码行数:13,代码来源:FXDirBox.cpp

示例3: SaveBackup

bool BackupMgr::SaveBackup(SciDoc*sci)
{
  FXString savename;
  FXString untitled;
  untitled.format(FN_FMT, backupdir.text(), abs(getpid()), SciDocUtils::ID(sci));
  if (SciDocUtils::Filename(sci).empty()) {
    savename=untitled;
  } else {
    if (FXStat::isFile(untitled)) {
      RemoveBackup(untitled);
    }
#ifdef WIN32
    savename=SciDocUtils::Filename(sci).text();
    savename.substitute(':', '%', true);
    savename.prepend(backupdir.text());
#else
    savename.format("%s%s", backupdir.text(), SciDocUtils::Filename(sci).text());
#endif
  }
  if (MakePath(FXPath::directory(savename))) {
    if (SciDocUtils::SaveToFile(sci,savename.text(),false)) {
      SciDocUtils::NeedBackup(sci, false);
      return true;
    } else {
      lasterror=SciDocUtils::GetLastError(sci);
      ErrorMessage(_("Failed to save backup"), savename);
      return false;
    }
  } else {
    return false;
  }
}
开发者ID:gahr,项目名称:fxite,代码行数:32,代码来源:backup.cpp

示例4: getPathname

FXString ProjectBrowser::getPathname(FXTreeItem* item) 
{
	FXString path;

	FXTreeItem* current = item;
	while (true)
	{
		path.prepend(current->getText());
		path.prepend(FS::dirSeparator());
		FXTreeItem* parent = current->getParent();
		if (parent == NULL)
			break;
		current = parent;
	}

	path.prepend(mainWin->settings->getStringValue("baseDir"));
	return path;
}
开发者ID:BackupTheBerlios,项目名称:inde-svn,代码行数:18,代码来源:ProjectBrowser.cpp

示例5: MigrateConfigDir

void MigrateConfigDir(FXApp*a, const FXString &src, const FXString &dst, FXString &errors)
{
  if (!FXStat::isDirectory(src)) { return; }
  if (FXStat::isDirectory(dst)) { return; }

  FXMessageBox dlg(a,
    _("IMPORTANT NOTICE"),
    _(
    "\n"
    "The location of the "APP_NAME" configuration directory has changed.\n"
    "\n"
#ifndef WIN32
    "This is due to changes in the FOX toolkit, in accordance with\n"
    "the freedesktop.org  \"XDG base directory specification\".\n"
    "\n"
#endif
    "Migration options:\n"
    " Click  [ Yes ]  to automatically copy your old settings (recommended).\n"
    " Click  [ No ]  to create a new configuration.\n"
    " Click  [Cancel]  to exit "APP_NAME" now without any changes.\n"
    "\n"
    "Do you want me to copy your existing configuration?"
    ),
    NULL,MBOX_YES_NO_CANCEL
  );
  a->create();
  FXint rv=dlg.execute(PLACEMENT_SCREEN);
  switch (rv) {
    case MBOX_CLICKED_YES: {
      copyConfigFiles(src,dst,errors,0);
      if (!errors.empty()) {
        errors.prepend("================================\n");
        errors.prepend(_("Settings migration messages:\n"));
        errors.prepend("================================\n");
      }
      a->reg().read();
      return;
    }
    case MBOX_CLICKED_NO: { return; }
    default: { ::exit(0); }
  }
}
开发者ID:gahr,项目名称:fxite,代码行数:42,代码来源:migration.cpp

示例6: RemoveBackup

void BackupMgr::RemoveBackup(SciDoc*sci)
{
  FXString untitled;
  SciDocUtils::NeedBackup(sci,false);
  untitled.format(FN_FMT, backupdir.text(), abs(getpid()), SciDocUtils::ID(sci));
  RemoveBackup(untitled);
  if (!SciDocUtils::Filename(sci).empty()) {
    FXString savename;
#ifdef WIN32
    savename=SciDocUtils::Filename(sci).text();
    savename.substitute(':', '%', true);
    savename.prepend(backupdir.text());
#else
    savename.format("%s%s", backupdir.text(), SciDocUtils::Filename(sci).text());
#endif
    RemoveBackup(savename);
  }
}
开发者ID:gahr,项目名称:fxite,代码行数:18,代码来源:backup.cpp


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