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

VCF::Control Class Reference

The base class for all visual components in the Visual Component Framework. More...

#include <vcf/ApplicationKit/Control.h>

Inheritance diagram for VCF::Control:

VCF::UIComponent VCF::AbstractView VCF::Component VCF::View VCF::ObjectWithCallbacks VCF::Object VCF::CommandButton VCF::CustomControl VCF::Frame VCF::HTMLBrowserControl VCF::ListControl VCF::TextControl VCF::Toolbar VCF::TreeControl List of all members.

Public Types

enum  { ANCHOR_DTOP = 0, ANCHOR_DLEFT, ANCHOR_DBOTTOM, ANCHOR_DRIGHT }
enum  ControlState {
  csVisible = 0x00000001, csEnabled = 0x00000002, csUseParentFont = 0x00000004, csDoubleBuffered = 0x00000008,
  csAutoStartDragDrop = 0x00000010, csTabStop = 0x00000020, csIgnoreForLayout = 0x00000040, csIgnoreForParentScrolling = 0x00000080,
  csAllowPaintNotification = 0x00000100, csHasMouseCapture = 0x00000200, csUseRenderBuffer = 0x00000400, csAllowMouseFocus = 0x00000800,
  csAllowFocus = 0x00001000, csKeepsReturnKey = 0x00002000, csKeepsTabKey = 0x00004000, csKeepsArrowKeys = 0x00008000,
  csDefaultControlState
}
enum  MinMaxSizeDefaults { mmIgnoreMinWidth = -1, mmIgnoreMinHeight = -1, mmIgnoreMaxWidth = -1, mmIgnoreMaxHeight = -1 }
enum  ControlEvents {
  CONTROL_EVENTS = COMPONENT_EVENTS_LAST + 200, CONTROL_SIZED, CONTROL_POSITIONED, CONTROL_PARENT_CHANGED,
  CONTROL_MODELCHANGED, FOCUS_GAINED, FOCUS_LOST, HELP_REQUESTED,
  WHATS_THIS_HELP_REQUESTED, KEYBOARD_DOWN, KEYBOARD_PRESSED, KEYBOARD_UP,
  KEYBOARD_ACCELERATOR, MOUSE_DOWN, MOUSE_MOVE, MOUSE_UP,
  MOUSE_CLICK, MOUSE_DBLCLICK, MOUSE_ENTERED, MOUSE_LEAVE,
  BEFORE_CONTROL_PAINTED, AFTER_CONTROL_PAINTED, BEFORE_POPUP_MENU, CONTROL_EVENTS_LAST
}

Public Member Functions

 Control ()
virtual ~Control ()
virtual void handleEvent (Event *event)
 This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc.
void handleEventAndForwardToChildren (Event *event)
 calls handleEvent on this control, and then calls handleEventToChildren() on any child controls the container of this control may have.
virtual ComponentfindComponent (const String &componentName, const bool &recursive=false)
 finds a particular component as specified by the componentName parameter within the list of owned components.
virtual void addNewComponent (Component *component)
 Adds a brand new child component instance to this component.
virtual void preLoading ()
 Called when loading the component.
virtual void postLoaded (const bool &visible)
 Called after the component is done loading.
virtual bool bindVariable (Component **variablePtr, const String &variableName)
 Used to bind a variable to a component by attempting to bind the variable passed in to the component in the variablePtr parameter to the component instance with the same name as the variableName parameter.
virtual bool generatePropertyValue (const String &fullPropertyName, Property *property, VariantData *value, String &strValue)
VariantData getModelKey ()
void setModelKey (const VariantData &val)
BordergetBorder ()
 Returns the control's current border object, if any.
void setBorder (Border *border)
 Sets the border for this control.
virtual Rect getBounds ()
 returns the bounds in parent coordinates of the Control.
virtual Rect getClientBounds (const bool &includeBorder=true)
 Returns the bounds in terms of the control's coordinates.
virtual double getLeft ()
 Returns the left position in parent coordinates.
virtual double getRight ()
 Returns the right position in parent coordinates.
virtual double getWidth ()
 returns the width of the control
virtual double getTop ()
 returns the top position in parent coordinates
virtual double getBottom ()
 returns the bottom position in parent coordinates
virtual double getHeight ()
 returns the height of the control
virtual bool getVisible ()
 is this control visible to the user.
AlignmentType getAlignment ()
 Returns the control's alignment.
bool isIgnoredForLayout ()
 Returns whether this control must be ignored in the control container's layout implementation.
void setIgnoredForLayout (const bool &val)
void setBounds (const double &x, const double &y, const double &width, const double &height)
 sets the bounds of the control.
void setBounds (Rect *rect, const bool &anchorDeltasNeedUpdating=true)
 sets the bounds of the control.
void setAlignment (const AlignmentType &alignment)
 sets the alignment of the control
virtual void setLeft (const double &left)
 sets the left value for the control, immediately updates the controls position.
virtual void setRight (const double &right)
 sets the right value of the control.
virtual void setWidth (const double &width)
 sets the width of the control.
virtual void setTop (const double &top)
 sets the top value of the control.
virtual void setBottom (const double &bottom)
 sets the bottom value of the control.
virtual void setHeight (const double &height)
 sets the height of the control.
virtual void setVisible (const bool &visible)
 determines whether or not the control is visible, and set it visible if it wasn't.
virtual bool canBeginDragDrop (Point *point)
 if autoStartDragDrop_ is true then this method checks to see if the Controls dragging is with the windowing system's tolernace for a drag drop operation to start.
void setAutoStartDragDrop (const bool &canAutoStartDragDrop)
 sets auto start dragging to true or false
bool getAutoStartDragDrop ()
 returns whether or not auto dragging is on or off.
virtual bool beginDragDrop (MouseEvent *event)
 Override this to provide functionality for handling the start of drag-drop operation This will get called automatically by the framework if it detects that a mouse-move has occured that indicates a drag-drop operation COULD occur.
virtual ControlPeergetPeer ()
 returns the control's native peer interface
virtual void setParent (Control *parent)
 sets the parent for the control
virtual ControlgetParent ()
 returns the control's current parent
void removeFromParent (const bool &freeInstance=true)
 throw( InvalidPeer ); -JEC - FIXME later
bool isFocused ()
 does this control currently have focus?
ControlsetFocused ()
 Makes this control the currently focused control.
bool getAllowsFocus ()
void setAllowsFocus (const bool &val)
bool getAllowsMouseFocus ()
void setAllowsMouseFocus (const bool &val)
bool isEnabled ()
 returns whether the control is enabled or not.
bool areParentsEnabled ()
 This checks not only to see if the control itself is enabled, but will return false if any parent control is not enabled.
void setEnabled (const bool &enabled)
 sets whether the control is enabled or not.
virtual void paint (GraphicsContext *context)=0
 Paints the control.
void paintBorder (GraphicsContext *context)
 Paints the border for the control.
virtual void mouseEnter (MouseEvent *event)
 Called when the mouse first enters the control's bounds.
virtual void mouseDown (MouseEvent *event)
 Called when one (or more) of the mouse buttons are held down.
virtual void mouseMove (MouseEvent *event)
 Called when the mouse moves over the control.
virtual void mouseUp (MouseEvent *event)
 Called when one (or more) of the mouse buttons are released.
virtual void mouseClick (MouseEvent *event)
 Called when one or mouse buttons are held down and immediately released ( a "mouse click" ).
virtual void mouseDblClick (MouseEvent *event)
 Called when one or mouse buttons are held down and immediately released ( a "mouse double click" ) twice, within some specific time period, as determined on the windowing system.
virtual void mouseLeave (MouseEvent *event)
 Called when the mouse leaves the control's bounds.
virtual void keyDown (KeyboardEvent *event)
 called when the user presses the key down
virtual void keyPressed (KeyboardEvent *event)
 called when the user simply presses the key and represents a full key cycle having occurred, in other words the key has been pressed down and then released
virtual void keyUp (KeyboardEvent *event)
 called when the user releases the key
virtual void sizeChange (ControlEvent *event)
 called when the control's bounds change.
virtual void positionChange (ControlEvent *event)
 called when the control's coordinates change.
