mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Reduce coupling between ValueEditors/Viewers and Set and StyleSheet.
- Adding of actions is done with an addAction function
- Files are read from
- getStylePackage for styling stuff (this is stylesheet)
- getLocalPackage for symbol and image values (this was the set)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@970 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -16,7 +16,8 @@ ValueViewer::ValueViewer(DataViewer& parent, const StyleP& style)
|
||||
: StyleListener(style), viewer(parent)
|
||||
{}
|
||||
|
||||
Set& ValueViewer::getSet() const { return *viewer.getSet(); }
|
||||
Package& ValueViewer::getStylePackage() const { return viewer.getStylePackage(); }
|
||||
Package& ValueViewer::getLocalPackage() const { return viewer.getLocalPackage(); }
|
||||
|
||||
void ValueViewer::setValue(const ValueP& value) {
|
||||
assert(value->fieldP == styleP->fieldP); // matching field
|
||||
@@ -47,6 +48,10 @@ void ValueViewer::drawFieldBorder(RotatedDC& dc) {
|
||||
}
|
||||
}
|
||||
|
||||
void ValueViewer::redraw() {
|
||||
viewer.redraw(*this);
|
||||
}
|
||||
|
||||
bool ValueViewer::nativeLook() const {
|
||||
return viewer.nativeLook();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user