cheshirekow
v0.1.0
|
stores typed maps from string names -> pointers or RefPtrs depending on if the pointed-to object is a widget or an object More...
#include <mpblocks/gtk/LayoutMap.h>
Public Member Functions | |
template<class T > | |
DerivedTypes< T >::Ptr_t | get (const std::string &key) |
unified getter More... | |
bool | loadLayout (std::string layoutFile) |
load a GUI from a glade file, mapping each widget/object name to a reference/pointer to that object More... | |
void | loadValues (std::string yamlFile) |
read in values from a yaml file More... | |
void | loadValues (YAML::Node &node) |
template<class Object_t > | |
Glib::RefPtr< Object_t > | object (std::string key) |
return a RefPtr to an object More... | |
void | saveValues (std::string yamlFile) |
record values from all the widgets to the yaml file More... | |
void | saveValues (YAML::Emitter &emitter) |
template<class T > | |
void | set (const std::string &key, typename DerivedTypes< T >::Ptr_t ptr) |
unified setter More... | |
template<class Widget_t > | |
Widget_t * | widget (std::string key) |
return a pointer to a widget More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Window > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Button > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::CheckButton > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::ToggleButton > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::RadioButton > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::ColorButton > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::SpinButton > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::AspectFrame > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Frame > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Box > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Alignment > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Scale > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::ProgressBar > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::ComboBox > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::ComboBoxText > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::TextView > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Grid > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::DrawingArea > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::TreeView > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::WidgetMapBase< Gtk::Expander > | |
void | init (std::string key) |
adds the key to the map with an empty pointer More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
get widget pointers for all widgets whose names have been read in More... | |
void | read (YAML::Node &) |
read in any values for our widgets which are stored in the node More... | |
void | write (YAML::Emitter &) |
write out the values of our widgets into the yaml file More... | |
Public Member Functions inherited from mpblocks::gtk::ObjectMapBase< Gtk::Adjustment > | |
void | init (std::string key) |
adds a key to the map with an empty reference More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
retrieves RefPtrs for all the objects whose keys have been entered More... | |
void | read (YAML::Node &) |
read in values for any of the objects in our map More... | |
void | write (YAML::Emitter &) |
write out the values for all of the objects in our map More... | |
Public Member Functions inherited from mpblocks::gtk::ObjectMapBase< Gtk::EntryBuffer > | |
void | init (std::string key) |
adds a key to the map with an empty reference More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
retrieves RefPtrs for all the objects whose keys have been entered More... | |
void | read (YAML::Node &) |
read in values for any of the objects in our map More... | |
void | write (YAML::Emitter &) |
write out the values for all of the objects in our map More... | |
Public Member Functions inherited from mpblocks::gtk::ObjectMapBase< Gtk::TextBuffer > | |
void | init (std::string key) |
adds a key to the map with an empty reference More... | |
void | load (const Glib::RefPtr< Gtk::Builder > &builder) |
retrieves RefPtrs for all the objects whose keys have been entered More... | |
void | read (YAML::Node &) |
read in values for any of the objects in our map More... | |
void | write (YAML::Emitter &) |
write out the values for all of the objects in our map More... | |
Private Member Functions | |
void | loadRecurse (tinyxml2::XMLElement *) |
recursively read in a glade file and record all keys for widgets that we know about More... | |
Additional Inherited Members | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Window > | |
typedef std::map< std::string, Gtk::Window * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Button > | |
typedef std::map< std::string, Gtk::Button * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::CheckButton > | |
typedef std::map< std::string, Gtk::CheckButton * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::ToggleButton > | |
typedef std::map< std::string, Gtk::ToggleButton * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::RadioButton > | |
typedef std::map< std::string, Gtk::RadioButton * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::ColorButton > | |
typedef std::map< std::string, Gtk::ColorButton * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::SpinButton > | |
typedef std::map< std::string, Gtk::SpinButton * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::AspectFrame > | |
typedef std::map< std::string, Gtk::AspectFrame * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Frame > | |
typedef std::map< std::string, Gtk::Frame * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Box > | |
typedef std::map< std::string, Gtk::Box * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Alignment > | |
typedef std::map< std::string, Gtk::Alignment * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Scale > | |
typedef std::map< std::string, Gtk::Scale * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::ProgressBar > | |
typedef std::map< std::string, Gtk::ProgressBar * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::ComboBox > | |
typedef std::map< std::string, Gtk::ComboBox * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::ComboBoxText > | |
typedef std::map< std::string, Gtk::ComboBoxText * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::TextView > | |
typedef std::map< std::string, Gtk::TextView * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Grid > | |
typedef std::map< std::string, Gtk::Grid * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::DrawingArea > | |
typedef std::map< std::string, Gtk::DrawingArea * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::TreeView > | |
typedef std::map< std::string, Gtk::TreeView * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::WidgetMapBase< Gtk::Expander > | |
typedef std::map< std::string, Gtk::Expander * > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::ObjectMapBase< Gtk::Adjustment > | |
typedef std::map< std::string, Glib::RefPtr< Gtk::Adjustment > > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::ObjectMapBase< Gtk::EntryBuffer > | |
typedef std::map< std::string, Glib::RefPtr< Gtk::EntryBuffer > > | Map_t |
the map type stored by this base class More... | |
Public Types inherited from mpblocks::gtk::ObjectMapBase< Gtk::TextBuffer > | |
typedef std::map< std::string, Glib::RefPtr< Gtk::TextBuffer > > | Map_t |
the map type stored by this base class More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Window > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Button > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::CheckButton > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::ToggleButton > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::RadioButton > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::ColorButton > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::SpinButton > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::AspectFrame > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Frame > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Box > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Alignment > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Scale > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::ProgressBar > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::ComboBox > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::ComboBoxText > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::TextView > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Grid > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::DrawingArea > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::TreeView > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::WidgetMapBase< Gtk::Expander > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::ObjectMapBase< Gtk::Adjustment > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::ObjectMapBase< Gtk::EntryBuffer > | |
Map_t | m_map |
the actual map More... | |
Protected Attributes inherited from mpblocks::gtk::ObjectMapBase< Gtk::TextBuffer > | |
Map_t | m_map |
the actual map More... | |
stores typed maps from string names -> pointers or RefPtrs depending on if the pointed-to object is a widget or an object
Definition at line 128 of file LayoutMap.h.
|
inline |
unified getter
Definition at line 183 of file LayoutMap.h.
bool mpblocks::gtk::LayoutMap::loadLayout | ( | std::string | layoutFile | ) |
load a GUI from a glade file, mapping each widget/object name to a reference/pointer to that object
|
private |
recursively read in a glade file and record all keys for widgets that we know about
void mpblocks::gtk::LayoutMap::loadValues | ( | std::string | yamlFile | ) |
read in values from a yaml file
void mpblocks::gtk::LayoutMap::loadValues | ( | YAML::Node & | node | ) |
|
inline |
return a RefPtr to an object
Definition at line 177 of file LayoutMap.h.
void mpblocks::gtk::LayoutMap::saveValues | ( | std::string | yamlFile | ) |
record values from all the widgets to the yaml file
void mpblocks::gtk::LayoutMap::saveValues | ( | YAML::Emitter & | emitter | ) |
|
inline |
unified setter
Definition at line 195 of file LayoutMap.h.
|
inline |
return a pointer to a widget
Definition at line 171 of file LayoutMap.h.