mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Added placeholder ValueEditors for all field types
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@75 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -55,6 +55,9 @@ class ValueViewer {
|
||||
/// Called when an action is performed on the associated value
|
||||
virtual void onAction(const ValueAction&, bool undone) { onValueChange(); }
|
||||
|
||||
/// Convert this viewer to an editor, if possible
|
||||
virtual ValueEditor* getEditor() { return 0; }
|
||||
|
||||
protected:
|
||||
DataViewer& viewer; ///< Our parent object
|
||||
StyleP styleP; ///< The style of this viewer
|
||||
@@ -75,7 +78,7 @@ class ValueViewer {
|
||||
// ----------------------------------------------------------------------------- : Utility
|
||||
|
||||
#define DECLARE_VALUE_VIEWER(Type) \
|
||||
private: \
|
||||
protected: \
|
||||
inline Type##Style& style() const { return static_cast< Type##Style&>(*styleP); } \
|
||||
inline const Type##Value& value() const { return static_cast<const Type##Value&>(*valueP); } \
|
||||
inline const Type##Field& field() const { return style().field(); } \
|
||||
|
||||
Reference in New Issue
Block a user