void ZLWin32ApplicationWindow::setToggleButtonState(const ZLToolbar::ToggleButtonItem &button) {
	Toolbar &tb = toolbar(type(button));
	if (tb.hwnd == 0) {
		return;
	}

	PostMessage(tb.hwnd, TB_CHECKBUTTON, tb.ActionCodeById[button.actionId()], button.isPressed());
}
void ZLGtkApplicationWindow::setToggleButtonState(const ZLToolbar::ToggleButtonItem &button) {
	GtkToggleToolButton *gtkButton =
		GTK_TOGGLE_TOOL_BUTTON(myAbstractToGtk[&(ZLToolbar::Item&)button]);
	const bool isPressed = button.isPressed();
	if (gtk_toggle_tool_button_get_active(gtkButton) != isPressed) {
		gtk_toggle_tool_button_set_active(gtkButton, isPressed);
	}
}
void ZLQtApplicationWindow::setToggleButtonState(const ZLToolbar::ToggleButtonItem &button) {
	((QToolButton*)myItemToWidgetMap[&button])->setOn(button.isPressed());
}
void ZLQtApplicationWindow::setToggleButtonState(const ZLToolbar::ToggleButtonItem &button) {
	myActions[&button]->setChecked(button.isPressed());
}