72 TGFrame(p, 10, 10, options, back)
95 Int_t max_ascent, max_descent;
100 fTHeight = max_ascent + max_descent;
130 TGFrame(p, 10, 10, options, back)
159 Int_t max_ascent, max_descent;
162 fTHeight = max_ascent + max_descent;
200 const char* n4,
const char* n5,
const char* n6,
201 const char* n7,
const char* n8,
const char* n9,
202 const char* n10,
const char* n11,
const char* n12)
213 if (n12 && strlen(n12)) ncol=12;
214 else if (n11 && strlen(n11)) ncol=11;
215 else if (n10 && strlen(n10)) ncol=10;
216 else if (n9 && strlen(n9)) ncol=9;
217 else if (n8 && strlen(n8)) ncol=8;
218 else if (n7 && strlen(n7)) ncol=7;
219 else if (n6 && strlen(n6)) ncol=6;
220 else if (n5 && strlen(n5)) ncol=5;
221 else if (n4 && strlen(n4)) ncol=4;
222 else if (n3 && strlen(n3)) ncol=3;
223 else if (n2 && strlen(n2)) ncol=2;
224 else if (n1 && strlen(n1)) ncol=1;
244 fCtw =
new int[ncol];
247 for (
int i = 0; i<ncol; i++) {
296 if (!bigpic || !smallpic)
return;
328 Int_t ix, iy, lx, ly;
329 Int_t max_ascent, max_descent;
333 fTHeight = max_ascent + max_descent;
367 if ( ftmpWidth > (
fCpos[0] - lx) ) {
369 tmpString = (*fItemName)(0,j) +
"...";
372 if ( ftmpWidth <= (
fCpos[0] - lx) ) {
434 for (
int j =
fSubnames[i]->Length() - 1 ; j > 0; j--) {
435 tmpString = (*
fSubnames[i])(0,j) +
"...";
447 lx =
fCpos[i+1] - ftmpWidth - 2;
449 lx = (
fCpos[i] +
fCpos[i+1] - ftmpWidth) >> 1;
476 size.
fHeight = isize.fHeight + lsize.fHeight + 6;
482 size.
fWidth = isize.fWidth + lsize.fWidth + 4;
568 const char* n4,
const char* n5,
const char* n6,
569 const char* n7,
const char* n8,
const char* n9,
570 const char* n10,
const char* n11,
const char* n12)
575 if (n12 && strlen(n12)) ncol=12;
576 else if (n11 && strlen(n11)) ncol=11;
577 else if (n10 && strlen(n10)) ncol=10;
578 else if (n9 && strlen(n9)) ncol=9;
579 else if (n8 && strlen(n8)) ncol=8;
580 else if (n7 && strlen(n7)) ncol=7;
581 else if (n6 && strlen(n6)) ncol=6;
582 else if (n5 && strlen(n5)) ncol=5;
583 else if (n4 && strlen(n4)) ncol=4;
584 else if (n3 && strlen(n3)) ncol=3;
585 else if (n2 && strlen(n2)) ncol=2;
586 else if (n1 && strlen(n1)) ncol=1;
743 if (
f->GetUserData() == userData) {
786 newpos = pos.
fY - page;
787 if (newpos < 0) newpos = 0;
804 fXp = pos.
fX +
event->fX;
805 fYp = pos.
fY +
event->fY;
823 select_frame =
kTRUE;
827 select_frame =
kTRUE;
831 if (select_frame || last==el->
fFrame)
832 inSelection = !inSelection;
833 if (inSelection || select_frame) {
847 total = selected = 0;
859 select_frame =
kTRUE;
863 select_frame =
kTRUE;
888 if ( selected == 0 ) {
1052 if (
x > hw && (hb && !hb->
IsMapped())) {
1188 this,
"ScrollHeader(Int_t)");
1218 Int_t i, xl = - pos;
1239 if (ncolumns <= 0) {
1240 Error(
"SetHeaders",
"number of columns must be > 0");
1271 this,
"LayoutHeader(TGFrame *)");
1273 this,
"SetDefaultColumnWidth(TGVFileSplitter*)");
1300 Error(
"SetHeader",
"header index must be [0 - %d>",
fNColumns-1);
1311 if (txt.
Contains(
"modified")) txt +=
" date";
1312 if (txt.
Contains(
"attributes")) txt =
"type";
1382 if (
f->InheritsFrom(TGLVContainer::Class())) {
1387 Error(
"SetContainer",
"frame must inherit from TGLVContainer");
1407 Error(
"SetDefaultColumnWidth",
"no listview container set yet");
1434 Error(
"ResizeColumns",
"no listview container set yet");
1453 Error(
"Layout",
"no listview container set yet");
1476 for (
int j =
fColNames[i].Length() - 1 ; j > 0; j--) {
1518 container->
Move(0,
h);
1527 container->
Move(0, 0);
1540 static Int_t oldPos = 0;
1541 if (head == 0) oldPos = 0;
1546 Error(
"Layout",
"no listview container set yet");
1569 for (
int j =
fColNames[i].Length() - 1 ; j > 0; j--) {
1612 entry = (
TGLVEntry *) cnt->GetNextSelected(&p);
1616 if ((cnt->NumSelected() == 1) && (entry != 0)) {
1624 if ((cnt->NumSelected() == 1) && (entry!=0)) {
1650 Emit(
"Clicked(TGLVEntry*,Int_t)", args);
1665 Emit(
"Clicked(TGLVEntry*,Int_t,Int_t,Int_t)", args);
1678 Emit(
"DoubleClicked(TGLVEntry*,Int_t)", args);
1693 Emit(
"DoubleClicked(TGLVEntry*,Int_t,Int_t,Int_t)", args);
1725 out << std::endl <<
" // list view" << std::endl;
1726 out <<
" TGListView *";
1732 out <<
");" << std::endl;
1739 if (option && strstr(option,
"keep_names"))
1740 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
1746 <<
");" << std::endl;
1747 out <<
" " <<
GetName() <<
"->SetViewMode(";
1750 out <<
"kLVLargeIcons";
1753 out <<
"kLVSmallIcons";
1759 out <<
"kLVDetails";
1762 out <<
");" << std::endl;
1768 <<
");" << std::endl;
1773 <<
");" << std::endl;
1784 out << std::endl <<
" // list view container" << std::endl;
1785 out <<
" TGLVContainer *";
1795 out <<
");" << std::endl;
1802 if (option && strstr(option,
"keep_names"))
1803 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
ULong_t Handle_t
Generic resource handle.
const Mask_t kKeyShiftMask
const Mask_t kKeyControlMask
Handle_t FontStruct_t
Pointer to font structure.
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
include TDocParser_001 C image html pict1_TDocParser_001 png width
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
static unsigned int total
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
virtual void SetContainer(TGFrame *f)
TGFrame * GetContainer() const
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
virtual Int_t GetVsbPosition() const
Get position of vertical scrollbar.
TGHScrollBar * fHScrollbar
TGVScrollBar * fVScrollbar
virtual Int_t GetHsbPosition() const
Get position of horizontal scrollbar.
virtual void Layout()
Create layout for canvas.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle message generated by the canvas scrollbars.
const TGResourcePool * GetResourcePool() const
TGMimeTypes * GetMimeTypeList() const
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual TGLayoutManager * GetLayoutManager() const
virtual Int_t MustCleanup() const
virtual void ActivateItem(TGFrameElement *el)
Activate item.
virtual void RemoveItem(TGFrame *item)
Remove item from container.
virtual void UnSelectAll()
Unselect all items in the container.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in container.
virtual void ClearViewPort()
Clear view port and redraw full content.
const TGWindow * fMsgWindow
virtual TGFrameElement * FindFrame(Int_t x, Int_t y, Bool_t exclude=kTRUE)
Find frame located int container at position x,y.
virtual void AdjustPosition()
Move content to position of highlighted/activated frame.
virtual void Clicked(TGFrame *f, Int_t btn)
Emit Clicked() signal.
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
TGCanvas * GetCanvas() const
virtual void SetHsbPosition(Int_t newPos)
set new hor. position
virtual void Layout()
Layout container entries.
static const TGGC & GetLineGC()
Get graphics context for line drawing.
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw a region of container in viewport.
virtual void RemoveAll()
Remove all items from the container.
virtual TGPosition GetPagePosition() const
Returns page position.
virtual TGHScrollBar * GetHScrollbar() const
returns pointer to hor. scroll bar
TGFrameElement * fLastActiveEl
virtual void DeActivateItem(TGFrameElement *el)
DeActivate item.
FontStruct_t GetFontStruct() const
FontH_t GetFontHandle() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual Bool_t IsActive() const
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
static Pixel_t fgDefaultSelectedBackground
TGFrameElement * GetFrameElement() const
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.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
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 void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
virtual void MapWindow()
map window
static Pixel_t fgWhitePixel
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
static Pixel_t fgBlackPixel
virtual void UnmapWindow()
unmap window
void SetFont(FontH_t v)
Set font.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in container.
TList * GetSelectedItems()
Get list of selected items in container.
virtual void SetColumns(Int_t *cpos, Int_t *jmode)
Set column information for list items.
virtual void LineRight(Bool_t select=kFALSE)
Move current position one column right.
virtual void ActivateItem(TGFrameElement *el)
Select/activate item.
virtual void LineUp(Bool_t select=kFALSE)
Make current position first line in window by scrolling up.
virtual void SetColHeaders(const char *n1="", const char *n2="", const char *n3="", const char *n4="", const char *n5="", const char *n6="", const char *n7="", const char *n8="", const char *n9="", const char *n10="", const char *n11="", const char *n12="")
set columns headers
virtual void SelectEntry(TGLVEntry *item)
Select the TGLVEntry given as argument and de-select the previous one if the container is not in mult...
TGLayoutHints * fItemLayout
virtual Int_t GetMaxSubnameWidth(Int_t idx) const
Get width of largest subname in container.
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode for container.
virtual void LineDown(Bool_t select=kFALSE)
Move one line down.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a list view container as a C++ statement(s) on output stream out.
virtual void RemoveItemWithData(void *userData)
Remove item with fUserData == userData from container.
virtual ~TGLVContainer()
Delete list view container.
TGLVContainer(const TGLVContainer &)=delete
TList * GetSelectedEntries()
Get list of selected items in container.
virtual void DeActivateItem(TGFrameElement *el)
Unselect/deactivate item.
EListViewMode GetViewMode() const
virtual void LineLeft(Bool_t select=kFALSE)
Move current position one column left.
virtual TGDimension GetPageDimension() const
Returns page dimension.
virtual TGDimension GetMaxItemSize() const
Get size of largest item in container.
const TGPicture * fCurrent
virtual void DoRedraw()
Redraw list view item.
virtual void SetPictures(const TGPicture *bigpic=0, const TGPicture *smallpic=0)
change pictures
const TGPicture * fBigPic
virtual TGDimension GetDefaultSize() const
Get default size of list item.
virtual void SetViewMode(EListViewMode viewMode)
Set the view mode for this list item.
virtual void Activate(Bool_t a)
Make list view item active.
virtual ~TGLVEntry()
Delete a list view item.
TGLVEntry(const TGLVEntry &)=delete
TGSelectedPicture * fSelPic
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y)
Draw list view item in other window.
const TGPicture * fSmallPic
virtual Int_t GetSubnameWidth(Int_t idx) const
virtual void SetSubnames(const char *n1="", const char *n2="", const char *n3="", const char *n4="", const char *n5="", const char *n6="", const char *n7="", const char *n8="", const char *n9="", const char *n10="", const char *n11="", const char *n12="")
Sets new subnames.
static const TGGC & GetDefaultGC()
Return the default graphics context in use.
static FontStruct_t GetDefaultFontStruct()
Return the default font structure in use.
const TGPicture * fCheckMark
static TGGC * fgDefaultGC
static const TGFont * fgDefaultFont
virtual void SetDefaultWidth(UInt_t)
static FontStruct_t GetDefaultFontStruct()
Return the default font structure in use.
virtual void DoubleClicked(TGLVEntry *entry, Int_t btn)
Emit DoubleClicked() signal.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle messages generated by the list view components.
virtual void ResizeColumns()
Resize column headers to show whole item names.
virtual void Layout()
Layout list view components (container and contents of container).
virtual void ScrollHeader(Int_t pos)
Scroll header buttons with horizontal scrollbar.
TGListView(const TGListView &)=delete
virtual void SetHeader(const char *s, Int_t hmode, Int_t cmode, Int_t idx)
Set header button idx [0-fNColumns>, hmode is the x text alignmode (ETextJustification) for the heade...
virtual void SetIncrements(Int_t hInc, Int_t vInc)
Set horizontal and vertical scrollbar increments.
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
static const TGGC & GetDefaultGC()
Return the default graphics context in use.
virtual void SetHeaders(Int_t ncolumns)
Set number of headers, i.e.
virtual void SelectionChanged()
TGTextButton ** fColHeader
virtual void SetDefaultHeaders()
Default headers are: Name, Attributes, Size, Owner, Group, Modified.
virtual void Clicked(TGLVEntry *entry, Int_t btn)
Emit Clicked() signal.
virtual void LayoutHeader(TGFrame *head)
Layout list view components (container and contents of container).
virtual ~TGListView()
Delete a list view widget.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a list view widget as a C++ statement(s) on output stream out.
virtual void SetDefaultColumnWidth(TGVFileSplitter *splitter)
Set default column width of the columns headers.
static const TGFont * fgDefaultFont
virtual void SetContainer(TGFrame *f)
Set list view container.
TGVFileSplitter ** fSplitHeader
virtual const char * GetHeader(Int_t idx) const
Returns name of header idx.
TGDimension GetMaxItemSize() const
static TGGC * fgDefaultGC
const TGPicture * GetIcon(const char *filename, Bool_t small_icon)
Return icon belonging to mime type of filename.
void Draw(Option_t *="")
Default Draw method for all objects.
Pixel_t GetSelectedFgndColor() const
const char * GetString() const
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
virtual void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetText(TGHotString *new_label)
Set new button text.
TString GetString() const
virtual void SetFrame(TGFrame *frame, Bool_t left)
Set frame to be resized.
TGFrame * GetContainer() const
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void DestroyWindow()
destroy window
const TGWindow * GetParent() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
virtual void RaiseWindow()
raise window
virtual void Add(TObject *obj)
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Collectable string class.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
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.
void ToLower()
Change string to lower-case.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
Short_t Max(Short_t a, Short_t b)
Short_t Min(Short_t a, Short_t b)
EGEventType fType
of event (see EGEventType)
UInt_t fState
key or button mask
Int_t fYRoot
coordinates relative to root
Long_t fUser[5]
5 longs can be used by client message events NOTE: only [0], [1] and [2] may be used.
UInt_t fCode
key or button code