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


C++ nglString::IsNull方法代码示例

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


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

示例1: nuiLabel

nuiHyperLink::nuiHyperLink(const nglString& rURL, const nglString& rLabel)
  : nuiLabel(rLabel.IsNull() ? rURL : rLabel),
    mURL(rURL)
{
  if (SetObjectClass(_T("nuiHyperLink")))
    InitAttributes();
    
  SetTextColor(nuiColor(_T("nuiHyperLink")));
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:9,代码来源:nuiHyperLink.cpp

示例2: nuiFileSelectorBase

nuiFileTree::nuiFileTree(const nglPath& rPath, const nglPath& rRootPath, const nglString& rFilter, bool showHiddenFiles)
: nuiFileSelectorBase(), mEventSink(this)
{
  std::list<nglString> filters;
  if (!rFilter.IsNull())
    filters.push_back(rFilter);
  
  Init(rPath, rRootPath, filters, showHiddenFiles);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例3: SetState

void nuiStateDecoration::SetState(nuiStateDescription State, const nglString& rDecorationName)
{  
  if (rDecorationName.IsNull())
    return;
  nuiDecoration* pDecoration = nuiDecoration::Get(rDecorationName, true);
  if (!pDecoration)
    return;
  SetState(State, pDecoration);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: nuiDecoration

nuiStateDecoration::nuiStateDecoration(const nglString& rName, const nglString& rUp, const nglString& rDown, const nglString& rHoverOn, const nglString& rDisabled, const nglString& rDisabledSelected)
  : nuiDecoration(rName), mClientRect(0,0,0,0), mUseSourceClientRect(false)
{
  if (SetObjectClass(_T("nuiStateDecoration")))
    InitAttributes();

  if (!rUp.IsNull())
    SetState(nuiStateEnabled  | nuiStateReleased, GetDecoration(rUp));
  if (!rDown.IsNull())
    SetState(nuiStateEnabled  | nuiStatePressed,  GetDecoration(rDown));
  if (!rHoverOn.IsNull())
    SetState(nuiStateEnabled  | nuiStateHoverOn,  GetDecoration(rHoverOn));
  if (!rDisabled.IsNull())
    SetState(nuiStateDisabled | nuiStateReleased, GetDecoration(rDisabled));
  if (!rDisabledSelected.IsNull())
  {
    SetState(nuiStateDisabled | nuiStateSelected, GetDecoration(rDisabledSelected));
    SetState(nuiStateDisabled | nuiStatePressed, GetDecoration(rDisabledSelected));
  }
}
开发者ID:,项目名称:,代码行数:20,代码来源:

示例5: AddFile

bool nuiZipWriter::AddFile(nglIStream* pStream, const nglString& rPathInZip, const nglString& rComment, bool OwnStream)
{
  NGL_ASSERT(IsValid());
  zip_fileinfo info;
  nglTime tm;
  nglTimeInfo t;
  tm.GetLocalTime(t);
  info.tmz_date.tm_sec  = t.Seconds;
  info.tmz_date.tm_min  = t.Minutes;
  info.tmz_date.tm_hour = t.Hours;
  info.tmz_date.tm_mday = t.Day;
  info.tmz_date.tm_mon  = t.Month;
  info.tmz_date.tm_year = t.Year;

  info.dosDate = 0;

  info.internal_fa = 0;
  info.external_fa = 0;
  
  bool res = zipOpenNewFileInZip(mpZip, rPathInZip.IsNull() ? NULL : rPathInZip.GetStdString().c_str(), &info, NULL, 0, NULL, 0, rComment.IsNull() ? NULL : rComment.GetStdString().c_str(), 0, 0) == Z_OK;
  if (!res)
    return res;

  const uint32 bufsize = 4096;
  uint8 buf[bufsize];
  uint64 todo = pStream->Available();
  uint32 _read = -1;
  while (todo && _read)
  {
    uint32 toread = MIN(todo, bufsize);
    _read = pStream->Read(buf, toread, 1);
    res = zipWriteInFileInZip(mpZip, buf, _read) == Z_OK;
    todo -= _read;

    if (_read != toread)
      return false;
  }

  res = zipCloseFileInZip(mpZip) == Z_OK;

  if (OwnStream)
    delete pStream;
  return res;
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:44,代码来源:nglZipFS.cpp

示例6: Close

bool nuiZipWriter::Close(const nglString& rComment)
{
  NGL_ASSERT(mpZip);
  return Z_OK == zipClose(mpZip, rComment.IsNull() ? NULL : rComment.GetStdString().c_str());
  mpZip = NULL;
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:6,代码来源:nglZipFS.cpp


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