Add ComboBox::Change signal (to replace JI_SIGNAL_COMBOBOX_SELECT in the future).

This commit is contained in:
David Capello 2011-08-07 22:22:48 -03:00
parent 63f163439f
commit 26c2fff7d0
2 changed files with 7 additions and 1 deletions

View File

@ -390,8 +390,10 @@ static bool combobox_listbox_msg_proc(JWidget widget, Message* msg)
combobox->closeListBox();
if (IS_VALID_ITEM(combobox, index))
if (IS_VALID_ITEM(combobox, index)) {
combobox->Change();
jwidget_emit_signal(combobox, JI_SIGNAL_COMBOBOX_SELECT);
}
}
return true;

View File

@ -8,6 +8,7 @@
#define GUI_COMBOBOX_H_INCLUDED
#include "base/compiler_specific.h"
#include "base/signal.h"
#include "gui/widget.h"
#include <string>
@ -56,6 +57,9 @@ public:
void switchListBox();
JRect getListBoxPos();
// Signals
Signal0<void> Change;
protected:
bool onProcessMessage(Message* msg) OVERRIDE;
void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;