virtual void parentChange (ControlEvent *event)
 Called when the parent of the control is changed.
virtual void gotFocus (FocusEvent *event)
 Called when the control gains keyboard focus.
virtual void lostFocus (FocusEvent *event)
 Called when the control loses keyboard focus.
void translateToParent (Point *point)
 translate the point from this controls coordinate system to the parent controls coordinate system
void translateToLocal (Point *point)
 translate the point from parent controls coordinate system to this controls coordinate system
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.
void translateToScreenCoords (Rect *rect)
 Takes the coordinates in rect, which are in the coordinate system of this control, and translates them into the coordinate system of the Screen.
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.
void translateFromScreenCoords (Rect *rect)
 Takes the coordinates in rect, which are in the coordinate system of the Screen, and translates them into the coordinate system of this control.
virtual bool isLightWeight ()
 identifies the control as a lightweight control.
virtual ControlgetHeavyweightParent ()
 Returns the first parent of the Control that is a heavweight Control, i.e it's isLighweight() method return false.
ColorgetColor ()
 returns the color used to fill the background of this control
void setColor (Color *color)
 sets the color to fill this control's background with
virtual void beforeDestroy (ComponentEvent *event)
 called just prior to completely destroying the control and it's associated memory.
virtual void afterCreate (ComponentEvent *event)
 Special initializations may then happen here.
FontgetFont ()
 Returns the font associated with this control.
void setFont (Font *font)
 sets the font attributes.
bool useParentFont ()
 returns whether this control will use the font settings of the parent's font.
void setUseParentFont (const bool &useParentFont)
 sets whether the control should use it's parent font's settigns or use it's own independent of it's parent's font.
void repaint (Rect *repaintRect=NULL)
 repaint the control.
void repaintNow (Rect *repaintRect=NULL)
bool isDoubleBuffered ()
 is this component double buffered.
void setDoubleBuffered (const bool &doubleBuffered)
 sets whether or not this control is double buffered.
bool isUsingRenderBuffer ()
 Returns true if the Control should take advantage of the GraphicsContexts' render buffer for anti-aliased vector graphics (based on the AGG library).
void setUsingRenderBuffer (const bool &useRenderBuffer)
 sets whether or not the control is using the render buffer of it's GraphicsContext.
void keepMouseEvents ()
 this keeps the mouse events being sent to this control, even if the mouse leaves the physical bounds of the control
void releaseMouseEvents ()
 releases mouse events - goes back to normal event handling
PopupMenugetPopupMenu ()
 returns the Control's PopupMenu, if any.
void setPopupMenu (PopupMenu *popupMenu)
 sets the popup menu for this control.
ViewgetView ()
 returns the view associated with this control
void setView (View *view)
 sets the view to associate with this control
virtual double getPreferredWidth ()
 returns the preferred width for this control.
virtual double getPreferredHeight ()
 returns the preferred height for this control.
virtual void setPreferredWidth (const double &width)
 set the preferred width.
virtual void setPreferredHeight (const double &height)
 set the preferred height.
Size getMinSize ()
 Returns the minimum size for this control.
void setMinSize (const Size &val)
 Sets the minimum size of the control.
double getMinWidth ()
 Returns the minimum width of the control.
void setMinWidth (const double &val)
 Sets the minimum width of the control.
double getMinHeight ()
 Returns the minimum height of the control.
void setMinHeight (const double &val)
 Sets the minimum height of the control.
Size getMaxSize ()
 Returns the maximum size for this control.
void setMaxSize (const Size &val)
 Sets the maximum size of the control.
double getMaxWidth ()
void setMaxWidth (const double &val)
double getMaxHeight ()
void setMaxHeight (const double &val)
ScrollablegetScrollable ()
 returns an object implementing the Scrollable interface The default value is NULL, indicating the control does not support scrolling behaviour
virtual void setScrollable (Scrollable *scrollable)
 sets the scrollable for the control.
