#include <win32_misc.h>
|
static size_t | _ItemCount (HWND wnd) |
|
static const wchar_t * | _ItemText (HWND wnd, size_t index, int subItem=0) |
|
static LRESULT | Handler (NMHDR *hdr, int subItemFrom=0, int subItemCnt=1) |
|
static wchar_t | myCharLower (wchar_t c) |
|
static bool | StringPartialMatch (const wchar_t *part, const wchar_t *str) |
|
static bool | StringPrefixMatch (const wchar_t *part, const wchar_t *str) |
|
Definition at line 212 of file win32_misc.h.
static size_t TypeFind::_ItemCount |
( |
HWND |
wnd | ) |
|
|
inlinestatic |
Definition at line 265 of file win32_misc.h.
266 return ListView_GetItemCount(wnd);
static const wchar_t* TypeFind::_ItemText |
( |
HWND |
wnd, |
|
|
size_t |
index, |
|
|
int |
subItem = 0 |
|
) |
| |
|
inlinestatic |
Definition at line 268 of file win32_misc.h.
269 NMLVDISPINFO
info = {};
270 info.hdr.code = LVN_GETDISPINFO;
271 info.hdr.idFrom = GetDlgCtrlID(wnd);
272 info.hdr.hwndFrom = wnd;
273 info.item.iItem = index;
274 info.item.iSubItem = subItem;
275 info.item.mask = LVIF_TEXT;
276 ::SendMessage(::GetParent(wnd), WM_NOTIFY, info.hdr.idFrom, reinterpret_cast<LPARAM>(&info));
277 if (info.item.pszText == NULL)
return L
"";
278 return info.item.pszText;
void info(const char *p_message)
static LRESULT TypeFind::Handler |
( |
NMHDR * |
hdr, |
|
|
int |
subItemFrom = 0 , |
|
|
int |
subItemCnt = 1 |
|
) |
| |
|
inlinestatic |
Definition at line 214 of file win32_misc.h.
215 NMLVFINDITEM *
info =
reinterpret_cast<NMLVFINDITEM*
>(hdr);
216 const HWND wnd = hdr->hwndFrom;
217 if (info->lvfi.flags & LVFI_NEARESTXY)
return -1;
219 if (count == 0)
return -1;
220 const size_t base = (size_t) info->iStart % count;
221 for(
size_t walk = 0; walk < count; ++walk) {
222 const size_t index = (walk + base) % count;
223 for(
int subItem = subItemFrom; subItem < subItemFrom + subItemCnt; ++subItem) {
227 for(
size_t walk = 0; walk < count; ++walk) {
228 const size_t index = (walk + base) % count;
229 for(
int subItem = subItemFrom; subItem < subItemFrom + subItemCnt; ++subItem) {
void info(const char *p_message)
static bool StringPartialMatch(const wchar_t *part, const wchar_t *str)
static bool StringPrefixMatch(const wchar_t *part, const wchar_t *str)
static size_t _ItemCount(HWND wnd)
static const wchar_t * _ItemText(HWND wnd, size_t index, int subItem=0)
static wchar_t TypeFind::myCharLower |
( |
wchar_t |
c | ) |
|
|
inlinestatic |
Definition at line 236 of file win32_misc.h.
237 return (
wchar_t) CharLower((
wchar_t*)c);
static bool TypeFind::StringPartialMatch |
( |
const wchar_t * |
part, |
|
|
const wchar_t * |
str |
|
) |
| |
|
inlinestatic |
Definition at line 250 of file win32_misc.h.
255 wchar_t c1 = part[walk], c2 = str[base + walk];
256 if (c1 == 0)
return true;
257 if (c2 == 0)
return false;
static wchar_t myCharLower(wchar_t c)
static bool TypeFind::StringPrefixMatch |
( |
const wchar_t * |
part, |
|
|
const wchar_t * |
str |
|
) |
| |
|
inlinestatic |
Definition at line 239 of file win32_misc.h.
242 wchar_t c1 = part[walk], c2 = str[walk];
243 if (c1 == 0)
return true;
244 if (c2 == 0)
return false;
static wchar_t myCharLower(wchar_t c)
The documentation for this class was generated from the following file: