30using namespace std::string_literals;
50 std::vector<std::string> btns;
53 btns.emplace_back(
"horizontal");
55 btns.emplace_back(
"vertical");
60 while (
auto btn = iter()) {
61 btns.emplace_back(btn->GetName());
62 btns.emplace_back(btn->GetTitle());
68 std::string buf =
"BTNS:";
83 if (arg.compare(0, 6,
"CLICK:") == 0) {
84 auto id = std::stoi(arg.substr(6));
91 printf(
"Click btn %s act %s\n", btn->GetName(), btn->GetAction());
96 printf(
"Get msg %s from conn %u\n", arg.c_str(), connid);
117 if (
gROOT->IsWebDisplayBatch())
125 fWindow->SetDefaultPage(
"file:rootui5sys/canv/ctrlbar.html");
129 [
this](
unsigned connid) {
133 [
this](
unsigned connid,
const std::string &arg) {
142 int nbtns = 0, maxlen = 0, totallen = 0;
144 while (
auto btn = iter()) {
146 int len = strlen(btn->GetName());
156 w = totallen*10 + nbtns*20;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Holds different arguments for starting browser with RWebDisplayHandle::Display() method.
RWebDisplayArgs & SetWidgetKind(const std::string &kind)
set widget kind
static std::shared_ptr< RWebWindow > Create()
Create new RWebWindow Using default RWebWindowsManager.
static TString ToJSON(const T *obj, Int_t compact=0, const char *member_name=nullptr)
ABC describing GUI independent control bar.
TControlBar * fControlBar
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Int_t GetOrientation() const
TList * GetListOfButtons() const
const char * GetName() const override
Returns name of object.
Web-based implementation for TControlBar class.
TWebControlBar(TControlBar *bar, const char *title, Int_t x, Int_t y)
Constructor.
std::shared_ptr< ROOT::RWebWindow > fWindow
void Hide() override
Hide control bar.
Bool_t ProcessData(unsigned connid, const std::string &arg)
Handle data from web browser Returns kFALSE if message was not processed.
void Show() override
Show canvas in browser window.
void SendInitMsg(unsigned connid)
!< configured display
static TControlBarImp * NewControlBar(TControlBar *bar, const char *title, Int_t x, Int_t y)
Static method to create TWebControlBar instance Used by plugin manager.