void adjustViewableBoundsAndOriginForScrollable (GraphicsContext *context, Rect &viewBounds, Point &origin)
 Call this method to adjust the view bounds (i.e.
String getWhatThisHelpString ()
 returns a string that is used for context sensitive help for the control.
void setWhatThisHelpString (const String &whatThisHelpString)
 sets the string that is used for context sensitive help for the control.
String getToolTipText ()
 returns a string that is used to display in the tooltip for the control.
void setToolTipText (const String &tooltip)
 sets the string that is used to display in the tooltip for the control.
int32 getCursorID ()
 returns the cursor ID for the control.
void setCursorID (const int32 &cursorID)
 sets the cursor ID for the control.
AnchorTypes getAnchor ()
 returns the anchor mask value for this control.
void setAnchor (const AnchorTypes &anchor)
 sets the anchor mask value for the control.
float * getAnchorDeltas ()
 returns the current delta for each of the anchors.
bool keepsReturnCharacter ()
 this function determines if the control keeps the key event when the return key is pressed, or if it will relinquish the event for the system to process.
void setKeepsReturnChar (const bool &val)
bool keepsTabKey ()
 This function determines whether or not the control should have precedence and prevent the the tab key from switching focus to another control.
void setKeepsTabKey (const bool &val)
bool keepsArrowKeys ()
 This function determines whether or not the control should have precedence and prevent the the arrow keys from switching focus to another control.
void setKeepsArrowKeys (const bool &val)
bool getTabStop ()
 Indicates whether the control responds to the TAB key to set it's focus when tabbing from control to control.
void setTabStop (const bool &tabStop)
 sets the tab stop value of the control.
int32 getTabOrder ()
 Returns the tab order of the control.
void setTabOrder (const int32 &tabOrder)
AcceleratorKeygetAccelerator (const VirtualKeyCode &keyCode, const uint32 &modifierMask)
 Returns the AcceleratorKey instance that is associated with this control and the specified key code and modifier mask.
void addAcceleratorKey (const VirtualKeyCode &keyCode, const uint32 &modifierMask, EventHandler *eventHandler)
 Associates a new AcceleratorKey with the Control.
void addAcceleratorKey (const VirtualKeyCode &keyCode, const uint32 &modifierMask, Action *action)
 Associates a new AcceleratorKey with the Control.
void addAcceleratorKey (AcceleratorKey *accelerator)
 This should generally not be called.
AcceleratorKeygetAcceleratorKey (const uint32 &index) const
void setAcceleratorKey (const uint32 &index, AcceleratorKey *accelerator)
uint32 getAcceleratorKeyIndexes (std::vector< uint32 > &indexes)
virtual void mnemonicActivate ()
 Pressing the accelerator character will cause the control's mnemonicActivate() method to be fired, which by default sets focus to the control.
FramegetParentFrame ()
 This returns a pointer to the top level frame that this control is associated with.
bool isActive ()
 This returns a value that indicates whether or not hte control is considered to be active.
bool canAcceptFocus ()
 Can the control accept focus? This method determines if the control can recieve focus.
ContainergetContainer ()
 returns the current container for this control.
void setContainer (Container *container)
 sets the current container for a control.
bool hasChildren ()
 This returns whether or not the control has any child controls associated with it.
bool isChild ()
 Returns whether or not this control is a child of some other control.
bool getAllowPaintNotification ()
 Returns whether or not the control will allow paint notification.
void setAllowPaintNotification (const bool &val)
 Sets whether or not the control will allow paint notification.
bool ignoreForParentScrolling ()
void setIgnoreForParentScrolling (const bool &val)
void preChildPaint (GraphicsContext *graphicsContext, Control *child, Rect *childClipRect)
 Called by the container instance of the child's parent control during it's paintChildren() function.
void postChildPaint (GraphicsContext *graphicsContext, Control *child, Rect *oldClipRect)
 Called by the container instance of the child's parent control during it's paintChildren() function.
virtual ModelgetViewModel ()
virtual void setViewModel (Model *viewModel)
 sets a new model for the view Once set, the control fires a ControlModelChanged event.
virtual void modelChanged (Model *oldModel, Model *newModel)
ModelgetModel ()
void setModel (Model *val)
void internal_beforePaint (GraphicsContext *context)
 called by the internals of the framework - DO NOT CALL!
void internal_afterPaint (GraphicsContext *context)
 called by the internals of the framework - DO NOT CALL!

Static Public Member Functions

static ControlgetCapturedMouseControl ()
 returns the current control that has captured the mouse input.
static void setCapturedMouseControl (Control *control)
 sets the control that has captured the mouse.
static ControlgetCurrentFocusedControl ()
 returns the currently focused control.
static ControlgetPreviousMouseOverControl ()
 returns the control the mouse was previously over, if any.
static void setPreviousMouseOverControl (Control *control)
static void buildTabList (Control *control, std::vector< Control * > &tabList)

Public Attributes

VCF::Delegate ControlDelegate
 ControlSized
 ControlPositioned
 ControlParentChanged
VCF::Delegate MouseDelegate
 MouseDoubleClicked
 MouseClicked
 MouseMove
 MouseUp
 MouseDown
 MouseEnter
 MouseLeave
VCF::Delegate KeyboardDelegate
 KeyPressed
 KeyDown
 KeyUp
VCF::Delegate WhatsThisHelpDelegate
 ControlHelpRequested
VCF::Delegate HelpDelegate
 HelpRequested
VCF::Delegate FocusDelegate
 FocusGained
 FocusLost
VCF::Delegate ToolTipDelegate
 ToolTipRequested
 ToolTip
 ControlModelChanged
 BeforeControlPainted
 AfterControlPainted
VCF::Delegate ControlPopupMenuDelegate
 BeforePopupMenu

Protected Member Functions

void updateAnchorDeltas ()
virtual void getAppNameAndKey (String &appName, String &key)
virtual void destroy ()
 called by the free() method.

Protected Attributes

ControlPeerpeer_
Controlparent_
AlignmentType aligment_
uint32 anchor_
Rectbounds_
RectclientBounds_
Borderborder_
Colorcolor_
Fontfont_
Viewview_
PopupMenupopupMenu_
Scrollablescrollable_
String whatThisHelpString_
String toolTip_
int32 cursorID_
Cursorcursor_
float anchorDeltas_ [4]
int32 tabOrder_
Point clickPt_
Containercontainer_
Size minSize_
Size maxSize_
uint32 controlState_
VariantData modelKey_

Static Protected Attributes

static ControlcurrentFocusedControl
static ControlpreviousMouseOverControl
static ControlcapturedMouseControl

Detailed Description

The base class for all visual components in the Visual Component Framework.

In addition it implements the View interface. This means that the Control is itself a specialized form of a View, though it may not have have a model, and can hold an external view, separate from itself.

A control receives a wide variety of events from the user such as paint events, mouse events, keyboard events, help events, etc.

Controls can have parents, and can form a hierarchy of parent-child controls. Controls can have children if they have a valid Container instance set.

Controls can also be aligned or anchored, which can aid in laying out the presentation of a UI.

Finally a Control may also be lightweight or heavyweight, which determines how many window system resources the control consumes. A heavyweight control has a native window/widget and takes up resources accordingly. In addition a heavyweight control also has a native graphics context associated with it that also takes up resources. In contrast, a lightweight control shares the underlying native window and graphics context resources with it's parent, and greatly reduces the number of resources the application will consume. This is especially useful when making complex custom controls that have many moving parts like a tree-list control, complete with a header and movable icons, etc.

To aid in the drawing of a control, all controls are double buffered by default to prevent flicker, though this can be turned off and on at will.

Event Delegates for this class:


Member Enumeration Documentation

anonymous enum
 

Enumerator:
ANCHOR_DTOP 
ANCHOR_DLEFT 
ANCHOR_DBOTTOM 
ANCHOR_DRIGHT 

enum VCF::Control::ControlEvents
 

Enumerator:
CONTROL_EVENTS 
CONTROL_SIZED 
CONTROL_POSITIONED 
CONTROL_PARENT_CHANGED 
CONTROL_MODELCHANGED 
FOCUS_GAINED 
FOCUS_LOST 
HELP_REQUESTED 
WHATS_THIS_HELP_REQUESTED 
KEYBOARD_DOWN 
KEYBOARD_PRESSED 
KEYBOARD_UP 
KEYBOARD_ACCELERATOR 
MOUSE_DOWN 
MOUSE_MOVE 
MOUSE_UP 
MOUSE_CLICK 
MOUSE_DBLCLICK 
MOUSE_ENTERED 
MOUSE_LEAVE 
BEFORE_CONTROL_PAINTED 
AFTER_CONTROL_PAINTED 
BEFORE_POPUP_MENU 
CONTROL_EVENTS_LAST 

enum VCF::Control::ControlState
 

Enumerator:
csVisible 
csEnabled 
csUseParentFont 
csDoubleBuffered 
csAutoStartDragDrop 
csTabStop 
csIgnoreForLayout 
csIgnoreForParentScrolling 
csAllowPaintNotification 
csHasMouseCapture 
csUseRenderBuffer 
csAllowMouseFocus 
csAllowFocus 
csKeepsReturnKey 
csKeepsTabKey 
csKeepsArrowKeys 
csDefaultControlState 

enum VCF::Control::MinMaxSizeDefaults
 

Enumerator:
mmIgnoreMinWidth 
mmIgnoreMinHeight 
mmIgnoreMaxWidth 
mmIgnoreMaxHeight 


Constructor & Destructor Documentation

VCF::Control::Control  ) 
 

virtual VCF::Control::~Control  )  [virtual]
 


Member Function Documentation

void VCF::Control::addAcceleratorKey AcceleratorKey accelerator  ) 
 

This should generally not be called.

It's for framework usage only at this point.

void VCF::Control::addAcceleratorKey const VirtualKeyCode keyCode,
const uint32 modifierMask,
Action action
 

Associates a new AcceleratorKey with the Control.

The key code, modifier mask and the action's accelerator event handler all become the attributes of the new AcceleratorKey instance.

void VCF::Control::addAcceleratorKey const VirtualKeyCode keyCode,
const uint32 modifierMask,
EventHandler eventHandler
 

Associates a new AcceleratorKey with the Control.

The key code, modifier mask and event handler all become the attributes of the new AcceleratorKey

virtual void VCF::Control::addNewComponent Component component  )  [virtual]
 

Adds a brand new child component instance to this component.

By default this simply calls addComponent(). Re-implemented in the Control class to also handle adding to the control's container as well. Used by the VFFInputStream class when loading component's up.

Reimplemented from VCF::Component.

void VCF::Control::adjustViewableBoundsAndOriginForScrollable GraphicsContext context,
Rect viewBounds,
Point origin
 

Call this method to adjust the view bounds (i.e.

what the GraphicsContext::getViewableBounds() method returns) to take into consideration the presence of scroll bars

virtual void VCF::Control::afterCreate ComponentEvent event  )  [virtual]
 

Special initializations may then happen here.

See also:
Component::afterCreate()

Reimplemented from VCF::Component.

Reimplemented in VCF::Frame, VCF::HTMLBrowserControl, and VCF::OpenGLControl.

bool VCF::Control::areParentsEnabled  ) 
 

This checks not only to see if the control itself is enabled, but will return false if any parent control is not enabled.

This function traverse all the parent child relationships till the frame window is hit, and checks the enabled status of each control. The first control that is not enabled stops the search and the methods returns false, otherwise it continues till it finds a NULL parent and returns true.

virtual void VCF::Control::beforeDestroy ComponentEvent event  )  [virtual]
 

called just prior to completely destroying the control and it's associated memory.

See also:
Component::beforeDestroy()

Reimplemented from VCF::Component.

Reimplemented in VCF::Window.

virtual bool VCF::Control::beginDragDrop MouseEvent event  )  [virtual]
 

Override this to provide functionality for handling the start of drag-drop operation This will get called automatically by the framework if it detects that a mouse-move has occured that indicates a drag-drop operation COULD occur.

Returns:
bool must return true if a drag-drop operation was started, otherwise should return false

virtual bool VCF::Control::bindVariable Component **  variablePtr,
const String variableName
[virtual]
 

Used to bind a variable to a component by attempting to bind the variable passed in to the component in the variablePtr parameter to the component instance with the same name as the variableName parameter.

