Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::OSXWindow Class Reference

#include <OSXWindow.h>

Inheritance diagram for VCF::OSXWindow:

VCF::Object VCF::ControlPeer VCF::WindowPeer VCF::Interface VCF::Interface VCF::OSXDialog List of all members.

Public Types

enum  WindowState { wsNone = 0, wsMaximized, wsMinimized, wsNormal }

Public Member Functions

 OSXWindow ()
 OSXWindow (Control *control, Control *owner)
virtual ~OSXWindow ()
virtual OSHandleID getHandleID ()
 returns a ID that identifies this control.
virtual void create (Control *owningControl)
 This is called to actually create any neccessary windowing system resources specific to a new control (or widget/window/etc) instance for the platform.
virtual void destroyControl ()
 Destroy the control peer's resoruces (if neccessary).
virtual String getText ()
 returns a text associated with the component.
virtual void setText (const String &text)
 sets the text for the control
virtual void setBounds (Rect *rect)
 sets the bounds for the component.
virtual bool beginSetBounds (const uint32 &numberOfChildren)
 advanced function for changing the size of multiple child windows.
virtual void endSetBounds ()
virtual Rect getBounds ()
 returns the bounds of the component in the coordinate system of the parent.
virtual void setVisible (const bool &visible)
 shows or hides the component.
virtual bool getVisible ()
 returns wether or not the component is currently visible.
virtual ControlgetControl ()
 returns the component that this Peer is attached to.
virtual void setControl (Control *component)
 attahces the Peer to a particular component.
virtual void setCursor (Cursor *cursor)
virtual void setParent (Control *parent)
virtual ControlgetParent ()
virtual bool isFocused ()
virtual void setFocused ()
virtual bool isEnabled ()
virtual void setEnabled (const bool &enabled)
virtual void setFont (Font *font)
virtual void repaint (Rect *repaintRect, const bool &immediately)
virtual void keepMouseEvents ()
 this keeps the mouse events being sent to this control, even is the mouse leaves the physical bounds of the control
virtual void releaseMouseEvents ()
 releases mouse events - goes back to normal event handling
virtual void translateToScreenCoords (Point *pt)
 Takes the coordinates in pt, which are in the coordinate system of this control, and translates them into the coordinate system of the Screen.
virtual void translateFromScreenCoords (Point *pt)
 Takes the coordinates in pt, which are in the coordinate system of the Screen, and translates them into the coordinate system of this control.
virtual void setBorder (Border *border)
 Called by the control when it's border object changes.
virtual void preChildPaint (GraphicsContext *graphicsContext, Control *child, Rect *childClipRect)
 Called by the container instance of the child's parent control during it's paintChildren() function.
virtual void postChildPaint (GraphicsContext *graphicsContext, Control *child, Rect *oldClipRect)
 Called by the container instance of the child's parent control during it's paintChildren() function.
Rect internal_getBounds ()
void internal_setBounds (const Rect &bounds)
virtual Rect getClientBounds ()
virtual void setClientBounds (Rect *bounds)
virtual void close ()
virtual void setFrameStyle (const FrameStyleType &frameStyle)
virtual void setFrameTopmost (const bool &isTopmost)
virtual bool isMaximized ()
virtual void setMaximized (const bool maximised)
virtual bool isMinimized ()
virtual void setMinimized (const bool &minimized)
virtual void restore ()
virtual void setIconImage (Image *icon)
virtual bool isActiveWindow ()
virtual void setBorderPath (Path *path)
virtual OSStatus handleOSXEvent (EventHandlerCallRef nextHandler, EventRef theEvent)
bool isComposited ()
ControlRef getRootControl ()
uint32 getCurrentMouseBtn ()
virtual WindowAttributes getCreationWinAttrs ()
virtual WindowClass getCreationWinClass ()

Static Public Member Functions

static OSXWindowgetWindowFromWindowRef (WindowRef window)

Protected Member Functions

RgnHandle determineUnobscuredClientRgn ()
ControlgetControlForMouseEvent (EventRef event)
OSStatus handleContentViewDraw (EventHandlerCallRef nextHandler, EventRef theEvent)
void copyControlsFromWndRef (WindowRef oldWndRef)

Static Protected Member Functions

static EventHandlerUPP getEventHandlerUPP ()
static OSStatus handleOSXEvents (EventHandlerCallRef nextHandler, EventRef theEvent, void *userData)
static OSStatus wndContentViewHandler (EventHandlerCallRef nextHandler, EventRef theEvent, void *userData)

