当前位置: 首页>>代码示例>>C++>>正文


C++ UpdateButtons函数代码示例

本文整理汇总了C++中UpdateButtons函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateButtons函数的具体用法?C++ UpdateButtons怎么用?C++ UpdateButtons使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UpdateButtons函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UpdateOrientation

void AndroidCardboardController::Update() {
  UpdateOrientation();
  UpdateButtons();
}
开发者ID:google,项目名称:zooshi,代码行数:4,代码来源:android_cardboard_controller.cpp

示例2: UpdateButtons

void CGUIDialogKeyboardGeneric::OnShift()
{
  m_bShift = !m_bShift;
  UpdateButtons();
}
开发者ID:lewy20041,项目名称:xbmclibmedia,代码行数:5,代码来源:GUIDialogKeyboardGeneric.cpp

示例3: UpdateButtons

void
TrafficWidget::ZoomOut()
{
  view->ZoomOut();
  UpdateButtons();
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:6,代码来源:BigTrafficWidget.cpp

示例4: UpdateButtons

void CSmartFieldsDialog::OnIdleUpdate(void)
{
	UpdateButtons();
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:4,代码来源:MACRODLG.CPP

示例5: EventDialog


//.........这里部分代码省略.........
            m_script->GetError(error);
            SetInfoText(error, false);
        }
    }

    if ( event.type == EVENT_STUDIO_RUN )  // run/stop?
    {
        if ( m_script->IsRunning() )
        {
            m_event->AddEvent(Event(EVENT_OBJECT_PROGSTOP));
        }
        else
        {
            if ( m_script->GetScript(edit) )  // compile
            {
                SetInfoText("", false);

                m_event->AddEvent(Event(EVENT_OBJECT_PROGSTART));
            }
            else
            {
                std::string error;
                m_script->GetError(error);
                SetInfoText(error, false);
            }
        }
    }

    if ( event.type == EVENT_STUDIO_REALTIME )  // real time?
    {
        m_bRealTime = !m_bRealTime;
        m_script->SetStepMode(!m_bRealTime);
        UpdateFlux();
        UpdateButtons();
    }

    if ( event.type == EVENT_STUDIO_STEP )  // step?
    {
        m_script->Step();
    }

    if ( event.type == EVENT_WINDOW3 )  // window is moved?
    {
        m_editActualPos = m_editFinalPos = pw->GetPos();
        m_editActualDim = m_editFinalDim = pw->GetDim();
        m_settings->SetWindowPos(m_editActualPos);
        m_settings->SetWindowDim(m_editActualDim);
        AdjustEditScript();
    }
    if ( event.type == pw->GetEventTypeReduce() )
    {
        if ( m_bEditMinimized )
        {
            m_editFinalPos = m_settings->GetWindowPos();
            m_editFinalDim = m_settings->GetWindowDim();
            m_bEditMinimized = false;
            m_bEditMaximized = false;
        }
        else
        {
            m_editFinalPos.x =  0.00f;
            m_editFinalPos.y = -0.44f;
            m_editFinalDim.x =  1.00f;
            m_editFinalDim.y =  0.50f;
            m_bEditMinimized = true;
            m_bEditMaximized = false;
开发者ID:CyborgMaster,项目名称:colobot,代码行数:67,代码来源:studio.cpp

示例6: wxPanel


//.........这里部分代码省略.........
    m_pButtonJumpTo->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
            wxCommandEventHandler( AISTargetListDialog::OnTargetScrollTo ), NULL, this );
    boxSizer02->Add( m_pButtonJumpTo, 0, wxALL, 0 );

    m_pButtonCreateWpt = new wxButton( this, wxID_ANY, _("Create WPT"), wxDefaultPosition,
            wxDefaultSize, wxBU_AUTODRAW );
    m_pButtonCreateWpt->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
            wxCommandEventHandler( AISTargetListDialog::OnTargetCreateWpt ), NULL, this );
    boxSizer02->Add( m_pButtonCreateWpt, 0, wxALL, 0 );
    boxSizer02->AddSpacer( 10 );

    m_pStaticTextRange = new wxStaticText( this, wxID_ANY, _("Limit range: NM"), wxDefaultPosition,
            wxDefaultSize, 0 );
    boxSizer02->Add( m_pStaticTextRange, 0, wxALL, 0 );
    boxSizer02->AddSpacer( 2 );
    m_pSpinCtrlRange = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition,
            wxSize( 50, -1 ), wxSP_ARROW_KEYS, 1, 20000, g_AisTargetList_range );
    m_pSpinCtrlRange->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED,
            wxCommandEventHandler( AISTargetListDialog::OnLimitRange ), NULL, this );
    m_pSpinCtrlRange->Connect( wxEVT_COMMAND_TEXT_UPDATED,
            wxCommandEventHandler( AISTargetListDialog::OnLimitRange ), NULL, this );
    boxSizer02->Add( m_pSpinCtrlRange, 0, wxEXPAND | wxALL, 0 );
    topSizer->Add( boxSizer02, 0, wxEXPAND | wxALL, 2 );

    boxSizer02->AddSpacer( 10 );
    m_pStaticTextCount = new wxStaticText( this, wxID_ANY, _("Target Count"), wxDefaultPosition,
            wxDefaultSize, 0 );
    boxSizer02->Add( m_pStaticTextCount, 0, wxALL, 0 );

    boxSizer02->AddSpacer( 2 );
    m_pTextTargetCount = new wxTextCtrl( this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize,
            wxTE_READONLY );
    boxSizer02->Add( m_pTextTargetCount, 0, wxALL, 0 );

    topSizer->Layout();

    //    This is silly, but seems to be required for __WXMSW__ build
    //    If not done, the SECOND invocation of AISTargetList fails to expand the list to the full wxSizer size....
    SetSize( GetSize().x, GetSize().y - 1 );

    SetColorScheme();
    UpdateButtons();

    if( m_pAuiManager ) {
        wxAuiPaneInfo pane =
                wxAuiPaneInfo().Name( _T("AISTargetList") ).CaptionVisible( true ).
                        DestroyOnClose( true ).Float().FloatingPosition( 50, 200 ).TopDockable( false ).
                        BottomDockable( true ).LeftDockable( false ).RightDockable( false ).Show( true );
        m_pAuiManager->LoadPaneInfo( g_AisTargetList_perspective, pane );

        bool b_reset_pos = false;

#ifdef __WXMSW__
        //  Support MultiMonitor setups which an allow negative window positions.
        //  If the requested window title bar does not intersect any installed monitor,
        //  then default to simple primary monitor positioning.
        RECT frame_title_rect;
        frame_title_rect.left = pane.floating_pos.x;
        frame_title_rect.top = pane.floating_pos.y;
        frame_title_rect.right = pane.floating_pos.x + pane.floating_size.x;
        frame_title_rect.bottom = pane.floating_pos.y + 30;

        if( NULL == MonitorFromRect( &frame_title_rect, MONITOR_DEFAULTTONULL ) ) b_reset_pos =
                true;
#else

        //    Make sure drag bar (title bar) of window intersects wxClient Area of screen, with a little slop...
        wxRect window_title_rect;// conservative estimate
        window_title_rect.x = pane.floating_pos.x;
        window_title_rect.y = pane.floating_pos.y;
        window_title_rect.width = pane.floating_size.x;
        window_title_rect.height = 30;

        wxRect ClientRect = wxGetClientDisplayRect();
        ClientRect.Deflate(60, 60);// Prevent the new window from being too close to the edge
        if(!ClientRect.Intersects(window_title_rect))
        b_reset_pos = true;

#endif

        if( b_reset_pos ) pane.FloatingPosition( 50, 200 );

        //    If the list got accidentally dropped on top of the chart bar, move it away....
        if( pane.IsDocked() && ( pane.dock_row == 0 ) ) {
            pane.Float();
            pane.Row( 1 );
            pane.Position( 0 );

            g_AisTargetList_perspective = m_pAuiManager->SavePaneInfo( pane );
            pConfig->UpdateSettings();
        }

        pane.Caption( wxGetTranslation( _("AIS target list") ) );
        m_pAuiManager->AddPane( this, pane );
        m_pAuiManager->Update();

        m_pAuiManager->Connect( wxEVT_AUI_PANE_CLOSE,
                wxAuiManagerEventHandler( AISTargetListDialog::OnPaneClose ), NULL, this );
    }
}
开发者ID:Makki1,项目名称:OpenCPN,代码行数:101,代码来源:AISTargetListDialog.cpp