This functions looks at all the owned components first, then checks to see if the Container interface is supported, and if so, it checks all the child controls of the container.

Parameters:
Component* a pointer to a Component pointer variable
String the name of the component to find
Returns:
bool true if the component is found, otherwise false

Reimplemented from VCF::Component.

static void VCF::Control::buildTabList Control control,
std::vector< Control * > &  tabList
[static]
 

bool VCF::Control::canAcceptFocus  ) 
 

Can the control accept focus? This method determines if the control can recieve focus.

Returns:
bool returns true if the control is enabled and all of it's parents are enabled as well. Otherwise it returns false.

virtual bool VCF::Control::canBeginDragDrop Point point  )  [virtual]
 

if autoStartDragDrop_ is true then this method checks to see if the Controls dragging is with the windowing system's tolernace for a drag drop operation to start.

other wise it returns false. If autoStartDragDrop_ is false then it returns false unless some derived class overides the functionality.

Reimplemented in VCF::TableControl.

virtual void VCF::Control::destroy  )  [protected, virtual]
 

called by the free() method.

Should be overriden and any clean up code performed here

Reimplemented from VCF::UIComponent.

Reimplemented in VCF::ComboBoxControl, VCF::Frame, VCF::ListBoxControl, and VCF::Window.

virtual Component* VCF::Control::findComponent const String componentName,
const bool &  recursive = false
[virtual]
 

finds a particular component as specified by the componentName parameter within the list of owned components.

Parameters:
String the name of the component to look for
Returns:
Component a pointer to the Component with a matching name to componentName. If no match is found or the component has no owned components, the return value is NULL.

Reimplemented from VCF::Component.

virtual bool VCF::Control::generatePropertyValue const String fullPropertyName,
Property property,
VariantData value,
String strValue
[virtual]
 

Reimplemented from VCF::Component.

Reimplemented in VCF::CheckBoxControl, VCF::ComboBoxControl, VCF::CommandButton, VCF::HeaderControl, VCF::ProgressControl, VCF::PushButton, VCF::RadioButtonControl, VCF::SliderControl, and VCF::TextControl.

AcceleratorKey* VCF::Control::getAccelerator const VirtualKeyCode keyCode,
const uint32 modifierMask
 

Returns the AcceleratorKey instance that is associated with this control and the specified key code and modifier mask.

The AcceleratorKey will be activated whenever the corresponding keyboard combination is pressed.

Parameters:
VirtualKeyCode the key code that represents this AcceleratorKey. For example, vkLetterV is used to indicated an accelerator that is triggered whenever the "V" key is pressed.
uint32 a mask of special keys that can be pressed together with the specified key code, such as Shift, Alt or Ctrl.
See also:
AcceleratorKey

AcceleratorKey* VCF::Control::getAcceleratorKey const uint32 index  )  const
 

uint32 VCF::Control::getAcceleratorKeyIndexes std::vector< uint32 > &  indexes  ) 
 

AlignmentType VCF::Control::getAlignment  ) 
 

Returns the control's alignment.

These alignment values are used by the basic container type, the StandardContainer class, which uses these values to determine how to layout the controls. Other layout implementations may choose to ignore these values. For example, the HorizontalLayoutContainer doesn't pay any attention to these value, it just lays out the controls as they are added.

See also:
isIgnoredForLayout()

setIgnoredForLayout()

bool VCF::Control::getAllowPaintNotification  )  [inline]
 

Returns whether or not the control will allow paint notification.

See also:
paint()

BeforeControlPainted

AfterControlPainted

bool VCF::Control::getAllowsFocus  ) 
 

bool VCF::Control::getAllowsMouseFocus  ) 
 

AnchorTypes VCF::Control::getAnchor  )  [inline]
 

returns the anchor mask value for this control.

Anchors allow you to customize the sizing behavior of a particular control. Setting the alignment may be done at any time after the control has been instantiated. By anchoring a control you can have finer control over how the control gets resized when it's parent is resized than simply specifying an alignment value. However, changing the anchor value of a control will automatically set the control's alignment to ALIGN_NONE, while changing the control's alignment will automatically set the control's anchor value to ANCHOR_NONE. The two values are mutually exclusive, you can get one or the other, but not both. The following table describes the meanings of the various mask values for the anchor value, which can have either the value of ANCHOR_NONE or any combination of the other four mask types.
Value Meaning
ANCHOR_NONE This is the default value for a control's anchor property. No layout adjustments are performed on the control.
ANCHOR_TOP The Control is anchored to the top edge of the parent control it belongs to. Whatever the distance between the top edge and the top coordinate of the control when this is set, is maintained whenever the parent control's dimensions change. 
ANCHOR_LEFT The Control is anchored to the left edge of the parent control it belongs to. Whatever the distance between the left edge and the left coordinate of the control when this is set, is maintained whenever the parent control's dimensions change. 
ANCHOR_BOTTOM The Control is anchored to the bottom edge of the parent control it belongs to. Whatever the distance between the bottom edge and the bottom coordinate of the control when this is set, is maintained whenever the parent control's dimensions change. 
ANCHOR_RIGHT The Control is anchored to the right edge of the parent control it belongs to. Whatever the distance between the right edge and the right coordinate of the control when this is set, is maintained whenever the parent control's dimensions change.

float* VCF::Control::getAnchorDeltas  )  [inline]
 

returns the current delta for each of the anchors.

There will be a delta for the left, the top, the right, and the bottom sides. These deltas are recalculated whenever the controls bounds are set with the anchorDeltasNeedUpdating param set to true.

virtual void VCF::Control::getAppNameAndKey String appName,
String key
[protected, virtual]
 

Reimplemented from VCF::Component.

bool VCF::Control::getAutoStartDragDrop  ) 
 

returns whether or not auto dragging is on or off.

Returns:
bool true if auto dragging is on, otherwise false.

Border* VCF::Control::getBorder  ) 
 

Returns the control's current border object, if any.

virtual double VCF::Control::getBottom  )  [virtual]
 

returns the bottom position in parent coordinates

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

returns the bounds in parent coordinates of the Control.

The Control derived class must call it's Peer's getBounds() method

static Control* VCF::Control::getCapturedMouseControl  )  [static]
 

returns the current control that has captured the mouse input.

This may return NULL if no control has expressly captured the mouse input through the Control::keepMouseEvents() method.

virtual Rect VCF::Control::getClientBounds const bool &  includeBorder = true  )  [virtual]
 

Returns the bounds in terms of the control's coordinates.

Thus the top and left will typically be 0.0, 0.0, and the right and bottom of the bounds will typically equal the width and height of the control.

Reimplemented in VCF::Dialog, VCF::TabbedPages, and VCF::Window.

Color* VCF::Control::getColor  ) 
 

returns the color used to fill the background of this control

See also:
CustomControl::setUseColorForBackground

Container* VCF::Control::getContainer  )  [inline]
 

returns the current container for this control.

The container determines whether or not the control can contain child controls. By default a control container is NULL, indicating it cannot hold any child controls.

Returns:
Container returns the current container for the control. If the value returned is NULL, then the control has no container, and cannot have any child controls.
See also:
Container

static Control* VCF::Control::getCurrentFocusedControl  )  [static]
 

returns the currently focused control.

int32 VCF::Control::getCursorID  )  [inline]
 

returns the cursor ID for the control.

The cursor id represents an id tag that identifies a Cursor object to be used to for controling the display of the mouse cursor. To access the Cursor object directly call the CursorManager::getCursor() method.

Returns:
int32 the id of the cursor
See also:
CursorManager

CursorManager::getCursor()

Cursor

Font* VCF::Control::getFont  ) 
 

Returns the font associated with this control.

virtual Control* VCF::Control::getHeavyweightParent  )  [virtual]
 

Returns the first parent of the Control that is a heavweight Control, i.e it's isLighweight() method return false.

virtual double VCF::Control::getHeight  )  [virtual]
 

returns the height of the control

virtual double VCF::Control::getLeft  )  [virtual]
 

Returns the left position in parent coordinates.

double VCF::Control::getMaxHeight  )  [inline]
 

Size VCF::Control::getMaxSize  )  [inline]
 

Returns the maximum size for this control.

