Exemplo n.º 1
0
Dialog::Dialog(std::string id, std::string message) : _id(id) {
	LinearContainer * buttons = new LinearContainer();
	buttons->setHorizontal();

	buttonOk = new ButtonWidget(new TextWidget("Ok", 0, 0));
	buttons->addWidget(buttonOk);

	setLayout(setTextMessage(message), buttons);

	_ct = -getWidth();
}
Exemplo n.º 2
0
Dialog::Dialog(std::string id, std::string message, std::string positiveButton, std::string negativeButton, std::string neutralButton) : _id(id) {
	LinearContainer * buttons = new LinearContainer();
	buttons->setHorizontal();

	buttonPositive = new ButtonWidget(new TextWidget(positiveButton, 0, 0));
	buttons->addWidget(buttonPositive);
	buttonNegative = new ButtonWidget(new TextWidget(negativeButton, 0, 0));
	buttons->addWidget(buttonNegative);
	buttonNeutral = new ButtonWidget(new TextWidget(neutralButton, 0, 0));
	buttons->addWidget(buttonNeutral);

	setLayout(setTextMessage(message), buttons);

	_ct = -getWidth();
}
Exemplo n.º 3
0
/**
 *	@brief	Sets tool tip text.
 */
void BeSkinView::SetToolTipText(
	ConstAStr text				///< new tool tip text
)
{
	BMessage deactivateMessage(BeToolTipWindow::MSG_DEACTIVATE);
	toolTipMessenger->SendMessage(&deactivateMessage, static_cast<BHandler*>(NULL), 1000000);

	BMessage setTextMessage(BeToolTipWindow::MSG_SETTEXT);
	setTextMessage.AddString(BeToolTipWindow::PARAM_TEXT, text);
	toolTipMessenger->SendMessage(&setTextMessage, static_cast<BHandler*>(NULL), 1000000);

	if ('\0' != text[0])
	{
		BMessage activateMessage(BeToolTipWindow::MSG_ACTIVATE);
		toolTipMessenger->SendMessage(&activateMessage, static_cast<BHandler*>(NULL), 1000000);		
	}
}