diff --git a/doc/index.html b/doc/index.html
index 0edc75d..6b253b7 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -344,6 +344,9 @@
MwListBoxDelete
+
+ MwListBoxGet
+
Mw/Widget/Menu.h
@@ -2406,6 +2409,34 @@
+MWDECL const char* MwListBoxGet (
+ MwWidget handle,
+ int index
+);
+
+-
+ Gets item from the listbox.
+
+-
+ Parameter
handle
+
+-
+ Widget.
+
+-
+ Parameter
index
+
+-
+ Index.
+
+-
+ Returns
+
+-
+ Item.
+
+
+
-
diff --git a/include/Mw/Widget/ListBox.h b/include/Mw/Widget/ListBox.h
index d152eeb..675f737 100644
--- a/include/Mw/Widget/ListBox.h
+++ b/include/Mw/Widget/ListBox.h
@@ -33,6 +33,14 @@ MWDECL void MwListBoxInsert(MwWidget handle, int index, const char* text);
*/
MWDECL void MwListBoxDelete(MwWidget handle, int index);
+/*!
+ * %brief Gets item from the listbox
+ * %param handle Widget
+ * %param index Index
+ * %return Item
+ */
+MWDECL const char* MwListBoxGet(MwWidget handle, int index);
+
#ifdef __cplusplus
}
#endif
diff --git a/include/MwOO/Widget/ListBox.h b/include/MwOO/Widget/ListBox.h
index 345a09b..665a37a 100644
--- a/include/MwOO/Widget/ListBox.h
+++ b/include/MwOO/Widget/ListBox.h
@@ -10,6 +10,7 @@ class ListBox : public MwOO::Base {
ListBox(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
void Insert(int index, const char* text);
void Delete(int index);
+ const char* Get(int index);
void SetBackground(const char* value);
const char* GetBackground(void);
void SetForeground(const char* value);
diff --git a/oosrc/widget/listbox.cc b/oosrc/widget/listbox.cc
index accafbe..47b4561 100644
--- a/oosrc/widget/listbox.cc
+++ b/oosrc/widget/listbox.cc
@@ -11,6 +11,9 @@ void MwOO::ListBox::Insert(int index, const char* text){
void MwOO::ListBox::Delete(int index){
MwListBoxDelete(this->widget, index);
}
+const char* MwOO::ListBox::Get(int index){
+ return MwListBoxGet(this->widget, index);
+}
void MwOO::ListBox::SetBackground(const char* value){
MwSetText(this->widget, MwNbackground, value);
}
diff --git a/resource/icon/error.png b/resource/icon/error.png
index bf2726c..9566cab 100644
Binary files a/resource/icon/error.png and b/resource/icon/error.png differ
diff --git a/resource/icon/info.png b/resource/icon/info.png
index 5b5e043..8e18420 100644
Binary files a/resource/icon/info.png and b/resource/icon/info.png differ
diff --git a/resource/icon/news.png b/resource/icon/news.png
index c87e210..4796b7c 100644
Binary files a/resource/icon/news.png and b/resource/icon/news.png differ
diff --git a/resource/icon/note.png b/resource/icon/note.png
index 0a3f6f0..aac8492 100644
Binary files a/resource/icon/note.png and b/resource/icon/note.png differ
diff --git a/resource/icon/question.png b/resource/icon/question.png
index ae7b994..ecfa227 100644
Binary files a/resource/icon/question.png and b/resource/icon/question.png differ
diff --git a/resource/icon/warning.png b/resource/icon/warning.png
index 77b1167..d619a85 100644
Binary files a/resource/icon/warning.png and b/resource/icon/warning.png differ
diff --git a/src/widget/listbox.c b/src/widget/listbox.c
index bf2c290..270c67f 100644
--- a/src/widget/listbox.c
+++ b/src/widget/listbox.c
@@ -211,3 +211,12 @@ void MwListBoxDelete(MwWidget handle, int index) {
MwForceRender(lb->frame);
}
}
+
+const char* MwListBoxGet(MwWidget handle, int index) {
+ MwListBox lb = handle->internal;
+
+ if(index < 0) return NULL;
+ if(index >= arrlen(lb->list)) return NULL;
+
+ return lb->list[index];
+}