Mcalc
0.1
a machinist's calculator
|
#include <comboboxtext.hpp>
Public Member Functions | |
ComboBoxText (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &refGlade) | |
~ComboBoxText () | |
void | notify (Event *e) |
virtual void | on_changed () |
void | populate () |
void | set_references (std::vector< mc::Interface * > i) |
std::string | get_value () |
void | set_value (std::string s) |
void | block (bool b) |
void | set_value (std::vector< mc::Interface * > v) |
![]() | |
Interface () | |
virtual | ~Interface () |
void | set_column (std::string n) |
std::string | get_column () |
![]() | |
Subscriber () | |
virtual | ~Subscriber () |
Additional Inherited Members | |
![]() | |
Broadcaster * | broadcaster |
DataStore * | data |
std::string | column_name |
ComboBoxText wraps a Gtk::ComboBoxText widget, updates it when dependent values change, and broadcasts an event when the user selects a value.
mc::ComboBoxText::ComboBoxText | ( | 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::ComboBoxText::~ComboBoxText | ( | ) |
The destructor
void mc::ComboBoxText::block | ( | bool | b | ) |
Stop/start broadcasting events
b | True allows broadcasts, false dis-allows. |
|
virtual |
Get the current value of the ComboBoxText
Implements mc::Interface.
|
virtual |
Method used to update the ComboBoxText by the broadcaster.
e | Event received from broadcaster |
Implements mc::Subscriber.
|
virtual |
Sends out a change event.
void mc::ComboBoxText::populate | ( | ) |
Populates the UI with values from the datastore.
void mc::ComboBoxText::set_references | ( | std::vector< mc::Interface * > | i | ) |
Add references to the interface that will trigger the ComboBoxText to update when they change.
i | A vector of Interfaces to use as a reference |
|
virtual |
Sets the current value of the interface.
Implements mc::Interface.
void mc::ComboBoxText::set_value | ( | std::vector< mc::Interface * > | v | ) |
Set the ComboBoxText contents
v | A vector of Interface objects to fetch path from datastore |