At the moment this is only used for Frames, to control the maximum size a user can resize the Frame to.

Returns:
Size the maximum size. If the width_ field is set equal to Control::mmIgnoreMaxWidth then the maximum width is ignored. If the height_ field is set equal to Control::mmIgnoreMaxHeight then the maximum height is ignored.

double VCF::Control::getMaxWidth  )  [inline]
 

double VCF::Control::getMinHeight  )  [inline]
 

Returns the minimum height of the control.

See also:
getMinSize

Size VCF::Control::getMinSize  )  [inline]
 

Returns the minimum size for this control.

At the moment this is only used for Frames, to control the minimum size a user can resize the Frame to.

Returns:
Size the minimum size. If the width_ field is set equal to Control::mmIgnoreMinWidth then the minimum width is ignored. If the height_ field is set equal to Control::mmIgnoreMinHeight then the minimum height is ignored.

double VCF::Control::getMinWidth  )  [inline]
 

Returns the minimum width of the control.

See also:
getMinSize

Model* VCF::Control::getModel  )  [inline]
 

VariantData VCF::Control::getModelKey  )  [inline]
 

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

returns the control's current parent

Frame* VCF::Control::getParentFrame  ) 
 

This returns a pointer to the top level frame that this control is associated with.

Returns:
Frame the top level froma instance for this control. This may not be the parent instance as the control's current parent.
See also:
Control::getParent()

virtual ControlPeer* VCF::Control::getPeer  )  [virtual]
 

returns the control's native peer interface

PopupMenu* VCF::Control::getPopupMenu  ) 
 

returns the Control's PopupMenu, if any.

The popupmenu will be displayed whenever the user right clicks the mouse over the control.

virtual double VCF::Control::getPreferredHeight  )  [inline, virtual]
 

returns the preferred height for this control.

This is used when determing the height of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size.

Reimplemented in VCF::CheckBoxControl, VCF::ComboBoxControl, VCF::CommandButton, VCF::HeaderControl, VCF::Label, VCF::ProgressControl, VCF::PushButton, VCF::RadioButtonControl, VCF::SliderControl, VCF::Splitter, VCF::TextControl, and VCF::Window.

virtual double VCF::Control::getPreferredWidth  )  [inline, virtual]
 

returns the preferred width for this control.

This is used when determing the width of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size.

Reimplemented in VCF::CheckBoxControl, VCF::CommandButton, VCF::HeaderControl, VCF::Label, VCF::ProgressControl, VCF::PushButton, VCF::RadioButtonControl, VCF::SliderControl, VCF::Splitter, and VCF::Window.

static Control* VCF::Control::getPreviousMouseOverControl  )  [static]
 

returns the control the mouse was previously over, if any.

virtual double VCF::Control::getRight  )  [virtual]
 

Returns the right position in parent coordinates.

Scrollable* VCF::Control::getScrollable  )  [inline]
 

returns an object implementing the Scrollable interface The default value is NULL, indicating the control does not support scrolling behaviour

int32 VCF::Control::getTabOrder  )  [inline]
 

Returns the tab order of the control.

Tab order may be specified independently of the controls child order within it's parent Container.

Returns:

bool VCF::Control::getTabStop  )  [inline]
 

Indicates whether the control responds to the TAB key to set it's focus when tabbing from control to control.

Returns:
bool whether the control responds to the Tab key. If the return value is true then the control will allow itself to become focused, while a value of false indicates the control does not respond to the tab key and will not become focused.

String VCF::Control::getToolTipText  )  [inline]
 

returns a string that is used to display in the tooltip for the control.

virtual double VCF::Control::getTop  )  [virtual]
 

returns the top position in parent coordinates

View* VCF::Control::getView  ) 
 

returns the view associated with this control

virtual Model* VCF::Control::getViewModel  )  [inline, virtual]
 

Reimplemented from VCF::AbstractView.

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

is this control visible to the user.

Returns:
bool true if the control is visible, otherwise false.

String VCF::Control::getWhatThisHelpString  )  [inline]
 

returns a string that is used for context sensitive help for the control.

virtual double VCF::Control::getWidth  )  [virtual]
 

returns the width of the control

virtual void VCF::Control::gotFocus FocusEvent event  )  [virtual]
 

Called when the control gains keyboard focus.

Override this for your own custom behaviour if you need to.

Reimplemented in VCF::MultilineTextControl, and VCF::TextControl.

virtual void VCF::Control::handleEvent Event event  )  [virtual]
 

This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc.

Once inside the event the Control determines the type, and behaves accordingly, as well as notifying any appropriate listeners.

Reimplemented from VCF::UIComponent.

Reimplemented in VCF::HeaderControl, VCF::ListBoxControl, VCF::ListControl, VCF::ListViewControl, VCF::TabbedPages, VCF::TableControl, VCF::TextControl, VCF::Toolbar, VCF::TreeControl, VCF::TreeListControl, and VCF::Window.

void VCF::Control::handleEventAndForwardToChildren Event event  ) 
 

calls handleEvent on this control, and then calls handleEventToChildren() on any child controls the container of this control may have.

bool VCF::Control::hasChildren  ) 
 

This returns whether or not the control has any child controls associated with it.

Returns:
bool returns true if the control has children. A control with children, by definition, must have a Container instance. Returns false if the control has no children. Note that a false return value doesn't neccessarily mean that the control has no container (just that the container has no child controls yet).
See also:
getContainer()

bool VCF::Control::ignoreForParentScrolling  )  [inline]
 

void VCF::Control::internal_afterPaint GraphicsContext context  ) 
 

called by the internals of the framework - DO NOT CALL!

void VCF::Control::internal_beforePaint GraphicsContext context  ) 
 

called by the internals of the framework - DO NOT CALL!

bool VCF::Control::isActive  ) 
 

This returns a value that indicates whether or not hte control is considered to be active.

A control is considered active if it belongs to, i.e. is a child eitehr directly or indirectly, (or is) the active frame. This is determined by checking if the control's getParentFrame() equals the Frame::getActiveFrame().

Returns:
bool true if the control is active, otherwise false.

Reimplemented in VCF::Frame.

bool VCF::Control::isChild  ) 
 

Returns whether or not this control is a child of some other control.

Equivalent to checking the return value of getParent() for a non-null value.

Returns:
bool returns true if the control has a parent. Otherwise it returns false.
See also:
getParent()

bool VCF::Control::isDoubleBuffered  ) 
 

is this component double buffered.

Returns:
bool true if the component is double buffered, otherwise false.

bool VCF::Control::isEnabled  ) 
 

returns whether the control is enabled or not.

A control that is enabled can receive mouse events. A control that is not enabled will not respond to either mouse events or keyboard events.

bool VCF::Control::isFocused  ) 
 

does this control currently have focus?

Returns:
bool true if the control has focus, otehr wise false. If a control has focus, it will receive keyboard events. Currently all controls get focused when they receive a mouse down event.

bool VCF::Control::isIgnoredForLayout  ) 
 

Returns whether this control must be ignored in the control container's layout implementation.

Unlike the alignment values returned by getAlignment(), which are optional for the container to use, this must be honored. Failure to do so may result in dire intergalatic consequences, or worse, result in a shortage of SUVs. If this is false, the default value, then the control is laid out however the container is implemented to accomplish this. If the value is true, then the container should simply place the control wherever the controls bounds indicate. Container implementations that have some sort of layout that processes controls sequentially, such as the HorizontalLayoutContainer, must ignore a control that returns false.

virtual bool VCF::Control::isLightWeight  )  [virtual]
 

identifies the control as a lightweight control.

Lightweight control's do not take up windowing system resources, instead, they rely on all events and paint notification be sent to them via their parents. The default return for this is false, so only those controls specifically actign as light weight Controls need to return true

Reimplemented in VCF::CustomControl.

bool VCF::Control::isUsingRenderBuffer  )  [inline]
 

Returns true if the Control should take advantage of the GraphicsContexts' render buffer for anti-aliased vector graphics (based on the AGG library).

void VCF::Control::keepMouseEvents  ) 
 

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

bool VCF::Control::keepsArrowKeys  )  [inline]
 

This function determines whether or not the control should have precedence and prevent the the arrow keys from switching focus to another control.

