1 #ifndef WMPREF_H 2 #define WMPREF_H 3 4 #include "ymenu.h" 5 #include "yaction.h" 6 #include "yarray.h" 7 #include "ymsgbox.h" 8 9 struct cfoption; 10 11 class PrefsMenu: 12 public YMenu, 13 private YActionListener, 14 private YMsgBoxListener 15 { 16 public: 17 PrefsMenu(); 18 19 private: 20 const int count; 21 const YAction actionSaveMod; 22 static YArray<int> mods; 23 YMsgBox* message; 24 cfoption* modify; 25 26 void query(cfoption* opt, const char* old); 27 void modified(cfoption* opt, bool set = true); 28 29 virtual void actionPerformed(YAction action, unsigned int modifiers); 30 virtual void handleMsgBox(YMsgBox *msgbox, int operation); 31 32 static int countPrefs(); 33 static int sortPrefs(const void* p1, const void* p2); 34 }; 35 36 #endif 37