29 #ifndef ivlook_sfield_h 30 #define ivlook_sfield_h 32 #include <InterViews/input.h> 36 class FieldSEditorImpl;
50 #if defined(__STDC__) || defined(__ANSI_CPP__) 51 #define __FieldSEditorCallback(T) T##_FieldSEditorCallback 52 #define FieldSEditorCallback(T) __FieldSEditorCallback(T) 53 #define __FieldSEditorMemberFunction(T) T##_FieldSEditorMemberFunction 54 #define FieldSEditorMemberFunction(T) __FieldSEditorMemberFunction(T) 56 #define __FieldSEditorCallback(T) T_FieldSEditorCallback
57 #define FieldSEditorCallback(T) __FieldSEditorCallback(T) 58 #define __FieldSEditorMemberFunction(T) T_FieldSEditorMemberFunction
59 #define FieldSEditorMemberFunction(T) __FieldSEditorMemberFunction(T) 62 #define declareFieldSEditorCallback(T) \ 63 typedef void (T::*FieldSEditorMemberFunction(T))(FieldSEditor*); \ 64 class FieldSEditorCallback(T) : public FieldSEditorAction { \ 66 FieldSEditorCallback(T)( \ 67 T*, FieldSEditorMemberFunction(T) accept, \ 68 FieldSEditorMemberFunction(T) cancel \ 70 virtual ~FieldSEditorCallback(T)(); \ 72 virtual void accept(FieldSEditor*); \ 73 virtual void cancel(FieldSEditor*); \ 76 FieldSEditorMemberFunction(T) accept_; \ 77 FieldSEditorMemberFunction(T) cancel_; \ 80 #define implementFieldSEditorCallback(T) \ 81 FieldSEditorCallback(T)::FieldSEditorCallback(T)( \ 82 T* obj, FieldSEditorMemberFunction(T) accept, \ 83 FieldSEditorMemberFunction(T) cancel \ 90 FieldSEditorCallback(T)::~FieldSEditorCallback(T)() { } \ 92 void FieldSEditorCallback(T)::accept(FieldSEditor* f) { (obj_->*accept_)(f); } \ 93 void FieldSEditorCallback(T)::cancel(FieldSEditor* f) { (obj_->*cancel_)(f); } 102 virtual void undraw();
107 virtual void keystroke(
const Event&);
109 virtual void focus_out();
111 virtual void field(
const char*);
112 virtual void field(
const String&);
114 virtual void select(
int pos);
115 virtual void select(
int left,
int right);
117 virtual void selection(
int&
start,
int&
index)
const;
120 virtual void edit(
const char*,
int left,
int right);
121 virtual void edit(
const String&,
int left,
int right);
virtual ~FieldSEditorAction()
virtual void cancel(FieldSEditor *)
virtual void accept(FieldSEditor *)