• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetCurrentPage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: childBestSize

wxSize wxBookCtrlBase::DoGetBestSize() const
{
    wxSize bestSize;

    // iterate over all pages, get the largest width and height
    const size_t nCount = m_pages.size();
    for ( size_t nPage = 0; nPage < nCount; nPage++ )
    {
        const wxWindow * const pPage = m_pages[nPage];
        if( pPage )
        {
            wxSize childBestSize(pPage->GetBestSize());

            if ( childBestSize.x > bestSize.x )
                bestSize.x = childBestSize.x;

            if ( childBestSize.y > bestSize.y )
                bestSize.y = childBestSize.y;
        }
    }

    if (m_fitToCurrentPage && GetCurrentPage())
        bestSize = GetCurrentPage()->GetBestSize();

    // convert display area to window area, adding the size necessary for the
    // tabs
    wxSize best = CalcSizeFromPage(bestSize);
    CacheBestSize(best);
    return best;
}
开发者ID:Kaoswerk,项目名称:newton-dynamics,代码行数:30,代码来源:bookctrl.cpp


示例2: wxRemoveFile

void CUpdateWizard::FailedTransfer()
{
	m_inTransfer = false;

	if (!m_loaded)
		return;

	if (m_localFile != _T(""))
	{
		wxLogNull log;
		wxRemoveFile(m_localFile);
	}

	if (!m_currentPage)
		XRCCTRL(*this, "ID_FAILURE", wxStaticText)->SetLabel(_("Failed to check for newer version of FileZilla."));
	else
		XRCCTRL(*this, "ID_FAILURE", wxStaticText)->SetLabel(_("Failed to download the latest version of FileZilla."));

	((wxWizardPageSimple*)GetCurrentPage())->SetNext(m_pages[3]);
	m_pages[3]->SetPrev((wxWizardPageSimple*)GetCurrentPage());

	m_skipPageChanging = true;
	ShowPage(m_pages[3]);
	m_currentPage = 3;
	m_skipPageChanging = false;

	wxButton* pNext = wxDynamicCast(FindWindow(wxID_FORWARD), wxButton);
	pNext->Enable();
	wxButton* pPrev = wxDynamicCast(FindWindow(wxID_BACKWARD), wxButton);
	pPrev->Disable();

	XRCCTRL(*this, "ID_LOG", wxTextCtrl)->ChangeValue(m_update_log);
}
开发者ID:madnessw,项目名称:thesnow,代码行数:33,代码来源:updatewizard.cpp


示例3: GetCurrentPage

void CCandidateWindow::_NextComp()
{
	UINT uOldPage, uNewPage;

	GetCurrentPage(&uOldPage);

	if(_uIndex + 1 >= _uCount)
	{
		return;
	}

	_InvokeSfHandler(SKK_NEXT_COMP);

	candidx++;

	_uIndex++;
	GetCurrentPage(&uNewPage);

	_dwFlags = TF_CLUIE_SELECTION;
	if(uNewPage != uOldPage)
	{
		_dwFlags |= TF_CLUIE_CURRENTPAGE;
	}

	_Update();
	_UpdateUIElement();
}
开发者ID:SGA-Takeshi-Tsukamoto,项目名称:corvusskk,代码行数:27,代码来源:CandidateWindow.cpp


示例4: SetBitmap

void WIZARD_3DSHAPE_LIBS_DOWNLOADER::OnPageChanged( wxWizardEvent& aEvent )
{
    SetBitmap( KiBitmap( wizard_add_fplib_icon_xpm ) );
    enableNext( true );

    if( GetCurrentPage() == m_githubListDlg )
        setupGithubList();
    else if( GetCurrentPage() == m_reviewDlg )
        setupReview();
}
开发者ID:AlexanderBrevig,项目名称:kicad-source-mirror,代码行数:10,代码来源:wizard_3DShape_Libs_downloader.cpp


示例5: switch

bool CGUITextBox::GetCondition(int condition, int data) const
{
  switch (condition)
  {
  case CONTAINER_HAS_NEXT:
      return (GetCurrentPage() < GetNumPages());
  case CONTAINER_HAS_PREVIOUS:
    return (GetCurrentPage() > 1);
  default:
    return false;
  }
}
开发者ID:has12,项目名称:xbmc,代码行数:12,代码来源:GUITextBox.cpp


