|
Open CASCADE Technology
7.7.0
|
#include <Draw_Window.hxx>

Public Types | |
| typedef void(* | FCallbackBeforeTerminate) () |
| Type of the callback function that is to be passed to the method AddCallbackBeforeTerminate(). More... | |
Public Member Functions | |
| virtual | ~Draw_Window () |
| Destructor. More... | |
| void | GetPosition (Standard_Integer &thePosX, Standard_Integer &thePosY) |
| Get window position. More... | |
| void | SetPosition (Standard_Integer theNewXpos, Standard_Integer theNewYpos) |
| Set window position. More... | |
| Standard_Integer | HeightWin () const |
| Return window height. More... | |
| Standard_Integer | WidthWin () const |
| Return window width. More... | |
| void | SetDimension (Standard_Integer theNewDx, Standard_Integer theNewDy) |
| Set window dimensions. More... | |
| TCollection_AsciiString | GetTitle () const |
| Return window title. More... | |
| void | SetTitle (const TCollection_AsciiString &theTitle) |
| Set window title. More... | |
| bool | IsMapped () const |
| Return true if window is displayed on the screen. More... | |
| void | DisplayWindow () |
| Display window on the screen. More... | |
| void | Hide () |
| Hide window. More... | |
| void | Destroy () |
| Destroy window. More... | |
| void | Clear () |
| Clear window content. More... | |
| Standard_Boolean | GetUseBuffer () const |
| Returns Standard_True if off-screen image buffer is being used. More... | |
| void | SetUseBuffer (Standard_Boolean theToUse) |
| void | SetColor (Standard_Integer theColor) |
| Set active color index for further paintings. More... | |
| void | SetMode (Standard_Integer theMode) |
| Set active paint mode (3 for COPY; 6 for XOR). More... | |
| void | DrawString (Standard_Integer theX, Standard_Integer theY, const char *theText) |
| Draw the string. More... | |
| void | DrawSegments (const Draw_XSegment *theSegments, Standard_Integer theNumberOfElements) |
| Draw array of segments. More... | |
| void | Redraw () |
| Redraw window content. More... | |
| Standard_Boolean | Save (const char *theFileName) const |
| Save snapshot. More... | |
| virtual void | WExpose ()=0 |
| Perform window exposing. More... | |
| void | InitBuffer () |
| (Re)initializes off-screen image buffer according to current window size. More... | |
Static Public Member Functions | |
| static void | AddCallbackBeforeTerminate (FCallbackBeforeTerminate theCB) |
| This method registers a callback function that will be called just before exit. This is useful especially for Windows platform, on which Draw is normally self-terminated instead of exiting. More... | |
| static void | RemoveCallbackBeforeTerminate (FCallbackBeforeTerminate theCB) |
| Just in case method for un-registering a callback previously registered by AddCallbackBeforeTerminate(). More... | |
| static Standard_Boolean | DefineColor (const Standard_Integer theIndex, const char *theColorName) |
| static void | Flush () |
| XFlush() wrapper (X11), has no effect on other platforms. More... | |
Protected Member Functions | |
| Draw_Window (const char *theTitle, const NCollection_Vec2< int > &theXY, const NCollection_Vec2< int > &theSize, Aspect_Drawable theParent, Aspect_Drawable theWin) | |
| Main constructor. More... | |
| void | init (const NCollection_Vec2< int > &theXY, const NCollection_Vec2< int > &theSize) |
| Initialize the window. More... | |
Draw window.
| typedef void(* Draw_Window::FCallbackBeforeTerminate) () |
Type of the callback function that is to be passed to the method AddCallbackBeforeTerminate().
|
virtual |
Destructor.
|
protected |
Main constructor.
| theTitle | [in] window title |
| theXY | [in] top-left position |
| theSize | [in] window dimensions |
| theParent | [in] optional native parent window |
| theWin | [in] optional native window |
|
static |
This method registers a callback function that will be called just before exit. This is useful especially for Windows platform, on which Draw is normally self-terminated instead of exiting.
| void Draw_Window::Clear | ( | ) |
Clear window content.
|
static |
| void Draw_Window::Destroy | ( | ) |
Destroy window.
| void Draw_Window::DisplayWindow | ( | ) |
Display window on the screen.
| void Draw_Window::DrawSegments | ( | const Draw_XSegment * | theSegments, |
| Standard_Integer | theNumberOfElements | ||
| ) |
Draw array of segments.
| void Draw_Window::DrawString | ( | Standard_Integer | theX, |
| Standard_Integer | theY, | ||
| const char * | theText | ||
| ) |
Draw the string.
|
static |
XFlush() wrapper (X11), has no effect on other platforms.
| void Draw_Window::GetPosition | ( | Standard_Integer & | thePosX, |
| Standard_Integer & | thePosY | ||
| ) |
Get window position.
| TCollection_AsciiString Draw_Window::GetTitle | ( | ) | const |
Return window title.
|
inline |
Returns Standard_True if off-screen image buffer is being used.
| Standard_Integer Draw_Window::HeightWin | ( | ) | const |
Return window height.
| void Draw_Window::Hide | ( | ) |
Hide window.
|
protected |
Initialize the window.
| void Draw_Window::InitBuffer | ( | ) |
(Re)initializes off-screen image buffer according to current window size.
| bool Draw_Window::IsMapped | ( | ) | const |
Return true if window is displayed on the screen.
| void Draw_Window::Redraw | ( | ) |
Redraw window content.
|
static |
Just in case method for un-registering a callback previously registered by AddCallbackBeforeTerminate().
| Standard_Boolean Draw_Window::Save | ( | const char * | theFileName | ) | const |
Save snapshot.
| void Draw_Window::SetColor | ( | Standard_Integer | theColor | ) |
Set active color index for further paintings.
| void Draw_Window::SetDimension | ( | Standard_Integer | theNewDx, |
| Standard_Integer | theNewDy | ||
| ) |
Set window dimensions.
| void Draw_Window::SetMode | ( | Standard_Integer | theMode | ) |
Set active paint mode (3 for COPY; 6 for XOR).
| void Draw_Window::SetPosition | ( | Standard_Integer | theNewXpos, |
| Standard_Integer | theNewYpos | ||
| ) |
Set window position.
| void Draw_Window::SetTitle | ( | const TCollection_AsciiString & | theTitle | ) |
Set window title.
| void Draw_Window::SetUseBuffer | ( | Standard_Boolean | theToUse | ) |
|
pure virtual |
Perform window exposing.
Implemented in Draw_View.
| Standard_Integer Draw_Window::WidthWin | ( | ) | const |
Return window width.
1.8.13