Typically this will return false, with the exception of keyboard entry controls like the TextControl. To prevent the tab key from causing a the framework to switch to another control, override this and return true.

Returns:
bool returns false, indicating the framework can go ahead and switch the focus to the next tabbed control when appropriate, otherwise if it returns true the control will keep the tabbed key event and process it

Reimplemented in VCF::ComboBoxControl.

bool VCF::Control::keepsReturnCharacter  )  [inline]
 

this function determines if the control keeps the key event when the return key is pressed, or if it will relinquish the event for the system to process.

Most controls will return false with the exception of keyboard entry controls. If the control does keep the event, then any default buttons will NOT receive their enter key event until they receive focus.

See also:
Button::setDefault()

bool VCF::Control::keepsTabKey  )  [inline]
 

This function determines whether or not the control should have precedence and prevent the the tab key from switching focus to another control.

Typically this will return false, with the exception of keyboard entry controls like the TextControl. To prevent the tab key from causing a the framework to switch to another control, override this and return true.

Returns:
bool returns false, indicating the framework can go ahead and switch the focus to the next tabbed control when appropriate, otherwise if it returns true the control will keep the tabbed key event and process it

virtual void VCF::Control::keyDown KeyboardEvent event  )  [virtual]
 

called when the user presses the key down

Reimplemented in VCF::Dialog, VCF::ListBoxControl, VCF::PushButton, VCF::SliderControl, VCF::TableControl, and VCF::TreeListControl.

virtual void VCF::Control::keyPressed KeyboardEvent event  )  [virtual]
 

called when the user simply presses the key and represents a full key cycle having occurred, in other words the key has been pressed down and then released

Reimplemented in VCF::ComboBoxControl, and VCF::ListBoxControl.

virtual void VCF::Control::keyUp KeyboardEvent event  )  [virtual]
 

called when the user releases the key

Reimplemented in VCF::ListBoxControl, VCF::PushButton, and VCF::SliderControl.

virtual void VCF::Control::lostFocus FocusEvent event  )  [virtual]
 

Called when the control loses keyboard focus.

Override this for your own custom behaviour if you need to.

virtual void VCF::Control::mnemonicActivate  )  [virtual]
 

Pressing the accelerator character will cause the control's mnemonicActivate() method to be fired, which by default sets focus to the control.

Reimplemented in VCF::CommandButton, and VCF::Label.

virtual void VCF::Control::modelChanged Model oldModel,
Model newModel
[inline, virtual]
 

Reimplemented in VCF::HeaderControl, VCF::ListControl, VCF::TabbedPages, VCF::TableControl, and VCF::TreeControl.

virtual void VCF::Control::mouseClick MouseEvent event  )  [virtual]
 

Called when one or mouse buttons are held down and immediately released ( a "mouse click" ).

override this to provide specific behaviours when a mouse click occurs

Reimplemented in VCF::ListBoxControl, VCF::PushButton, and VCF::TableControl.

virtual void VCF::Control::mouseDblClick MouseEvent event  )  [virtual]
 

Called when one or mouse buttons are held down and immediately released ( a "mouse double click" ) twice, within some specific time period, as determined on the windowing system.

override this to provide specific behaviours when a mouse double click occurs

Reimplemented in VCF::ListBoxControl, and VCF::Splitter.

virtual void VCF::Control::mouseDown MouseEvent event  )  [virtual]
 

Called when one (or more) of the mouse buttons are held down.

override this to provide specific behaviours when the mouse buttons are held down

Reimplemented in VCF::ComboBoxControl, VCF::HeaderControl, VCF::ListBoxControl, VCF::PopupWindow, VCF::PushButton, VCF::SliderControl, VCF::Splitter, VCF::TabbedPages, VCF::TableControl, VCF::ToggledButton, VCF::ToolbarDock, and VCF::TreeListControl.

virtual void VCF::Control::mouseEnter MouseEvent event  )  [virtual]
 

Called when the mouse first enters the control's bounds.

override this to provide specific behaviours when the control is first entered, like highlighting the control

Reimplemented in VCF::ComboBoxControl, and VCF::PushButton.

virtual void VCF::Control::mouseLeave MouseEvent event  )  [virtual]
 

Called when the mouse leaves the control's bounds.

override this to provide specific behaviours when the control is left, like highlighting the control

Reimplemented in VCF::ComboBoxControl, and VCF::PushButton.

virtual void VCF::Control::mouseMove MouseEvent event  )  [virtual]
 

Called when the mouse moves over the control.

override this to provide specific behaviours when the mouse moves over the control.

Reimplemented in VCF::ComboBoxControl, VCF::HeaderControl, VCF::ListBoxControl, VCF::PushButton, VCF::SliderControl, VCF::Splitter, VCF::TabbedPages, VCF::TableControl, VCF::ToggledButton, and VCF::ToolbarDock.

virtual void VCF::Control::mouseUp MouseEvent event  )  [virtual]
 

Called when one (or more) of the mouse buttons are released.

override this to provide specific behaviours when the mouse buttons are released.

Reimplemented in VCF::ComboBoxControl, VCF::HeaderControl, VCF::ListBoxControl, VCF::PushButton, VCF::SliderControl, VCF::Splitter, VCF::TabbedPages, VCF::TableControl, VCF::ToggledButton, and VCF::ToolbarDock.

virtual void VCF::Control::paint GraphicsContext context  )  [pure virtual]
 

Paints the control.

Called by the underlying windowing system whenever the control needs to be painted. Note that in some cases the GraphicsContext passed in to this method may not be the same pointer as the GraphicsContext that the control holds itself. During the paint() method you should only use the context value for all your drawing and not the one returned in getContext(). The value returned by getContext() should be used for drawing that takes place outside of the paint() method.

If the control allows paint notification, then the framework will fire an event to the BeforeControlPainted delegate prior to calling the control's paint() method. After the paint() method has returned, if the control allows paint notification, the framework will fire an event to the AfterControlPainted delegate. This allows outside observers to take part in the paint cycle, but beware that this does come at a bit of a cost, so use this feature sparingly.

Note: This should NEVER be called by programmers using the VCF, it will be called for you during the course of your applications native event loop, and is only here for providing custom drawing routines for controls. In other words: you implement it, you never call it yourself.

See also:
getAllowPaintNotification

Implemented in VCF::CheckBoxControl, VCF::ComboBoxControl, VCF::CommandButton, VCF::ControlContainer, VCF::CustomControl, VCF::Dialog, VCF::DropDownControl, VCF::Frame, VCF::HeaderControl, VCF::ImageControl, VCF::Label, VCF::ListBoxControl, VCF::ListViewControl, VCF::Panel, VCF::PopupWindow, VCF::ProgressControl, VCF::PushButton, VCF::RadioButtonControl, VCF::SliderControl, VCF::Splitter, VCF::StatusBar, VCF::TabbedPages, VCF::TabbedPages::ScrollButton, VCF::TabSheet, VCF::TableControl, VCF::TextControl, VCF::Toolbar, VCF::ToolbarDock, VCF::TransparentWindow, VCF::TreeControl, VCF::Window, VCF::HTMLBrowserControl, and VCF::OpenGLControl.

void VCF::Control::paintBorder GraphicsContext context  ) 
 

Paints the border for the control.

This is called by the framework during the painting of the control. Do not count on this being called at the same time as the paint() method, as the order in which this is called is dependant on the underlying windowing system. For example, on Win32 systems this call may be made by the framework outside of the WM_PAINT message handling, while on Mac OS X this will be called in the same event handler that dispatches the control's paint() method.

virtual void VCF::Control::parentChange ControlEvent event  )  [virtual]
 

Called when the parent of the control is changed.

Override this for your own custom behaviour if you need to.

virtual void VCF::Control::positionChange ControlEvent event  )  [virtual]
 

called when the control's coordinates change.

Override this for your own custom behaviour if you need to.

void VCF::Control::postChildPaint GraphicsContext graphicsContext,
Control child,
Rect oldClipRect
 

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.

virtual void VCF::Control::postLoaded const bool &  visible  )  [virtual]
 

Called after the component is done loading.

