redrawing of editors (for drop down lists)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@155 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-23 13:26:53 +00:00
parent 2233295cfd
commit dcdd000aef
8 changed files with 39 additions and 12 deletions
+7
View File
@@ -99,6 +99,9 @@ class ValueEditor {
virtual void determineSize(bool force_fit = false) {}
/// The editor is shown or hidden
virtual void onShow(bool) {}
/// Redraw this viewer
virtual void redraw() = 0;
};
// ----------------------------------------------------------------------------- : Utility
@@ -106,6 +109,7 @@ class ValueEditor {
#define DECLARE_VALUE_EDITOR(Type) \
Type##ValueEditor(DataEditor& parent, const Type##StyleP& style); \
virtual ValueEditor* getEditor() { return this; } \
virtual void redraw(); \
private: \
inline DataEditor& editor() const { \
return static_cast<DataEditor&>(viewer); \
@@ -113,6 +117,9 @@ class ValueEditor {
public:
#define IMPLEMENT_VALUE_EDITOR(Type) \
void Type##ValueEditor::redraw() { \
editor().redraw(*this); \
} \
Type##ValueEditor::Type##ValueEditor(DataEditor& parent, const Type##StyleP& style) \
: Type##ValueViewer(parent, style)