mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 00:23:35 +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,9 +390,11 @@ static bool combobox_listbox_msg_proc(JWidget widget, Message* msg)
|
|||||||
|
|
||||||
combobox->closeListBox();
|
combobox->closeListBox();
|
||||||
|
|
||||||
if (IS_VALID_ITEM(combobox, index))
|
if (IS_VALID_ITEM(combobox, index)) {
|
||||||
|
combobox->Change();
|
||||||
jwidget_emit_signal(combobox, JI_SIGNAL_COMBOBOX_SELECT);
|
jwidget_emit_signal(combobox, JI_SIGNAL_COMBOBOX_SELECT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* case JM_IDLE: { */
|
/* case JM_IDLE: { */
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#define GUI_COMBOBOX_H_INCLUDED
|
#define GUI_COMBOBOX_H_INCLUDED
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/signal.h"
|
||||||
#include "gui/widget.h"
|
#include "gui/widget.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -56,6 +57,9 @@ public:
|
|||||||
void switchListBox();
|
void switchListBox();
|
||||||
JRect getListBoxPos();
|
JRect getListBoxPos();
|
||||||
|
|
||||||
|
// Signals
|
||||||
|
Signal0<void> Change;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool onProcessMessage(Message* msg) OVERRIDE;
|
bool onProcessMessage(Message* msg) OVERRIDE;
|
||||||
void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;
|
void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;
|
||||||
|
Loading…
Reference in New Issue
Block a user