2013-03-15 13:11:33 +00:00
|
|
|
namespace phoenix {
|
|
|
|
|
2011-02-27 09:05:10 +00:00
|
|
|
void pCheckItem::setChecked(bool checked) {
|
2011-09-05 03:48:23 +00:00
|
|
|
if(parentMenu) CheckMenuItem(parentMenu->p.hmenu, id, checked ? MF_CHECKED : MF_UNCHECKED);
|
2011-02-27 09:05:10 +00:00
|
|
|
}
|
|
|
|
|
2013-07-29 09:42:45 +00:00
|
|
|
void pCheckItem::setText(string text) {
|
2011-02-27 09:05:10 +00:00
|
|
|
if(parentWindow) parentWindow->p.updateMenu();
|
|
|
|
}
|
|
|
|
|
|
|
|
void pCheckItem::constructor() {
|
|
|
|
}
|
2011-09-05 03:48:23 +00:00
|
|
|
|
|
|
|
void pCheckItem::destructor() {
|
|
|
|
if(parentMenu) parentMenu->remove(checkItem);
|
|
|
|
}
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2013-11-28 10:29:01 +00:00
|
|
|
void pCheckItem::onToggle() {
|
|
|
|
checkItem.state.checked = !checkItem.state.checked;
|
|
|
|
setChecked(checkItem.state.checked);
|
|
|
|
if(checkItem.onToggle) checkItem.onToggle();
|
|
|
|
}
|
|
|
|
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|