|
XenevaOS
|
#include "base.h"#include "../chitralekha.h"#include "window.h"#include "scrollbar.h"#include <_xeneva.h>#include "icon.h"

Go to the source code of this file.
Classes | |
| struct | _list_column_ |
| struct | _ListItem_ |
| struct | _List_View_ |
Macros | |
| #define | LIST_VIEW_MAX_TEXT 64 |
| #define | LIST_VIEW_MAX_COMUMNS 8 |
| #define | LIST_VIEW_ICON_COLUMN_DEFAULT_W 20 |
| #define | LIST_VIEW_ICON_PADDING 4 |
Typedefs | |
| typedef struct _list_column_ | ListColumn |
| typedef struct _ListItem_ | ListItem |
| typedef struct _List_View_ | ListView |
Functions | |
| XE_EXPORT ListView * | ChListViewCreate (int x, int y, int w, int h, int itemHeight) |
| ChListViewCreate – create a new list view. | |
| XE_EXPORT ListItem * | ListViewAddItem (ListView *lv, const char **cell_texts, int cell_count, void *user_data) |
| ListViewAddItem – add a new item to the listview. | |
| XE_EXPORT void | ListViewSetItemIcon (ListView *lv, int index, ChIcon *icon, int iconW, int iconH) |
| ListViewSetItemIcon – add a icon to the item. | |
| XE_EXPORT void | ListViewAddColumn (ListView *lv, const char *header, int width, int minWidth) |
| XE_EXPORT void | ListViewRemoveItem (ListView *lv, int index) |
| XE_EXPORT void | ListViewClear (ListView *lv) |
BSD 2-Clause License
Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define LIST_VIEW_ICON_COLUMN_DEFAULT_W 20 |
| #define LIST_VIEW_ICON_PADDING 4 |
| #define LIST_VIEW_MAX_COMUMNS 8 |
| #define LIST_VIEW_MAX_TEXT 64 |
| typedef struct _list_column_ ListColumn |
| typedef struct _ListItem_ ListItem |
| typedef struct _List_View_ ListView |
ChListViewCreate – create a new list view.
| x | – X location within the window |
| y | – Y location within the window |
| w | – Width of the view |
| h | – Height of the view |
| itemHeight | – each row item height |
| XE_EXPORT ListItem * ListViewAddItem | ( | ListView * | lv, |
| const char ** | cell_texts, | ||
| int | cell_count, | ||
| void * | user_data | ||
| ) |
ListViewAddItem – add a new item to the listview.
| lv | – pointer to the list view |
| cell_texts | – item text with each column details |
| cell_count | – number of cells |
| user_data | – any data that this item holds |