示例6: SetBitmap

void WIZARD_FPLIB_TABLE::OnPageChanged( wxWizardEvent& aEvent )
{
    SetBitmap( KiBitmap( wizard_add_fplib_icon_xpm ) );
    enableNext( true );

#ifdef BUILD_GITHUB_PLUGIN
    if( GetCurrentPage() == m_githubListDlg )
        setupGithubList();
    else
#endif
        if( GetCurrentPage() == m_fileSelectDlg )
            setupFileSelect();
        else if( GetCurrentPage() == m_reviewDlg )
            setupReview();
}
开发者ID:blueantst,项目名称:kicad-source-mirror,代码行数:15,代码来源:wizard_add_fplib.cpp


示例7: switch

/***********************************************************************************
**  WebServerDialog::OnInputAction
************************************************************************************/
/*virtual*/ BOOL
WebServerDialog::OnInputAction(OpInputAction* action)
{
	switch (action->GetAction())
	{
	case OpInputAction::ACTION_GET_ACTION_STATE:
		{
			OpInputAction* child_action = action->GetChildAction();
			switch (child_action->GetAction())
			{
			case OpInputAction::ACTION_OPEN_ADVANCED_WEBSERVER_SETTINGS: // disable button after clicking it once
				{
					child_action->SetEnabled(IsFeatureSettingsPage(GetCurrentPage()));
					return TRUE;
				}
			}
		}
		break;

	case OpInputAction::ACTION_OPEN_ADVANCED_WEBSERVER_SETTINGS:
		{
			WebServerAdvancedSettingsDialog * dialog = OP_NEW(WebServerAdvancedSettingsDialog, (&m_current_settings, &m_current_settings));
			if (dialog)
			{
				OpStatus::Ignore(dialog->Init(this));
			}
			return TRUE;
		}
	}
	return FeatureDialog::OnInputAction(action);
}
开发者ID:prestocore,项目名称:browser,代码行数:34,代码来源:WebServerSetupWizard.cpp


示例8: GetCurrentPage

