fixed: "Double click to select image" text now always shown when editing;

Correct control used for clipboard actions in CardsPanel

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@253 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-12 19:39:08 +00:00
parent 3dd0521c40
commit f915a491a8
6 changed files with 24 additions and 8 deletions
+1
View File
@@ -54,6 +54,7 @@ void DataViewer::drawViewer(RotatedDC& dc, ValueViewer& v) {
bool DataViewer::nativeLook() const { return false; }
bool DataViewer::drawBorders() const { return false; }
bool DataViewer::drawEditing() const { return false; }
bool DataViewer::drawFocus() const { return false; }
wxPen DataViewer::borderPen(bool) const { return wxPen(); }
ValueViewer* DataViewer::focusedViewer() const { return nullptr; }
Context& DataViewer::getContext() const { return set->getContext(); }
+3
View File
@@ -42,6 +42,9 @@ class DataViewer : public SetView {
/// Should editing specific things be drawn?
/** false by default, can be overloaded */
virtual bool drawEditing() const;
/// Should focus only editing specific things be drawn?
/** false by default, can be overloaded */
virtual bool drawFocus() const;
/// Pens for drawing field borders (only called if drawBorders())
virtual wxPen borderPen(bool active) const;
/// The viewer that is currently focused, may be null
+2 -2
View File
@@ -25,8 +25,8 @@ void TextValueViewer::draw(RotatedDC& dc) {
v.prepare(dc, value().value(), style(), viewer.getContext());
v.draw(dc, style(), (DrawWhat)(
DRAW_NORMAL
| (viewer.drawBorders() ? DRAW_BORDERS : 0)
| (viewer.drawEditing() && isCurrent() ? DRAW_ACTIVE : 0)
| (viewer.drawBorders() ? DRAW_BORDERS : 0)
| (viewer.drawFocus() && isCurrent() ? DRAW_ACTIVE : 0)
));
}