#include <YBarGraph.h>


Public Member Functions | |
| virtual | ~YBarGraph () |
| virtual const char * | widgetClass () const |
| void | addSegment (const YBarGraphSegment &segment) |
| void | deleteAllSegments () |
| int | segments () const |
| const YBarGraphSegment & | segment (int segmentIndex) const |
| void | setValue (int segmentIndex, int newValue) |
| void | setLabel (int segmentIndex, const std::string &newLabel) |
| void | setSegmentColor (int segmentIndex, const YColor &color) |
| void | setTextColor (int segmentIndex, const YColor &color) |
| virtual bool | setProperty (const std::string &propertyName, const YPropertyValue &val) |
| virtual YPropertyValue | getProperty (const std::string &propertyName) |
| virtual const YPropertySet & | propertySet () |
Public Member Functions inherited from YWidget | |
| virtual | ~YWidget () |
| virtual std::string | debugLabel () const |
| std::string | helpText () const |
| void | setHelpText (const std::string &helpText) |
| bool | hasChildren () const |
| YWidget * | firstChild () const |
| YWidget * | lastChild () const |
| YWidgetListIterator | childrenBegin () const |
| YWidgetListIterator | childrenEnd () const |
| YWidgetListConstIterator | childrenConstBegin () const |
| YWidgetListConstIterator | childrenConstEnd () const |
| YWidgetListIterator | begin () |
| YWidgetListIterator | end () |
| int | childrenCount () const |
| bool | contains (YWidget *child) const |
| virtual void | addChild (YWidget *child) |
| virtual void | removeChild (YWidget *child) |
| void | deleteChildren () |
| YWidget * | parent () const |
| bool | hasParent () const |
| void | setParent (YWidget *newParent) |
| YDialog * | findDialog () |
| YWidget * | findWidget (YWidgetID *id, bool doThrow=true) const |
| virtual int | preferredWidth ()=0 |
| virtual int | preferredHeight ()=0 |
| virtual int | preferredSize (YUIDimension dim) |
| virtual void | setSize (int newWidth, int newHeight)=0 |
| bool | isValid () const |
| bool | beingDestroyed () const |
| void * | widgetRep () const |
| void | setWidgetRep (void *toolkitWidgetRep) |
| bool | hasId () const |
| YWidgetID * | id () const |
| void | setId (YWidgetID *newId_disown) |
| virtual void | setEnabled (bool enabled=true) |
| void | setDisabled () |
| virtual bool | isEnabled () const |
| virtual bool | stretchable (YUIDimension dim) const |
| void | setStretchable (YUIDimension dim, bool newStretch) |
| void | setDefaultStretchable (YUIDimension dim, bool newStretch) |
| virtual int | weight (YUIDimension dim) |
| bool | hasWeight (YUIDimension dim) |
| void | setWeight (YUIDimension dim, int weight) |
| void | setNotify (bool notify=true) |
| bool | notify () const |
| void | setNotifyContextMenu (bool notifyContextMenu=true) |
| bool | notifyContextMenu () const |
| bool | sendKeyEvents () const |
| void | setSendKeyEvents (bool doSend) |
| bool | autoShortcut () const |
| void | setAutoShortcut (bool _newAutoShortcut) |
| int | functionKey () const |
| bool | hasFunctionKey () const |
| virtual void | setFunctionKey (int fkey_no) |
| virtual bool | setKeyboardFocus () |
| virtual std::string | shortcutString () const |
| virtual void | setShortcutString (const std::string &str) |
| virtual const char * | userInputProperty () |
| void | dumpWidgetTree (int indentationLevel=0) |
| void | dumpDialogWidgetTree () |
| void | setChildrenEnabled (bool enabled) |
| virtual void | saveUserInput (YMacroRecorder *macroRecorder) |
| void * | operator new (size_t size) |
| void | operator delete (void *ptr) noexcept |
| virtual void | startMultipleChanges () |
| virtual void | doneMultipleChanges () |
Protected Member Functions | |
| YBarGraph (YWidget *parent) | |
| virtual void | doUpdate ()=0 |
Protected Member Functions inherited from YWidget | |
| YWidget (YWidget *parent) | |
| YWidgetChildrenManager * | childrenManager () const |
| void | setChildrenManager (YWidgetChildrenManager *manager) |
| void | setBeingDestroyed () |
| void | dumpWidget (YWidget *w, int indentationLevel) |
Friends | |
| class | YBarGraphMultiUpdate |
A graph showing partitioning of a whole. The whole is divided into YBarGraphSegment each of which has a relative size, a text color, a background color, and a label.
|
protected |
Constructor.
|
virtual |
Destructor.
| void YBarGraph::addSegment | ( | const YBarGraphSegment & | segment | ) |
Add one segment.
If the segment's background and text colors are not explicitly specified, the YBarGraph widget will assign them from a list of (at least 5 different) color sets.
When adding multiple segments, use a YBarGraphMultiUpdate object for improved performance to hold back display updates until all segments are added.
| void YBarGraph::deleteAllSegments | ( | ) |
Delete all segments.
|
protectedpure virtual |
Perform a display update after any change to any of the segments.
Derived classes are required to implement this.
|
virtual |
|
virtual |
| const YBarGraphSegment & YBarGraph::segment | ( | int | segmentIndex | ) | const |
Return the segment with the specified index (from 0 on).
This will throw an exception if there are not this many segments.
| int YBarGraph::segments | ( | ) | const |
Return the current number of segments.
| void YBarGraph::setLabel | ( | int | segmentIndex, |
| const std::string & | newLabel ) |
Set the label of the segment with the specified index (from 0 on). Use %1 as a placeholder for the current value.
This will throw an exception if there are not this many segments.
Note: Use a YBarGraphMultiUpdate object for improved performance when doing multiple changes at the same time.
|
virtual |
| void YBarGraph::setSegmentColor | ( | int | segmentIndex, |
| const YColor & | color ) |
Set the background color of the segment with the specified index (from 0 on).
This will throw an exception if there are not this many segments or if the color is undefined.
| void YBarGraph::setTextColor | ( | int | segmentIndex, |
| const YColor & | color ) |
Set the text color of the segment with the specified index (from 0 on).
This will throw an exception if there are not this many segments or if the color is undefined.
| void YBarGraph::setValue | ( | int | segmentIndex, |
| int | newValue ) |
Set the value of the segment with the specifie index (from 0 on).
This will throw an exception if there are not this many segments.
Note: Use a YBarGraphMultiUpdate object for improved performance when doing multiple changes at the same time.
|
inlinevirtual |
Return a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YWidget.