|
SBB Host
Host communication with the self balancing bike.
|
A class for slider with Gtk::Label, Gtk::SpinButton and Gtk::ToggleButton. More...
#include <HostControl.h>
Public Member Functions | |
| Slider (Glib::ustring str, double min, double max, double val) | |
| Constructor. More... | |
| void | set_active (bool is_active=true) |
| Enable/disable the slider. More... | |
| bool | get_active () |
| Get the slider active. More... | |
| double | get_value () |
| Get the slider value. More... | |
Protected Attributes | |
| Gtk::Scale | scrollbar |
| Gtk::Scale object for the scrollbar. More... | |
| Gtk::ToggleButton | button |
| Gtk::Button object for the enable button. More... | |
| Gtk::Box | vbox |
| Gtk::Box object for a vertical box. More... | |
| Gtk::Box | hminbox |
| Gtk::Box object for the horizontal box of the minimum value. More... | |
| Gtk::Box | hmaxbox |
| Gtk::Box object for the horizontal box of the maximum value. More... | |
| Gtk::SpinButton | minEntry |
| Gtk::SpinButton object for the minimum value entry. More... | |
| Gtk::SpinButton | maxEntry |
| Gtk::SpinButton object for the maximum value entry. More... | |
| Gtk::Label | minLabel |
| Gtk::Label object for the minimum value label. More... | |
| Gtk::Label | maxLabel |
| Gtk::Label object for the maximum value label. More... | |
| Glib::RefPtr< Gtk::Adjustment > | p_adj |
| Gtk::Adjustment pointer for the scrollbar. More... | |
| Glib::RefPtr< Gtk::Adjustment > | p_minadj |
| Gtk::Adjustment pointer for the minimum value entry. More... | |
| Glib::RefPtr< Gtk::Adjustment > | p_maxadj |
| Gtk::Adjustment pointer for the minimum value entry. More... | |
Private Member Functions | |
| void | on_minadj_changed () |
| Callback of minimum value entry. More... | |
| void | on_maxadj_changed () |
| Callback of maximum value entry. More... | |
| void | on_enable_button_toggled () |
| Callback of enable button. More... | |
A class for slider with Gtk::Label, Gtk::SpinButton and Gtk::ToggleButton.
Class for a slider with a Gtk::Label, Gtk::ToggleButton to enable the slider, and two Gtk::SpinButton for the minimum and maximum values, used in HostControl.
| Slider::Slider | ( | Glib::ustring | str, |
| double | min, | ||
| double | max, | ||
| double | val | ||
| ) |
Constructor.
Default constructor.
| str | The label. |
| min | The minimum value of the slider. |
| max | The maximum value of the slider. |
| val | The default value of the slider. |
| bool Slider::get_active | ( | ) |
Get the slider active.
Function to get the slider state (active or not).
| double Slider::get_value | ( | ) |
Get the slider value.
Function to get the slider value.
|
private |
Callback of enable button.
Callback function of the enable button toggled to enable or disable the scrollbar and the minimum and maximum value entries.
|
private |
Callback of maximum value entry.
Callback function of the maximum-value entry changed to update the scrollbar maximum value.
|
private |
Callback of minimum value entry.
Callback function of the minimum-value entry changed to update the scrollbar minimum value.
| void Slider::set_active | ( | bool | is_active = true | ) |
Enable/disable the slider.
Function to enable or disable the slider.
| is_active | The flag to enable or disable the slider. |
|
protected |
Gtk::Button object for the enable button.
|
protected |
Gtk::Box object for the horizontal box of the maximum value.
|
protected |
Gtk::Box object for the horizontal box of the minimum value.
|
protected |
Gtk::SpinButton object for the maximum value entry.
|
protected |
Gtk::Label object for the maximum value label.
|
protected |
Gtk::SpinButton object for the minimum value entry.
|
protected |
Gtk::Label object for the minimum value label.
|
protected |
Gtk::Adjustment pointer for the scrollbar.
|
protected |
Gtk::Adjustment pointer for the minimum value entry.
|
protected |
Gtk::Adjustment pointer for the minimum value entry.
|
protected |
Gtk::Scale object for the scrollbar.
|
protected |
Gtk::Box object for a vertical box.