1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef WXD_EDITABLELISTBOX_H
#define WXD_EDITABLELISTBOX_H
#include "../wxd_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Create a new wxEditableListBox
*
* @param parent Parent window
* @param id Window identifier
* @param label Label shown at the top of the listbox
* @param pos Initial position
* @param size Initial size
* @param style The window style, see wxEditableListBox
* @return Pointer to the new wxEditableListBox
*/
wxd_Window_t* wxd_EditableListBox_New(wxd_Window_t* parent,
int id,
const char* label,
int x, int y,
int width, int height,
int64_t style);
/**
* @brief Get the string items in the listbox
*
* @param self Pointer to wxEditableListBox
* @param count Pointer to be filled with the count of items
* @return Array of strings, must be freed with wxd_free_strings
*/
char** wxd_EditableListBox_GetStrings(wxd_Window_t* self, int* count);
/**
* @brief Set the string items in the listbox
*
* @param self Pointer to wxEditableListBox
* @param strings Array of strings
* @param count Number of strings
*/
void wxd_EditableListBox_SetStrings(wxd_Window_t* self, const char** strings, int count);
/**
* @brief Add a string item to the listbox
*
* @param self Pointer to wxEditableListBox
* @param string String to add
*/
void wxd_EditableListBox_AddString(wxd_Window_t* self, const char* string);
/**
* @brief Get the underlying wxListCtrl
*
* @param self Pointer to wxEditableListBox
* @return Pointer to the internal wxListBox
*/
wxd_Window_t* wxd_EditableListBox_GetListCtrl(wxd_Window_t* self);
/**
* @brief Copy strings from the listbox to an array of wxd_ArrayString_t
*
* @param self Pointer to wxEditableListBox
* @return Pointer to the array of strings
*/
wxd_ArrayString_t* wxd_EditableListBox_CopyStringsToArrayString(wxd_Window_t* self_ptr);
#ifdef __cplusplus
}
#endif
#endif // WXD_EDITABLELISTBOX_H