|
Mcalc
0.1
a machinist's calculator
|
#include <slider.hpp>


Public Member Functions | |
| Slider (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &refGlade) | |
| ~Slider () | |
| void | notify (Event *e) |
| void | on_value_changed () |
| void | populate () |
| void | set_marks () |
| void | set_marks (std::map< double, std::string > m) |
| void | set_scaler (mc::Interface *i) |
| void | set_references (std::vector< mc::Interface * > s, std::vector< mc::Interface * > e) |
| void | set_columns (std::vector< std::string > c) |
| void | block (bool b) |
| std::string | get_value () |
| void | fix () |
| void | unfix () |
| void | set_value (double max, double min, double val) |
| void | set_value (std::string s) |
Public Member Functions inherited from mc::Interface | |
| Interface () | |
| virtual | ~Interface () |
| void | set_column (std::string n) |
| std::string | get_column () |
Public Member Functions inherited from mc::Subscriber | |
| Subscriber () | |
| virtual | ~Subscriber () |
Additional Inherited Members | |
Protected Attributes inherited from mc::Interface | |
| Broadcaster * | broadcaster |
| DataStore * | data |
| std::string | column_name |
A Slider wraps a Gtk::Scale widget in the UI and manages flexible max/min values, responding to broadcast events.
| mc::Slider::Slider | ( | BaseObjectType * | cobject, |
| const Glib::RefPtr< Gtk::Builder > & | refGlade | ||
| ) |
Constructor for the Gtk::Builder
| cobject | A base object typedef |
| refGlade | A reference to the builder. |
| mc::Slider::~Slider | ( | ) |
Destructor
| void mc::Slider::block | ( | bool | b | ) |
Stop/start broadcasting events
| b | True allows broadcasts, false dis-allows. |
| void mc::Slider::fix | ( | ) |
Freezes the slider at the current value.
|
virtual |
Returns a string representation of the current value of the Interface.
Implements mc::Interface.
|
virtual |
Update the Interface about change events. Used by broadcaster.
| e | The event object |
Implements mc::Subscriber.
| void mc::Slider::on_value_changed | ( | ) |
Generates a change event and sends it to Broadcaster.
| void mc::Slider::populate | ( | ) |
Populates the UI with values from the datastore.
| void mc::Slider::set_columns | ( | std::vector< std::string > | c | ) |
The columns to use for setting max and min values.
| c | Column names ('max_sfpm' etc.) |
| void mc::Slider::set_marks | ( | ) |
Sets any marks that this Slider contains in the UI.
| void mc::Slider::set_marks | ( | std::map< double, std::string > | m | ) |
Overloaded set_marks is used to provide constant mark values to add to the Gtk::Scale.
| m | A map of double (position) and string (label) values. |
| void mc::Slider::set_references | ( | std::vector< mc::Interface * > | s, |
| std::vector< mc::Interface * > | e | ||
| ) |
| void mc::Slider::set_scaler | ( | mc::Interface * | i | ) |
| void mc::Slider::set_value | ( | double | max, |
| double | min, | ||
| double | val | ||
| ) |
Sets the max, min and current position of the Slider.
|
virtual |
Sets a value from a string (converts to double).
Implements mc::Interface.
| void mc::Slider::unfix | ( | ) |
Unfreezes the slider.
1.8.11