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

VCF::ControlPeer Class Reference

The base Peer interface. More...

#include <vcf/ApplicationKit/ControlPeer.h>

Inheritance diagram for VCF::ControlPeer:

VCF::Interface VCF::AbstractGTKControl VCF::AbstractWin32Component VCF::AbstractX11Control VCF::LightweightComponent VCF::OSXControl VCF::OSXLightweightControl VCF::OSXWindow VCF::Win32CustomControl VCF::XCBAbstractControl VCF::XCBWindowPeer List of all members.

Public Member Functions

virtual ~ControlPeer ()
virtual void create (Control *owningControl)=0
 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 ()=0
 Destroy the control peer's resoruces (if neccessary).
virtual OSHandleID getHandleID ()=0
 returns a ID that identifies this control.
virtual String getText ()=0
 returns a text associated with the component.
virtual void setText (const String &text)=0
 sets the text for the control
virtual void setBounds (Rect *rect)=0
 sets the bounds for the component.
virtual bool beginSetBounds (const uint32 &numberOfChildren)=0
 advanced function for changing the size of multiple child windows.
virtual void endSetBounds ()=0
virtual Rect getBounds ()=0
 returns the bounds of the component in the coordinate system of the parent.
virtual void setVisible (const bool &visible)=0
 shows or hides the component.
virtual bool getVisible ()=0
 returns wether or not the component is currently visible.
virtual ControlgetControl ()=0
 returns the component that this Peer is attached to.
virtual void setControl (Control *component)=0
 attahces the Peer to a particular component.
virtual void setCursor (Cursor *cursor)=0
virtual void setParent (Control *parent)=0
virtual ControlgetParent ()=0
virtual bool isFocused ()=0
virtual void setFocused ()=0
virtual bool isEnabled ()=0
virtual void setEnabled (const bool &enabled)=0
virtual void setFont (Font *font)=0
virtual void repaint (Rect *repaintRect, const bool &immediately)=0
virtual void keepMouseEvents ()=0
 this keeps the mouse events being sent to this control, even is the mouse leaves the physical bounds of the control
virtual void releaseMouseEvents ()=0
 releases mouse events - goes back to normal event handling
virtual void translateToScreenCoords (Point *pt)=0
 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)=0
 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)=0
 Called by the control when it's border object changes.
virtual void preChildPaint (GraphicsContext *graphicsContext, Control *child, Rect *childClipRect)=0
 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)=0
 Called by the container instance of the child's parent control during it's paintChildren() function.

Detailed Description

The base Peer interface.

In the Visual Control Framework Peers are the equivalent of Peers in Java. Peers can be either light weight or heavyweight. Heavyweight Peers are based on native widgets are consume a certain amount of resources. On Win32 heavweight Peers have their own window handle and graphics context. Lightweight Peers use the window handle and graphics context of the parents. Frame Peers, such as WindowPeer and DialogPeer must be based on heavyweight controls.


Constructor & Destructor Documentation

virtual VCF::ControlPeer::~ControlPeer  )  [inline, virtual]
 


Member Function Documentation

virtual bool VCF::ControlPeer::beginSetBounds const uint32 numberOfChildren  )  [pure virtual]
 

advanced function for changing the size of multiple child windows.

This may have no implementation on some windowing systems

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::create Control owningControl  )  [pure 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.

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::GTKCommandButton, VCF::GTKControl, VCF::GTKDialog, VCF::GTKTextControl, VCF::GTKToolbar, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXButton, VCF::OSXControl, VCF::OSXDialog, VCF::OSXLightweightControl, VCF::OSXListview, VCF::OSXTextEditPeer, VCF::OSXToolbar, VCF::OSXTree, VCF::OSXWindow, VCF::Win32Button, VCF::Win32Component, VCF::Win32Dialog, VCF::Win32Edit, VCF::Win32Listview, VCF::Win32PopupWindowPeer, VCF::Win32Toolbar, VCF::Win32Tree, VCF::Win32Window, VCF::XCBAbstractControl, VCF::XCBWindowPeer, and VCF::Win32HTMLBrowser.

virtual void VCF::ControlPeer::destroyControl  )  [pure virtual]
 

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

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::endSetBounds  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual Rect VCF::ControlPeer::getBounds  )  [pure virtual]
 

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

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXDialog, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual Control* VCF::ControlPeer::getControl  )  [pure virtual]
 

