qPCR4vir / nana

a modern C++ GUI library
http://nanapro.org
Boost Software License 1.0
16 stars 2 forks source link

posible optimization in very big listbox #27

Open qPCR4vir opened 9 years ago

qPCR4vir commented 9 years ago

I may have listbox with more than 100 000 items, and I need to sort. The sort function come in two versions: for text only and for the atached any.objects only. If the second exist for the given header (column) to sort it have preference to be used. Also, it could be a ref to an array or vector with the actual data, and indexed by the any object or better simple by the index of the item. The real items or item proxys are created only on demand, on the fly, need to be draw, but not when only need to be ordered. To draw we need maximal 20 to 100 items, not more: it is not to much and is not going to be very slow. Drawed items could be conserverd until it go out of the screen.

qPCR4vir commented 9 years ago

It will be another witget, or a big modification: lazy_listbox, where cat and item are created on the fly, and really exist only the few which are at the moment on the screen. There will be a vector with the item order and the generation off cell will be with a resolver which take and item_proxy?? (or a light variant?) or an abs index_pair, or directly an nana::any object, and an abs column index