52 image =
"bld_rgb.xpm";
54 char *path =
StrDup(image);
157 fImage->Scale(
w - 2*border,
h - 2*border);
210 Error(
"SavePrimitive()",
"icon pixmap not found ");
215 gSystem->ExpandPathName(picname);
220 <<
",gClient->GetPicture(" << quote
225 out <<
");" << std::endl;
238 << quote <<
name.Data() << quote <<
");" << std::endl;
241 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
TGFrame(const TGFrame &)=delete
UInt_t fHeight
frame height
virtual void DrawBorder()
Draw frame border.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
void Move(Int_t x, Int_t y) override
Move frame.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
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.
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move icon to (x,y) and resize it to (w,h).
~TGIcon() override
Delete icon and free picture.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save an icon widget as a C++ statement(s) on output stream out.
virtual void SetPicture(const TGPicture *pic)
Set icon picture.
virtual void SetImage(const char *img)
Set icon image.
const TGPicture * fPic
icon picture
void DoRedraw() override
Redraw picture.
TString fPath
directory of image
void Resize(UInt_t w=0, UInt_t h=0) override
Resize.
TGIcon(const TGIcon &)=delete
TGDimension GetDefaultSize() const override
Return size of icon.
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.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
const TGWindow * fParent
Parent window.
virtual void SetWindowName(const char *name=nullptr)
Set window name.
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
An abstract interface to image processing library.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.