Log of /trunk/gui/gui/src/TGView.cxx
Parent Directory
Revision
44075 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 2 15:14:08 2012 UTC (2 years, 8 months ago) by
tpochep
File length: 17600 byte(s)
Diff to
previous 31685
Quite tricky modification, quite tough problem:
TGView frame (base of TGTextView) has a child window - TGViewFrame.
TGViewFrame is never actually painted (DoRedraw never gets called for this window),
but ... it receives Expose event and delegates it to ... its parent - TGTextView,
and TGTextView, it its DoRedraw (or DrawRegion) .... tries to paint into child window - TGViewFrame.
While this is may be OK for X11 or Window, with Cocoa it's a total mess and disaster - if some view is
to be updated, it does not expect a child to be suddenly rendered in the middle of work.
View is not a window.
I've added some quite risky code to address this problem (text scrolling is still wrong) - only
"static rendering" for a text view works now.
Revision
25229 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 25 15:14:34 2008 UTC (6 years, 5 months ago) by
bellenot
File length: 17463 byte(s)
Diff to
previous 23115
From Matevz and me:
Merge changes from branches/dev/fireworks (CMS event display)
TGSplitFrame
------------
- Added Docked(TGFrame*) and Undocked(TGFrame*) signals
- Added GetUndocked() getter
TGView
------
- Added a protection against possible negative scroll values
TGTextView
----------
- Fix bottom line not being properly updated while scrolling TGTextView
- Solve a problem with vertical slider (avoid negative value when scrolling)
TGTextEdit
----------
- Fix blinking cursor on some platforms/compilers in TGTextEdit
TGToolTip
---------
- Add new constructor with global x, y position.
If neither fWindow nor fPad are set use global fX, fY that was passed from outside.
TGListTree
----------
DeleteItem/Children() - for list-tree in stand-alone mode set below-mouse/current item to zero before deleting the item; remove corresponding comments.
TGSplitter
----------
- Add option to handle frame resizing externally.
TGPack
------
New Container class for vertical and horizontal grouping of frames. It enforces a predictable resizing behaviour on children.
Revision
18534 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 19 16:23:13 2007 UTC (7 years, 9 months ago) by
brun
Original Path:
trunk/gui/src/TGView.cxx
File length: 17257 byte(s)
Diff to
previous 15849
From Valeriy Onuchin:
TGView, TGTextView, TGTextEdit classes
The main changes :
o restructuring and revisiting the code
- move all text methods from TGView to TGTextView class.
o new methods
TGTextEdit::SetSelectBack - setting selection background color
TGTextEdit::SetSelectfore - setting color for slected text
TGText::AsString - return content as ROOT string.
o improved painting: exposed events, resizing
- compression of exposed events added which
eliminates flickering when text_edit widget is resized or
exposed.
- repaint only whose areas which where modified or
overlapped.
o undo management on Ctrl-Z
o autoscrolling when text is selected
o many small bug fixes:
- crash on double click on blank field
- selected text in some cases was not correctly removed
- etc.
Revision
15849 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 26 13:36:44 2006 UTC (8 years, 6 months ago) by
rdm
Original Path:
trunk/gui/src/TGView.cxx
File length: 23362 byte(s)
Diff to
previous 15742
Instead of providing default implementations for copy ctor's and assignment
operators we better make them private (and not implemented) to avoid people
from accidentally using them. Especially the collections classes and the
TQObject derived classes. In these classes the default implementations would
cause havoc due to multiple deletions of the same objects and other
potential memory corruptions.
Revision
15191 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun May 28 20:08:00 2006 UTC (8 years, 7 months ago) by
brun
Original Path:
trunk/gui/src/TGView.cxx
File length: 24949 byte(s)
Diff to
previous 15173
From valeriy Onuchine:
- TImage, TASImage
o Change return type of Vectorize method from "void" to "Double_t*".
o Implement FromWindow method under X11. This method allows to
create "snapshot image" from any ROOT window or frame.
- config/Makefile.depend
Add dependency of libGuiBld lib on libGraf.
GuiBuilder uses internally TImage/TASImage class.
- GX11Gui.cxx
X11 error handler was slightly modified.
Many X11 errors lead to freezing X11 server and
did not allow debugging.
To prevent freezing, a "forced seg.violation" was added
to the error handler.
The usage of the new "feature" is the following:
0. run "gdb root.exe"
1. set "gDebug = (int)gVirtualX" - that activates the new error handling.
2. run application which has X11 errors.
On X11 error the application was stopped by the "forced seg.violation".
3. "gdb>bt" - backtrace the problem.
!!! A big list of changes in libGui initiated by gui builder development !!!
- TGButton.h, TGButton.cxx
TGButton class:
o SetDown methods removed from context menu.
o SetEnabled method of context menu changed to TOGGLE.
Setting fWidgetFlags was added.
- TGTextButton class
o GetNormGC(), GetFontStruct() methods are introduced.
o SetFont removed from context menu.
o ChangeText(const char *title) was introduced and added to context menu.
o fixed an error in SetFont method which set font globally instead of
locally.
o SavePrimitive - save text justification
- TGPictureButton
o added getter method GetDisabledPicture()
- TGCanvas
o added to GuiBuilder widgets palette.
- TGColorDialog
o new methods:
- TGColorPalette *GetPalette(),
- TGColorPalette *GetCustomPalette(),
- void SetCurrentColor(Pixel_t col)
o new signal:
- void ColorSelected(Pixel_t)
o new parameter added to contructor "Bool_t wait".
If "wait" is kTRUE, "gClient->WaitForUnmap" is called internally
(normal/old usage). If "wait" is kFALSE - "gClient->WaitForUnmap"
should be called by user.
o few "usefull" colors added to "custom" palette.
- TGColorSelect
o added to GuiBuilder widgets palette.
- TGComboBox
o new methods:
- SortByName - allows to sort combobox entries by names.
- SetEnabled, IsEnabled.
- TGFontDialog was rewritten.
o Previous version worked under win32 only,
now it works on X11 also.
It allows to select any font available on the system.
o new parameter added to contructor "Bool_t wait".
If "wait" is kTRUE, "gClient->WaitForUnmap" is called internally
(normal/old usage). If "wait" is kFALSE - "gClient->WaitForUnmap"
should be called by user.
o new methods:
void SetFont(TGFont *font);
void SetColor(Pixel_t color);
void SetAlign(Int_t align);
void EnableAlign(Bool_t on = kTRUE);
void UpdateStyleSize(const char *family);
o new signals:
- FontSelected(char *font)
- AlignSelected(Int_t a)
- ColorSelected(Pixel_t c)
- TGFrame
o unused static member fgContextMenu removed.
- TGCompositeFrame
o TGCompositeFrame::SetEditDisabled modified. It is used for setting
fEditDisableXX attribute during gui buildind.
o ChangeSubframesBackground helper method was introduced.
- TGGroupFrame
o SetTextFont, SetTextColor methods were corrected for
"local" changing of the font.
- TGWindow
o kEditDisableKeyEnable added to EEditMode enum.
If this flag is set - window can handle keyboard events during gui
building.
- TGLabel
o new methods:
- GetNormGC, GetFontStruct
o fixed bugs in setting label's "local" text font.
o SavePrimitive - saving text justification added.
- TGListBox
o new methods:
- SortByName - allow to sort listbox entries by names.
- new auxilary/internal class TGLBFrameElement created.
It's used for ascending/descending sort of list box entries.
o reimplemented methods:
ChangeBackground, Layout, GetDefaultWidth
o disable changing layout manager in SetLayoutManager method.
Layout manager is not used for layout of list box.
- TGIcon
o SetImagePath method was corrected.
- TGScrollBarElement
o new methods:
- SetEnabled, IsEnabled. These methods are used in enabling/disabling
TGNumberEntry objects.
- TGScrollBar
o new getter methods:
- GetHead, GetTail, GetSlider
o new signals:
- PositionChanged, RangeChanged, PageSizeChanged
o ChangeBackground was reimplemented.
- TGShutter
o new methods:
- AddPage, RemovePage, RenamePage
o new signal Selected.
o disable changing layout manager in SetLayoutManager method.
Layout manager is not used for layout.
- TGView
o disable changing layout manager by SetLayoutManager method.
Layout manager is not used for layout.
o ChangeBackground(Pixel_t col) method added which changes background
color only of the canvas frame.
- TGNumberEntry
o more options added to context menu.
- TGProgressBar
o new getter/setter methods:
- GetBarColor, GetNormGC, GetFontStruct, SetForegroundColor.
- TGTab
o disable SetEditDisabled method to avoid changing "edit disable
attribute".
- TGTextEdit, TGTextView, TGView
o fixed bug - "character replace" mode didn't work
o setting insert mode added to context menu.
o setting "read only" mode added to context menu.
o new method which enable/disable "popup menu for edit actions" added.
o few corrections to SavePrimitive method.
- TGTextEntry
o guibuilder specific code was removed.
- TGuiBuilder.h, TGuiBldAction
o possibility to set picture for context menu entry added.
- treeviewer/inc/TSessionViewer.h
o forward declaration of TContextMenu class added.
Revision
15134 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by
brun
Original Path:
trunk/gui/src/TGView.cxx
File length: 24299 byte(s)
Diff to
previous 13691
From Federico Carminati:
"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."
Revision
12247 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 5 12:36:07 2005 UTC (9 years, 6 months ago) by
brun
Original Path:
trunk/gui/src/TGView.cxx
File length: 22145 byte(s)
Diff to
previous 10389
From valeriy Onuchin:
- new class TImagePlugin is introduced;
To add possibility to read/write new image format one needs to create
a derived class and to override two methods:
virtual unsigned char *ReadFile(const char *filename, UInt_t &w,UInt_t &h)
virtual Bool_t WriteFile(const char *filename, unsigned char *argb,
UInt_t w, UInt_t h)
... and to specify it in the root resource file:
Plugin.TImagePlugin: ps TASPluginGS ASPluginGS "TASPluginGS(const char*)"
the name of plugin file extension DLL containing an implementation of
TImagePlugin subclass
- new class TASImagePlugin that is a subclass of TImagePlugin with ASImage
specific implementations;
- new class TASPluginGS - an image plugin class that allows to create images from
PS/EPS/PDF files and to display them in TCanvas/TPad. In addition, it allows to
browse PS/EPS/PDF files with the ROOT browser.
New files:
asimage/inc/LinkDefGS.h
asimage/inc/TASImagePlugin.h
asimage/inc/TASPluginGS.h
asimage/src/TASPluginGS.cxx
graf/inc/TImagePlugin.h
icons/pdf.xpm
icons/tb_find.xpm
libAfterImage.tar.gz
- TROOT.h
o new data member fClipboard and corresponding getter GetClipboard();
TSeqCollection *fClipboard; //List of clipboard objects;
- TGFrame
o embedded frames resized correctly now.
- TGCanvas
o several useful methods made public
- TGListBox, TGComboBox
o new method FindEntry(const char *s) added which returns entry by name
- TGMdiMainFrame, TGMdiDecorFrame
o fix bug which changed text color globally
o add displaying scroll bars when mdi frame is moved out of mdi
canvas viewport
- TGTextEdit/TGView, guitest
o added processing of:
2-clicks - selects a word
3-clicks - selects a line
4-clicks - selects the whole text
o change the key handling
Ctrl-F - invokes Search dialog
Ctrl-L - invokes Goto line dialog
Correspondent changes added to guitest.C and guitest.cxx (TextEdit test)
o readonly mode added
- TGSearchDialog
o Text entry was replaced by "text entry" combobox. It allows to
"remember" a history of entered search strings.
o new static method TGSearchDialog *&gDialog() introduced. It returns
a global search dialog.
o Search method - display warning message box when object is not found
- TRootBrowser, mime.types
o possibility to browse PS/EPS/PDF fies added
o possibility to browse text files added. The content of text file
appears in "icon box" window (a la netscape)
o "Search" tool bar button added. It activates the "search dialog" for
searching a specified icon or text when a text file is browsed.
- TGuiBldEditor.
o fix bug which changed text color globally
Revision
10389 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 22 07:31:58 2004 UTC (10 years, 3 months ago) by
rdm
Original Path:
trunk/gui/src/TGView.cxx
File length: 21852 byte(s)
Diff to
previous 6663
From Valeriy:
- TGFrame dtor, TGFrame::Cleanup I omitted a call fList->Remove(el);
That caused a lot of problems. I appologize.
- TPad::Print(".gif") - added protection against warnings when loading
libAfterImage. Typo fixed.
- added protection against double deletion in TGComboBox, TGView dtors.
- TGListBoxt::InsertEntry - correct init of TGFrameElement
Revision
6663 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 28 11:55:32 2003 UTC (11 years, 8 months ago) by
rdm
Original Path:
trunk/gui/src/TGView.cxx
File length: 21812 byte(s)
Diff to
previous 2712
major changes in the resource management of the GUI classes. Introduced the
new class TGResourcePool which loads and keeps track of the 3 main resource
pools: fonts, picture and graphics contexts. Fonts are now handled via the
new TGFont class (and TGFontPool). In the past the loading of these resources
was done in TGClient and required all GUI classes to have TGClient as friend
to have their global statics initialized by TGClient. Adding a new widget
required TGClient.cxx to be changed too. This was obviously not good.
In addition it is now possible to find the full definition of the original
resource back based on a resource handle (GContext_t or FontStruct_t yielding
a TGGC or TGFont) which is needed for the SavePrimitive() functionality.
The resource pool can be found via TGClient (e.g. gClient->GetResourcePool()).
To see all active graphics contexts, fonts and pictures do:
gClient->GetResourcePool()->GetGCPool()->Print()
gClient->GetResourcePool()->GetFontPool()->Print()
gClient->GetResourcePool()->GetPicturePool()->Print()
For more examples see the widget source code.
These changes are largely backward compatible except maybe for some low
level 3rd party widgets that use some TGFrame internals. In these cases
the following sed command will patch the code:
sed -e "s/fgBlackGC()/GetBlackGC()()/g" \
-e "s/fgWhiteGC()/GetWhiteGC()()/g" \
-e "s/fgHilightGC()/GetHilightGC()()/g" \
-e "s/fgShadowGC()/GetShadowGC()()/g" \
-e "s/fgBckgndGC()/GetBckgndGC()()/g" \
widget.cxx > widget.cxx.new
Revision
813 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Oct 22 19:28:58 2000 UTC (14 years, 3 months ago) by
rdm
Original Path:
trunk/gui/src/TGView.cxx
File length: 21888 byte(s)
Diff to
previous 714
changed inheritance tree. Move TQObject inheritance from TGWidget to
TGFrame. This allows all frames to emit signals (all widgets were frames,
but not all frames were widgets). Added several missing signals in several
different widgets to get tutorials/guitest.C working.
Revision
685 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 29 08:57:05 2000 UTC (14 years, 3 months ago) by
rdm
Original Path:
trunk/gui/src/TGView.cxx
File length: 21908 byte(s)
Diff to
previous 369
many change connected with the introduction of the TGGC (graphics context)
class (all backward compatible). Also many of the static default GC's and
fontstructs are now available to the user. This can simplify code in many
places. See change in guitest.cxx.
Revision
342 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 10 01:07:19 2000 UTC (14 years, 6 months ago) by
rdm
Original Path:
trunk/gui/src/TGView.cxx
File length: 21605 byte(s)
Diff to
previous 339
many improvements and fixes in the text edit widget. Fully implemented
cut/copy/paste between editor and any X11 window supporting text (and
vice versa). Also added a context menu giving access to the most essential
text editor actions (open, close, save, print, search, etc.). Fixed several
text navigation and selection issues.
Revision
322 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Mon Jul 3 18:55:32 2000 UTC (14 years, 6 months ago) by
rdm
Original Path:
trunk/gui/src/TGView.cxx
File length: 20718 byte(s)
infrastructure for the new TGTextEdit widget. The new TGView class is
the base class for all text viewing/editing widgets. TGTextView has been
totally rewritten to use the new TGView and TGText classes. TRootHelpDialog
uses the new TGTextView widget. TGTextEdit will derive from TGTextView.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.