本文整理汇总了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")));
}
示例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);
}
示例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);
}
示例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));
}
}
示例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;
}
示例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;
}