Esempio n. 1
0
void CControlPanel::UpdateDebug()
{
	long total, contig;
	
	LProgressBar *theBar = dynamic_cast<LProgressBar*> (_floatWindow->FindPaneByID(kMemoryIndicator));
	LStaticText *theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kMemoryField));
	
	::PurgeSpace(&total, &contig);

	if (_totalMem == 0) {
		_totalMem = total;
	}
	
	if (total != _displayedTotalMem) {
		LStr255 purgespace = LStr255(total/1024);
		LStr255 totalspace = LStr255((long)_totalMem/1024);
		LStr255 message;
		message += purgespace;
		message += "K free of ";
		message += totalspace;
		message += "K";
		theCaption->SetDescriptor((StringPtr)message);
		
		theBar->SetMinValue(0);
		theBar->SetMaxValue(_totalMem/1024);
		theBar->SetValue(_totalMem/1024 - total/1024);
		_displayedTotalMem = total;
	}
}
Esempio n. 2
0
void
VETypeList::DoNoCPPbSupportDialog(
	ConstStringPtr	inFileName )
{
	StApplicationContext	appContext;
	StDialogHandler			dialog(PPob_NoCPPbSupport, LCommander::GetTopCommander());
	
	// make the error string
	
	LStr255 errorStr(STRx_NoCPPbSupport, NoCPPb_StringFirst);
	if ( inFileName[0] > 0 ) {
		errorStr += inFileName;
	}
	errorStr += LStr255(STRx_NoCPPbSupport, NoCPPb_StringSecond);
	
	LStaticText *theCaption = dynamic_cast<LStaticText *> (dialog.GetDialog()->FindPaneByID(NoCPPb_Caption));
	theCaption->SetDescriptor(errorStr);
			
	dialog.GetDialog()->Show();
	
	MessageT theMessage;
	do {
		theMessage = dialog.DoDialog();
	} while ( (theMessage != msg_OK) && (theMessage != msg_Cancel) );

	LCommander::SetUpdateCommandStatus(true);
}
Esempio n. 3
0
void CControlPanel::UpdateValues(Boolean draw)
{
	LStaticText *theCaption;
	LSlider *theControl;
	
	theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kRotXField));
	theControl = dynamic_cast<LSlider*> (_floatWindow->FindPaneByID(kRotXSlider));
	theCaption->SetValue(theControl->GetValue());
	if (draw) UpdateCaption(theCaption);

	theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kRotYField));
	theControl = dynamic_cast<LSlider*> (_floatWindow->FindPaneByID(kRotYSlider));
	theCaption->SetValue(theControl->GetValue());
	if (draw) UpdateCaption(theCaption);

	theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kRotZField));
	theControl = dynamic_cast<LSlider*> (_floatWindow->FindPaneByID(kRotZSlider));
	theCaption->SetValue(theControl->GetValue());
	if (draw) UpdateCaption(theCaption);


	theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kTransXField));
	theControl = dynamic_cast<LSlider*> (_floatWindow->FindPaneByID(kTransXSlider));
	theCaption->SetValue(theControl->GetValue());
	if (draw) UpdateCaption(theCaption);

	theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kTransYField));
	theControl = dynamic_cast<LSlider*> (_floatWindow->FindPaneByID(kTransYSlider));
	theCaption->SetValue(theControl->GetValue());
	if (draw) UpdateCaption(theCaption);

	theCaption = dynamic_cast<LStaticText*> (_floatWindow->FindPaneByID(kTransZField));
	theControl = dynamic_cast<LSlider*> (_floatWindow->FindPaneByID(kTransZSlider));
	theCaption->SetValue(theControl->GetValue());
	if (draw) UpdateCaption(theCaption);

}