コード例 #1
0
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());
}
コード例 #2
0
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);
	}
}
コード例 #3
0
void ZLQtApplicationWindow::setToggleButtonState(const ZLToolbar::ToggleButtonItem &button) {
	((QToolButton*)myItemToWidgetMap[&button])->setOn(button.isPressed());
}
コード例 #4
0
void ZLQtApplicationWindow::setToggleButtonState(const ZLToolbar::ToggleButtonItem &button) {
	myActions[&button]->setChecked(button.isPressed());
}