00001 #ifndef _DROPDOWN_HELPER_H_ 00002 #define _DROPDOWN_HELPER_H_ 00003 00004 00005 class cfg_dropdown_history 00006 { 00007 enum {separator = '\n'}; 00008 cfg_string data; 00009 unsigned max; 00010 void build_list(pfc::ptr_list_t<char> & out); 00011 void parse_list(const pfc::ptr_list_t<char> & src); 00012 public: 00013 cfg_dropdown_history(const GUID & p_guid,unsigned p_max = 10,const char * init_vals = "") : data(p_guid,init_vals) {max = p_max;} 00014 void setup_dropdown(HWND wnd); 00015 void setup_dropdown(HWND wnd,UINT id) {setup_dropdown(GetDlgItem(wnd,id));} 00016 void add_item(const char * item); 00017 bool is_empty(); 00018 void on_context(HWND wnd,LPARAM coords); 00019 }; 00020 00021 00022 #endif //_DROPDOWN_HELPER_H_
1.5.5