本文整理汇总了C++中Panel::GetFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ Panel::GetFocus方法的具体用法?C++ Panel::GetFocus怎么用?C++ Panel::GetFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Panel
的用法示例。
在下文中一共展示了Panel::GetFocus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ChangePanel
Panel* FilePanels::ChangePanel(Panel *Current,int NewType,int CreateNew,int Force)
{
Panel *NewPanel;
SaveScreen *SaveScr=nullptr;
// OldType не инициализировался...
int OldType=Current->GetType(),X1,Y1,X2,Y2;
int OldPanelMode=Current->GetMode();
if (!Force && NewType==OldType && OldPanelMode==NORMAL_PANEL)
return(Current);
int UseLastPanel=0;
int OldViewMode=Current->GetPrevViewMode();
bool OldFullScreen=Current->IsFullScreen();
int OldSortMode=Current->GetPrevSortMode();
int OldSortOrder=Current->GetPrevSortOrder();
int OldNumericSort=Current->GetPrevNumericSort();
int OldCaseSensitiveSort=Current->GetPrevCaseSensitiveSort();
int OldSortGroups=Current->GetSortGroups();
int OldShowShortNames=Current->GetShowShortNamesMode();
int OldFocus=Current->GetFocus();
int OldSelectedFirst=Current->GetSelectedFirstMode();
int OldDirectoriesFirst=Current->GetPrevDirectoriesFirst();
int LeftPosition=(Current==LeftPanel);
Panel *(&LastFilePanel)=LeftPosition ? LastLeftFilePanel:LastRightFilePanel;
Current->GetPosition(X1,Y1,X2,Y2);
int ChangePosition=((OldType==FILE_PANEL && NewType!=FILE_PANEL &&
OldFullScreen) || (NewType==FILE_PANEL &&
((OldFullScreen && !FileList::IsModeFullScreen(OldViewMode)) ||
(!OldFullScreen && FileList::IsModeFullScreen(OldViewMode)))));
if (!ChangePosition)
{
SaveScr=Current->SaveScr;
Current->SaveScr=nullptr;
}
if (OldType==FILE_PANEL && NewType!=FILE_PANEL)
{
delete Current->SaveScr;
Current->SaveScr=nullptr;
if (LastFilePanel!=Current)
{
DeletePanel(LastFilePanel);
LastFilePanel=Current;
}
LastFilePanel->Hide();
if (LastFilePanel->SaveScr)
{
LastFilePanel->SaveScr->Discard();
delete LastFilePanel->SaveScr;
LastFilePanel->SaveScr=nullptr;
}
}
else
{
Current->Hide();
DeletePanel(Current);
if (OldType==FILE_PANEL && NewType==FILE_PANEL)
{
DeletePanel(LastFilePanel);
LastFilePanel=nullptr;
}
}
if (!CreateNew && NewType==FILE_PANEL && LastFilePanel)
{
int LastX1,LastY1,LastX2,LastY2;
LastFilePanel->GetPosition(LastX1,LastY1,LastX2,LastY2);
if (LastFilePanel->IsFullScreen())
LastFilePanel->SetPosition(LastX1,Y1,LastX2,Y2);
else
LastFilePanel->SetPosition(X1,Y1,X2,Y2);
NewPanel=LastFilePanel;
if (!ChangePosition)
{
if ((NewPanel->IsFullScreen() && !OldFullScreen) ||
(!NewPanel->IsFullScreen() && OldFullScreen))
{
Panel *AnotherPanel=GetAnotherPanel(Current);
if (SaveScr && AnotherPanel->IsVisible() &&
AnotherPanel->GetType()==FILE_PANEL && AnotherPanel->IsFullScreen())
SaveScr->Discard();
delete SaveScr;
}
else
NewPanel->SaveScr=SaveScr;
}
if (!OldFocus && NewPanel->GetFocus())
//.........这里部分代码省略.........