static void PrintRegisters(struct net_device *dev) { unsigned int ioaddr = dev->base_addr; if (pc_debug > 1) { int i, page; printk(KERN_DEBUG pr_fmt("Register common: ")); for (i = 0; i < 8; i++) pr_cont(" %2.2x", GetByte(i)); pr_cont("\n"); for (page = 0; page <= 8; page++) { printk(KERN_DEBUG pr_fmt("Register page %2x: "), page); SelectPage(page); for (i = 8; i < 16; i++) pr_cont(" %2.2x", GetByte(i)); pr_cont("\n"); } for (page=0x40 ; page <= 0x5f; page++) { if (page == 0x43 || (page >= 0x46 && page <= 0x4f) || (page >= 0x51 && page <=0x5e)) continue; printk(KERN_DEBUG pr_fmt("Register page %2x: "), page); SelectPage(page); for (i = 8; i < 16; i++) pr_cont(" %2.2x", GetByte(i)); pr_cont("\n"); } } }
void cQuickSlotDlg::OnActionEvnet(LONG lId, void * p, DWORD we) { if( we & WE_BTNCLICK ) { if( lId == QI_PREVPAGEBTN || lId == QI2_PREVPAGEBTN) { SelectPage( mCurSheet - 1 ); } else if( lId == QI_NEXTPAGEBTN || lId == QI2_NEXTPAGEBTN ) { SelectPage( mCurSheet + 1 ); } } else if( we & WE_LBTNDBLCLICK ) { // 080704 LYW --- QuickSlotDlg : 확장 슬롯 추가 처리. //QUICKMGR->UseQuickItem( mCurShee, ( WORD )( mpSheet[ mCurSheet ]->GetCurSelCellPos() ) ); if(this->GetID() == QI1_QUICKSLOTDLG) { QUICKMGR->UseQuickItem( mCurSheet, ( WORD )( mpSheet[ mCurSheet ]->GetCurSelCellPos() ) ); } else { QUICKMGR->UseQuickItem( (mCurSheet+MAX_SLOTPAGE) + 0, ( WORD )( mpSheet[ mCurSheet ]->GetCurSelCellPos() ) ); } } }
bool wxPropertyGridManager::RemovePage( int page ) { wxCHECK_MSG( (page >= 0) && (page < (int)GetPageCount()), false, wxT("invalid page index") ); wxPropertyGridPage* pd = (wxPropertyGridPage*)m_arrPages.Item(page); if ( m_arrPages.GetCount() == 1 ) { // Last page: do not remove page entry m_pPropGrid->Clear(); m_selPage = -1; m_iFlags &= ~wxPG_MAN_FL_PAGE_INSERTED; pd->m_label.clear(); } // Change selection if current is page else if ( page == m_selPage ) { if ( !m_pPropGrid->ClearSelection() ) return false; // Substitute page to select int substitute = page - 1; if ( substitute < 0 ) substitute = page + 1; SelectPage(substitute); } // Remove toolbar icon #if wxUSE_TOOLBAR if ( m_windowStyle & wxPG_TOOLBAR ) { wxASSERT( m_pToolbar ); int toolPos = GetExtraStyle() & wxPG_EX_MODE_BUTTONS ? 3 : 0; toolPos += page; m_pToolbar->DeleteToolByPos(toolPos); // Delete separator as well, for consistency if ( (GetExtraStyle() & wxPG_EX_MODE_BUTTONS) && GetPageCount() == 1 ) m_pToolbar->DeleteToolByPos(2); } #endif if ( m_arrPages.GetCount() > 1 ) { m_arrPages.RemoveAt(page); delete pd; } // Adjust indexes that were above removed if ( m_selPage > page ) m_selPage--; return true; }
/*************************************************************************************************** *FunctionName: activityStart *Description: 显示主界面 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:00:32 ***************************************************************************************************/ static void activityStart(void) { readPrintInfo(&page->printInfo); showDeviceInfoText(); SelectPage(102); }
/*************************************************************************************************** *FunctionName: activityResume *Description: 界面恢复显示时要做的事 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:01:58 ***************************************************************************************************/ static void activityResume(void) { if(S_ShowPageBuffer) { } SelectPage(147); }
/*************************************************************************************************** *FunctionName: activityResume *Description: 界面恢复显示时要做的事 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:01:58 ***************************************************************************************************/ static void activityResume(void) { if(S_OtherSetPageBuffer) { } SelectPage(122); }
/*************************************************************************************************** *FunctionName: activityStart *Description: 显示主界面 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:00:32 ***************************************************************************************************/ static void activityStart(void) { if(S_SysSetPageBuffer) { } SelectPage(98); }
/*************************************************************************************************** *FunctionName: activityResume *Description: 界面恢复显示时要做的事 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:01:58 ***************************************************************************************************/ static void activityResume(void) { if(S_PaiDuiPageBuffer) { //进入界面先禁止插卡自动新建测试功能,通过设置超大检测时间 timer_set(&(S_PaiDuiPageBuffer->timer0), 65535); } SelectPage(93); }
/*************************************************************************************************** *FunctionName: activityStart *Description: 显示主界面 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:00:32 ***************************************************************************************************/ static void activityStart(void) { RefreshText(); DspLine(); dspIco(); SelectPage(147); }
/*************************************************************************************************** *FunctionName: activityStart *Description: 显示主界面 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:00:32 ***************************************************************************************************/ static void activityStart(void) { if(S_PaiDuiPageBuffer) { //进入界面先禁止插卡自动新建测试功能 timer_set(&(S_PaiDuiPageBuffer->timer0), 65535); //如果排队模块失联,则提示 timer_set(&(S_PaiDuiPageBuffer->timer1), 1); } SelectPage(93); }
/*************************************************************************************************** *FunctionName: activityStart *Description: 显示主界面 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:00:32 ***************************************************************************************************/ static void activityStart(void) { if(S_OtherSetPageBuffer) { copyGBSystemSetData(&(S_OtherSetPageBuffer->systemSetData)); showPrintfIco(); showMuteIco(); showLcdLightNum(); showLcdSleepTime(); } SelectPage(122); }
/*************************************************************************************************** *FunctionName: activityResume *Description: 界面恢复显示时要做的事 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:01:58 ***************************************************************************************************/ static void activityResume(void) { /*读取所有操作人*/ ReadUserData(S_UserPageBuffer->user); S_UserPageBuffer->pageindex = 1; S_UserPageBuffer->selectindex = 0; ShowList(); SelectUser(S_UserPageBuffer->selectindex); AddNumOfSongToList(9, 0); SelectPage(84); }
void MainBook::OnPageChanged(NotebookEvent& e) { int newSel = e.GetSelection(); if (newSel != wxNOT_FOUND && m_reloadingDoRaise) { wxWindow *win = m_book->GetPage((size_t)newSel); if(win) { SelectPage(win); //LEditor *editor = dynamic_cast<LEditor*>(win); //if(editor) { // ManagerST::Get()->UpdatePreprocessorFile(editor); //} } } e.Skip(); }
static void activityStart(void) { if(S_AdjustLedPageBuffer) { //获取最新的系统参数 copyGBSystemSetData(&(S_AdjustLedPageBuffer->systemSetData)); clearPageText(); dspTestStatus("Waitting\0"); //校准设置为1通道 S_AdjustLedPageBuffer->itemData.testdata.temperweima.ChannelNum = 0; } SelectPage(140); }
void MainBook::OnPageClosed(NotebookEvent &e) { SelectPage(m_book->GetCurrentPage()); m_quickFindBar->SetEditor(GetActiveEditor()); // any editors left open? LEditor *editor = NULL; for (size_t i = 0; i < m_book->GetPageCount() && editor == NULL; i++) { editor = dynamic_cast<LEditor*>(m_book->GetPage(i)); } if (m_book->GetPageCount() == 0) { SendCmdEvent(wxEVT_ALL_EDITORS_CLOSED); ShowQuickBar(false); } }
/*************************************************************************************************** *FunctionName: activityStart *Description: 显示主界面 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:00:32 ***************************************************************************************************/ static void activityStart(void) { MotorMoveTo(1, 2, WaittingCardLocation, FALSE); S_WaitPageData->currenttestdata = GetCurrentTestItem(); S_WaitPageData->currenttestdata->statues = status_wait1; /*间隔一段时间提示插卡*/ timer_set(&(S_WaitPageData->timer2), 50); //如果无卡,提示插卡 if(GetCardState() == NoCard) AddNumOfSongToList(11, 0); SelectPage(88); }
BOOL CEncpSettingPage::OnInitDialog() { RECT rc, rcWindow; CDialog::OnInitDialog(); // Get Item Information for encp item. encp_GetNetworkInfo(m_hENCPItem, &m_netInfo); encp_GetNodeInfo(m_hENCPItem, &m_nodeInfo); encp_GetGuestPermission( m_hENCPItem, &m_bGuestAllow); if( !m_dlgPage[0] ) { m_dlgPage[0] = new CSettingPageNetwork; m_dlgPage[0]->Create(IDD_SETTING_PAGE_NETWORK, this); } if( !m_dlgPage[1] ) { m_dlgPage[1] = new CSettingPageHostname; m_dlgPage[1]->Create(IDD_SETTING_PAGE_HOSTNAME, this); } if( !m_dlgPage[2] ) { m_dlgPage[2] = new CSettingPageAccount; m_dlgPage[2]->Create(IDD_SETTING_PAGE_ACCOUNT, this); } GetDlgItem(IDC_OUTLINE)->GetClientRect(&rc); GetDlgItem(IDC_OUTLINE)->GetWindowRect(&rcWindow); ScreenToClient(&rcWindow); GetDlgItem(IDC_OUTLINE)->ShowWindow(SW_HIDE); m_dlgPage[0]->SetWindowPos(NULL, rcWindow.left, rcWindow.top, rc.right, rc.bottom, SWP_SHOWWINDOW); m_dlgPage[1]->SetWindowPos(NULL, rcWindow.left, rcWindow.top, rc.right, rc.bottom, SWP_HIDEWINDOW); m_dlgPage[2]->SetWindowPos(NULL, rcWindow.left, rcWindow.top, rc.right, rc.bottom, SWP_HIDEWINDOW); SelectPage( IDC_BUTTON_NETWORK ); #ifdef FACTORY GetDlgItem(IDC_BUTTON_HOSTNAME)->EnableWindow(false); GetDlgItem(IDC_BUTTON_ACCOUNT)->EnableWindow(false); GetDlgItem(IDC_BUTTON_HOSTNAME)->ShowWindow(false); GetDlgItem(IDC_BUTTON_ACCOUNT)->ShowWindow(false); #endif return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len) { int i; SelectPage(2); for (i=0; i < 32; i++) mii_putbit(ioaddr, 1); mii_wbits(ioaddr, 0x05, 4); mii_wbits(ioaddr, phyaddr, 5); mii_wbits(ioaddr, phyreg, 5); mii_putbit(ioaddr, 1); mii_putbit(ioaddr, 0); mii_wbits(ioaddr, data, len); mii_idle(ioaddr); }
/*************************************************************************************************** *FunctionName: activityStart *Description: 显示主界面 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:00:32 ***************************************************************************************************/ static void activityStart(void) { /*获取当前测试的数据指针*/ S_UserPageBuffer->currenttestdata = GetCurrentTestItem(); S_UserPageBuffer->currenttestdata->statues = status_user; /*读取所有操作人*/ ReadUserData(S_UserPageBuffer->user); S_UserPageBuffer->pageindex = 1; S_UserPageBuffer->selectindex = 0; ShowList(); SelectUser(S_UserPageBuffer->selectindex); AddNumOfSongToList(9, 0); SelectPage(84); }
LRESULT CPageNavigator::OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { if (!m_bCapture) return S_OK; ReleaseCapture(); m_bCapture = false; if (!m_bDown) return S_OK; m_bDown = false; int nPage = -1; POINT ptCursor = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; for (int i = 0; i < GetItemCount(); i++) { RECT ItemRect = {0,0,0,0}; GetIconRect(i, &ItemRect); if (::PtInRect(&ItemRect, ptCursor)) { nPage = i; break; } } if (::GetFocus() != m_hWnd) ::SetFocus(m_hWnd); if (nPage < m_pAGDoc->GetNumPages()) { int nLastPage = GetPage(); if (SelectPage(nPage, true/*bSetState*/)) SendMessage(GetParent(), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(), BN_CLICKED/*wNotifyCode*/), MAKELPARAM(nLastPage,nPage)); } else { // It must be the add button SendMessage(GetParent(), WM_COMMAND, MAKEWPARAM(IDC_DOC_PAGEADD, BN_CLICKED/*wNotifyCode*/), 0L); } return S_OK; }
void MainBook::OnPageChanged(wxBookCtrlEvent& e) { e.Skip(); int newSel = e.GetSelection(); if(newSel != wxNOT_FOUND && m_reloadingDoRaise) { wxWindow* win = m_book->GetPage((size_t)newSel); if(win) { SelectPage(win); } } // Cancel any tooltip LEditor::Vec_t editors; GetAllEditors(editors, MainBook::kGetAll_IncludeDetached); for(size_t i = 0; i < editors.size(); ++i) { // Cancel any calltip when switching from the editor editors.at(i)->DoCancelCalltip(); } DoUpdateNotebookTheme(); }
static unsigned mii_rd(unsigned int ioaddr, u_char phyaddr, u_char phyreg) { int i; unsigned data=0, m; SelectPage(2); for (i=0; i < 32; i++) mii_putbit(ioaddr, 1); mii_wbits(ioaddr, 0x06, 4); mii_wbits(ioaddr, phyaddr, 5); mii_wbits(ioaddr, phyreg, 5); mii_idle(ioaddr); mii_getbit(ioaddr); for (m = 1<<15; m; m >>= 1) if (mii_getbit(ioaddr)) data |= m; mii_idle(ioaddr); return data; }
bool Tabbed::OnMouseDown(MouseButtonEvent *e) { if ((e->button == SDL_BUTTON_LEFT) && (e->y < TAB_BAR_HEIGHT)) { float xpos = 0.0; int index = 0; for (pagecontainer_t::iterator i = m_pages.begin(); i!=m_pages.end(); ++i, index++) { float csize[2]; (*i).first->GetSize(csize); csize[0] += 2*LABEL_PADDING; if (e->x - xpos < csize[0]) { SelectPage(index); onSelectPage.emit(index); break; } xpos += csize[0]; } return false; } else { return Container::OnMouseDown(e); } }
int CPageNavigator::ChangePage(int iDelta) { if (!m_hWnd || !m_pAGDoc) return -1; int nPage = m_nPage + iDelta; int nPages = m_pAGDoc->GetNumPages(); bool bHasAddItem = m_ImageList.GetImageCount() & 1; // If the image count is odd if (bHasAddItem && nPage == nPages) { // Scroll the add button into position, if necessary EnsureIconVisible(nPage); return -1; } if (nPage < 0 || nPage >= nPages) return -1; SetRedraw(false); SelectPage(nPage, true/*bSetState*/); SetRedraw(true); return m_nPage; // If successful, this is set in SelectPage() }
void Tabbed::OnActivate() { SelectPage((m_page+1)%m_pages.size()); }
void CEncpSettingPage::OnButtonAccount() { SelectPage( IDC_BUTTON_ACCOUNT ); }
void CEncpSettingPage::OnButtonHostname() { SelectPage( IDC_BUTTON_HOSTNAME ); }
void CEncpSettingPage::OnButtonNetwork() { SelectPage( IDC_BUTTON_NETWORK ); }
/*************************************************************************************************** *FunctionName: activityResume *Description: 界面恢复显示时要做的事 *Input: *Output: *Return: *Author: xsx *Date: 2016年12月21日09:01:58 ***************************************************************************************************/ static void activityResume(void) { SelectPage(88); }
LEditor* MainBook::OpenFile(const wxString& file_name, const wxString& projectName, int lineno, long position, OF_extra extra /*=OF_AddJump*/, bool preserveSelection /*=true*/) { wxFileName fileName(file_name); fileName.MakeAbsolute(); #ifdef __WXMSW__ // Handle cygwin paths wxString curpath = fileName.GetFullPath(); static wxRegEx reCygdrive("/cygdrive/([A-Za-z])"); if(reCygdrive.Matches(curpath)) { // Replace the /cygdrive/c with volume C: wxString volume = reCygdrive.GetMatch(curpath, 1); volume << ":"; reCygdrive.Replace(&curpath, volume); fileName = curpath; } #endif if(!IsFileExists(fileName)) { wxLogMessage(wxT("Failed to open: %s: No such file or directory"), fileName.GetFullPath().c_str()); return NULL; } if(FileExtManager::GetType(fileName.GetFullName()) == FileExtManager::TypeBmp) { // a bitmap file, open it using an image viewer DoOpenImageViewer(fileName); return NULL; } wxString projName = projectName; if(projName.IsEmpty()) { // try to match a project name to the file. otherwise, CC may not work projName = ManagerST::Get()->GetProjectNameByFile(fileName.GetFullPath()); } LEditor* editor = GetActiveEditor(true); BrowseRecord jumpfrom = editor ? editor->CreateBrowseRecord() : BrowseRecord(); editor = FindEditor(fileName.GetFullPath()); if(editor) { editor->SetProject(projName); } else if(fileName.IsOk() == false) { wxLogMessage(wxT("Invalid file name: ") + fileName.GetFullPath()); return NULL; } else if(!fileName.FileExists()) { wxLogMessage(wxT("File: ") + fileName.GetFullPath() + wxT(" does not exist!")); return NULL; } else { // A Nice trick: hide the notebook, open the editor // and then show it bool hidden(false); if(m_book->GetPageCount() == 0) hidden = GetSizer()->Hide(m_book); editor = new LEditor(m_book); editor->Create(projName, fileName); int sel = m_book->GetSelection(); if((extra & OF_PlaceNextToCurrent) && (sel != wxNOT_FOUND)) { AddPage(editor, fileName.GetFullName(), fileName.GetFullPath(), wxNullBitmap, false, sel + 1); } else { AddPage(editor, fileName.GetFullName(), fileName.GetFullPath()); } editor->SetSyntaxHighlight(); // mark the editor as read only if neede MarkEditorReadOnly(editor); // SHow the notebook if(hidden) GetSizer()->Show(m_book); if(position == wxNOT_FOUND && lineno == wxNOT_FOUND && editor->GetContext()->GetName() == wxT("C++")) { // try to find something interesting in the file to put the caret at // for now, just skip past initial blank lines and comments for(lineno = 0; lineno < editor->GetLineCount(); lineno++) { switch(editor->GetStyleAt(editor->PositionFromLine(lineno))) { case wxSTC_C_DEFAULT: case wxSTC_C_COMMENT: case wxSTC_C_COMMENTDOC: case wxSTC_C_COMMENTLINE: case wxSTC_C_COMMENTLINEDOC: continue; } // if we got here, it's a line to stop on break; } if(lineno == editor->GetLineCount()) { lineno = 1; // makes sure a navigation record gets saved } } } if(position != wxNOT_FOUND) { editor->SetEnsureCaretIsVisible(position, preserveSelection); editor->SetLineVisible(editor->LineFromPosition(position)); } else if(lineno != wxNOT_FOUND) { editor->CenterLine(lineno); } if(m_reloadingDoRaise) { if(GetActiveEditor() == editor) { editor->SetActive(); } else { SelectPage(editor); } } // Add this file to the history. Don't check for uniqueness: // if it's already on the list, wxFileHistory will move it to the top // Also, sync between the history object and the configuration file m_recentFiles.AddFileToHistory(fileName.GetFullPath()); clConfig::Get().AddRecentFile(fileName.GetFullPath()); if(extra & OF_AddJump) { BrowseRecord jumpto = editor->CreateBrowseRecord(); NavMgr::Get()->AddJump(jumpfrom, jumpto); } #if !CL_USE_NATIVEBOOK if(m_book->GetPageCount() == 1) { m_book->GetSizer()->Layout(); } #endif return editor; }