1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _Xw_IconBox_HeaderFile
#define _Xw_IconBox_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Xw_IconBox_HeaderFile
#include <Handle_Xw_IconBox.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Xw_Window_HeaderFile
#include <Xw_Window.hxx>
#endif
#ifndef _Handle_Xw_GraphicDevice_HeaderFile
#include <Handle_Xw_GraphicDevice.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Quantity_NameOfColor_HeaderFile
#include <Quantity_NameOfColor.hxx>
#endif
#ifndef _Xw_WindowQuality_HeaderFile
#include <Xw_WindowQuality.hxx>
#endif
#ifndef _Handle_Xw_Window_HeaderFile
#include <Handle_Xw_Window.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Aspect_Handle_HeaderFile
#include <Aspect_Handle.hxx>
#endif
class Aspect_WindowDefinitionError;
class Aspect_WindowError;
class Xw_GraphicDevice;
class Xw_Window;
//! This class defines a X11 IconBox <br>
//! Warning: The IconBox is not visible at the creation time . <br>
//! To show the Icon Box use the method Show () . <br>
//! In this case the Icon Box appears at the DSU position <br>
//! specified given in [0,1] space . <br>
//! The size of the Icon Box grows depending of the number <br>
//! of the Icons loaded inside . <br>
class Xw_IconBox : public Xw_Window {
public:
//! Creates a IconBox n Preferred PseudoColor Visual <br>
//! defined by his Center in DSU and connects it to the <br>
//! X server at the first call depending of the GraphicDevice <br>
//! connexion . <br>
//! ALL Icons are loaded from the Icon File Directory Name : <br>
//! "[$SYMBOL]xxxxxxx[.ifd]" <br>
//! Warning: Raises if the Position is out of the Screen Space <br>
//! or the Icon File Directory Name don't exist <br>
Standard_EXPORT 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);
//! Loads Icon Box from an Other Icon File Directory Name <br>
//! and returns the loaded icons number. <br>
//! Warning: The Icons previously loaded are NOT cleared . <br>
Standard_EXPORT Standard_Integer LoadIcons(const Standard_CString Name) ;
//! Shows Icon Box to the screen <br>
//! Warning: The Icon Box is displayed at the centered position <br>
//! specified at the creation time and the size depend <br>
//! of the Icon number really loaded inside . <br>
Standard_EXPORT void Show() const;
//! Unloads All previously loaded Icons in the IconBox <br>
//! and returns the unloaded icons number. <br>
Standard_EXPORT Standard_Integer UnloadIcons(const Standard_CString Name) ;
//! Destroies the IconBox <br>
Standard_EXPORT virtual void Destroy() ;
~Xw_IconBox()
{
Destroy();
}
//! Adds an Icon of Size aWidth,aHeight given in PIXEL <br>
//! to the Icon Box from a FULL Existing Window <br>
//! NOTE that if aWidth or aHeight is 0 the default icon size is taken. <br>
Standard_EXPORT void AddIcon(const Handle(Xw_Window)& W,const Standard_CString Name,const Standard_Integer aWidth = 0,const Standard_Integer aHeight = 0) ;
//! Saves all new created Icons as iconname.xwd file in the user <br>
//! directory and returns the saved icons number. <br>
Standard_EXPORT Standard_Integer SaveIcons() const;
//! Returns the Number of Icons loaded in the Icon Box . <br>
Standard_EXPORT Standard_Integer IconNumber() const;
//! Returns the Name of the N ime Icon <br>
//! Warning: Raises if Index if out of range depending of the <br>
//! Number of Loaded Icons . <br>
Standard_EXPORT Standard_CString IconName(const Standard_Integer Index) const;
//! Returns the Pixmap Size attached to the Icon Name <br>
//! Warning: May return FALSE if Icon doesn't exist in the IconBox . <br>
Standard_EXPORT Standard_Boolean IconSize(const Standard_CString Name,Standard_Integer& Width,Standard_Integer& Height) const;
//! Returns the Pixmap attached to the Icon Name <br>
//! Warning: May return 0 if Icon doesn't exist in the IconBox . <br>
Standard_EXPORT Aspect_Handle IconPixmap(const Standard_CString Name) const;
//! Returns the Centered part of the Pixmap of required Size <br>
//! attached to the Icon Name <br>
//! Warning: May return 0 if Icon doesn't exist in the IconBox . <br>
Standard_EXPORT Aspect_Handle IconPixmap(const Standard_CString Name,const Standard_Integer Width,const Standard_Integer Height) const;
DEFINE_STANDARD_RTTI(Xw_IconBox)
protected:
private:
Standard_Integer MyNumberOfIcons;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|