VCF::ControlPeer Class Reference
The base Peer interface. More...
#include <vcf/ApplicationKit/ControlPeer.h>
Inheritance diagram for VCF::ControlPeer:

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 Control * | getControl ()=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 Control * | getParent ()=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
|
|
|
Member Function Documentation
|
|
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. |
|
|
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. |
|
|
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. |
|
|
|
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. |
|
|
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. |
|
|
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. |
|
|
|
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. |
|
|
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. |
|
|
|
|
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. |
|
||||||||||||||||
|
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. |
|
||||||||||||||||
|
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. |
|
|
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. |
|
||||||||||||
|
|
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. |
|
|
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. |
|
|
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. |
|
|
|
|
|
|
|
|
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. |
|
|
Takes the coordinates in pt, which are in the coordinate system of the Screen, and translates them into the coordinate system of this control.
Implemented in VCF::AbstractGTKControl, VCF::AbstractWin32Component, VCF::LightweightComponent, VCF::OSXControl, VCF::OSXLightweightControl, VCF::OSXWindow, VCF::XCBAbstractControl, and VCF::XCBWindowPeer. |
|
|
Takes the coordinates in pt, which are in the coordinate system of this control, and translates them into 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. |
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/ControlPeer.h
