Exemplo n.º 1
0
void ZLWin32MessageBox::addButton(const std::string &text) {
    W32WidgetPtr button = new W32PushButton(text);
    myButtons.push_back(button);
    ((W32Control&)*button).addListener(this);
    button->setVisible(true);
    myButtonBox->addElement(button);
    if (myButtons.size() > 1) {
        myPanel.setExitOnOk(false);
    }
}
Exemplo n.º 2
0
void W32Table::setElement(W32WidgetPtr element, int row, int fromColumn, int toColumn) {
	if (!element.isNull()) {
		if (row >= (int)myRows.size()) {
			myRows.insert(myRows.end(), row - myRows.size() + 1, RowList());
		}
		RowList &rowList = myRows[row];

		RowList::iterator it = rowList.begin();
		bool canInsertAfter = true;
		for (; it != rowList.end(); ++it) {
			if (it->XFrom > toColumn) {
				break;
			}
			canInsertAfter = it->XTo < fromColumn;
		}
		if (canInsertAfter) {
			rowList.insert(it, CellInfo(fromColumn, toColumn, element));
		}
	}
}
Exemplo n.º 3
0
void W32Box::addElement(W32WidgetPtr element) {
	if (!element.isNull()) {
		myElements.push_back(element);
	}
}
Exemplo n.º 4
0
void ZLWin32Dialog::addButton(const ZLResourceKey &key, bool accept) {
	W32WidgetPtr button = new W32PushButton(ZLDialogManager::buttonName(key), accept ? W32PushButton::OK_BUTTON : W32PushButton::CANCEL_BUTTON);
	button->setVisible(true);
	myButtonBox->addElement(button);
}