42 gVirtualX->ChangeWindowAttributes(fId, &attr);
43 SetBackgroundColor(fClient->GetResourcePool()->GetTipBgndColor());
46 fRectGC.SetForeground(0x99ff99);
58 fContextMenu =
new TContextMenu(
"SplitFrameContextMenu",
"Actions");
60 fMap.SetOwnerValue(
kFALSE);
62 if (
f) Resize(
f->GetWidth()/10,
f->GetHeight()/10);
96 rect->
fY, rect->
fW, rect->
fH);
121 Int_t px = 0, py = 0;
130 gClient->GetDefaultRoot()->GetId(),
131 event->fX,
event->fY, px, py, wtarget);
149 static TGRectMap *rect = 0, *oldrect = 0;
154 if (rect != oldrect) {
157 oldrect->fY, oldrect->fW, oldrect->fH);
159 oldrect->fW, oldrect->fH);
172 oldrect->fY, oldrect->fW, oldrect->fH);
174 oldrect->fW, oldrect->fH);
425 "OnSplitterClicked(Event_t*)");
454 "OnSplitterClicked(Event_t*)");
468 Int_t px = 0, py = 0;
469 Int_t rx = 0, ry = 0;
470 Int_t cx, cy, cw, ch;
474 if (parent && parent->
fSecond ==
this) {
481 fX,
fY, px, py, wtarget);
500 Int_t px = 0, py = 0;
507 gClient->GetDefaultRoot()->GetId(),
508 event->fX,
event->fY, px, py, wtarget);
527 "In which side the actual frame has to be kept (top / bottom)",
529 if ( strcmp(side,
"") == 0 )
548 if (!strcmp(side,
"top")) {
552 else if (!strcmp(side,
"bottom")) {
575 "In which side the actual frame has to be kept (left / right)",
577 if ( strcmp(side,
"") == 0 )
596 if (!strcmp(side,
"left")) {
600 else if (!strcmp(side,
"right")) {
623 if (!el || !el->
fFrame)
return;
689 if ((source != prev) && (source !=
dest))
709 if (!strcmp(which,
"first")) {
713 else if (!strcmp(which,
"second")) {
717 if (!kframe || !dframe)
741 out << std::endl <<
" // splittable frame" << std::endl;
742 out <<
" TGSplitFrame *";
748 out <<
");" << std::endl;
755 if (option && strstr(option,
"keep_names"))
756 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
769 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
771 out <<
");"<< std::endl;
virtual void SetFrame(TGFrame *frame, Bool_t prev)=0
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
TList * GetMenuList() const
Return the list of menu items associated with the class.
void SplitVertical(const char *side="left")
Vertically split the frame, and if it contains a child frame, ask the user where to keep it (left or ...
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
TGTransientFrame * fUndocked
void SwallowBack()
Swallow back the child frame previously extracted, and close its parent (transient frame)...
virtual void HSplit(UInt_t h=0)
Horizontally split the frame.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
const TGWindow * GetParent() const
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
R__EXTERN void * gTQSender
void CloseAndCollapse()
Close (unmap, remove from the list of frames and destroy) the frame contained in this split frame...
This is the ROOT implementation of the Qt object communication mechanism (see also http://www...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
virtual TList * GetList() const
TGSplitFrame * GetSecond() const
TGSplitFrame * GetFirst() const
void Close()
Close (unmap and remove from the list of frames) the frame contained in this split frame...
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
void SetWRatio(Float_t r)
void OnSplitterClicked(Event_t *event)
Handle mouse click events on the splitter.
virtual void Layout()
Layout the elements of the composite frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
TGSplitTool * GetSplitTool() const
const Mask_t kPointerMotionMask
void SplitHor()
Horizontally split the frame, and if it contains a child frame, ask the user where to keep it (top or...
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent...
void MapToSPlitTool(TGSplitFrame *top)
Map this split frame in the small overview tooltip.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
void SplitHorizontal(const char *side="top")
Horizontally split the frame, and if it contains a child frame, ask the user where to keep it (top or...
void SwitchToMain()
Switch the actual embedded frame to the main (first) split frame.
virtual void RemoveFrame(TGFrame *f)
Add a frame in the split frame using layout hints l.
void Emit(const char *signal)
Acitvate signal without args.
virtual Bool_t HandleConfigureNotify(Event_t *)
Handles resize events for this frame.
const Mask_t kButtonPressMask
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a splittable frame as a C++ statement(s) on output stream out.
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...
TGSplitFrame(const TGSplitFrame &)
void Delete(Option_t *option="")
Remove all (key,value) pairs from the map AND delete the keys when they are allocated on the heap...
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxilary protected method used to save subframes.
const Mask_t kWASaveUnder
#define dest(otri, vertexptr)
void MakeCustomMenuList()
Makes a customizable version of the popup menu list, i.e.
void SetHRatio(Float_t r)
Bool_t Contains(Int_t px, Int_t py) const
virtual void CloseWindow()
Close and delete main frame.
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
The ROOT global object gROOT contains a list of all defined classes.
TGFrame * GetFrame() const
static const TGGC & GetBlackGC()
Get black graphics context.
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void SetWidth(UInt_t w)
const Mask_t kStructureNotifyMask
const TGResourcePool * GetResourcePool() const
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
const Mask_t kButtonReleaseMask
virtual void RaiseWindow()
const Mask_t kWAOverrideRedirect
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual void VSplit(UInt_t w=0)
Vertically split the frame.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Cursor_t GetGrabCursor() const
void Undocked(TGFrame *frame)
Emit Undocked() signal.
void ExtractFrame()
Extract the frame contained in this split frame an reparent it in a transient frame.
Mother of all ROOT objects.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void UnmapWindow()
virtual void Cleanup()
Recursively cleanup child frames.
virtual void SetHeight(UInt_t h)
static void SwitchFrames(TGFrame *frame, TGCompositeFrame *dest, TGFrame *prev)
Switch (exchange) two frames.
virtual ~TGSplitFrame()
Destructor. Make cleanup.
void Docked(TGFrame *frame)
Emit Undocked() signal.
void SplitVer()
Vertically split the frame, and if it contains a child frame, ask the user where to keep it (left or ...
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
TGSplitFrame * GetTopFrame()
Return the top level split frame.
void UnSplit(const char *which)
Close (unmap and remove from the list of frames) the frame contained in this split frame...
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual TGLayoutManager * GetLayoutManager() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add a frame in the split frame using layout hints l.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".