Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
webgui: clang-format
  • Loading branch information
linev committed Jul 27, 2017
commit ae128e4a0b5b239ad4218b54111e03b4f24889b7
6 changes: 4 additions & 2 deletions gui/canvaspainter/v7/cef/base_handler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class TCefWSEngine : public THttpWSEngine {

virtual ~TCefWSEngine()
{
if (fCallback) fCallback->Failure(0, "close");
if (fCallback)
fCallback->Failure(0, "close");
}

virtual UInt_t GetId() const
Expand All @@ -68,7 +69,8 @@ class TCefWSEngine : public THttpWSEngine {
virtual void SendCharStar(const char *buf)
{
// printf("CEF sends message to client %d\n", strlen(buf));
if (fCallback) fCallback->Success(buf); // send next message to JS
if (fCallback)
fCallback->Success(buf); // send next message to JS
}

virtual Bool_t PreviewData(THttpCallArg *arg)
Expand Down
10 changes: 7 additions & 3 deletions tutorials/v7/draw_v6.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ void draw_v6()
// canvas->Show("firefox"); // it could be firefox, opera, chromium; canvas can be shown several times

// synchronous, wait until painting is finished
canvas->Update(false, [](bool res) { std::cout << "First Update done = " << (res ? "true" : "false") << std::endl; });
canvas->Update(false,
[](bool res) { std::cout << "First Update done = " << (res ? "true" : "false") << std::endl; });

// call again, should return immediately
canvas->Update(false, [](bool res) { std::cout << "Second Update done = " << (res ? "true" : "false") << std::endl; });
canvas->Update(false,
[](bool res) { std::cout << "Second Update done = " << (res ? "true" : "false") << std::endl; });

// request to create PNG file in asynchronous mode and specify lambda function as callback
// when request processed by the client, callback called with result value
canvas->SaveAs("draw.png", true, [](bool res) { std::cout << "Producing PNG done res = " << (res ? "true" : "false") << std::endl; }); // asynchronous
canvas->SaveAs("draw.png", true, [](bool res) {
std::cout << "Producing PNG done res = " << (res ? "true" : "false") << std::endl;
}); // asynchronous

// this function executed in synchronous mode (async = false is default),
// mean previous file saving will be completed as well at this point
Expand Down