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

VCF::Toolbar Class Reference

A class for adding toolbars to your window. More...

#include <vcf/ApplicationKit/Toolbar.h>

Inheritance diagram for VCF::Toolbar:

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

Public Member Functions

 Toolbar ()
virtual ~Toolbar ()
ToolbarModelgetToolbarModel ()
ToolbarItemaddToolBarButton (const String &caption)
ImageListgetImageList ()
void setImageList (ImageList *imageList)
void setShowButtonCaptions (const bool &val)
bool getShowButtonCaptions ()
Size getButtonSize ()
void setButtonSize (const Size &buttonSize)
double getButtonWidth ()
void setButtonWidth (const double &val)
double getButtonHeight ()
void setButtonHeight (const double &val)
void setButtonCaptionsHorizontal (const bool &val)
bool getButtonCaptionsHorizontal ()
void setEnableAutoResize (const bool &val)
bool isAutoResizeEnabled ()
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.
virtual void paint (GraphicsContext *context)
 Paints the control.

Protected Attributes

ToolbarPeertoolbarPeer_
ImageListimageList_
bool showButtonCaptions_
bool buttonCaptionsHorizontal_
Size buttonSize_

Classes

class  FloatingToolbar
 inner class used by the Toolbar to create a Floating toolbar window when the Toolbar is dragged out of it's dock. More...

Detailed Description

A class for adding toolbars to your window.

A toolbar has a series of buttons (each represented by a ToolbarItem).


Constructor & Destructor Documentation

VCF::Toolbar::Toolbar  ) 
 

virtual VCF::Toolbar::~Toolbar  )  [virtual]
 


Member Function Documentation

ToolbarItem* VCF::Toolbar::addToolBarButton const String caption  )  [inline]
 

bool VCF::Toolbar::getButtonCaptionsHorizontal  )  [inline]
 

double VCF::Toolbar::getButtonHeight  )  [inline]
 

Size VCF::Toolbar::getButtonSize  )  [inline]
 

double VCF::Toolbar::getButtonWidth  )  [inline]
 

ImageList* VCF::Toolbar::getImageList  )  [inline]
 

bool VCF::Toolbar::getShowButtonCaptions  )  [inline]
 

ToolbarModel* VCF::Toolbar::getToolbarModel  )  [inline]
 

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

bool VCF::Toolbar::isAutoResizeEnabled  ) 
 

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

Implements VCF::Control.

void VCF::Toolbar::setButtonCaptionsHorizontal const bool &  val  ) 
 

void VCF::Toolbar::setButtonHeight const double &  val  )  [inline]
 

void VCF::Toolbar::setButtonSize const Size buttonSize  ) 
 

void VCF::Toolbar::setButtonWidth const double &  val  )  [inline]
 

void VCF::Toolbar::setEnableAutoResize const bool &  val  ) 
 

void VCF::Toolbar::setImageList ImageList imageList  ) 
 

void VCF::Toolbar::setShowButtonCaptions const bool &  val  ) 
 


Member Data Documentation

bool VCF::Toolbar::buttonCaptionsHorizontal_ [protected]
 

Size VCF::Toolbar::buttonSize_ [protected]
 

ImageList* VCF::Toolbar::imageList_ [protected]
 

bool VCF::Toolbar::showButtonCaptions_ [protected]
 

ToolbarPeer* VCF::Toolbar::toolbarPeer_ [protected]
 


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