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

VCF::AbstractX11Control Class Reference

This class serves as a common implementation for various methods of the ControlPeer interface. More...

#include <AbstractX11Control.h>

Inheritance diagram for VCF::AbstractX11Control:

VCF::ControlPeer VCF::Interface VCF::X11Control VCF::X11Dialog VCF::X11Window VCF::X11SimpleTextControl List of all members.

Public Member Functions

 AbstractX11Control ()
virtual ~AbstractX11Control ()
virtual int32 getHandleID ()
 returns a ID that identifies this control.
virtual String getText ()
 returns a text associated with the component.
virtual void setText (const String &text)
 sets the text for the widget
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 RectgetBounds ()
 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 uint32 getStyleMask ()
 returns a bit-masked uint32 that contains style constants.
virtual void setStyleMask (const uint32 &styleMask)
 sets the current style mask.
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 setFocus (const bool &focused)
virtual bool isEnabled ()
virtual void setEnabled (const bool &enabled)
virtual void setFont (Font *font)
virtual void repaint (Rect *repaintRect=NULL)
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
void addUpdateRect (const Rect &updateRect)
virtual void handlePaintEvent ()
virtual void handleEvent (XEvent *x11Event)

Static Public Member Functions

static void handleXEvent (xLib::Window wndHandle, XEvent *x11Event)
static AbstractX11ControlgetX11ControlFromXWindow (xLib::Window wndHandle)

Protected Types

typedef std::map< xLib::Window,
AbstractX11Control * > 
XwndControlMap

Static Protected Member Functions

static void registerX11Control (AbstractX11Control *x11Control)
static void unRegisterX11Control (AbstractX11Control *x11Control)

Protected Attributes

AbstractX11Controlparent_
std::vector< RectupdateRects_
xLib::Window wndHandle_
Controlcontrol_
Rect bounds_
bool visible_
bool enabled_
uint32 currentKeyState_
uint32 currentButtonState_

Static Protected Attributes

static XwndControlMap xwndControlMap

Detailed Description

This class serves as a common implementation for various methods of the ControlPeer interface.

Usually a class like X11Control, X11Window, etc will share most of the same functionality, and only differ by a few overridden methods


Member Typedef Documentation

typedef std::map<xLib::Window,AbstractX11Control*> VCF::AbstractX11Control::XwndControlMap [protected]
 


Constructor & Destructor Documentation

VCF::AbstractX11Control::AbstractX11Control  ) 
 

virtual VCF::AbstractX11Control::~AbstractX11Control  )  [virtual]
 


Member Function Documentation

void VCF::AbstractX11Control::addUpdateRect const Rect updateRect  ) 
 

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

advanced function for changing the size of multiple child windows

Implements VCF::ControlPeer.

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

Implements VCF::ControlPeer.

virtual Rect* VCF::AbstractX11Control::getBounds  )  [virtual]
 

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

Implements VCF::ControlPeer.

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

returns the component that this Peer is attached to.

Implements VCF::ControlPeer.

virtual int32 VCF::AbstractX11Control::getHandleID  )  [inline, virtual]
 

returns a ID that identifies this control.

On Win32 this corresponds to an HWND.

Implements VCF::ControlPeer.

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

Implements VCF::ControlPeer.

virtual uint32 VCF::AbstractX11Control::getStyleMask  )  [virtual]
 

returns a bit-masked uint32 that contains style constants.

These style constants are defined in the VCF, and must be translated to the particular windowing system being used.

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

returns a text associated with the component.

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

Implements VCF::ControlPeer.

Reimplemented in VCF::X11Dialog, VCF::X11SimpleTextControl, and VCF::X11Window.

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

returns wether or not the component is currently visible.

Implements VCF::ControlPeer.

static AbstractX11Control* VCF::AbstractX11Control::getX11ControlFromXWindow xLib::Window  wndHandle  )  [static]
 

virtual void VCF::AbstractX11Control::handleEvent XEvent *  x11Event  )  [virtual]
 

Reimplemented in VCF::X11Dialog, VCF::X11SimpleTextControl, and VCF::X11Window.

virtual void VCF::AbstractX11Control::handlePaintEvent  )  [virtual]
 

Reimplemented in VCF::X11SimpleTextControl.

static void VCF::AbstractX11Control::handleXEvent xLib::Window  wndHandle,
XEvent *  x11Event
[static]
 

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

Implements VCF::ControlPeer.

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

Implements VCF::ControlPeer.

virtual void VCF::AbstractX11Control::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.

static void VCF::AbstractX11Control::registerX11Control AbstractX11Control x11Control  )  [static, protected]
 

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

releases mouse events - goes back to normal event handling

Implements VCF::ControlPeer.

virtual void VCF::AbstractX11Control::repaint Rect repaintRect = NULL  )  [virtual]
 

virtual void VCF::AbstractX11Control::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::X11Dialog.

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

attahces the Peer to a particular component.

This should only be done once.

Implements VCF::ControlPeer.

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

Implements VCF::ControlPeer.

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

Implements VCF::ControlPeer.

virtual void VCF::AbstractX11Control::setFocus const bool &  focused  )  [virtual]
 

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

Implements VCF::ControlPeer.

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

Implements VCF::ControlPeer.

virtual void VCF::AbstractX11Control::setStyleMask const uint32 styleMask  )  [virtual]
 

sets the current style mask.

Should cause a repaint of the component, if neccessary.

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

sets the text for the widget

Implements VCF::ControlPeer.

Reimplemented in VCF::X11Dialog, VCF::X11SimpleTextControl, and VCF::X11Window.

virtual void VCF::AbstractX11Control::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.

static void VCF::AbstractX11Control::unRegisterX11Control AbstractX11Control x11Control  )  [static, protected]
 


Member Data Documentation

Rect VCF::AbstractX11Control::bounds_ [protected]
 

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

uint32 VCF::AbstractX11Control::currentButtonState_ [protected]
 

uint32 VCF::AbstractX11Control::currentKeyState_ [protected]
 

bool VCF::AbstractX11Control::enabled_ [protected]
 

AbstractX11Control* VCF::AbstractX11Control::parent_ [protected]
 

std::vector<Rect> VCF::AbstractX11Control::updateRects_ [protected]
 

bool VCF::AbstractX11Control::visible_ [protected]
 

xLib::Window VCF::AbstractX11Control::wndHandle_ [protected]
 

XwndControlMap VCF::AbstractX11Control::xwndControlMap [static, protected]
 


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