9 const char * src = temp;
13 while(src[ptr] && src[ptr]!=
separator) ptr++;
29 temp.add_string(src[n]);
38 uSendMessage(wnd,CB_RESETCONTENT,0,0);
54 if (!item || !*item)
return false;
67 if (!strcmp(list[n],item))
94 const char * src = temp;
105 int coords_x = (short)LOWORD(coords), coords_y = (short)HIWORD(coords);
106 if (coords_x == -1 && coords_y == -1)
109 GetWindowRect(wnd,&asdf);
110 coords_x = (asdf.left + asdf.right) / 2;
111 coords_y = (asdf.top + asdf.bottom) / 2;
113 enum {ID_ERASE_ALL = 1, ID_ERASE_ONE };
114 HMENU menu = CreatePopupMenu();
115 uAppendMenu(menu,MF_STRING,ID_ERASE_ALL,
"Wipe history");
120 uAppendMenu(menu,MF_STRING,ID_ERASE_ONE,
"Remove this history item");
122 int cmd = TrackPopupMenu(menu,TPM_RIGHTBUTTON|TPM_NONOTIFY|TPM_RETURNCMD,coords_x,coords_y,0,wnd,0);
131 uSendMessage(wnd,CB_RESETCONTENT,0,0);
145 if (!strcmp(value,list[n]))
void setup_dropdown(HWND wnd)
BOOL SHARED_EXPORT uGetWindowText(HWND wnd, pfc::string_base &out)
virtual void set_state(const char *val)=0
void build_list(pfc::ptr_list_t< char > &out)
virtual void get_state(pfc::string_base &out) const =0
LRESULT SHARED_EXPORT uSendMessageText(HWND wnd, UINT msg, WPARAM wp, const char *text)
static void g_setup_dropdown_fromlist(HWND wnd, const pfc::ptr_list_t< char > &list)
t_size add_item(const T &item)
T remove_by_idx(t_size idx)
char * strdup_n(const char *src, t_size len)
BOOL SHARED_EXPORT uSetWindowText(HWND wnd, const char *p_text)
BOOL SHARED_EXPORT uAppendMenu(HMENU menu, UINT flags, UINT_PTR id, const char *content)
t_size insert_item(const t_in &item, t_size idx)
bool on_context(HWND wnd, LPARAM coords)
t_size uReplaceChar(pfc::string_base &out, const char *src, t_size src_len, unsigned c1, unsigned c2, bool casesens)
void delete_by_idx(t_size p_index)
bool add_item(const char *item)
void parse_list(const pfc::ptr_list_t< char > &src)
string8_t< pfc::alloc_fast_aggressive > string8_fastalloc