Mcalc  0.1
a machinist's calculator
Public Member Functions | List of all members
mc::ComboBoxText Class Reference

#include <comboboxtext.hpp>

Inheritance diagram for mc::ComboBoxText:
Inheritance graph
[legend]
Collaboration diagram for mc::ComboBoxText:
Collaboration graph
[legend]

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)
 
- 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
Broadcasterbroadcaster
 
DataStoredata
 
std::string column_name
 

Detailed Description

ComboBoxText wraps a Gtk::ComboBoxText widget, updates it when dependent values change, and broadcasts an event when the user selects a value.

Constructor & Destructor Documentation

mc::ComboBoxText::ComboBoxText ( BaseObjectType *  cobject,
const Glib::RefPtr< Gtk::Builder > &  refGlade 
)

Constructor for the Gtk::Builder

Parameters
cobjectA base object typedef
refGladeA reference to the builder.
mc::ComboBoxText::~ComboBoxText ( )

The destructor

Member Function Documentation

void mc::ComboBoxText::block ( bool  b)

Stop/start broadcasting events

Parameters
bTrue allows broadcasts, false dis-allows.
std::string mc::ComboBoxText::get_value ( )
virtual

Get the current value of the ComboBoxText

Implements mc::Interface.

void mc::ComboBoxText::notify ( Event e)
virtual

Method used to update the ComboBoxText by the broadcaster.

Parameters
eEvent received from broadcaster

Implements mc::Subscriber.

void mc::ComboBoxText::on_changed ( )
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.

Parameters
iA vector of Interfaces to use as a reference
void mc::ComboBoxText::set_value ( std::string  s)
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

Parameters
vA vector of Interface objects to fetch path from datastore

The documentation for this class was generated from the following files: