本文整理汇总了C++中GetCurrentPage函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCurrentPage函数的具体用法?C++ GetCurrentPage怎么用?C++ GetCurrentPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCurrentPage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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);
}
示例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();
}
示例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();
}
示例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;
}
}
示例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();
}
示例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);
}
示例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 );
}
}
示例9: Redraw
void Redraw()
{
XClearWindow(disp, win);
MarkMargins();
DrawPage(GetCurrentPage());
}
示例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;
}
示例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);
}
示例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;
}
示例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());
}
示例14: SetCurrentPage
void
TabMenuControl::NextPage()
{
const unsigned NumAllPages = pager.GetTabCount();
if (NumAllPages < 2)
return;
SetCurrentPage((GetCurrentPage() + 1) % NumAllPages);
}
示例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;
}