more methods
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@332 b9cfdab3-6d41-4d17-bbe4-086880011989
@@ -344,6 +344,9 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<a href="#Mw_Widget_ListBox_h__MwListBoxDelete">MwListBoxDelete</a>
|
<a href="#Mw_Widget_ListBox_h__MwListBoxDelete">MwListBoxDelete</a>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dd>
|
||||||
|
<a href="#Mw_Widget_ListBox_h__MwListBoxGet">MwListBoxGet</a>
|
||||||
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="#Mw_Widget_Menu_h">Mw/Widget/Menu.h</a>
|
<a href="#Mw_Widget_Menu_h">Mw/Widget/Menu.h</a>
|
||||||
</dt>
|
</dt>
|
||||||
@@ -2406,6 +2409,34 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<hr>
|
<hr>
|
||||||
|
<pre id="Mw_Widget_ListBox_h__MwListBoxGet">MWDECL <B><FONT COLOR="#228B22">const</FONT></B> <B><FONT COLOR="#228B22">char</FONT></B>* <B><FONT COLOR="#0000FF">MwListBoxGet</FONT></B> (
|
||||||
|
MwWidget handle,
|
||||||
|
<B><FONT COLOR="#228B22">int</FONT></B> index
|
||||||
|
);</pre>
|
||||||
|
<dl>
|
||||||
|
<dd>
|
||||||
|
Gets item from the listbox.
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
Parameter <code>handle</code>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Widget.
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
Parameter <code>index</code>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Index.
|
||||||
|
</dd>
|
||||||
|
<dt>
|
||||||
|
Returns
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
Item.
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<hr>
|
||||||
<h2 align="center" id="Mw_Widget_Menu_h">Mw/Widget/Menu.h</h2>
|
<h2 align="center" id="Mw_Widget_Menu_h">Mw/Widget/Menu.h</h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ MWDECL void MwListBoxInsert(MwWidget handle, int index, const char* text);
|
|||||||
*/
|
*/
|
||||||
MWDECL void MwListBoxDelete(MwWidget handle, int index);
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -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);
|
ListBox(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||||
void Insert(int index, const char* text);
|
void Insert(int index, const char* text);
|
||||||
void Delete(int index);
|
void Delete(int index);
|
||||||
|
const char* Get(int index);
|
||||||
void SetBackground(const char* value);
|
void SetBackground(const char* value);
|
||||||
const char* GetBackground(void);
|
const char* GetBackground(void);
|
||||||
void SetForeground(const char* value);
|
void SetForeground(const char* value);
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ void MwOO::ListBox::Insert(int index, const char* text){
|
|||||||
void MwOO::ListBox::Delete(int index){
|
void MwOO::ListBox::Delete(int index){
|
||||||
MwListBoxDelete(this->widget, index);
|
MwListBoxDelete(this->widget, index);
|
||||||
}
|
}
|
||||||
|
const char* MwOO::ListBox::Get(int index){
|
||||||
|
return MwListBoxGet(this->widget, index);
|
||||||
|
}
|
||||||
void MwOO::ListBox::SetBackground(const char* value){
|
void MwOO::ListBox::SetBackground(const char* value){
|
||||||
MwSetText(this->widget, MwNbackground, value);
|
MwSetText(this->widget, MwNbackground, value);
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 663 B After Width: | Height: | Size: 663 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 542 B |
|
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 529 B |
|
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 498 B |
@@ -211,3 +211,12 @@ void MwListBoxDelete(MwWidget handle, int index) {
|
|||||||
MwForceRender(lb->frame);
|
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];
|
||||||
|
}
|
||||||
|
|||||||