|
ROOT
Reference Guide |
|
Go to the documentation of this file.
83 int max_ascent, max_descent;
120 int max_ascent, max_descent;
146 if (
main->IsScrollingEnabled())
150 if (
main->GetTabTab(
c)->IsEnabled()) {
158 if (
main->GetTabTab(
c)->IsEnabled()) {
173 if (
main->GetTabTab(
main->GetCurrent()) ==
this) {
218 int max_ascent, max_descent;
221 fTHeight = max_ascent + max_descent;
239 main->GetLayoutManager()->Layout();
282 UInt_t nw = (w - (bw << 1));
283 if (nw > 32768) nw = 1;
284 UInt_t nh = (
h - tabh - (bw << 1));
285 if (nh > 32768) nh = 1;
346 int max_ascent, max_descent;
348 fTabh = max_ascent + max_descent + 6;
445 if (count == tabIndex) {
570 count = count / 2 - 1;
571 if (tabIndex > count)
616 if (tabIndex < 0)
return 0;
626 if (el && count == tabIndex)
665 if (tabIndex < 0)
return 0;
675 if (count == tabIndex)
792 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
793 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
799 parFont.
Form(
"ufont->GetFontStruct()");
805 parGC.
Form(
"uGC->GetGC()");
811 out << std::endl <<
" // tab widget" << std::endl;
821 out <<
");" << std::endl;
823 out <<
"," << parGC.
Data() <<
");" << std::endl;
826 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
");" << std::endl;
834 if (option && strstr(option,
"keep_names"))
835 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
842 out << std::endl <<
" // container of " << quote
844 out <<
" TGCompositeFrame *" << cf->
GetName() <<
";" << std::endl;
847 << quote <<
");" << std::endl;
857 out <<
" " << cf->
GetName() <<
"->SetLayoutManager(";
859 out <<
");" << std::endl;
862 out <<
" " <<
GetName() <<
"->SetEnabled(" << i <<
", kFALSE);" << std::endl;
868 out <<
" TGTabElement *tab" << i <<
" = "
869 <<
GetName() <<
"->GetTabTab(" << i <<
");" << std::endl;
870 out <<
" tab" << i <<
"->ShowClose(kTRUE);" << std::endl;
874 out <<
" TGTabElement *tab" << i <<
" = "
875 <<
GetName() <<
"->GetTabTab(" << i <<
");" << std::endl;
876 out <<
" tab" << i <<
"->ChangeBackground(ucolor);" << std::endl;
880 out << std::endl <<
" " <<
GetName() <<
"->SetTab(" <<
GetCurrent() <<
");" << std::endl;
882 <<
"->GetDefaultSize());" << std::endl;
TGTabElement * GetCurrentTab() const
EGEventType fType
of event (see EGEventType)
static const TGGC * fgDefaultGC
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Int_t fY
pointer x, y coordinates in event window
ROOT GUI Window base class.
Bool_t IsScrollingEnabled() const
Returns true if tab scrolling is enabled.
virtual ~TGTab()
Delete tab widget.
virtual TList * GetList() const
virtual TGLayoutManager * GetLayoutManager() const
virtual ~TGTabElement()
Delete tab element.
const Mask_t kAnyModifier
void ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2)
Execute string "cmd" via the interpreter.
Short_t Max(Short_t a, Short_t b)
const TGPicture * fClosePic
const Mask_t kPointerMotionMask
virtual Bool_t HandleButton(Event_t *event)
Handle button event in the tab widget.
virtual void RaiseWindow()
raise window
virtual void SetEnabled(Bool_t on=kTRUE)
TGCompositeFrame * GetTabContainer(Int_t tabIndex) const
Return container of tab with index tabIndex.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
const char * Data() const
virtual void SetEnabled(Int_t tabIndex, Bool_t on=kTRUE)
Enable or disable tab.
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
Handle_t FontStruct_t
Pointer to font structure.
virtual void NewTab(const char *text="tab")
Create new tab. Used in context menu.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
static const TGFont * fgDefaultFont
virtual TGDimension GetDefaultSize() const
Return default size of tab element.
TGTab(const TGTab &)=delete
virtual void SetScrollingEnabled(Bool_t on=kTRUE)
Enable or disable tab scrolling.
static const TGGC & GetDefaultGC()
Return default graphics context in use.
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
void Draw(Option_t *="")
Default Draw method for all objects.
const TGString * GetText() const
TGCompositeFrame * GetContainer() const
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual Pixel_t GetBackground() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
static const TGGC & GetBlackGC()
Get black graphics context.
const Mask_t kButtonPressMask
virtual void DrawBorder()
Draw little tab element.
Service classes of the tab widget.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
virtual void MapWindow()
map window
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxiliary protected method used to save subframes.
TGTabLayout(const TGTabLayout &)=delete
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
virtual UInt_t GetOptions() const
virtual void Selected(Int_t id)
virtual void DestroyWindow()
destroy window
Handle_t GContext_t
Graphics context handle.
TGCompositeFrame * fContainer
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SetActive(Bool_t on=kTRUE)
virtual void SetText(const char *text="tab")
Set text to current tab.
virtual TGLayoutManager * GetLayoutManager() const
Return layout manager.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Encapsulate a graphics context used in the low level graphics.
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
TGTabElement(const TGTabElement &)=delete
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
UInt_t fCode
key or button code
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
const char * GetString() const
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Handle_t Window_t
Window handle.
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
void ChangeTab(Int_t tabIndex, Bool_t emit=kTRUE)
Make tabIdx the current tab.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Window_t fWindow
window reported event is relative to
virtual void Layout()
Layout the tab widget.
virtual void LowerWindow()
lower window
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual TGDimension GetDefaultSize() const
Get default size of tab widget.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a tab widget as a C++ statement(s) on output stream out.
virtual void UnmapWindow()
unmap window
Int_t GetBorderWidth() const
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
TGLayoutManager * fLayoutManager
virtual void Add(TObject *obj)
virtual void RemoveTab(Int_t tabIndex=-1, Bool_t storeRemoved=kTRUE)
Remove container and tab of tab with index tabIndex.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
Service classes of the tab widget.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
const char * GetString() const
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
virtual void ShowClose(Bool_t on=kTRUE)
Show/hide close icon on the tab element, then apply layout to compute correct elements size.
FontStruct_t GetFontStruct() const
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void Removed(Int_t id)
Int_t GetNumberOfTabs() const
Return number of tabs.
Encapsulate fonts used in the GUI system.
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
The base class for composite widgets (menu bars, list boxes, etc.).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual UInt_t GetDefaultWidth() const
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
const TGPicture * fClosePicD
UInt_t GetTabHeight() const
void SetText(TGString *text)
Set new tab text.
int main(int argc, char *argv[])