void CItemFindDialog::OnBnClickedItemFindNextPageButton()
{
	// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.

	// 다음 페이지로 이동

	int			page	= GetCurrentPage();
	const int	maxPage	= max( 0, int( mPageMap.size() ) - 1 );

	if( maxPage == page )
	{
		return;
	}

	PutPage( ++page );

	if( maxPage == page )
	{
		mPageNextButton.EnableWindow( FALSE );
	}

	mPagePrevButton.EnableWindow( TRUE );

	{
		CString text;
		text.Format( _T( "%d/%d" ), page + 1, mPageMap.size() );
		mPageStatic.SetWindowText( text );
	}
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:29,代码来源:ItemFindDialog.cpp


示例9: Redraw

void Redraw()
{
    XClearWindow(disp, win);

    MarkMargins();
    DrawPage(GetCurrentPage());
}
开发者ID:plonk,项目名称:xfont-draw,代码行数:7,代码来源:xfont-pagination.c


示例10: _PopPageTransition

/*!
 * Remove the page transition from the stack.
 */
wxWizardPageEx* CWizardAttach::_PopPageTransition() {
    wxWizardPageEx* pPage = NULL;
    if (GetCurrentPage()) {
        if (!m_PageTransition.empty()) {
            pPage = m_PageTransition.top();

            wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::_PopPageTransition -     Popping Page: '%p'"), pPage);
            m_PageTransition.pop();

            // TODO: Figure out the best way to handle the situation where the wizard has been launched with a
            //   project init file and the volunteer hits the back button on the m_ProjectPropertiesPage/
            //   m_AccountManagerPropertiesPage page.  Ideally they go back to the m_ProjectInfoPage/
            //   m_AccountManagerInfoPage page, but since the wizard launched in automatic attach mode
            //   that page isn't on the stack and the manager crashes.
            //
            //   It is probably enough to just push the correct InfoPage on the stack before launching the
            //   wizard in automatic mode.  I need to think about it some more.
            //
            if ((pPage == m_ProjectPropertiesPage) || (pPage == m_ProjectProcessingPage) ||
                (pPage == m_AccountManagerPropertiesPage) || (pPage == m_AccountManagerProcessingPage))
            {
                // We want to go back to the page before we attempted to communicate
                //   with any server.
                pPage = m_PageTransition.top();

                wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::_PopPageTransition -     Popping Page: '%p'"), pPage);
                m_PageTransition.pop();

            }
            wxASSERT(pPage);
            return pPage;
        }
    }
    return NULL;
}
开发者ID:Ocode,项目名称:boinc,代码行数:38,代码来源:WizardAttach.cpp


示例11: wxASSERT_MSG

/// Handle clicks on the 'Back' or 'Next' button.
/// Normally this is done by wxWizard but the standard behaviour is to call
/// the validators of the current page no matter which button is clicked.
/// This means that the user has to enter valid data before he is able to
/// click any of the two buttons. This is undesired if the user wants to
/// go back to the previous page so this version of the event handler just
/// skips the validation of the page's data in case the back button was clicked.
///
/// \param[in] event The event generated by clicking the 'Back' or 'Next' button.
void CBOINCBaseWizard::OnBackOrNext(wxCommandEvent& event) {
    int button_id = event.GetId();
    wxASSERT_MSG((button_id == wxID_FORWARD) || (button_id == wxID_BACKWARD),
                  wxT("unknown button"));

    wxWizardPage* cur_page = GetCurrentPage();
    wxCHECK_RET(cur_page, _T("should have a valid current page"));

    // Ask the current page first: notice that we do it before calling
    // GetNext/Prev() because the data transfered from the controls of the page
    // may change the value returned by these methods.
    // Only do this in case of the next button. This differs from standard
    // wxWizard behaviour!
    if (button_id == wxID_FORWARD) {
        if ((!cur_page->Validate()) || (!cur_page->TransferDataFromWindow())) {
            // the page data is incorrect, don't do anything
            return;
        }
    }

    wxWizardPage* next_page;
    bool forward = (button_id == wxID_FORWARD);
    if (forward) {
        next_page = cur_page->GetNext();
    } else { // back
        next_page = cur_page->GetPrev();

        wxASSERT_MSG(next_page, wxT("\"<Back\" button should have been disabled"));
    }

    // just pass to the new page (or maybe not - but we don't care here)
    (void)ShowPage(next_page, forward);
}
开发者ID:phenix3443,项目名称:synecdoche,代码行数:42,代码来源:BOINCBaseWizard.cpp


示例12: OnPageChanged

void ConnectWizard::OnPageChanged( wxWizardEvent& event ) {
	dout << "> OnPageChanged" << std::endl;
	if( event.GetDirection() ) {
		if( GetCurrentPage()==sessionlistPage ) {
			// just in case
			dout << "stop search" << std::endl;
			d->setup.stopSearch();

			// clear host search list
			dout << "clear list" << std::endl;
			d->sessionsCritSec.Enter();
			d->hosts.clear();
			sessions->Clear();
			sessions->Refresh();
			d->sessionsCritSec.Leave();

			// start new host search
			dout << "start new search" << std::endl;
			long portNum;
			port->GetValue().ToLong( &portNum );

			bool ret = d->setup.startSearch( broadcastRadio->GetValue(),
											 hostName->GetValue().c_str(), portNum );
			if( !ret )
				derr << "Search failed. Take a look at the logs to find out why." << std::endl;
		}
	}

	dout << "< OnPageChanged" << std::endl;
}
开发者ID:BackupTheBerlios,项目名称:multicrew-svn,代码行数:30,代码来源:ConnectWizard.cpp


示例13: return

LEditor* MainBook::GetActiveEditor(bool includeDetachedEditors)
{
    if(includeDetachedEditors) {
        EditorFrame::List_t::iterator iter = m_detachedEditors.begin();
        for(; iter != m_detachedEditors.end(); ++iter) {
            if((*iter)->GetEditor()->IsFocused()) {
                return (*iter)->GetEditor();
            }
        }
    }

    if(!GetCurrentPage()) {
        return NULL;
    }
    return dynamic_cast<LEditor*>(GetCurrentPage());
}
开发者ID:fmestrone,项目名称:codelite,代码行数:16,代码来源:mainbook.cpp


示例14: SetCurrentPage

void
TabMenuControl::NextPage()
{
  const unsigned NumAllPages = pager.GetTabCount();
  if (NumAllPages < 2)
    return;
  SetCurrentPage((GetCurrentPage() + 1) % NumAllPages);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:8,代码来源:TabMenu.cpp


示例15: wxMessageBox

void ConnectWizard::OnNextPage( wxWizardEvent& event ) {
	dout << "> OnNextPage" << std::endl;
	if( event.GetDirection() ) {
		if( GetCurrentPage()==hostPage ) {
			wxIPV4address addr;
			if( directRadio->GetValue() && addr.Hostname( hostName->GetValue() )==false ) {
		        wxMessageBox(_T("Please enter a valid internet (IP v4) address for the hostname."), _T("Invalid hostname"),
							 wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}
                
			if( addr.Service( port->GetValue() )==false ) {
				wxMessageBox(_T("Please enter a valid port number (between 1 and 65535)."), 
							 _T("Invalid port"),
							 wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}
		} else
		if( GetCurrentPage()==sessionlistPage ) {
			d->setup.stopSearch();

			// session selected?
			int selected = sessions->GetSelection();
			if( selected==wxNOT_FOUND ) {
				wxMessageBox(_T("Please select the host you want to connect to."), 
							 _T("No host selected"),
							 wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}

			// connect finally
			d->con = d->setup.connect( d->hosts[selected] );
			if( d->con.isNull() ) {
				wxMessageBox( _T(d->setup.errorMessage().c_str()),
							  _T("Connection error"),
							  wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}
		}
	}	
	dout << "< OnNextPage" << std::endl;
}
开发者ID:BackupTheBerlios,项目名称:multicrew-svn,代码行数:46,代码来源:ConnectWizard.cpp


示例16: wxStaticCast

void wxBookCtrlBase::OnHelp(wxHelpEvent& event)
{
    // determine where does this even originate from to avoid redirecting it
    // back to the page which generated it (resulting in an infinite loop)

    // notice that we have to check in the hard(er) way instead of just testing
    // if the event object == this because the book control can have other
    // subcontrols inside it (e.g. wxSpinButton in case of a notebook in wxUniv)
    wxWindow *source = wxStaticCast(event.GetEventObject(), wxWindow);
    while ( source && source != this && source->GetParent() != this )
    {
        source = source->GetParent();
    }

    if ( source && m_pages.Index(source) == wxNOT_FOUND )
    {
        // this event is for the book control itself, redirect it to the
        // corresponding page
        wxWindow *page = NULL;

        if ( event.GetOrigin() == wxHelpEvent::Origin_HelpButton )
        {
            // show help for the page under the mouse
            const int pagePos = HitTest(ScreenToClient(event.GetPosition()));

            if ( pagePos != wxNOT_FOUND)
            {
                page = GetPage((size_t)pagePos);
            }
        }
        else // event from keyboard or unknown source
        {
            // otherwise show the current page help
            page = GetCurrentPage();
        }

        if ( page )
        {
            // change event object to the page to avoid infinite recursion if
            // we get this event ourselves if the page doesn't handle it
            event.SetEventObject(page);

            if ( page->GetEventHandler()->ProcessEvent(event) )
            {
                // don't call event.Skip()
                return;
            }
        }
    }
    //else: event coming from one of our pages already

    event.Skip();
}
开发者ID:Kaoswerk,项目名称:newton-dynamics,代码行数:53,代码来源:bookctrl.cpp


示例17: GetCurrentPage

void CWizardAttach::_ProcessCancelEvent( wxWizardExEvent& event ) {

    bool bCancelWithoutNextPage = false;
    wxWizardPageEx* page = GetCurrentPage();

    int iRetVal = wxGetApp().SafeMessageBox(
        _("Do you really want to cancel?"), 
        _("Question"),
        wxICON_QUESTION | wxYES_NO,
        this
    );

    // Reenable the next and back buttons if they have been disabled
    GetNextButton()->Enable();
    GetBackButton()->Enable();

    // Page specific rules - Disable the validator(s)
    if (wxYES == iRetVal) {
        if ((page == m_ProjectInfoPage) || (page == m_AccountManagerInfoPage)) {
            m_ProjectInfoPage->m_pProjectUrlCtrl->SetValidator(wxDefaultValidator);
        } else if (page == m_AccountInfoPage) {
            m_AccountInfoPage->m_pAccountEmailAddressCtrl->SetValidator(wxDefaultValidator);
            m_AccountInfoPage->m_pAccountPasswordCtrl->SetValidator(wxDefaultValidator);
            if (IsAttachToProjectWizard) {
                m_AccountInfoPage->m_pAccountConfirmPasswordCtrl->SetValidator(wxDefaultValidator);
            }
        } else if (page == m_ErrProxyPage) {
            m_ErrProxyPage->m_pProxyHTTPServerCtrl->SetValidator(wxDefaultValidator);
            m_ErrProxyPage->m_pProxyHTTPPortCtrl->SetValidator(wxDefaultValidator);
            m_ErrProxyPage->m_pProxyHTTPUsernameCtrl->SetValidator(wxDefaultValidator);
            m_ErrProxyPage->m_pProxyHTTPPasswordCtrl->SetValidator(wxDefaultValidator);
            m_ErrProxyPage->m_pProxySOCKSServerCtrl->SetValidator(wxDefaultValidator);
            m_ErrProxyPage->m_pProxySOCKSPortCtrl->SetValidator(wxDefaultValidator);
            m_ErrProxyPage->m_pProxySOCKSUsernameCtrl->SetValidator(wxDefaultValidator);
            m_ErrProxyPage->m_pProxySOCKSPasswordCtrl->SetValidator(wxDefaultValidator);
        }
    }

    // Generic rules
    bCancelWithoutNextPage |= (page == m_ErrNotDetectedPage);
    bCancelWithoutNextPage |= (page == m_ErrUnavailablePage);
    bCancelWithoutNextPage |= (page == m_ErrNoInternetConnectionPage);
    
    if (IsAttachToProjectWizard) {
        bCancelWithoutNextPage |= (page == m_ErrAlreadyExistsPage);
    } else {
        bCancelWithoutNextPage |= (page == m_WelcomePage);
    }
    if (wxYES != iRetVal) {
        event.Veto();
    }
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:52,代码来源:WizardAttach.cpp


示例18: GetCurrentPage

bool
TPropertySheet::PreProcessMsg(MSG& msg) {

  // If current page = 0, then it's time to close the property sheet.
  // 
  HWND page = GetCurrentPage();
  if (!page) {
    CloseWindow();
    return false;
  } 
  else {
    return TWindow::PreProcessMsg(msg);
  }
}
开发者ID:GarMeridian3,项目名称:Meridian59,代码行数:14,代码来源:propsht.cpp


示例19: switch

void CWKSP::On_Command_UI(wxUpdateUIEvent &event)
{
	switch( event.GetId() )
	{
	default:
		if( !g_pACTIVE->Get_Active() || !g_pACTIVE->Get_Active()->On_Command_UI(event) )
		{
			m_pModules->On_Command_UI(event);
			m_pData   ->On_Command_UI(event);
			m_pMaps   ->On_Command_UI(event);
		}
		break;

	case ID_CMD_WKSP_ITEM_CLOSE:
		if( GetCurrentPage() )
		{
			switch( GetCurrentPage()->GetId() )
			{
			case ID_WND_WKSP_MODULES:	m_pModules->On_Command_UI(event);	break;
			case ID_WND_WKSP_DATA:		m_pData   ->On_Command_UI(event);	break;
			case ID_WND_WKSP_MAPS:		m_pMaps   ->On_Command_UI(event);	break;
			}
		}
		break;

	case ID_CMD_WKSP_OPEN:
		break;

	case ID_CMD_MODULES_SEARCH:
		m_pModules->On_Command_UI(event);
		break;

	case ID_CMD_WKSP_SAVE:
		event.Enable(g_pData->Get_Count() > 0);
		break;
	}
}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:37,代码来源:wksp.cpp


示例20: GetCurrentPage

wxSize wxBookCtrlBase::DoGetBestSize() const
{
    wxSize bestSize;

    if (m_fitToCurrentPage && GetCurrentPage())
    {
        bestSize = GetCurrentPage()->GetBestSize();
    }
    else
    {
        // iterate over all pages, get the largest width and height
        const size_t nCount = m_pages.size();
        for ( size_t nPage = 0; nPage < nCount; nPage++ )
        {
            const wxWindow * const pPage = m_pages[nPage];
            if ( pPage )
                bestSize.IncTo(pPage->GetBestSize());
        }
    }

    // convert display area to window area, adding the size necessary for the
    // tabs
    return CalcSizeFromPage(bestSize);
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:24,代码来源:bookctrl.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetCurrentPos函数代码示例发布时间:2022-05-30
下一篇:
C++ GetCurrentPPUThread函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap