summaryrefslogtreecommitdiffstats
path: root/src/listbox.c
Commit message (Collapse)AuthorAgeFilesLines
* Always use memory management wrappersLukas Fleischer2016-10-131-4/+4
| | | | | | | Use mem_*() wrappers instead of directly accessing libc functions when allocating/deallocating memory. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update copyright rangesLukas Fleischer2016-01-301-1/+1
| | | | Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Update copyright rangesLukas Fleischer2015-02-071-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Always fix selection in listbox_load_items()Lukas Fleischer2014-07-181-5/+3
| | | | | | | | | | Since commit 80a7267 (Fix selection in listbox_load_items(), 2014-07-18), listbox_fix_sel() is called if the selection is out of range after loading the new set of items. However, we should *always* fix the selection to make sure the selection doesn't move to a caption row when reloading items. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Do not use malloc() or xmalloc()Lukas Fleischer2014-07-181-2/+2
| | | | | | | Use mem_malloc() instead which automatically picks the right implementation depending on whether memory debugging is enabled or not. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix selection in listbox_load_items()Lukas Fleischer2014-07-181-7/+13
| | | | | | | Call listbox_fix_sel() after setting an initial selection in listbox_load_items() to make sure we do not pick a caption row. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Automatically select first item in list boxesLukas Fleischer2014-07-161-0/+3
| | | | | | | If the selection is empty during listbox_load_items() and there is at least one item in the list, automatically select the first item. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Avoid blank space after the last list box itemLukas Fleischer2014-05-191-0/+5
| | | | | | | Automatically scroll down the list box when resizing creates some blank space below the list of items. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* listbox_resize(): Avoid segmentation faultLukas Fleischer2014-05-191-0/+4
| | | | | | Only try to fix the visible region if an item is selected. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add support for caption rows in list boxesLukas Fleischer2014-05-181-9/+62
| | | | | | | This adds support for rows that cannot be selected. Such rows can be used for section headings and the like. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add support for drawing highlighted decorationLukas Fleischer2014-05-181-2/+2
| | | | | | | This allows for drawing selected scroll windows and list boxes with a highlighted border. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add a generic list box implementationLukas Fleischer2014-05-181-0/+138
This adds a very generic list box implementation. List boxes with items of different heights are supported. Two callback functions to determine the height of every single item and to draw a specific item are used. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>