74#include "RConfigure.h" 
   95class TPopupDelayTimer : 
public TTimer {
 
  106Bool_t TPopupDelayTimer::Notify()
 
  108   fPopup->HandleTimer(0);
 
  203         menuTitle->
GetMenu()->
Connect(
"PoppedUp()", 
"TGMenuBar", 
this, 
"PopupConnection()");
 
  224               beforeMenu = beforeMenuTitle->
GetMenu();
 
  293      const char* signal_name = connlist->GetName();
 
  294      TIter next2(connlist);
 
  296         const char* slot_name = conn->GetName();
 
  297         void* receiver = conn->GetReceiver();
 
  314      const char* signal_name = connlist->GetName();
 
  315      if (strcmp(signal_name, 
"Activated(int)") == 0) {
 
  316         TIter next2(connlist);
 
  319            const char* slot_name = conn->GetName();
 
  320            const char* class_name = conn->GetClassName();
 
  321            void* receiver = conn->GetReceiver();
 
  362         hot = 
e->GetLabel()->GetHotChar();
 
  384   if (!
main || !
main->InheritsFrom(
"TGMainFrame")) 
return;
 
  503   if (!
f->InheritsFrom(
"TGMenuTitle")) {
 
  504      Error(
"AddFrameBefore", 
"may only add TGMenuTitle objects to a menu bar");
 
  696      gVirtualX->LookupString(event, tmp, 
sizeof(tmp), keysym);
 
  707         if (el == 0) target = 0;
 
  730            while ( currentEntry ) {
 
  732                  currentMenu = currentEntry->
GetPopup();
 
  733               if ( currentEntry != currentMenu->
GetCurrent() )
 
  744               if (!hot || (hot != keysym)) 
continue;
 
  974   gClient->UnregisterPopup(
this);
 
  995      TString shortcut = ts(tab+1, 
s->Length());
 
 1017   UInt_t tw, ph = 0, pw = 0;
 
 1029   Int_t max_ascent, max_descent;
 
 1030   nw->
fEw = tw + pw +18+12;
 
 1112   UInt_t tw, ph = 0, pw = 0;
 
 1120   Int_t max_ascent, max_descent;
 
 1121   nw->
fEw = tw + pw +18+12;
 
 1178   Int_t max_ascent, max_descent;
 
 1179   nw->
fEw = tw + pw+18+12;
 
 1252   if (
gVirtualX->InheritsFrom(
"TGWin32")) {
 
 1321   gClient->UnregisterPopup(
this);
 
 1394   static Int_t twice = 0;
 
 1522   int max_ascent, max_descent;
 
 1523   gVirtualX->GetFontProperties(font, max_ascent, max_descent);
 
 1524   int tx = entry->
fEx + 
fXl;
 
 1526   int offset = (entry->
fEh - (max_ascent + max_descent)) / 2;
 
 1527   int ty = entry->
fEy + max_ascent + offset - 1;
 
 1531   switch (entry->
fType) {
 
 1547            if (entry->
fPic != 0)
 
 1567            if (entry->
fPic != 0)
 
 1603   if (
gClient->GetStyle() > 0) {
 
 1633   int m = (t + 
b) >> 1;
 
 1652   t = (t + 
b - 8) >> 1; ++t;
 
 1654   seg[0].
fX1 = 1+
l; seg[0].
fY1 = 3+t; seg[0].
fX2 = 3+
l; seg[0].
fY2 = 5+t;
 
 1655   seg[1].
fX1 = 1+
l; seg[1].
fY1 = 4+t; seg[1].
fX2 = 3+
l; seg[1].
fY2 = 6+t;
 
 1656   seg[2].
fX1 = 1+
l; seg[2].
fY1 = 5+t; seg[2].
fX2 = 3+
l; seg[2].
fY2 = 7+t;
 
 1657   seg[3].
fX1 = 3+
l; seg[3].
fY1 = 5+t; seg[3].
fX2 = 7+
l; seg[3].
fY2 = 1+t;
 
 1658   seg[4].
fX1 = 3+
l; seg[4].
fY1 = 6+t; seg[4].
fX2 = 7+
l; seg[4].
fY2 = 2+t;
 
 1659   seg[5].
fX1 = 3+
l; seg[5].
fY1 = 7+t; seg[5].
fX2 = 7+
l; seg[5].
fY2 = 3+t;
 
 1671   t = (t + 
b - 5) >> 1; ++t;
 
 1672   l = (
l + 
r - 5) >> 1; ++
l;
 
 1674   seg[0].
fX1 = 1+
l; seg[0].
fY1 = 0+t; seg[0].
fX2 = 3+
l; seg[0].
fY2 = 0+t;
 
 1675   seg[1].
fX1 = 0+
l; seg[1].
fY1 = 1+t; seg[1].
fX2 = 4+
l; seg[1].
fY2 = 1+t;
 
 1676   seg[2].
fX1 = 0+
l; seg[2].
fY1 = 2+t; seg[2].
fX2 = 4+
l; seg[2].
fY2 = 2+t;
 
 1677   seg[3].
fX1 = 0+
l; seg[3].
fY1 = 3+t; seg[3].
fX2 = 4+
l; seg[3].
fY2 = 3+t;
 
 1678   seg[4].
fX1 = 1+
l; seg[4].
fY1 = 4+t; seg[4].
fX2 = 3+
l; seg[4].
fY2 = 4+t;
 
 1695         ptr->
fStatus &= ~kMenuDefaultMask;
 
 1711            ptr->
fStatus &= ~kMenuHideMask;
 
 1756         ptr->
fStatus &= ~kMenuEnableMask;
 
 1810      if (ptr->
fEntryId == 
id) { ptr->
fStatus &= ~kMenuCheckedMask; 
break; }
 
 1822      ptr->
fStatus &= ~kMenuCheckedMask;
 
 1836      if (ptr->
fUserData == user_data) { ptr->
fStatus  &= ~kMenuCheckedMask; 
break; }
 
 1867            ptr->
fStatus &= ~kMenuRadioMask;
 
 2034   if (
s && (hotchar = 
s->GetHotChar()) != 0)
 
 2040   Int_t  max_ascent, max_descent;
 
 2045   Resize(tw + 8, max_ascent + max_descent + 7);
 
 2065                                         0, 0, ax, ay, wdummy);
 
 2089   int x, 
y, max_ascent, max_descent;
 
 2096      if (
gClient->GetStyle() > 1) {
 
 2111      if (
gClient->GetStyle() > 1) {
 
 2175   out << 
"   TGPopupMenu *";
 
 2176   out << 
GetName() << 
" = new TGPopupMenu(gClient->GetDefaultRoot()" 
 2180   Int_t r_first, r_last, r_active;
 
 2181   r_active = r_first = r_last = -1;
 
 2188      Int_t i, lentext, hotpos;
 
 2197            outext = 
new char[lentext+2];
 
 2199            while (
text && lentext) {
 
 2200               if (i == hotpos-1) {
 
 2205               i++; 
text++; lentext--;
 
 2212               memset(shortcut, 0, 80);
 
 2215            out << 
"   " << 
GetName() << 
"->AddEntry(" << quote
 
 2223               out << 
",gClient->GetPicture(" << quote
 
 2227            out << 
");" << std::endl;
 
 2232            out << 
"   // cascaded menu " << quote << mentry->
GetName() << quote <<std::endl;
 
 2237            outext = 
new char[lentext+2];
 
 2239            while (
text && lentext) {
 
 2240               if (i == hotpos-1) {
 
 2245               i++; 
text++; lentext--;
 
 2249            out << 
"   " << 
GetName() << 
"->AddPopup(" << quote
 
 2251                << 
");" << std::endl;
 
 2255            out << 
"   " << 
GetName() << 
"->AddLabel(" << quote
 
 2256                << mentry->
GetName() << quote;
 
 2258               out << 
",gClient->GetPicture(" << quote
 
 2262            out << 
");" << std::endl;
 
 2265            out << 
"   " << 
GetName() << 
"->AddSeparator();" << std::endl;
 
 2271            << 
");" << std::endl;
 
 2275            << 
");" << std::endl;
 
 2279            << 
");" << std::endl;
 
 2283            << 
");" << std::endl;
 
 2295      } 
else if (hasradio) {
 
 2296         out << 
"   " << 
GetName() << 
"->RCheckEntry(" << r_active << 
"," << r_first
 
 2297             << 
"," << r_last << 
");" << std::endl;
 
 2299         r_active = r_first = r_last = -1;
 
 2312   out << 
"   // " << quote << 
fLabel->
GetString() << quote <<
" menu" << std::endl;
 
 2319   char *outext = 
new char[lentext+2];
 
 2322      if (i == hotpos-1) {
 
 2327      i++; 
text++; lentext--;
 
 2330   out << 
"   " << 
fParent->
GetName() << 
"->AddPopup(" << quote << outext
 
 2342   out << 
"   // menu bar" << std::endl;
 
 2344   out << 
"   TGMenuBar *";
 
 2347   if (option && strstr(option, 
"keep_names"))
 
 2348      out << 
"   " << 
GetName() << 
"->SetName(\"" << 
GetName() << 
"\");" << std::endl;
 
 2358      out << 
");" << std::endl;
 
const Mask_t kWAOverrideRedirect
 
const Mask_t kKeyLockMask
 
const Mask_t kButtonPressMask
 
const Mask_t kKeyMod1Mask
 
const Mask_t kWASaveUnder
 
const Mask_t kAnyModifier
 
const Mask_t kButton1Mask
 
const Mask_t kPointerMotionMask
 
const Mask_t kKeyShiftMask
 
const Mask_t kKeyMod2Mask
 
const Mask_t kLeaveWindowMask
 
const Mask_t kButtonReleaseMask
 
const Mask_t kEnterWindowMask
 
static RooMathCoreReg dummy
 
R__EXTERN TSystem * gSystem
 
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
 
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
 
void RegisterPopup(TGWindow *w)
Add a popup menu to the list of popups.
 
const TGResourcePool * GetResourcePool() const
 
TGWindow * GetWindowById(Window_t sw) const
Find a TGWindow via its handle. If window is not found return 0.
 
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
 
virtual TList * GetList() const
 
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
 
virtual UInt_t GetDefaultWidth() const
 
virtual void Layout()
Layout the elements of the composite frame.
 
virtual Int_t MustCleanup() const
 
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
 
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
 
static TGLayoutHints * fgDefaultHints
 
FontStruct_t GetFontStruct() const
 
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
 
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
 
virtual void DoRedraw()
Redraw the frame.
 
static const TGGC & GetBlackGC()
Get black graphics context.
 
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
 
TGDimension GetSize() const
 
virtual Pixel_t GetForeground() const
Return frame foreground color.
 
static const TGGC & GetHilightGC()
Get highlight color graphics context.
 
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
 
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
 
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
 
static const TGGC & GetShadowGC()
Get shadow color graphics context.
 
virtual void Move(Int_t x, Int_t y)
Move frame.
 
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
 
virtual Bool_t HandleMotion(Event_t *)
 
virtual Pixel_t GetBackground() const
 
static const TGGC & GetBckgndGC()
Get background color graphics context.
 
virtual void UnmapWindow()
 
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw a hot string and underline the hot character.
 
Int_t GetPadRight() const
 
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
 
ULong_t GetLayoutHints() const
 
const char * GetName() const
Returns name of object.
 
void Draw(Option_t *="")
Default Draw method for all objects.
 
Cursor_t GetGrabCursor() const
 
const char * GetString() const
 
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
 
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
 
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
 
virtual void DestroyWindow()
 
const TGWindow * GetParent() const
 
virtual void RequestFocus()
 
virtual void Add(TObject *obj)
 
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
 
virtual TObject * Remove(TObject *obj)
Remove object from the list.
 
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
 
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
 
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
 
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
 
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
 
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
 
virtual void AddLast(TObject *obj)
Add object at the end of the list.
 
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
 
Named parameter, streamable and storable.
 
TQConnection class is an internal class, used in the object communication mechanism.
 
TList * GetListOfSignals() const
 
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
 
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
 
const char * Data() const
 
TString & Remove(Ssiz_t pos)
 
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
 
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
 
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
 
Handles synchronous and a-synchronous timer events.
 
void Reset()
Reset the timer.
 
virtual Bool_t Notify()
Notify when timer times out.
 
int main(int argc, char **argv)
 
static constexpr double bar
 
static constexpr double s
 
static constexpr double ms
 
Short_t Max(Short_t a, Short_t b)