Commit eee4536e authored by callum_linden's avatar callum_linden

Automated merge with: Vendor source drop of new tooltip features via Maxim...

Automated merge with: Vendor source drop of new tooltip features via Maxim (Linden) - Dullahan version bumped to 1.1.2222
parents 873d62f8 00817b99
......@@ -65,7 +65,7 @@ class RenderHandler :
{
CEF_REQUIRE_UI_THREAD();
// display dirty rectangles - oddly each one comes in on its own (array size of 1) vs
// display dirty rectangles - oddly each one comes in on its own (array size of 1) vs
// collecting them together - probably a good reason :)
std::cout << "OnPaint() called with size: " << width << " x " << height << std::endl;
for (int r = 0; r < dirtyRects.size(); r++)
......
......@@ -115,6 +115,7 @@ void app::init_dullahan()
mDullahan->setOnStatusMessageCallback(std::bind(&app::onStatusMessage, this, std::placeholders::_1));
mDullahan->setOnTitleChangeCallback(std::bind(&app::onTitleChange, this, std::placeholders::_1));
mDullahan->setOnJSDialogCallback(std::bind(&app::onJSDialogCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
mDullahan->setOnTooltipCallback(std::bind(&app::onTooltip, this, std::placeholders::_1));
std::vector<std::string> custom_schemes(1, "secondlife");
mDullahan->setCustomSchemes(custom_schemes);
......@@ -808,6 +809,13 @@ void app::onTitleChange(const std::string title)
std::cout << "onTitleChange: " << title << std::endl;
}
/////////////////////////////////////////////////////////////////////////////////
//
void app::onTooltip(const std::string tooltip)
{
std::cout << "onTooltip: " << tooltip << std::endl;
}
/////////////////////////////////////////////////////////////////////////////////
//
void app::on_left_mouse_down(int x, int y, int face)
......
......@@ -144,8 +144,7 @@ class app
void onRequestExitCallback();
void onStatusMessage(const std::string message);
void onTitleChange(const std::string title);
void onTooltip(const std::string title);
};
#endif // _WEBCUBE_EXAMPLE
......@@ -359,6 +359,11 @@ void dullahan::setOnTitleChangeCallback(std::function<void(const std::string tit
mImpl->getCallbackManager()->setOnTitleChangeCallback(callback);
}
void dullahan::setOnTooltipCallback(std::function<void(const std::string text)> callback)
{
mImpl->getCallbackManager()->setOnTooltipCallback(callback);
}
void dullahan::setOnPdfPrintFinishedCallback(std::function<void(const std::string path, bool ok)> callback)
{
mImpl->getCallbackManager()->setOnPdfPrintFinishedCallback(callback);
......
......@@ -346,6 +346,8 @@ class dullahan
// page title changes
void setOnTitleChangeCallback(std::function<void(const std::string title)> callback);
void setOnTooltipCallback(std::function<void(const std::string text)> callback);
// a call to printToPDF completed
void setOnPdfPrintFinishedCallback(std::function<void(const std::string path, bool ok)> callback);
......
......@@ -177,6 +177,16 @@ void dullahan_browser_client::OnTitleChange(CefRefPtr<CefBrowser> browser,
mParent->getCallbackManager()->onTitleChange(std::string(title));
}
// CefDisplayhandler overrides
bool dullahan_browser_client::OnTooltip(CefRefPtr<CefBrowser> browser,
CefString& text)
{
CEF_REQUIRE_UI_THREAD();
mParent->getCallbackManager()->OnTooltip(std::string(text));
return false;
}
// CefLoadHandler override
void dullahan_browser_client::OnLoadingStateChange(CefRefPtr<CefBrowser> browser,
bool isLoading, bool canGoBack, bool canGoForward)
......
......@@ -80,6 +80,8 @@ class dullahan_browser_client :
const CefString& value) override;
void OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) override;
bool OnTooltip(CefRefPtr<CefBrowser> browser,
CefString& text) override;
// CefLoadHandler overrides
CefRefPtr<CefLoadHandler> GetLoadHandler() override
......
......@@ -204,6 +204,19 @@ void dullahan_callback_manager::onTitleChange(const std::string title)
}
}
void dullahan_callback_manager::setOnTooltipCallback(std::function<void(const std::string text)> callback)
{
mOnTooltipCallbackFunc = callback;
}
void dullahan_callback_manager::OnTooltip(const std::string text)
{
if (mOnTooltipCallbackFunc)
{
mOnTooltipCallbackFunc(text);
}
}
void dullahan_callback_manager::setOnPdfPrintFinishedCallback(std::function<void(const std::string path, bool ok)> callback)
{
mOnPdfPrintFinishedCallbackFunc = callback;
......
......@@ -73,6 +73,9 @@ class dullahan_callback_manager
void setOnTitleChangeCallback(std::function<void(const std::string title)> callback);
void onTitleChange(const std::string title);
void setOnTooltipCallback(std::function<void(const std::string text)> callback);
void OnTooltip(const std::string text);
void setOnPdfPrintFinishedCallback(std::function<void(const std::string path, bool ok)> callback);
void onPdfPrintFinished(const std::string path, bool ok);
......@@ -99,6 +102,7 @@ class dullahan_callback_manager
std::function<void(const std::string)> mOnStatusMessageCallbackFunc;
std::function<void()> mOnRequestExitCallbackFunc;
std::function<void(const std::string)> mOnTitleChangeCallbackFunc;
std::function<void(const std::string)> mOnTooltipCallbackFunc;
std::function<void(const std::string, bool)> mOnPdfPrintFinishedCallbackFunc;
std::function<void(int percent, bool complete)> mOnFileDownloadProgressCallbackFunc;
std::function<const std::vector<std::string>(dullahan::EFileDialogType, const std::string, const std::string, const std::string, bool&)> mOnFileDialogCallbackFunc;
......
......@@ -39,7 +39,7 @@
// TODO: find a way to set build number directly from hg
#define DULLAHAN_VERSION_MAJOR 1
#define DULLAHAN_VERSION_MINOR 1
#define DULLAHAN_VERSION_BUILD 2200
#define DULLAHAN_VERSION_BUILD 2222
// version numbers pulled from CEF build via Cmake
@CEF_VERSION_STR@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment