Example #1
0
BOOL CoptimizerDlg::OnInitDialog()
{
	CSliderCtrl *Slider = (CSliderCtrl *)GetDlgItem(IDC_SLIDER_CUSTOM);
	CComboBox *CBox = (CComboBox *)GetDlgItem(IDC_COMBO_PRESET);
	CProgressCtrl *ProgressBar = (CProgressCtrl*)GetDlgItem(IDC_PROGRESS);
	CString buf;
	CDialog::OnInitDialog();

	SetIcon(m_hIcon, TRUE);
	SetIcon(m_hIcon, FALSE);
	
	CheckRadioButton(IDC_RADIO_PRESET, IDC_RADIO_CUSTOM, IDC_RADIO_PRESET);

	Slider->SetRange(1000, 10000);
	Slider->SetTicFreq(1000);	

	CBox->ResetContent();
	for(int i = 0; i < NUMSTRINGS; i++) {
		buf.LoadString(IDS_STRING1 + i);
		CBox->AddString(buf);
	}

	CBox->SetCurSel(2);
	SetSlider(Slider, 2);

	ProgressBar->SetRange(0, 100);

	return TRUE;
}
void CEdgePropPage::OnEdgeUnselected()  {
	m_CurType=0;
	SetSlider();
	UpdateColorRect();
    SetEdgeSizeControl();

}
Example #3
0
void PreferencesDialog::RefreshPreferences()
{
	ElectronConfiguration config;
	config.Read( _store );
	SetCheck( IDC_CHECKAUTOLOAD, config.Autoload );
	SetCheck( IDC_CHECKAUTOCONFIGURE, config.Autoconfigure );
	SetCheck( IDC_CHECKFIRSTBYTE, config.FirstByte );
	SetCheck( IDC_CHECKFASTLOAD, config.FastTape );
	SetCheck( IDC_CHECKMULTIPLEX, config.Display.DisplayMultiplexed );
	SetCheck( IDC_CHECKFULLSCREEN, config.Display.StartFullScreen );
	SetCheck( IDC_CHECKOVERLAY, config.Display.AllowOverlay );
	SetCheck( IDC_CHECKDISK, config.Plus3.Enabled  );
	SetCheck( IDC_CHECKPROTECT0, config.Plus3.Drive1WriteProtect  );
	SetCheck( IDC_CHECKPROTECT1, config.Plus3.Drive2WriteProtect  );
	SetCheck( IDC_CHECKSLOGGER, (config.MRBMode != 0) );
	SetCheck( IDC_RADIOTURBO, (config.MRBMode < 2) );
	SetCheck( IDC_RADIOSHADOW, (config.MRBMode == 2) );
	SetCheck( IDC_RADIO4, (config.MRBMode > 2) );
	SetCheck( IDC_CHECKUEFFILES, FileTypeRegistered( ".uef", "ueffile" ) );
	SetCheck( IDC_CHECKADFFILES, FileTypeRegistered( ".adf", "adffile" ) );
	SetCheck( IDC_CHECKSSDFILES, FileTypeRegistered( ".ssd", "ssdfile" ) );
	SetCheck( IDC_CHECKBASICFILES, FileTypeRegistered( ".bas", "basfile" ) );
	SetCheck( IDC_CHECKPLUS1, config.Plus1 );
	SetCheck( IDC_CHECKSAVESTATE, config.PersistentState);

	HWND hCtrl = ::GetDlgItem( _hPreferences, IDC_SLIDERVOLUME );
	::SendMessage( hCtrl, TBM_SETRANGE, FALSE, MAKELONG(0, 255));
	SetSlider( IDC_SLIDERVOLUME, config.Volume);

	RefreshChecks();
}
Example #4
0
void CoptimizerDlg::OnCbnSelchangeComboPreset()
{
	CSliderCtrl *Slider = (CSliderCtrl *)GetDlgItem(IDC_SLIDER_CUSTOM);
	CComboBox *CBox = (CComboBox *)GetDlgItem(IDC_COMBO_PRESET);
	int Sel;

	Sel = CBox->GetCurSel();
	SetSlider(Slider, Sel);
}
Example #5
0
void MpVerticalScrollbar::AdaptSlider (int shp) 
{  
  // adapt to new slider height
  sh = MpMax(shp,2*GetFrameWidth());	 // set a minimum slider height
  sh = MpMin(sh,Height()-2*GetFrameWidth()); // set a maximum slider height
  set_vars(); 
  bar->Resize(sw,sh); 
  SetSlider(0);
}
Example #6
0
void CoptimizerDlg::OnBnClickedRadioPreset()
{	
	CComboBox *CBox = (CComboBox *)GetDlgItem(IDC_COMBO_PRESET);
	CSliderCtrl *Slider = (CSliderCtrl *)GetDlgItem(IDC_SLIDER_CUSTOM);
	int Sel;

	Sel = CBox->GetCurSel();
	CBox->EnableWindow(TRUE);
	
	SetSlider(Slider, Sel);
	Slider->EnableWindow(FALSE);
}
Example #7
0
	//--------------------------------------------------------------------
	void CScrollBar::Create(  IGUIControl* p_pParent, int p_nLeft, int p_nTop,
		ENUM_ScrollBarType p_eType, CBitmap& p_Bitmap, int p_nLength )
	{
		IGUIControl::Create();

		SetParent( p_pParent );
		SetLeft( p_nLeft );
		SetTop( p_nTop );
		SetType( p_eType );
		SetLength( p_nLength );
		SetSlider( p_Bitmap );
		if( m_pColor == NULL )
		{
			SetFontColor( *(new CColor( CColor::WHITE )) );
		}
	}
