33 enum ETextJustification {
36 kTextCenterX = BIT(2),
46 kWidgetWantFocus = BIT(0),
47 kWidgetHasFocus = BIT(1),
48 kWidgetIsEnabled = BIT(2)
60 const TGWindow *fMsgWindow;
63 TGWidget(
const TGWidget& tgw):
64 fWidgetId(tgw.fWidgetId), fWidgetFlags(tgw.fWidgetFlags),
65 fMsgWindow(tgw.fMsgWindow), fCommand(tgw.fCommand) { }
66 TGWidget& operator=(
const TGWidget& tgw) {
68 fWidgetId=tgw.fWidgetId; fWidgetFlags=tgw.fWidgetFlags;
69 fMsgWindow=tgw.fMsgWindow; fCommand=tgw.fCommand; }
return *
this; }
70 Int_t SetFlags(Int_t flags) {
return fWidgetFlags |= flags; }
71 Int_t ClearFlags(Int_t flags) {
return fWidgetFlags &= ~flags; }
75 fWidgetId(-1), fWidgetFlags(0), fMsgWindow(0), fCommand() { }
77 fWidgetId(id), fWidgetFlags(0), fMsgWindow(0), fCommand() { }
78 virtual ~TGWidget() { }
80 Int_t WidgetId()
const {
return fWidgetId; }
81 Bool_t IsEnabled()
const {
return (Bool_t)((fWidgetFlags & kWidgetIsEnabled) != 0); }
82 Bool_t HasFocus()
const {
return (Bool_t)((fWidgetFlags & kWidgetHasFocus) != 0); }
83 Bool_t WantFocus()
const {
return (Bool_t)((fWidgetFlags & kWidgetWantFocus) != 0); }
84 virtual void Associate(
const TGWindow *w) { fMsgWindow = w; }
85 virtual void SetCommand(
const char *command) { fCommand = command; }
86 const char *GetCommand()
const {
return fCommand.Data(); }