Control's will re-implement this and set their visible state to whatever the value of the visible parameter is.

Reimplemented from VCF::Component.

void VCF::Control::preChildPaint GraphicsContext graphicsContext,
Control child,
Rect childClipRect
 

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.

virtual void VCF::Control::preLoading  )  [virtual]
 

Called when loading the component.

Control's will re-implement this and set their visible state to false.

Reimplemented from VCF::Component.

void VCF::Control::releaseMouseEvents  ) 
 

releases mouse events - goes back to normal event handling

void VCF::Control::removeFromParent const bool &  freeInstance = true  ) 
 

throw( InvalidPeer ); -JEC - FIXME later

void VCF::Control::repaint Rect repaintRect = NULL  ) 
 

repaint the control.

This post a message to the windowing systems message queue.

Parameters:
Rect a rectangle may be specified indicating the precise region of the control that should be repainted. If this is NULL, then the entire visible region of the control is repainted

void VCF::Control::repaintNow Rect repaintRect = NULL  ) 
 

void VCF::Control::setAcceleratorKey const uint32 index,
AcceleratorKey accelerator
 

void VCF::Control::setAlignment const AlignmentType alignment  ) 
 

sets the alignment of the control

Reimplemented in VCF::Splitter.

void VCF::Control::setAllowPaintNotification const bool &  val  )  [inline]
 

Sets whether or not the control will allow paint notification.

See also:
paint()

BeforeControlPainted

AfterControlPainted

void VCF::Control::setAllowsFocus const bool &  val  ) 
 

void VCF::Control::setAllowsMouseFocus const bool &  val  ) 
 

void VCF::Control::setAnchor const AnchorTypes anchor  ) 
 

sets the anchor mask value for the control.

See getAnchor() for a complete description of the various values and what they mean for the control's alignment.

See also:
getAnchor()

void VCF::Control::setAutoStartDragDrop const bool &  canAutoStartDragDrop  ) 
 

sets auto start dragging to true or false

void VCF::Control::setBorder Border border  ) 
 

Sets the border for this control.

The control will check the border's owner value, and if it's NULL then it will set itself as the component owner of the border.

virtual void VCF::Control::setBottom const double &  bottom  )  [virtual]
 

sets the bottom value of the control.

This value is in the coordinates of the parent control.

void VCF::Control::setBounds Rect rect,
const bool &  anchorDeltasNeedUpdating = true
 

sets the bounds of the control.

The values in the rect parameter must be in the corrdinate system of the parent control

Parameters:
Rect the new bounds of the control. If the control implements the Container interface, then any child controls wil be resized via the Container::resizeChildren() automatically.

void VCF::Control::setBounds const double &  x,
const double &  y,
const double &  width,
const double &  height
 

sets the bounds of the control.

You can pass in left, top, width and height as the new position for the control.

Parameters:
double x the new left coordinate of the control
double y the new top coordinate of the control
double width the new width of the control
double height the new height of the control

static void VCF::Control::setCapturedMouseControl Control control  )  [static]
 

sets the control that has captured the mouse.

Used internally only. DO NOT call, this is for internal framework use only.

void VCF::Control::setColor Color color  ) 
 

sets the color to fill this control's background with

void VCF::Control::setContainer Container container  ) 
 

sets the current container for a control.

Setting a control's container, will enable (or disable, if the container value passed in is NULL) the control's ability to handle child controls

See also:
Container

void VCF::Control::setCursorID const int32 cursorID  ) 
 

sets the cursor ID for the control.

This will change the cursor appearance whenever the mouse is over the control.

void VCF::Control::setDoubleBuffered const bool &  doubleBuffered  ) 
 

sets whether or not this control is double buffered.

A control that is double buffered will automatically use a memory graphics context to draw on, and then blit the contents of this on the actual graphics context for the control. Doing this results in completely flicker free drawing of your controls, but is slighty slower. Without double buffering, the painting of the control takes place directly on the control's graphics context, and can result in flicker, but is slighlty faster. Controls have this set to true by default, with the exception of the OpenGL control, which lets the underlying OpenGL graphics engine take care of the double buffering for it.

Parameters:
bool true to enable the double buffered drawing, otherwise false

void VCF::Control::setEnabled const bool &  enabled  ) 
 

sets whether the control is enabled or not.

Parameters:
bool true if the control is enabled, otherwise false.

Reimplemented in VCF::ComboBoxControl.

Control* VCF::Control::setFocused  ) 
 

Makes this control the currently focused control.

A control with focus will receive keyboard events.

Returns:
Control - the previously focused control (which will receive a FocusLost event).

void VCF::Control::setFont Font font  ) 
 

sets the font attributes.

Note the internal font is not reassigned, but rather the data is copied over from the font instance passed in to the method. The caller completely owns the font instance that is passed in, and is responsible for cleaning up it's memory.

Parameters:
Font the font to copy data from in replacing attributes of the control's font.

virtual void VCF::Control::setHeight const double &  height  )  [virtual]
 

sets the height of the control.

If the control implements the Container interface, then any child controls will be resized via the Container::resizeChildren() automatically.

void VCF::Control::setIgnoredForLayout const bool &  val  ) 
 

void VCF::Control::setIgnoreForParentScrolling const bool &  val  )  [inline]
 

void VCF::Control::setKeepsArrowKeys const bool &  val  ) 
 

void VCF::Control::setKeepsReturnChar const bool &  val  ) 
 

void VCF::Control::setKeepsTabKey const bool &  val  ) 
 

virtual void VCF::Control::setLeft const double &  left  )  [virtual]
 

sets the left value for the control, immediately updates the controls position.

void VCF::Control::setMaxHeight const double &  val  )  [inline]
 

void VCF::Control::setMaxSize const Size val  )  [inline]
 

Sets the maximum size of the control.

Parameters:
Size the maximum size. If the width_ field is set equal to Control::mmIgnoreMaxWidth then the maximum width is ignored. If the height_ field is set equal to Control::mmIgnoreMaxHeight then the maximum height is ignored.

void VCF::Control::setMaxWidth const double &  val  )  [inline]
 

void VCF::Control::setMinHeight const double &  val  )  [inline]
 

Sets the minimum height of the control.

See also:
setMinSize

void VCF::Control::setMinSize const Size val  )  [inline]
 

Sets the minimum size of the control.

Parameters:
Size the minimum size. If the width_ field is set equal to Control::mmIgnoreMinWidth then the minimum width is ignored. If the height_ field is set equal to Control::mmIgnoreMinHeight then the minimum height is ignored.

void VCF::Control::setMinWidth const double &  val  )  [inline]
 

Sets the minimum width of the control.

See also:
setMinSize

void VCF::Control::setModel Model val  )  [inline]
 

void VCF::Control::setModelKey const VariantData val  ) 
 

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

sets the parent for the control

void VCF::Control::setPopupMenu PopupMenu popupMenu  ) 
 

sets the popup menu for this control.

virtual void VCF::Control::setPreferredHeight const double &  height  )  [inline, virtual]
 

set the preferred height.

This is used when determing the height of the control when it is first created.

virtual void VCF::Control::setPreferredWidth const double &  width  )  [inline, virtual]
 

set the preferred width.

This is used when determing the height of the control when it is first created.

static void VCF::Control::setPreviousMouseOverControl Control control  )  [static]
 

virtual void VCF::Control::setRight const double &  right  )  [virtual]
 

sets the right value of the control.

This value is in the coordinates of the parent control.

virtual void VCF::Control::setScrollable Scrollable scrollable  )  [virtual]
 

sets the scrollable for the control.

Control's with a scrollable object will be able to provide scroll bars when neccessary.

See also:
Scrollable

Scrollable::setVirtualViewHeight

Scrollable::setVirtualViewWidth

Reimplemented in VCF::ListBoxControl.

void VCF::Control::setTabOrder const int32 tabOrder  ) 
 

void VCF::Control::setTabStop const bool &  tabStop  ) 
 

sets the tab stop value of the control.

The default value is true.

Parameters:
bool the new value for the tab stop property
See also:
getTabStop()

void VCF::Control::setToolTipText const String tooltip  ) 
 

sets the string that is used to display in the tooltip for the control.