returns the component that this Peer is attached to.

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual OSHandleID VCF::ControlPeer::getHandleID  )  [pure virtual]
 

returns a ID that identifies this control.

On Win32 this corresponds to an HWND.

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual Control* VCF::ControlPeer::getParent  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual String VCF::ControlPeer::getText  )  [pure virtual]
 

returns a text associated with the component.

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

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::GTKCommandButton, VCF::GTKTextControl, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXButton, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXTextEditPeer, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32Edit, VCF::Win32ListBox, VCF::X11Dialog, VCF::X11SimpleTextControl, VCF::X11Window, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual bool VCF::ControlPeer::getVisible  )  [pure virtual]
 

returns wether or not the component is currently visible.

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual bool VCF::ControlPeer::isEnabled  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual bool VCF::ControlPeer::isFocused  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::keepMouseEvents  )  [pure virtual]
 

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

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::postChildPaint GraphicsContext graphicsContext,
Control child,
Rect oldClipRect
[pure 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.

Implemented in VCF::AbstractWin32Component, VCF::GTKCommandButton, VCF::GTKControl, VCF::GTKDialog, VCF::GTKTextControl, VCF::GTKToolbar, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::preChildPaint GraphicsContext graphicsContext,
Control child,
Rect childClipRect
[pure 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.

Implemented in VCF::AbstractWin32Component, VCF::GTKCommandButton, VCF::GTKControl, VCF::GTKDialog, VCF::GTKTextControl, VCF::GTKToolbar, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::releaseMouseEvents  )  [pure virtual]
 

releases mouse events - goes back to normal event handling

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

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

Implemented in VCF::AbstractWin32Component, VCF::GTKCommandButton, VCF::GTKControl, VCF::GTKDialog, VCF::GTKTextControl, VCF::GTKToolbar, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::setBorder Border border  )  [pure virtual]
 

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

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

Implemented in VCF::AbstractWin32Component, VCF::GTKCommandButton, VCF::GTKControl, VCF::GTKDialog, VCF::GTKTextControl, VCF::GTKToolbar, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32PopupWindowPeer, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::setBounds Rect rect  )  [pure virtual]
 

sets the bounds for the component.

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

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXDialog, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::Win32PopupWindowPeer, VCF::Win32Window, VCF::X11Dialog, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::setControl Control component  )  [pure virtual]
 

attahces the Peer to a particular component.

This should only be done once.

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::setCursor Cursor cursor  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

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

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::setFocused  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, VCF::XCBWindowPeer, and VCF::Win32HTMLBrowser.

virtual void VCF::ControlPeer::setFont Font font  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32ListBox, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::setParent Control parent  )  [pure virtual]
 

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::Win32Window, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::setText const String text  )  [pure virtual]
 

sets the text for the control

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::GTKCommandButton, VCF::GTKTextControl, VCF::GTKWindow, VCF::LightweightComponent, VCF::OSXButton, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXTextEditPeer, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32Edit, VCF::Win32ListBox, VCF::Win32PopupWindowPeer, VCF::Win32Window, VCF::X11Dialog, VCF::X11SimpleTextControl, VCF::X11Window, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

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

shows or hides the component.

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

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::AbstractX11Control, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXDialog, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::Win32ComboBox, VCF::Win32CustomControl, VCF::Win32ListBox, VCF::Win32PopupWindowPeer, VCF::Win32Window, VCF::XCBAbstractControl, VCF::XCBWindowPeer, and VCF::Win32HTMLBrowser.

virtual void VCF::ControlPeer::translateFromScreenCoords Point pt  )  [pure 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.

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.

virtual void VCF::ControlPeer::translateToScreenCoords Point pt  )  [pure 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.

Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer.


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