Warning, file /include/root/TGFSComboBox.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGFSComboBox
0013 #define ROOT_TGFSComboBox
0014
0015
0016 #include "TGComboBox.h"
0017
0018 #include <vector>
0019 #include <string>
0020
0021 class TGPicture;
0022 class TGSelectedPicture;
0023
0024
0025 class TGTreeLBEntry : public TGLBEntry {
0026
0027 protected:
0028 TGString *fText;
0029 TGString *fPath;
0030 const TGPicture *fPic;
0031 TGSelectedPicture *fSelPic;
0032 UInt_t fTWidth;
0033 UInt_t fTHeight;
0034 Bool_t fActive;
0035 GContext_t fNormGC;
0036 FontStruct_t fFontStruct;
0037
0038 void DoRedraw() override;
0039
0040 static const TGFont *fgDefaultFont;
0041 static TGGC *fgDefaultGC;
0042
0043 public:
0044 static FontStruct_t GetDefaultFontStruct();
0045 static const TGGC &GetDefaultGC();
0046
0047 TGTreeLBEntry(const TGWindow *p = nullptr, TGString *text = nullptr, const TGPicture *pic = nullptr,
0048 Int_t id = -1, TGString *path = nullptr, GContext_t norm = GetDefaultGC()(),
0049 FontStruct_t font = GetDefaultFontStruct(),
0050 UInt_t options = kHorizontalFrame, Pixel_t back = GetWhitePixel());
0051 ~TGTreeLBEntry() override;
0052
0053 const TGString *GetText() const { return fText; }
0054 const TGPicture *GetPicture() const { return fPic; }
0055 const TGString *GetPath() const { return fPath; }
0056
0057 TGDimension GetDefaultSize() const override;
0058
0059 void Activate(Bool_t a) override;
0060 void Update(TGLBEntry *e) override;
0061 void DrawCopy(Handle_t id, Int_t x, Int_t y) override;
0062
0063 ClassDefOverride(TGTreeLBEntry,0)
0064 };
0065
0066
0067 class TGFSComboBox : public TGComboBox {
0068 struct Lbc_t {
0069 std::string fName;
0070 std::string fPath;
0071 std::string fPixmap;
0072 Int_t fId{0};
0073 Int_t fIndent{0};
0074 Int_t fFlags{0};
0075 Lbc_t(const char *name, const char *path, const char *pixmap, Int_t indent) :
0076 fName(name), fPath(path), fPixmap(pixmap), fIndent(indent) { }
0077 };
0078
0079 std::vector<Lbc_t> fLbc;
0080
0081 public:
0082 TGFSComboBox(const TGWindow *p = nullptr, Int_t id = -1,
0083 UInt_t options = kHorizontalFrame | kSunkenFrame |
0084 kDoubleBorder, Pixel_t back = GetWhitePixel());
0085
0086 virtual void Update(const char *path);
0087 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0088
0089 ClassDefOverride(TGFSComboBox,0)
0090 };
0091
0092 #endif