Protected Attributes

WindowRef windowRef_
Controlcontrol_
Rect bounds_
EventHandlerRef handlerRef_
EventHandlerRef contentViewHandlerRef_
MouseTrackingRef mouseTrackRef_
uint32 currentMouseBtn_
bool internalClose_

Member Enumeration Documentation

enum VCF::OSXWindow::WindowState
 

Enumerator:
wsNone 
wsMaximized 
wsMinimized 
wsNormal 


Constructor & Destructor Documentation

VCF::OSXWindow::OSXWindow  ) 
 

VCF::OSXWindow::OSXWindow Control control,
Control owner
 

virtual VCF::OSXWindow::~OSXWindow  )  [virtual]
 


Member Function Documentation

virtual bool VCF::OSXWindow::beginSetBounds const uint32 numberOfChildren  )  [virtual]
 

advanced function for changing the size of multiple child windows.

This may have no implementation on some windowing systems

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::close  )  [virtual]
 

Implements VCF::WindowPeer.

Reimplemented in VCF::OSXDialog.

void VCF::OSXWindow::copyControlsFromWndRef WindowRef  oldWndRef  )  [protected]
 

virtual void VCF::OSXWindow::create Control owningControl  )  [virtual]
 

This is called to actually create any neccessary windowing system resources specific to a new control (or widget/window/etc) instance for the platform.

create() must be called by the containing VCF::Control subclass, typically in the classes constructor, after retreiving the new peer instance from the appropriate UIToolkit::createXXX() call.

Implements VCF::ControlPeer.

Reimplemented in VCF::OSXDialog.

virtual void VCF::OSXWindow::destroyControl  )  [virtual]
 

Destroy the control peer's resoruces (if neccessary).

Implements VCF::ControlPeer.

RgnHandle VCF::OSXWindow::determineUnobscuredClientRgn  )  [protected]
 

virtual void VCF::OSXWindow::endSetBounds  )  [virtual]
 

Implements VCF::ControlPeer.

virtual Rect VCF::OSXWindow::getBounds  )  [virtual]
 

returns the bounds of the component in the coordinate system of the parent.

Implements VCF::ControlPeer.

Reimplemented in VCF::OSXDialog.

virtual Rect VCF::OSXWindow::getClientBounds  )  [virtual]
 

Implements VCF::WindowPeer.

virtual Control* VCF::OSXWindow::getControl  )  [virtual]
 

returns the component that this Peer is attached to.

Implements VCF::ControlPeer.

Control* VCF::OSXWindow::getControlForMouseEvent EventRef  event  )  [protected]
 

virtual WindowAttributes VCF::OSXWindow::getCreationWinAttrs  )  [virtual]
 

Reimplemented in VCF::OSXDialog.

virtual WindowClass VCF::OSXWindow::getCreationWinClass  )  [virtual]
 

Reimplemented in VCF::OSXDialog.

uint32 VCF::OSXWindow::getCurrentMouseBtn  )  [inline]
 

static EventHandlerUPP VCF::OSXWindow::getEventHandlerUPP  )  [static, protected]
 

virtual OSHandleID VCF::OSXWindow::getHandleID  )  [inline, virtual]
 

returns a ID that identifies this control.

On Win32 this corresponds to an HWND.

Implements VCF::ControlPeer.

virtual Control* VCF::OSXWindow::getParent  )  [virtual]
 

Implements VCF::ControlPeer.

ControlRef VCF::OSXWindow::getRootControl  ) 
 

virtual String VCF::OSXWindow::getText  )  [virtual]
 

returns a text associated with the component.

This usually gets used in the Control::getCaption() method.

Implements VCF::ControlPeer.

virtual bool VCF::OSXWindow::getVisible  )  [virtual]
 

returns wether or not the component is currently visible.

Implements VCF::ControlPeer.

static OSXWindow* VCF::OSXWindow::getWindowFromWindowRef WindowRef  window  )  [static]
 

OSStatus VCF::OSXWindow::handleContentViewDraw EventHandlerCallRef  nextHandler,
EventRef  theEvent
[protected]
 

virtual OSStatus VCF::OSXWindow::handleOSXEvent EventHandlerCallRef  nextHandler,
EventRef  theEvent
[virtual]
 

Reimplemented in VCF::OSXDialog.

static OSStatus VCF::OSXWindow::handleOSXEvents EventHandlerCallRef  nextHandler,
EventRef  theEvent,
void *  userData
[static, protected]
 

Rect VCF::OSXWindow::internal_getBounds  )  [inline]
 

