ui-obj-list.h File Reference

Object list UI. More...

Go to the source code of this file.


void object_list_show_subwindow (int height, int width)
 Display the object list statically. More...
void object_list_show_interactive (int height, int width)
 Display the object list interactively. More...

Detailed Description

Object list UI.

Copyright (c) 2013 Ben Semmler

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Function Documentation

◆ object_list_show_interactive()

void object_list_show_interactive ( int  height,
int  width 

Display the object list interactively.

This will dynamically size the list for the best appearance. This should only be used in the main term.

heightis the height limit for the list.
widthis the width limit for the list.

References region::col, max_height, max_width, MIN, NULL, object_list_collect(), object_list_format_textblock(), object_list_free(), object_list_new(), object_list_sort(), object_list_standard_compare(), region::page_rows, region_erase_bordered(), region::row, textblock_free(), textblock_new(), textui_textblock_show(), and region::width.

Referenced by do_cmd_itemlist().

◆ object_list_show_subwindow()

void object_list_show_subwindow ( int  height,
int  width 

Display the object list statically.

This will force the list to be displayed to the provided dimensions. Contents will be adjusted accordingly.

In order to be more efficient, this function uses a shared list object so that it's not constantly allocating and freeing the list.

heightis the height of the list.
widthis the width of the list.

References NULL, object_list_collect(), object_list_format_textblock(), object_list_reset(), object_list_shared_instance(), object_list_sort(), object_list_standard_compare(), SCREEN_REGION, textblock_free(), textblock_new(), and textui_textblock_place().

Referenced by update_itemlist_subwindow().