mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-28 15:20:15 +00:00
Add ComboBox::Change signal (to replace JI_SIGNAL_COMBOBOX_SELECT in the future).
This commit is contained in:
parent
63f163439f
commit
26c2fff7d0
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user