virtual void VCF::Control::setTop const double &  top  )  [virtual]
 

sets the top value of the control.

This value is in the coordinates of the parent control.

void VCF::Control::setUseParentFont const bool &  useParentFont  ) 
 

sets whether the control should use it's parent font's settigns or use it's own independent of it's parent's font.

void VCF::Control::setUsingRenderBuffer const bool &  useRenderBuffer  ) 
 

sets whether or not the control is using the render buffer of it's GraphicsContext.

Using the render buffer allows the control to take advantage of the GraphicsContext's advanced anti-aliasing vector graphics. This will create snapshot image that is retained and used to draw into. When the drawing is done (i.e. paint() returns), the image contents are copied back to the actual GraphicsContext. If the control is resized the image is resized as well

void VCF::Control::setView View view  ) 
 

sets the view to associate with this control

virtual void VCF::Control::setViewModel Model viewModel  )  [virtual]
 

sets a new model for the view Once set, the control fires a ControlModelChanged event.

Reimplemented from VCF::AbstractView.

Reimplemented in VCF::ComboBoxControl.

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

determines whether or not the control is visible, and set it visible if it wasn't.

Parameters:
bool true to show the control, false to hide it

void VCF::Control::setWhatThisHelpString const String whatThisHelpString  )  [inline]
 

sets the string that is used for context sensitive help for the control.

virtual void VCF::Control::setWidth const double &  width  )  [virtual]
 

sets the width of the control.

If the control implements the Container interface, then any child controls will be resized via the Container::resizeChildren() automatically.

virtual void VCF::Control::sizeChange ControlEvent event  )  [virtual]
 

called when the control's bounds change.

Override this for your own custom behaviour if you need to.

void VCF::Control::translateFromScreenCoords Rect rect  ) 
 

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

Parameters:
Rect the initial rect value, in the coordinate system of the Screen.

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

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

void VCF::Control::translateToLocal Point point  ) 
 

translate the point from parent controls coordinate system to this controls coordinate system

void VCF::Control::translateToParent Point point  ) 
 

translate the point from this controls coordinate system to the parent controls coordinate system

void VCF::Control::translateToScreenCoords Rect rect  ) 
 

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

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

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

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

void VCF::Control::updateAnchorDeltas  )  [protected]
 

bool VCF::Control::useParentFont  ) 
 

returns whether this control will use the font settings of the parent's font.

Returns:
bool true if the control does use it's parent's font settings otherwise false.


Member Data Documentation

VCF::Control::AfterControlPainted
 

AlignmentType VCF::Control::aligment_ [protected]
 

uint32 VCF::Control::anchor_ [protected]
 

float VCF::Control::anchorDeltas_[4] [protected]
 

VCF::Control::BeforeControlPainted
 

VCF::Control::BeforePopupMenu
 

Border* VCF::Control::border_ [protected]
 

Rect* VCF::Control::bounds_ [protected]
 

Control* VCF::Control::capturedMouseControl [static, protected]
 

Point VCF::Control::clickPt_ [protected]
 

Rect* VCF::Control::clientBounds_ [protected]
 

Color* VCF::Control::color_ [protected]
 

Container* VCF::Control::container_ [protected]
 

VCF::Delegate VCF::Control::ControlDelegate
 

Event Delegate:
ControlSized fires an ControlEvent, with a type set to Control::CONTROL_SIZED. Fired whenever the control's width or height changes. Calls to setBounds(), setHeight(), or setWidth() can trigger this.
event class: ControlEvent
event type: Control::CONTROL_SIZED

VCF::Control::ControlHelpRequested
 

VCF::Control::ControlModelChanged
 

VCF::Control::ControlParentChanged
 

VCF::Delegate VCF::Control::ControlPopupMenuDelegate
 

Event Delegate:
AfterControlPainted fires an ControlPopupMenuMenuEvent before the popup menu is displayed, allowing for customization of the popup menu.
event class: ControlPopupMenuMenuEvent
event type: Control::BEFORE_POPUP_MENU

VCF::Control::ControlPositioned
 

VCF::Control::ControlSized
 

uint32 VCF::Control::controlState_ [protected]
 

Control* VCF::Control::currentFocusedControl [static, protected]
 

Cursor* VCF::Control::cursor_ [protected]
 

int32 VCF::Control::cursorID_ [protected]
 

VCF::Delegate VCF::Control::FocusDelegate
 

Event Delegate:
FocusGained fires an FocusEvent, with a type set to Control::FOCUS_GAINED. Fired whenever the control receives notice that it has become the focused control. This is triggered by the underlying windowing system.
event class: FocusEvent
event type: Control::FOCUS_GAINED

VCF::Control::FocusGained
 

VCF::Control::FocusLost
 

Font* VCF::Control::font_ [protected]
 

VCF::Delegate VCF::Control::HelpDelegate
 

Event Delegate:
HelpRequested fires an HelpEvent, with a type set to Control::HELP_REQUESTED. Fired whenever the control receives notice the F1 key (or some other acknowledged help key) has been pressed. This is triggered by the underlying windowing system.
event class: HelpEvent
event type: Control::HELP_REQUESTED

VCF::Control::HelpRequested
 

VCF::Delegate VCF::Control::KeyboardDelegate
 

Event Delegate:
KeyPressed fires an KeyboardEvent, with a type set to Control::KEYBOARD_PRESSED. Fired whenever the control receives a keypress. This is triggered by the underlying windowing system.
event class: KeyboardEvent
event type: Control::KEYBOARD_PRESSED

VCF::Control::KeyDown
 

VCF::Control::KeyPressed
 

VCF::Control::KeyUp
 

Size VCF::Control::maxSize_ [protected]
 

Size VCF::Control::minSize_ [protected]
 

VariantData VCF::Control::modelKey_ [protected]
 

VCF::Control::MouseClicked
 

VCF::Delegate VCF::Control::MouseDelegate
 

Event Delegate:
MouseDoubleClicked fires an MouseEvent, with a type set to Control::MOUSE_DBLCLICK. Fired whenever the control receives a double click from the mouse. This is triggered by the underlying windowing system.
event class: MouseEvent
event type: Control::MOUSE_DBLCLICK

Reimplemented in VCF::HeaderControl, VCF::ListViewControl, and VCF::TreeListControl.

VCF::Control::MouseDoubleClicked
 

VCF::Control::MouseDown
 

VCF::Control::MouseEnter
 

VCF::Control::MouseLeave
 

VCF::Control::MouseMove
 

VCF::Control::MouseUp
 

Control* VCF::Control::parent_ [protected]
 

ControlPeer* VCF::Control::peer_ [protected]
 

PopupMenu* VCF::Control::popupMenu_ [protected]
 

Control* VCF::Control::previousMouseOverControl [static, protected]
 

Scrollable* VCF::Control::scrollable_ [protected]
 

int32 VCF::Control::tabOrder_ [protected]
 

VCF::Control::ToolTip
 

String VCF::Control::toolTip_ [protected]
 

VCF::Delegate VCF::Control::ToolTipDelegate
 

Event Delegate:
ToolTipRequested fires an ToolTipEvent, with a type set to TOOLTIP_EVENT_TIP_REQESTED. This is fired if the VCF framework determines a tooltip can be displayed for this control, and no tootip text was defined for the control.
event class: ToolTipEvent
event type: TOOLTIP_EVENT_TIP_REQESTED
See also:
ToolTipEvent.h for more on TOOLTIP_EVENT_TIP_REQESTED define

ToolTipEvent

VCF::Control::ToolTipRequested
 

View* VCF::Control::view_ [protected]
 

VCF::Delegate VCF::Control::WhatsThisHelpDelegate
 

Event Delegate:
ControlHelpRequested fires an WhatsThisHelpEvent, with a type set to Control::WHATS_THIS_HELP_REQUESTED. Fired whenever the control receives notice of a context sensitive help event. This is triggered by the underlying windowing system. On Win32 this is frequently triggered by right clicking on a control, and clicking on the "Whats This?" context menu item.
event class: WhatsThisHelpEvent
event type: Control::WHATS_THIS_HELP_REQUESTED

String VCF::Control::whatThisHelpString_ [protected]
 


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