示例7: switch

uint32 CScreenHostLevels::OnCommand(uint32 dwCommand, uint32 dwParam1, uint32 dwParam2)
{
	switch(dwCommand)
	{
	case CMD_ADD_LEVEL:
		{
			if (m_pAvailMissions->GetSelectedIndex() >= 0 && (m_pSelMissions->GetNumControls() < MAX_GAME_LEVELS))
			{
				CLTGUITextCtrl *pCtrl = (CLTGUITextCtrl *)m_pAvailMissions->GetSelectedControl();
				if (pCtrl)
				{
					AddMissionToList(pCtrl->GetParam1(),true,false);
					m_pSelMissions->ClearSelection();
				}
			}
			UpdateButtons();
		} break;
	case CMD_ADD_ALL:
		{
			if (m_pAvailMissions->GetNumControls())
			{
				for (uint32 i = 0; i < m_pAvailMissions->GetNumControls() && (m_pSelMissions->GetNumControls() < MAX_GAME_LEVELS); i++)
				{
					CLTGUITextCtrl *pCtrl = (CLTGUITextCtrl *)m_pAvailMissions->GetControl(i);
					if (pCtrl)
					{
						AddMissionToList(pCtrl->GetParam1(),false,false);
					}
				}
			}
			m_pSelMissions->ClearSelection();
			UpdateButtons();
		} break;
	case CMD_REMOVE_LEVEL:
		{
			int nIndex = m_pSelMissions->GetSelectedIndex();
			if (nIndex >= 0)
			{
				m_pSelMissions->ClearSelection();
				m_pSelMissions->RemoveControl(nIndex);
				int numLeft = m_pSelMissions->GetNumControls();
				if (numLeft > 0)
				{
					if (nIndex >= numLeft)
						nIndex = numLeft-1;
					m_pSelMissions->SetSelection(nIndex);
				}
			}
			UpdateButtons();

		} break;
	case CMD_REMOVE_ALL:
		{
			if (m_pSelMissions->GetNumControls() > 0)
			{
				m_pSelMissions->ClearSelection();
				m_pSelMissions->RemoveAll();
			}
			UpdateButtons();
		} break;
	default:
		return CBaseScreen::OnCommand(dwCommand,dwParam1,dwParam2);
	}
	return 1;
};
开发者ID:Arc0re,项目名称:lithtech,代码行数:65,代码来源:ScreenHostLevels.cpp

