void LibraryPanel::OnPageChanging(wxBookCtrlEvent& event) { ee::LibraryPanel::OnPageChanging(event); Layer* curr = static_cast<LibraryPage*>(GetCurrPage())->GetLayer(); curr->SetEditable(false); static_cast<LibraryPage*>(m_pages[event.GetSelection()])->UpdateStatusFromLayer(); }
//���ڴ���ֹͣ void Q_ErrorStop(const char *FileName,const char *pFuncName,const u32 Line,const char *Msg) { u32 Gray; u16 Color; u16 x,y; u32 R,G,B; GUI_REGION DrawRegion; u8 ErrorMsg[256]; Debug(Msg); for(y=0;y<LCD_HIGHT;y++) for(x=0;x<LCD_WIDTH;x++) { Color=Gui_ReadPixel16Bit(x,y); R=((Color&0x1f)<<3); G=(((Color>>5)&0x3f)<<2); B=(((Color>>11)&0x1f)<<3); Gray =(R*38 + G*75 + B*15) >> 7; //if((x>20)&&(x<LCD_WIDTH-20)&&(y>20)&&(y<LCD_HIGHT-20)) //Gray=(Gray*9)>>3;if(Gray>0xff) Gray=0xff; Gray =((Gray&0xf8)<<8)+((Gray&0xfc)<<3)+((Gray&0xf8)>>3); Gui_WritePixel(x,y,Gray); } if(GetCurrPage()) sprintf((void *)ErrorMsg,"!!!--SYS ERROR STOP--!!!\n\rNow Page:%s\n\rFile:%s\n\rFunction:%s()\n\rLine:%d\nMsg:%s",GetCurrPage()->Name,FileName,pFuncName,Line,Msg); else sprintf((void *)ErrorMsg,"!!!--SYS ERROR STOP--!!!\n\rFile:%s\n\rFunction:%s()\n\rLine:%d\n\rMsg:%s",FileName,pFuncName,Line,Msg); DrawRegion.x=DrawRegion.y=19; DrawRegion.w=200; DrawRegion.h=280; DrawRegion.Color=FatColor(0xffffff); DrawRegion.Space=0x00; Gui_DrawFont(ASC14B_FONT,ErrorMsg,&DrawRegion); DrawRegion.x=21; DrawRegion.y=19; Gui_DrawFont(ASC14B_FONT,ErrorMsg,&DrawRegion); DrawRegion.x=19; DrawRegion.y=21; Gui_DrawFont(ASC14B_FONT,ErrorMsg,&DrawRegion); DrawRegion.x=21; DrawRegion.y=21; Gui_DrawFont(ASC14B_FONT,ErrorMsg,&DrawRegion); DrawRegion.x=20; DrawRegion.y=20; DrawRegion.Color=FatColor(0xff0000); Gui_DrawFont(ASC14B_FONT,ErrorMsg,&DrawRegion); while(1); }
void LibraryPanel::OnPageChanged(wxBookCtrlEvent& event) { ee::LibraryPanel::OnPageChanged(event); Layer* curr = static_cast<LibraryPage*>(GetCurrPage())->GetLayer(); ee::ChangeLayerMgrSJ::Instance()->Change(curr->GetLayerMgr()); curr->SetEditable(true); static_cast<LibraryPage*>(m_pages[event.GetSelection()])->UpdateStatusFromLayer(); Refresh(); }
bool LibraryPanel::IsCurrLevelLayer() { return m_level_page == static_cast<LibraryPage*>(GetCurrPage()); }
bool LibraryPanel::IsCurrUnitLayer() { return m_unit_page == static_cast<LibraryPage*>(GetCurrPage()); }
//ת��ijҳ��,���ô˺�����InputHandler���߳�����ɵ�ǰ����Ὺʼת������ //return TRUE :����ת�� //return FALSE : ������ת�� //ҳ����ҳ��֮��IJ������ݿ���pInfoParamָ�� SYS_MSG Q_GotoPage(PAGE_ACTION PageAction, u8 *Name, int IntParam, void *pSysParam) { INPUT_EVENT InEventParam; u8 PageIdx; u8 Result; if(GetCurrPage()) UA_Debug("%s : %s->%s\n\r",__FUNCTION__,GetCurrPage()->Name,Name); else UA_Debug("%s : NULL->%s\n\r",__FUNCTION__,Name); //���Ҷ�Ӧҳ�� if(PageAction==SubPageReturn) //�������ҳ�淵�أ����ҵ���һ��ҳ�� { gCurrSysMsg=SM_State_OK; PageIdx=GetPageIdxByLayerOffset(1); } else { gCurrSysMsg=FindPage(Name,0,&PageIdx);//��ʼ��ҳ��ش���Ϣ if(gCurrSysMsg!=SM_State_OK)//û�ҵ���Ӧҳ�� { return gCurrSysMsg; } } if(GetPageByIdx(PageIdx)->Type==POP_PAGE)//Ҫ�����ҳ����popҳ�� if((PageAction!=GotoSubPage)&&(PageAction!=SubPageReturn)) { Q_ErrorStopScreen("Pop Page not allow entry by \"GotoNewPage\" & \"SubPageTranslate\" param!"); return SM_State_Faile; } //POPҳ��ֻ��������ҳ�淵�ص���ʽ�˳� if((Q_GetPageByTrack(0)->Type==POP_PAGE)&&(PageAction!=SubPageReturn)) { Q_ErrorStopScreen("Pop Page only allow quit by \"SubPageReturn\" param!"); return SM_State_Faile; } if(Q_GetPageByTrack(0)->Type!=POP_PAGE) //�����popҳ�淵�أ���ô����Ҫִ�����goto case gCurrSysMsg=GetPageByIdx(PageIdx)->SysEvtHandler(Sys_PreGotoPage, IntParam,pSysParam); //Debug("GotoPage Return 0x%x\n\r",SysMsg); if(gCurrSysMsg&SM_NoGoto)//ҳ���Sys_Goto_Page���ݻص���Ϣ {//��ҳ���Sys_PreGotoPage���ݻ�SM_NoGoto��Ϣ��ʾ����Ҫ�����ҳ���ˡ� return gCurrSysMsg; } else { InEventParam.uType=Sync_Type; switch(PageAction) { case GotoNewPage: InEventParam.EventType=Input_GotoNewPage;break; case GotoSubPage: InEventParam.EventType=Input_GotoSubPage;break; case SubPageReturn: InEventParam.EventType=Input_SubPageReturn;break; } InEventParam.Num=PageIdx; InEventParam.Info.SyncInfo.IntParam=IntParam; InEventParam.Info.SyncInfo.pParam=pSysParam; //Debug("New Page Index:%d\n\r",PageIdx); if((Result=OS_MsgBoxSend(gInputHandler_Queue,&InEventParam,100,FALSE))==OS_ERR_NONE) { return gCurrSysMsg; } else { Debug("GotoPage Send Msg Error!%d\n\r",Result); return SM_State_Faile; } } }