29using namespace std::string_literals;
49 std::vector<std::string> btns;
52 btns.emplace_back(
"horizontal");
54 btns.emplace_back(
"vertical");
59 while (
auto btn = iter()) {
60 btns.emplace_back(btn->GetName());
61 btns.emplace_back(btn->GetTitle());
67 std::string buf =
"BTNS:";
82 if (arg.compare(0, 6,
"CLICK:") == 0) {
83 auto id = std::stoi(arg.substr(6));
90 printf(
"Click btn %s act %s\n", btn->GetName(), btn->GetAction());
95 printf(
"Get msg %s from conn %u\n", arg.c_str(), connid);
116 if (
gROOT->IsWebDisplayBatch())
124 fWindow->SetDefaultPage(
"file:rootui5sys/canv/ctrlbar.html");
128 [
this](
unsigned connid) {
132 [
this](
unsigned connid,
const std::string &arg) {
141 int nbtns = 0, maxlen = 0, totallen = 0;
143 while (
auto btn = iter()) {
145 int len = strlen(btn->GetName());
155 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.