示例8: UpdateButtons

/**
 * Update the button enabliness if the selected location changes
 * to prevent the up being on for the topmost and the down being on for the bottommost
 * @param event
 */
void EditLocationsDialog::OnSelectionChanges(wxCommandEvent &) {
    UpdateButtons();
}
开发者ID:Logician,项目名称:Streetview-Explorer,代码行数:8,代码来源:EditLocationsDialog.cpp

示例9: ResetGameState

/*
=============================
idGameBearShootWindow::UpdateGame
=============================
*/
void idGameBearShootWindow::UpdateGame()
{
	int i;

	if (onNewGame) {
		ResetGameState();

		goal->position.x = 550;
		goal->position.y = 164;
		goal->velocity.Zero();
		helicopter->position.x = 550;
		helicopter->position.y = 100;
		helicopter->velocity.Zero();
		bear->SetVisible(false);

		bearTurretAngle.SetFloat(0.f);
		bearTurretForce.SetFloat(200.f);

		gamerunning = true;
	}

	if (onContinue) {
		gameOver = false;
		timeRemaining = 60.f;

		onContinue = false;
	}

	if (gamerunning == true) {
		int current_time = gui->GetTime();
		idRandom rnd(current_time);

		// Check for button presses
		UpdateButtons();

		if (bear) {
			UpdateBear();
		}

		if (helicopter && goal) {
			UpdateHelicopter();
		}

		// Update Wind
		if (windUpdateTime < current_time) {
			float	scale;
			int		width;

			windForce = rnd.CRandomFloat() * (MAX_WINDFORCE * 0.75f);

			if (windForce > 0) {
				windForce += (MAX_WINDFORCE * 0.25f);
				wind->rotation = 0;
			} else {
				windForce -= (MAX_WINDFORCE * 0.25f);
				wind->rotation = 180;
			}

			scale = 1.f - ((MAX_WINDFORCE - idMath::Fabs(windForce)) / MAX_WINDFORCE);
			width = 100*scale;

			if (windForce < 0) {
				wind->position.x = 500 - width + 1;
			} else {
				wind->position.x = 500;
			}

			wind->SetSize(width, 40);

			windUpdateTime = current_time + 7000 + rnd.RandomInt(5000);
		}

		// Update turret rotation angle
		if (turret) {
			turretAngle = bearTurretAngle.GetFloat();
			turret->rotation = turretAngle;
		}

		for (i = 0; i < entities.Num(); i++) {
			entities[i]->Update(timeSlice);
		}

		// Update countdown timer
		timeRemaining -= timeSlice;
		timeRemaining = idMath::ClampFloat(0.f, 99999.f, timeRemaining);
		gui->SetStateString("time_remaining", va("%2.1f", timeRemaining));

		if (timeRemaining <= 0.f && !gameOver) {
			gameOver = true;
			updateScore = true;
		}

		if (updateScore) {
			UpdateScore();
			updateScore = false;
//.........这里部分代码省略.........
开发者ID:AreaScout,项目名称:dante-doom3-odroid,代码行数:101,代码来源:GameBearShootWindow.cpp

示例10: GetSelected

void EditLocationsDialog::OnRemove(wxCommandEvent &) {
    settings.locations.erase(settings.locations.begin() + GetSelected());

    RefillList(GetSelected());
    UpdateButtons();
}
开发者ID:Logician,项目名称:Streetview-Explorer,代码行数:6,代码来源:EditLocationsDialog.cpp

示例11: UpdateButtons

void ScrollBar::SetOrientation(Orientation orientation)
{
    Slider::SetOrientation(orientation);
    UpdateButtons();
}
开发者ID:Xandev,项目名称:XAGUI,代码行数:5,代码来源:ScrollBar.cpp

示例12: int

void MultiFuncSelectorWidget::OnClickButton(multifuncfunc_t f)
{
	m_active = int(f);
	UpdateButtons();
	onSelect.emit(f);
}
开发者ID:Sunsetjoy,项目名称:pioneer,代码行数:6,代码来源:ShipCpanelMultiFuncDisplays.cpp

示例13: UpdateButtons

void CFindDlg::OnEnChangeFind()
{
	UpdateButtons();
}
开发者ID:mavrus95,项目名称:windjview-subpix,代码行数:4,代码来源:FindDlg.cpp

示例14: UpdateButtons

void CFormatTabDlg::OnEditChange()
{
	UpdateButtons();
}
开发者ID:BraveStone,项目名称:wordpad,代码行数:4,代码来源:formatta.cpp

示例15: wxPanel

AISTargetListDialog::AISTargetListDialog( wxWindow *parent, wxAuiManager *auimgr,
        AIS_Decoder *pdecoder ) :
        wxPanel( parent, wxID_ANY, wxDefaultPosition, wxSize( -1, -1/*780, 250*/ ), wxBORDER_NONE )
{
    m_pparent = parent;
    m_pAuiManager = auimgr;
    m_pdecoder = pdecoder;
    g_bsort_once = false;
    m_bautosort_force = false;
    
    wxFont *qFont = GetOCPNScaledFont(_("Dialog"));
    SetFont( *qFont );

    s_p_sort_decoder = pdecoder;
    m_pMMSI_array = new ArrayOfMMSI( ArrayItemCompareMMSI );

    CreateControls();

    SetColorScheme();
    UpdateButtons();

    if( m_pAuiManager ) {
        wxAuiPaneInfo pane =
                wxAuiPaneInfo().Name( _T("AISTargetList") ).CaptionVisible( true ).Float().FloatingPosition( 50, 50 )
                .FloatingSize(400, 200).BestSize(700, GetCharHeight() * 10);
        m_pAuiManager->LoadPaneInfo( g_AisTargetList_perspective, pane );

        //      Force and/or override any perspective information that is not applicable
        pane.Name( _T("AISTargetList") );
        pane.DestroyOnClose( true );
        pane.TopDockable( false ).BottomDockable( true ).LeftDockable( false ).RightDockable( false );
        pane.Show( true );
        
        bool b_reset_pos = false;
        if( (pane.floating_size.x != -1) && (pane.floating_size.y != -1)){
#ifdef __WXMSW__
            //  Support MultiMonitor setups which an allow negative window positions.
            //  If the requested window title bar does not intersect any installed monitor,
            //  then default to simple primary monitor positioning.
            RECT frame_title_rect;
            frame_title_rect.left = pane.floating_pos.x;
            frame_title_rect.top = pane.floating_pos.y;
            frame_title_rect.right = pane.floating_pos.x + pane.floating_size.x;
            frame_title_rect.bottom = pane.floating_pos.y + 30;

            if( NULL == MonitorFromRect( &frame_title_rect, MONITOR_DEFAULTTONULL ) )
                b_reset_pos = true;
#else

            //    Make sure drag bar (title bar) of window intersects wxClient Area of screen, with a little slop...
            wxRect window_title_rect;// conservative estimate
            window_title_rect.x = pane.floating_pos.x;
            window_title_rect.y = pane.floating_pos.y;
            window_title_rect.width = pane.floating_size.x;
            window_title_rect.height = 30;

            wxRect ClientRect = wxGetClientDisplayRect();
            ClientRect.Deflate(60, 60);// Prevent the new window from being too close to the edge
            if(!ClientRect.Intersects(window_title_rect))
                b_reset_pos = true;

#endif

            if( b_reset_pos )
                pane.FloatingPosition( 50, 50 );
        }

        //    If the list got accidentally dropped on top of the chart bar, move it away....
        if( pane.IsDocked() && ( pane.dock_row == 0 ) ) {
            pane.Float();
            pane.Row( 1 );
            pane.Position( 0 );

        }
        pane.Caption( wxGetTranslation( _("AIS target list") ) );
        pane.Show();
        
        //  Some special setup for touch screens
        if(g_btouch){
            pane.Float();
            pane.Dockable( false );
            
            wxSize screen_size = ::wxGetDisplaySize();
            pane.FloatingSize(screen_size.x * 6/10, screen_size.y * 8/10);
            pane.FloatingPosition(screen_size.x * 2/10, screen_size.y * 1/10);
        }
        
        
        m_pAuiManager->AddPane( this, pane );
        m_pAuiManager->Update();

        g_AisTargetList_perspective = m_pAuiManager->SavePaneInfo( pane );
        pConfig->UpdateSettings();
        
        m_pAuiManager->Connect( wxEVT_AUI_PANE_CLOSE,
                wxAuiManagerEventHandler( AISTargetListDialog::OnPaneClose ), NULL, this );
    }
    else {
        //  Make an estimate of the default dialog size
        //  for the case when the AUI Perspective for this dialog is undefined
//.........这里部分代码省略.........
开发者ID:jieter,项目名称:OpenCPN,代码行数:101,代码来源:AISTargetListDialog.cpp


注:本文中的UpdateButtons函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。