Esempio n. 1
0
void PopupWindow::closeButtonCallback(Misc::CallbackData* cbData)
	{
	/* Call the close callbacks: */
	CloseCallbackData myCbData(this);
	closeCallbacks.call(&myCbData);
	
	/* Close the popup window: */
	manager->popdownWidget(this);
	}
Esempio n. 2
0
void TextFieldSlider::textFieldValueChangedCallback(TextField::ValueChangedCallbackData* cbData)
	{
	/* Get the text field's new value: */
	setValue(atof(textField->getString()));
	
	/* Call the value changed callbacks: */
	ValueChangedCallbackData myCbData(this,ValueChangedCallbackData::EDITED,value);
	valueChangedCallbacks.call(&myCbData);
	}
Esempio n. 3
0
void Pager::pageButtonSelectCallback(Button::SelectCallbackData* cbData)
	{
	/* Find the index of the selected page button: */
	GLint pageButtonIndex;
	for(pageButtonIndex=0;pageButtonIndex<GLint(pageButtons.size())&&pageButtons[pageButtonIndex]!=cbData->button;++pageButtonIndex)
		;
	
	/* Select the button's page: */
	setCurrentChildIndex(pageButtonIndex);
	
	/* Call the page changed callbacks: */
	PageChangedCallbackData myCbData(this,currentChildIndex);
	pageChangedCallbacks.call(&myCbData);
	}
Esempio n. 4
0
void TextFieldSlider::sliderValueChangedCallback(Slider::ValueChangedCallbackData* cbData)
	{
	/* Get the slider's new value: */
	switch(sliderMapping)
		{
		case LINEAR:
			setValue(double(slider->getValue()));
			break;
		
		case EXP10:
			setValue(Math::pow(10.0,double(slider->getValue())));
			break;
		}
	
	/* Call the value changed callbacks: */
	ValueChangedCallbackData::ChangeReason reason=cbData->reason==Slider::ValueChangedCallbackData::CLICKED?ValueChangedCallbackData::CLICKED:ValueChangedCallbackData::DRAGGED;
	ValueChangedCallbackData myCbData(this,reason,value);
	valueChangedCallbacks.call(&myCbData);
	}
void FileSelectionDialog::cancelButtonSelectedCallback(Misc::CallbackData* cbData)
	{
	/* Call the cancel callbacks: */
	CancelCallbackData myCbData(this);
	cancelCallbacks.call(&myCbData);
	}
void PaletteEditor::savePaletteCallback(Misc::CallbackData* cbData)
	{
	/* Delegate the actual saving to someone else: */
	CallbackData myCbData(this);
	savePaletteCallbacks.call(&myCbData);
	}