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

VCF::Label Class Reference

#include <vcf/ApplicationKit/Label.h>

Inheritance diagram for VCF::Label:

VCF::CustomControl VCF::Control VCF::UIComponent VCF::AbstractView VCF::Component VCF::View VCF::ObjectWithCallbacks VCF::Object List of all members.

Public Member Functions

 Label ()
virtual ~Label ()
virtual void paint (GraphicsContext *context)
 Paints the control.
void setCaption (const String &caption)
String getCaption ()
virtual void setName (const String &name)
 sets the name of the component.
TextAlignmentType getTextAlignment ()
void setTextAlignment (const TextAlignmentType &textAlignment)
TextVerticalAlignment getVerticalAlignment ()
void setVerticalAlignment (const TextVerticalAlignment &verticalAlignment)
ControlgetFocusControl ()
void setFocusControl (Control *focusControl)
bool getWordWrap ()
void setWordWrap (const bool &wordWrap)
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.
virtual double getPreferredHeight ()
 returns the preferred height for this control.
virtual double getPreferredWidth ()
 returns the preferred width for this control.

Constructor & Destructor Documentation

VCF::Label::Label  ) 
 

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


Member Function Documentation

String VCF::Label::getCaption  ) 
 

Control* VCF::Label::getFocusControl  )  [inline]
 

virtual double VCF::Label::getPreferredHeight  )  [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 from VCF::Control.

virtual double VCF::Label::getPreferredWidth  )  [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 from VCF::Control.

TextAlignmentType VCF::Label::getTextAlignment  )  [inline]
 

TextVerticalAlignment VCF::Label::getVerticalAlignment  )  [inline]
 

bool VCF::Label::getWordWrap  )  [inline]
 

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

virtual void VCF::Label::paint GraphicsContext context  )  [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

Reimplemented from VCF::CustomControl.

void VCF::Label::setCaption const String caption  ) 
 

void VCF::Label::setFocusControl Control focusControl  ) 
 

virtual void VCF::Label::setName const String name  )  [virtual]
 

sets the name of the component.

For naming conventions/rules please see getName().

Reimplemented from VCF::Component.

void VCF::Label::setTextAlignment const TextAlignmentType textAlignment  ) 
 

void VCF::Label::setVerticalAlignment const TextVerticalAlignment verticalAlignment  ) 
 

void VCF::Label::setWordWrap const bool &  wordWrap  ) 
 


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