36 gVirtualX->ChangeWindowAttributes(fId, &attr);
42 picName =
"Default.png";
44 if (!fImage || !fImage->IsValid())
45 Error(
"TGShapedFrame",
"%s not found", picName.
Data());
46 fBgnd = fClient->GetPicturePool()->GetPicture(picName.
Data(),
47 fImage->GetPixmap(), fImage->GetMask());
49 gVirtualX->ShapeCombineMask(fId, 0, 0, fBgnd->GetMask());
51 SetBackgroundPixmap(fBgnd->GetPicture());
55 Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
74 out << std::endl <<
" // shaped frame" << std::endl;
75 out <<
" TGShapedFrame *";
82 out <<
");" << std::endl;
89 if (option && strstr(option,
"keep_names"))
90 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
103 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
105 out <<
");"<< std::endl;
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
ClassImp(TGShapedFrame) TGShapedFrame
Shaped window default constructor.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
const char * Data() const
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
void FreePicture(const TGPicture *pic)
Free picture resource.
void Error(const char *location, const char *msgfmt,...)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a shaped frame as a C++ statement(s) on output stream out.
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxilary protected method used to save subframes.
const Mask_t kWASaveUnder
virtual ~TGShapedFrame()
Destructor.
virtual const char * GetName() const
Returns name of object.
const Mask_t kWAOverrideRedirect
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
virtual TGLayoutManager * GetLayoutManager() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".