9 "ROOT files",
"*.root",
21 {
"h1_s.xpm",
"TH1", 1001, 0 },
22 {
"h2_s.xpm",
"TH2", 1002, 0 },
23 {
"h3_s.xpm",
"TH3", 1003, 0 },
24 {
"profile_s.xpm",
"TProfile", 1004, 0 },
29 {
"f1_s.xpm",
"TF1", 2001, 0 },
30 {
"f2_s.xpm",
"TF2", 2002, 0 },
35 {
"ntuple_s.xpm",
"TNtuple", 3001, 0 },
36 {
"tree_s.xpm",
"TTree", 3002, 0 },
37 {
"chain_s.xpm",
"TChain", 3003, 0 },
42 "This is the ROOT text edit widget TGTextEdit. It is not intended as\n"
43 "a full developers editor, but it is relatively complete and can ideally\n"
44 "be used to edit scripts or to present users editable config files, etc.\n\n"
45 "The text edit widget supports standard emacs style ctrl-key navigation\n"
46 "in addition to the arrow keys. By default the widget has under the right\n"
47 "mouse button a popup menu giving access to several built-in functions.\n\n"
48 "Cut, copy and paste between different editor windows and any other\n"
49 "standard X11 text handling application is supported.\n\n"
50 "Text can be selected with the mouse while holding the left button\n"
51 "or with the arrow keys while holding the shift key pressed. Use the\n"
52 "middle mouse button to paste text at the current mouse location.\n"
53 "Mice with scroll-ball are properly supported.\n\n"
54 "This are the currently defined key bindings:\n"
56 " Move the cursor one character leftwards.\n"
57 " Scroll when cursor is out of frame.\n"
59 " Move the cursor one character rightwards.\n"
60 " Scroll when cursor is out of frame.\n"
62 " Deletes the character on the left side of the text cursor and moves the\n"
63 " cursor one position to the left. If a text has been marked by the user\n"
64 " (e.g. by clicking and dragging) the cursor will be put at the beginning\n"
65 " of the marked text and the marked text will be removed.\n"
67 " Moves the text cursor to the left end of the line. If mark is TRUE text\n"
68 " will be marked towards the first position, if not any marked text will\n"
69 " be unmarked if the cursor is moved.\n"
71 " Moves the text cursor to the right end of the line. If mark is TRUE text\n"
72 " will be marked towards the last position, if not any marked text will\n"
73 " be unmarked if the cursor is moved.\n"
75 " Deletes the character on the right side of the text cursor. If a text\n"
76 " has been marked by the user (e.g. by clicking and dragging) the cursor\n"
77 " will be put at the beginning of the marked text and the marked text will\n"
79 "Shift - Left Arrow\n"
80 " Mark text one character leftwards.\n"
81 "Shift - Right Arrow\n"
82 " Mark text one character rightwards.\n"
84 " Move the cursor to the beginning of the line.\n"
86 " Move the cursor one character leftwards.\n"
88 " Copy the marked text to the clipboard.\n"
90 " Delete the character to the right of the cursor.\n"
92 " Move the cursor to the end of the line.\n"
94 " Move the cursor one character rightwards.\n"
96 " Delete the character to the left of the cursor.\n"
98 " Delete marked text if any or delete all\n"
99 " characters to the right of the cursor.\n"
101 " Delete all characters on the line.\n"
103 " Paste the clipboard text into line edit.\n"
105 " Cut the marked text, copy to clipboard.\n"
107 " Paste the clipboard text into line edit.\n"
109 "All other keys with valid ASCII codes insert themselves into the line.";
145 if (newpos < 0) newpos = 0;
248 for (
int i=0; i < 256; ++i)
250 32, 32, 0, (i+1)&255),
453 for (i = 0; i < 20; i++) {
456 sprintf(tmp,
"Entry %i", i+1);
520 for (i=0; i < 20; ++i) {
523 sprintf(tmp,
"Entry %i", i+1);
542 for (j = 0; j < 4; j++) {
543 sprintf(buff,
"Module %i", j+1);
551 tent->
SetFont(
"-adobe-courier-bold-r-*-*-14-*-*-*-*-*-iso8859-1");
636 fHpx =
new TH1F(
"hpx",
"This is the px distribution",100,-4,4);
637 fHpxpy =
new TH2F(
"hpxpy",
"py vs px",40,-4,4,40,-4,4);
652 if (!(cnt % kUPDATE)) {
653 if (cnt == kUPDATE) {
680 static int newtab = 0;
690 printf(
"\nTerminating dialog: %s pressed\n",
691 (parm1 == 1) ?
"OK" :
"Cancel");
733 for (
int i = 0 ; i < nt; i++) {
743 sprintf(tmp,
"New Tab %d", ++newtab);
772 printf(
"Tab item %ld activated\n", parm1);
788 fRedTextGC(
TGButton::GetDefaultGC())
869 for (i = 0; i < 4; ++i) {
933 delete fC[0];
delete fC[1];
delete fC[2];
delete fC[3];
934 delete fC[4];
delete fC[5];
delete fC[6];
delete fC[7];
delete fC[8];
935 delete fR[0];
delete fR[1];
delete fR[2];
delete fR[3];
938 delete f3;
delete f4;
delete f5;
delete f2;
delete f1;
954 int i, buttons, retval;
975 icontype, buttons, &retval);
987 if (parm1 >= 21 && parm1 <= 24) {
989 if (
fR[i]->WidgetId() != parm1)
1150 sprintf(buf,
"%ld", parm2);
1225 static int id = 5001;
1238 Warning(
"AddShutterItem",
"missing pixmap \"%s\", using default",
1239 data[i].pixmap_name);
1377 int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0;
1378 int inc1 = 4, inc2 = 3, inc3 = 2, inc4 = 1;
1379 while (cnt1 < 100 || cnt2 < 100 || cnt3 < 100 || cnt4 <100) {
1469 sprintf(title,
"ROOT Editor - Untitled");
1471 sprintf(title,
"ROOT Editor - %s", txt->
GetFileName());
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Bool_t HandleButton(Event_t *event)
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
TestMsgBox(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options=kVerticalFrame)
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
TGCheckButton * fCheckMulti
TestProgress(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h)
void Increment(Float_t inc)
Increment progress position.
const TGWindow * GetParent() const
void LoadFile(const char *file)
virtual Bool_t LoadBuffer(const char *txtbuf)
Load text from a text buffer. Return false in case of failure.
virtual void SetRange(Int_t min, Int_t max)
virtual void CloseWindow()
Close and delete main frame.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
void SetForeground(Pixel_t v)
Set foreground color.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
TGPopupMenu * fCascade1Menu
const TGWindow * GetRoot() const
Returns current root (i.e.
virtual void CloseWindow()
Close and delete main frame.
virtual void SetBorderMode(Short_t bordermode)
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual void SetContainer(TGFrame *f)
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
TileFrame(const TGWindow *p)
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
virtual void SetRange(Float_t min, Float_t max)
R__EXTERN TApplication * gApplication
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Bool_t GetColorByName(const char *name, Pixel_t &pixel) const
Get a color by name.
TCanvas * GetCanvas() const
virtual void Layout()
Layout the elements of the composite frame.
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
TRootEmbeddedCanvas * fEc2
Int_t GetNumberOfTabs() const
Return number of tabs.
const Mask_t kPointerMotionMask
TGVerticalFrame * fVframe2
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
TGVerticalFrame * fVframe1
virtual void CloseWindow()
Close and delete main frame.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual UInt_t GetOptions() const
virtual void CloseWindow()
Close and delete main frame.
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
TGPictureButton * fPictButton
TGCompositeFrame(const TGCompositeFrame &)
const char * GetString() const
TGCompositeFrame * fFrame1
void AddText(Int_t pos, const char *text)
TGTextEdit * GetEditor() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Adding a frame to a canvas is actually adding the frame to the viewport container.
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
TGLayoutHints * fMenuBarHelpLayout
TGVerticalFrame * fVframe1
TRootEmbeddedCanvas * fEc1
virtual UInt_t GetDefaultWidth() const
Editor(const TGWindow *main, UInt_t w, UInt_t h)
virtual void CloseWindow()
Close and delete main frame.
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
TestDialog(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options=kVerticalFrame)
TGFrame * GetContainer() const
TGHorizontalFrame * fHframe1
const Mask_t kButtonPressMask
const char * filetypes1[]
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
void SetCanvas(TGCanvas *canvas)
TGPopupMenu * fCascadeMenu
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
TestSliders(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h)
virtual UInt_t GetDefaultHeight() const
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
TGFrame * GetContainer() const
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
virtual void SetPosition(Int_t pos)
const char * GetString() const
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
virtual void RemoveTab(Int_t tabIndex=-1, Bool_t storeRemoved=kTRUE)
Remove container and tab of tab with index tabIndex.
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
R__EXTERN TRandom * gRandom
virtual void Move(Int_t x, Int_t y)
Move frame.
char * StrDup(const char *str)
Duplicate the string str.
void AddShutterItem(const char *name, shutterData_t data[])
TGCompositeFrame * fStatusFrame
int main(int argc, char *argv[])
void LoadBuffer(const char *buffer)
virtual void AddEntry(TGString *s, Int_t id)
const Mask_t kButtonReleaseMask
TGLayoutHints * fMenuBarLayout
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
void CloseWindow()
Close and delete main frame.
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
const char * GetFileName() const
virtual void Layout()
Layout the listbox components.
const TGPicture * fDefaultPic
virtual void SetFont(TGFont *font, Bool_t local=kTRUE)
Changes text font specified by pointer to TGFont object.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
virtual UInt_t GetDefaultHeight() const
virtual void Add(TObject *obj)
virtual void SetPosition(Float_t min, Float_t max)
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual Float_t GetMinPosition() const
TGDoubleVSlider * fVslider2
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
TestShutter(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h)
virtual void Update()
Update canvas pad buffers.
virtual void CloseWindow()
Close and delete main frame.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Int_t Fill(Double_t)
Invalid Fill method.
const Mask_t kAnyModifier
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
void SetFillType(EFillType type)
Set fill type.
void Modified(Bool_t flag=1)
TGLayoutHints * fMenuBarItemLayout
TGPopupMenu * fCascade2Menu
TestMainFrame(const TGWindow *p, UInt_t w, UInt_t h)
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
Int_t GetState(TGFrame *f) const
Get state of sub frame.
virtual Int_t GetVsbPosition() const
Get position of vertical scrollbar.
TGViewPort * GetViewPort() const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.