ColorGroup Class Reference


Detailed Description
A group of properties and controls for setting color properties.
This group contains a Fl_Color_Chooser widget for selecting RGB color values and uses the ColorTrigger class to fetch data for and update its controls.
Public Member Functions | |
| ColorGroup (int x, int y) | |
Creates a new ColorGroup object. | |
| virtual void | set_properties (const std::set< ObjectID > &objects) |
| Virtual method for filling this group with color information from an object. | |
| void | register_triggers (const std::set< ObjectID > &objects, SceneTreePtr &ptr) |
| void | deregister_triggers (const std::set< ObjectID > &objects, SceneTreePtr &ptr) |
| void | clear_updates () |
| Removes all pending updates for this group. | |
Static Public Member Functions | |
| static void | color_callback (Fl_Widget *w, void *data) |
| Callback for applying color changes. | |
Private Attributes | |
| Fl_Color_Chooser * | m_color_chooser |
| Fl_Check_Button * | m_apply_recursively |
| ColorTrigger * | m_trigger |
| A pointer to the trigger this group registers with selected objects. | |
| std::set< ObjectID > | m_objects |
| The set of object this object was created with. | |
| boost::posix_time::ptime | m_last_action_time |
Constructor & Destructor Documentation
| ColorGroup | ( | int | x, | |
| int | y | |||
| ) |
Creates a new ColorGroup object.
Allocates and adds the sub widgets and fills them with properties by * calling set_properties() on the current selection.
It also registers the ColorTrigger to make sure the controls are set to the correct values.
Member Function Documentation
| void set_properties | ( | const std::set< ObjectID > & | objects | ) | [virtual] |
Virtual method for filling this group with color information from an object.
This method registers a ColorTrigger for all objects in the selection in order to fetch property data. It also deregisters triggers for objects that have been deselected.
This method is called by the PropertyVisitor upon creation, and whenever the selection changes.
Implements PropertyGroup.
| void color_callback | ( | Fl_Widget * | w, | |
| void * | data | |||
| ) | [static] |
Callback for applying color changes.
This is called whenever the user releases the mouse button in the color area, or hits enter in one of the value input fields.
Will generate a SetColorAction based on the value entered by the user.
- Parameters:
-
w A pointer to the Fl_Buttoncontrol triggering the callback.data A pointer to void, as required by FLTK (not used).
The documentation for this class was generated from the following files:
- src/gui/ColorGroup.hh
- src/gui/ColorGroup.cc