diff --git a/doc/index.html b/doc/index.html index 6b253b7..d2f8d75 100644 --- a/doc/index.html +++ b/doc/index.html @@ -341,6 +341,9 @@
MwListBoxInsert
+
+ MwListBoxInsertMultiple +
MwListBoxDelete
@@ -2387,6 +2390,42 @@
+
MWDECL void MwListBoxInsertMultiple (
+	MwWidget handle,
+	int index,
+	char* const* text,
+	int count
+);
+
+
+ Inserts multiple items on the listbox. +
+
+ Parameter handle +
+
+ Widget. +
+
+ Parameter index +
+
+ Index. +
+
+ Parameter text +
+
+ Text. +
+
+ Parameter count +
+
+ Count. +
+
+
MWDECL void MwListBoxDelete (
 	MwWidget handle,
 	int index
diff --git a/include/Mw/Widget/ListBox.h b/include/Mw/Widget/ListBox.h
index 675f737..4ab19b2 100644
--- a/include/Mw/Widget/ListBox.h
+++ b/include/Mw/Widget/ListBox.h
@@ -26,6 +26,15 @@ MWDECL MwClass MwListBoxClass;
  */
 MWDECL void MwListBoxInsert(MwWidget handle, int index, const char* text);
 
+/*!
+ * %brief Inserts multiple items on the listbox
+ * %param handle Widget
+ * %param index Index
+ * %param text Text
+ * %param count Count
+ */
+MWDECL void MwListBoxInsertMultiple(MwWidget handle, int index, char* const* text, int count);
+
 /*!
  * %brief Deletes item from the listbox
  * %param handle Widget
diff --git a/include/MwOO/Widget/ListBox.h b/include/MwOO/Widget/ListBox.h
index 665a37a..fe0b4fc 100644
--- a/include/MwOO/Widget/ListBox.h
+++ b/include/MwOO/Widget/ListBox.h
@@ -9,6 +9,7 @@ class ListBox : public MwOO::Base {
       public:
 	ListBox(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
 	void	    Insert(int index, const char* text);
+	void	    InsertMultiple(int index, char* const* text, int count);
 	void	    Delete(int index);
 	const char* Get(int index);
 	void	    SetBackground(const char* value);
diff --git a/oosrc/widget/listbox.cc b/oosrc/widget/listbox.cc
index 47b4561..c78979b 100644
--- a/oosrc/widget/listbox.cc
+++ b/oosrc/widget/listbox.cc
@@ -8,6 +8,9 @@ MwOO::ListBox::ListBox(const char* widget_name, MwOO::Base* parent, int x, int y
 void MwOO::ListBox::Insert(int index, const char* text){
 	MwListBoxInsert(this->widget, index, text);
 }
+void MwOO::ListBox::InsertMultiple(int index, char* const* text, int count){
+	MwListBoxInsertMultiple(this->widget, index, text, count);
+}
 void MwOO::ListBox::Delete(int index){
 	MwListBoxDelete(this->widget, index);
 }
diff --git a/resource/icon/error.png b/resource/icon/error.png
index 9566cab..3a8d1ba 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 8e18420..f12a2cd 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 4796b7c..1408975 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 aac8492..2526813 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 ecfa227..abc23f9 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 d619a85..96f5c09 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 270c67f..5c63e09 100644
--- a/src/widget/listbox.c
+++ b/src/widget/listbox.c
@@ -193,6 +193,27 @@ void MwListBoxInsert(MwWidget handle, int index, const char* text) {
 	}
 }
 
+void MwListBoxInsertMultiple(MwWidget handle, int index, char* const* text, int count) {
+	int	  i;
+	MwListBox lb = handle->internal;
+	int	  old;
+	if(index == -1) index = arrlen(lb->list);
+	old = index;
+
+	for(i = 0; i < count; i++) {
+		char* str = malloc(strlen(text[i]) + 1);
+		strcpy(str, text[i]);
+
+		arrins(lb->list, index, str);
+		index++;
+	}
+
+	resize(handle);
+	if(old < (MwGetInteger(lb->vscroll, MwNvalue) + MwGetInteger(lb->vscroll, MwNareaShown))) {
+		MwForceRender(lb->frame);
+	}
+}
+
 void MwListBoxDelete(MwWidget handle, int index) {
 	MwListBox lb = handle->internal;