26 const char *kBStr =
"BUTTON";
27 const char *kDStr =
"DRAWNBUTTON";
28 const char *kSStr =
"SEPARATOR";
31 ClassImp(TControlBarButton);
36 TControlBarButton::TControlBarButton() : TNamed()
44 TControlBarButton::TControlBarButton(
const char *label,
const char *action,
45 const char *hint,
const char *type)
55 void TControlBarButton::Action()
57 if (!fAction.IsNull()) {
59 gApplication->ProcessLine(fAction.Data());
61 if (gPad) gPad->Update();
68 void TControlBarButton::SetAction(
const char *action)
71 char *s = Strip(action);
75 Error(
"SetAction",
"action missing");
83 void TControlBarButton::SetType(
const char *type)
88 if (!strcasecmp(type, kBStr))
90 else if (!strcasecmp(type, kDStr))
92 else if (!strcasecmp(type, kSStr))
95 Error(
"SetType",
"unknown type '%s' !\n\t(choice of: %s, %s, %s)",
96 type, kBStr, kDStr, kSStr);
104 void TControlBarButton::SetType(Int_t type)
116 Error(
"SetType",
"unknown type: %d !\n\t(choice of: %d, %d, %d)",
117 type, kButton, kDrawnButton, kSeparator);