52 image =
"bld_rgb.xpm";
54 char *path =
StrDup(image);
210 Error(
"SavePrimitive()",
"icon pixmap not found ");
220 <<
",gClient->GetPicture(" << quote
225 out <<
");" << std::endl;
238 << quote <<
name.Data() << quote <<
");" << std::endl;
240 if (option && strstr(option,
"keep_names"))
241 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
Bool_t IsEditable() const
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
TGPicturePool * GetPicturePool() const
void FreePicture(const TGPicture *pic)
Free picture resource.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
UInt_t fHeight
frame height
virtual void DrawBorder()
Draw frame border.
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.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
static const TGGC & GetBckgndGC()
Get background color graphics context.
This class handles GUI icons.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move icon to (x,y) and resize it to (w,h).
virtual void DoRedraw()
Redraw picture.
virtual ~TGIcon()
Delete icon and free picture.
virtual void SetPicture(const TGPicture *pic)
Set icon picture.
virtual void SetImage(const char *img)
Set icon image.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an icon widget as a C++ statement(s) on output stream out.
const TGPicture * fPic
icon picture
virtual TGDimension GetDefaultSize() const
Return size of icon.
TString fPath
directory of image
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize.
TGIcon(const TGIcon &)=delete
virtual void Reset()
Reset icon to original image. It can be used only via context menu.
virtual void SetImagePath(const char *path)
Set directory where image is located.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
const char * GetName() const
Returns name of object.
void Draw(Option_t *="")
Default Draw method for all objects.
ROOT GUI Window base class.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const TGWindow * fParent
Parent window.
An abstract interface to image processing library.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
virtual UInt_t GetWidth() const
virtual void Scale(UInt_t, UInt_t)
virtual Pixmap_t GetPixmap()
virtual Pixmap_t GetMask()
virtual UInt_t GetHeight() const
virtual const char * GetName() const
Returns name of object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.