Open CASCADE Technology 6.6.0
Public Member Functions | Protected Attributes
Cocoa_Window Class Reference

This class defines Cocoa window.

#include <Cocoa_Window.hxx>

Inheritance diagram for Cocoa_Window:
Inheritance graph
[legend]

Public Member Functions

 Cocoa_Window (const Standard_CString theTitle, const Standard_Integer thePxLeft, const Standard_Integer thePxTop, const Standard_Integer thePxWidth, const Standard_Integer thePxHeight)
 Creates a NSWindow and NSView defined by his position and size in pixels.
 Cocoa_Window (NSView *theViewNS)
 Creates a wrapper over existing NSView handle.
virtual void Destroy ()
 Destroies the Window and all resourses attached to it.
 ~Cocoa_Window ()
virtual void Map () const
 Opens the window <me>
virtual void Unmap () const
 Closes the window <me>
virtual Aspect_TypeOfResize DoResize () const
 Applies the resizing to the window <me>
virtual Standard_Boolean DoMapping () const
 Apply the mapping change to the window <me>
virtual Standard_Boolean IsMapped () const
 Returns True if the window <me> is opened.
virtual Quantity_Ratio Ratio () const
 Returns The Window RATIO equal to the physical WIDTH/HEIGHT dimensions.
virtual void Position (Standard_Integer &X1, Standard_Integer &Y1, Standard_Integer &X2, Standard_Integer &Y2) const
 Returns The Window POSITION in PIXEL.
virtual void Size (Standard_Integer &theWidth, Standard_Integer &theHeight) const
 Returns The Window SIZE in PIXEL.
NSView * HView () const
void SetHView (NSView *theView)
 Setup new NSView.

Protected Attributes

NSWindow * myHWindow
NSView * myHView
Standard_Integer myXLeft
Standard_Integer myYTop
Standard_Integer myXRight
Standard_Integer myYBottom

Constructor & Destructor Documentation

Cocoa_Window::Cocoa_Window ( const Standard_CString  theTitle,
const Standard_Integer  thePxLeft,
const Standard_Integer  thePxTop,
const Standard_Integer  thePxWidth,
const Standard_Integer  thePxHeight 
)
Cocoa_Window::Cocoa_Window ( NSView *  theViewNS)
Cocoa_Window::~Cocoa_Window ( ) [inline]

Member Function Documentation

virtual void Cocoa_Window::Destroy ( ) [virtual]

Implements Aspect_Window.

virtual Standard_Boolean Cocoa_Window::DoMapping ( ) const [virtual]

Implements Aspect_Window.

virtual Aspect_TypeOfResize Cocoa_Window::DoResize ( ) const [virtual]

Implements Aspect_Window.

NSView* Cocoa_Window::HView ( ) const
Returns:
associated NSView
virtual Standard_Boolean Cocoa_Window::IsMapped ( ) const [virtual]

Implements Aspect_Window.

virtual void Cocoa_Window::Map ( ) const [virtual]

Implements Aspect_Window.

virtual void Cocoa_Window::Position ( Standard_Integer X1,
Standard_Integer Y1,
Standard_Integer X2,
Standard_Integer Y2 
) const [virtual]

Implements Aspect_Window.

virtual Quantity_Ratio Cocoa_Window::Ratio ( ) const [virtual]

Implements Aspect_Window.

void Cocoa_Window::SetHView ( NSView *  theView)
virtual void Cocoa_Window::Size ( Standard_Integer theWidth,
Standard_Integer theHeight 
) const [virtual]

Implements Aspect_Window.

virtual void Cocoa_Window::Unmap ( ) const [virtual]

Implements Aspect_Window.


Field Documentation

NSView* Cocoa_Window::myHView [protected]
NSWindow* Cocoa_Window::myHWindow [protected]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines