Open CASCADE Technology
6.5.4
|
This class defines a X11 IconBox
Warning: The IconBox is not visible at the creation time .
To show the Icon Box use the method Show () .
In this case the Icon Box appears at the DSU position
specified given in [0,1] space .
The size of the Icon Box grows depending of the number
of the Icons loaded inside .
#include <Xw_IconBox.hxx>
Public Member Functions | |
Xw_IconBox (const Handle< Xw_GraphicDevice > &Device, const Standard_CString Name, const Standard_Real Xc=0.5, const Standard_Real Yc=0.5, const Quantity_NameOfColor BackColor=Quantity_NOC_MATRAGRAY, const Xw_WindowQuality aQuality=Xw_WQ_SAMEQUALITY) | |
Creates a IconBox n Preferred PseudoColor Visual defined by his Center in DSU and connects it to the X server at the first call depending of the GraphicDevice connexion . ALL Icons are loaded from the Icon File Directory Name : "[$SYMBOL]xxxxxxx[.ifd]" Warning: Raises if the Position is out of the Screen Space or the Icon File Directory Name don't exist | |
Standard_Integer | LoadIcons (const Standard_CString Name) |
Loads Icon Box from an Other Icon File Directory Name and returns the loaded icons number. Warning: The Icons previously loaded are NOT cleared . | |
void | Show () const |
Shows Icon Box to the screen Warning: The Icon Box is displayed at the centered position specified at the creation time and the size depend of the Icon number really loaded inside . | |
Standard_Integer | UnloadIcons (const Standard_CString Name) |
Unloads All previously loaded Icons in the IconBox and returns the unloaded icons number. | |
virtual void | Destroy () |
Destroies the IconBox | |
~Xw_IconBox () | |
void | AddIcon (const Handle< Xw_Window > &W, const Standard_CString Name, const Standard_Integer aWidth=0, const Standard_Integer aHeight=0) |
Adds an Icon of Size aWidth,aHeight given in PIXEL to the Icon Box from a FULL Existing Window NOTE that if aWidth or aHeight is 0 the default icon size is taken. | |
Standard_Integer | SaveIcons () const |
Saves all new created Icons as iconname.xwd file in the user directory and returns the saved icons number. | |
Standard_Integer | IconNumber () const |
Returns the Number of Icons loaded in the Icon Box . | |
Standard_CString | IconName (const Standard_Integer Index) const |
Returns the Name of the N ime Icon Warning: Raises if Index if out of range depending of the Number of Loaded Icons . | |
Standard_Boolean | IconSize (const Standard_CString Name, Standard_Integer &Width, Standard_Integer &Height) const |
Returns the Pixmap Size attached to the Icon Name Warning: May return FALSE if Icon doesn't exist in the IconBox . | |
Aspect_Handle | IconPixmap (const Standard_CString Name) const |
Returns the Pixmap attached to the Icon Name Warning: May return 0 if Icon doesn't exist in the IconBox . | |
Aspect_Handle | IconPixmap (const Standard_CString Name, const Standard_Integer Width, const Standard_Integer Height) const |
Returns the Centered part of the Pixmap of required Size attached to the Icon Name Warning: May return 0 if Icon doesn't exist in the IconBox . |
Xw_IconBox::Xw_IconBox | ( | const Handle< Xw_GraphicDevice > & | Device, |
const Standard_CString | Name, | ||
const Standard_Real | Xc = 0.5 , |
||
const Standard_Real | Yc = 0.5 , |
||
const Quantity_NameOfColor | BackColor = Quantity_NOC_MATRAGRAY , |
||
const Xw_WindowQuality | aQuality = Xw_WQ_SAMEQUALITY |
||
) |
Xw_IconBox::~Xw_IconBox | ( | ) | [inline] |
void Xw_IconBox::AddIcon | ( | const Handle< Xw_Window > & | W, |
const Standard_CString | Name, | ||
const Standard_Integer | aWidth = 0 , |
||
const Standard_Integer | aHeight = 0 |
||
) |
virtual void Xw_IconBox::Destroy | ( | ) | [virtual] |
Reimplemented from Xw_Window.
Standard_CString Xw_IconBox::IconName | ( | const Standard_Integer | Index | ) | const |
Standard_Integer Xw_IconBox::IconNumber | ( | ) | const |
Aspect_Handle Xw_IconBox::IconPixmap | ( | const Standard_CString | Name | ) | const |
Aspect_Handle Xw_IconBox::IconPixmap | ( | const Standard_CString | Name, |
const Standard_Integer | Width, | ||
const Standard_Integer | Height | ||
) | const |
Standard_Boolean Xw_IconBox::IconSize | ( | const Standard_CString | Name, |
Standard_Integer & | Width, | ||
Standard_Integer & | Height | ||
) | const |
Standard_Integer Xw_IconBox::SaveIcons | ( | ) | const |
void Xw_IconBox::Show | ( | ) | const |