void VCF::OSXWindow::internal_setBounds const Rect bounds  )  [inline]
 

virtual bool VCF::OSXWindow::isActiveWindow  )  [virtual]
 

Implements VCF::WindowPeer.

bool VCF::OSXWindow::isComposited  ) 
 

virtual bool VCF::OSXWindow::isEnabled  )  [virtual]
 

Implements VCF::ControlPeer.

virtual bool VCF::OSXWindow::isFocused  )  [virtual]
 

Implements VCF::ControlPeer.

virtual bool VCF::OSXWindow::isMaximized  )  [virtual]
 

Implements VCF::WindowPeer.

virtual bool VCF::OSXWindow::isMinimized  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::keepMouseEvents  )  [virtual]
 

this keeps the mouse events being sent to this control, even is the mouse leaves the physical bounds of the control

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::postChildPaint GraphicsContext graphicsContext,
Control child,
Rect oldClipRect
[virtual]
 

Called by the container instance of the child's parent control during it's paintChildren() function.

Called after the child control's paint() and paintBorder() functions.

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::preChildPaint GraphicsContext graphicsContext,
Control child,
Rect childClipRect
[virtual]
 

Called by the container instance of the child's parent control during it's paintChildren() function.

The implementation should do whatever is neccessary to seup up the child control's cliprect. A pre-calculated cliprect is passed in that was generated by the paintChildren() function.

This function is called prior the child control's paint() or paintBorder() functions.

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::releaseMouseEvents  )  [virtual]
 

releases mouse events - goes back to normal event handling

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::repaint Rect repaintRect,
const bool &  immediately
[virtual]
 

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::restore  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setBorder Border border  )  [virtual]
 

Called by the control when it's border object changes.

May or may not need to be implemented depending on the windowing system.

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setBorderPath Path path  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setBounds Rect rect  )  [virtual]
 

sets the bounds for the component.

Bounds are specified in the coordinate system of the componenents parent.

Implements VCF::ControlPeer.

Reimplemented in VCF::OSXDialog.

virtual void VCF::OSXWindow::setClientBounds Rect bounds  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setControl Control component  )  [virtual]
 

attahces the Peer to a particular component.

This should only be done once.

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setCursor Cursor cursor  )  [virtual]
 

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setEnabled const bool &  enabled  )  [virtual]
 

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setFocused  )  [virtual]
 

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setFont Font font  )  [virtual]
 

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setFrameStyle const FrameStyleType frameStyle  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setFrameTopmost const bool &  isTopmost  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setIconImage Image icon  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setMaximized const bool  maximised  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setMinimized const bool &  minimized  )  [virtual]
 

Implements VCF::WindowPeer.

virtual void VCF::OSXWindow::setParent Control parent  )  [virtual]
 

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setText const String text  )  [virtual]
 

sets the text for the control

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::setVisible const bool &  visible  )  [virtual]
 

shows or hides the component.

This does NOT close the component (if invoked on a frame based component ).

Implements VCF::ControlPeer.

Reimplemented in VCF::OSXDialog.

virtual void VCF::OSXWindow::translateFromScreenCoords Point pt  )  [virtual]
 

Takes the coordinates in pt, which are in the coordinate system of the Screen, and translates them into the coordinate system of this control.

Parameters:
Point the initial point value, in the coordinate system of the Screen.

Implements VCF::ControlPeer.

virtual void VCF::OSXWindow::translateToScreenCoords Point pt  )  [virtual]
 

Takes the coordinates in pt, which are in the coordinate system of this control, and translates them into the coordinate system of the Screen.

Parameters:
Point the initial point value, in the coordinate system of the control this method is called on.

Implements VCF::ControlPeer.

static OSStatus VCF::OSXWindow::wndContentViewHandler EventHandlerCallRef  nextHandler,
EventRef  theEvent,
void *  userData
[static, protected]
 


Member Data Documentation

Rect VCF::OSXWindow::bounds_ [protected]
 

EventHandlerRef VCF::OSXWindow::contentViewHandlerRef_ [protected]
 

Control* VCF::OSXWindow::control_ [protected]
 

uint32 VCF::OSXWindow::currentMouseBtn_ [protected]
 

EventHandlerRef VCF::OSXWindow::handlerRef_ [protected]
 

bool VCF::OSXWindow::internalClose_ [protected]
 

MouseTrackingRef VCF::OSXWindow::mouseTrackRef_ [protected]
 

WindowRef VCF::OSXWindow::windowRef_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information