BOOL CEdgePropPage::OnInitDialog()  {
	CPropertyPage::OnInitDialog();
	
    m_CurType=0;
	((CButton *)GetDlgItem(IDC_EDGEUNSELECTED))->SetCheck(TRUE);
	m_Red.SetRange(0,255);
	m_Green.SetRange(0,255);
	m_Blue.SetRange(0,255);

	m_Red.SetTicFreq(25);
	m_Green.SetTicFreq(25);
	m_Blue.SetTicFreq(25);

	SetSlider();
    SetEdgeSizeControl();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
void CEdgePropPage::OnEdgeFocused()  {
	m_CurType=2;
	SetSlider();
	UpdateColorRect();
    SetEdgeSizeControl();	
}
Example #10
0
void nraApplicationModel::MessageDispatcher(nraWeakPointer<CReconItem> ReconItem)
{
    nraSharedPointer<CUIMessage> UIMessage;
    CUIAddMark* 	pAddMark;
    CUIDestroyMark* pDestroyMark;
    CUIMoveMark* 	pMoveMark;
    CUISetLabel* 	pSetLabel;
    CUISetSlice* 	pSetSlice;
    CUISetSlider*	pSetSlider;
    CUISetStack* 	pSetStack;
    CUIDisable*		pDisable;
    
    //queue< nraSharedPointer<CUIMessage> > MessageQueue;
    
    m_boolSemaphore = false;
    while(!(*ReconItem).MessageQueue.empty())
    {
        UIMessage = (*ReconItem).MessageQueue.front();
        (*ReconItem).MessageQueue.pop();
    
        pAddMark = dynamic_cast<CUIAddMark*>(UIMessage.GetPointer());
        if(pAddMark)
        {
            emit AddMark(pAddMark->GetTag(), pAddMark->GetType(), pAddMark->GetAccLabel(), pAddMark->GetX(), pAddMark->GetY());
            continue;
        }
        pDestroyMark = dynamic_cast<CUIDestroyMark*>(UIMessage.GetPointer());
        if(pDestroyMark)
        {
            emit DestroyMark(pDestroyMark->GetTag());
            continue;
        }
        pMoveMark = dynamic_cast<CUIMoveMark*>(UIMessage.GetPointer());
        if(pMoveMark)
        {
            emit MoveMark(pMoveMark->GetTag(), pMoveMark->GetX(), pMoveMark->GetY());
            continue;
        }
        pSetLabel = dynamic_cast<CUISetLabel*>(UIMessage.GetPointer());
        if(pSetLabel)
        {
            emit SetLabel(pSetLabel->GetTag(), pSetLabel->GetLabel());
            continue;
        }
        pSetSlice = dynamic_cast<CUISetSlice*>(UIMessage.GetPointer());
        if(pSetSlice)
        {
            emit SetSlice(pSetSlice->GetSlice());
            continue;
        }
        pSetSlider = dynamic_cast<CUISetSlider*>(UIMessage.GetPointer());
        if(pSetSlider)
        {
            emit SetSlider(pSetSlider->GetMin(),pSetSlider->GetMax(),pSetSlider->GetVal());
	    	continue;
        }
        pSetStack = dynamic_cast<CUISetStack*>(UIMessage.GetPointer());
        if(pSetStack)
        {
            emit SetStack(pSetStack->GetStack());
            continue;
        }
        pDisable = dynamic_cast<CUIDisable*>(UIMessage.GetPointer());
        if(pDisable)
        {
            emit Disable();
            continue;
        }

    }
    m_boolSemaphore = true;
}
Example #11
0
void MpVerticalScrollbar::move_callback (int y) 
{ 
  SetSlider(y); 	// move continuously
}
Example #12
0
void MpVerticalScrollbar::SetSliderRelative (float z) 
{ 
  SetSlider(Nint(z * yspan));
}
Example #13
0
void MpVerticalScrollbar::jmp_callback (int up) 
{ 
  SetSlider( yact + (up) ? (-sh) : sh); // jump by one shifter height
}