Added: Allow to set webig window title from lua
--HG-- branch : develop
This commit is contained in:
parent
86db1f29ac
commit
1fde33cf8f
2 changed files with 22 additions and 0 deletions
|
@ -309,6 +309,7 @@ namespace NLGUI
|
|||
REFLECT_LUA_METHOD("renderHtml", luaRenderHtml)
|
||||
REFLECT_STRING("url", getURL, setURL)
|
||||
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
||||
REFLECT_STRING("title", getTitle, setTitle)
|
||||
REFLECT_EXPORT_END
|
||||
|
||||
protected :
|
||||
|
@ -407,6 +408,8 @@ namespace NLGUI
|
|||
|
||||
// Set the title
|
||||
void setTitle (const ucstring &title);
|
||||
void setTitle (const std::string &title);
|
||||
std::string getTitle() const;
|
||||
|
||||
// Lookup a url in local file system
|
||||
bool lookupLocalFile (std::string &result, const char *url, bool isUrl);
|
||||
|
|
|
@ -5153,6 +5153,25 @@ namespace NLGUI
|
|||
}
|
||||
}
|
||||
|
||||
void CGroupHTML::setTitle(const std::string &title)
|
||||
{
|
||||
ucstring uctitle;
|
||||
uctitle.fromUtf8(title);
|
||||
|
||||
_TitleString.clear();
|
||||
if(!_TitlePrefix.empty())
|
||||
{
|
||||
_TitleString = _TitlePrefix + " - ";
|
||||
}
|
||||
_TitleString += uctitle;
|
||||
|
||||
setTitle(_TitleString);
|
||||
}
|
||||
|
||||
std::string CGroupHTML::getTitle() const {
|
||||
return _TitleString.toUtf8();
|
||||
};
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
bool CGroupHTML::lookupLocalFile (string &result, const char *url, bool isUrl)
|
||||
|
|
Loading…
Reference in a new issue