MCPcopy Create free account
hub / github.com/ConEmu/ConEmu / ProcessEditorViewerEvent

Method ProcessEditorViewerEvent

src/ConEmuPlugin/ConEmuPluginBase.cpp:1233–1268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231}
1232
1233int CPluginBase::ProcessEditorViewerEvent(int EditorEvent, int ViewerEvent)
1234{
1235 if (EditorEvent == ee_Redraw)
1236 return 0;
1237
1238 if (!gbRequestUpdateTabs)
1239 {
1240 if ((EditorEvent != -1)
1241 && (EditorEvent == ee_Read || EditorEvent == ee_Close || EditorEvent == ee_GotFocus || EditorEvent == ee_KillFocus || EditorEvent == ee_Save))
1242 {
1243 gbRequestUpdateTabs = TRUE;
1244 //} else if (Event == EE_REDRAW && gbHandleOneRedraw) {
1245 // gbHandleOneRedraw = false; gbRequestUpdateTabs = TRUE;
1246 }
1247 else if ((ViewerEvent != -1)
1248 && (ViewerEvent == ve_Close || ViewerEvent == ve_GotFocus || ViewerEvent == ve_KillFocus || ViewerEvent == ve_Read))
1249 {
1250 gbRequestUpdateTabs = TRUE;
1251 }
1252 }
1253
1254 if (isModalEditorViewer())
1255 {
1256 if ((EditorEvent == ee_Close) || (ViewerEvent == ve_Close))
1257 {
1258 gbClosingModalViewerEditor = TRUE;
1259 }
1260 }
1261
1262 if (gpBgPlugin && (EditorEvent != ee_Redraw))
1263 {
1264 gpBgPlugin->OnMainThreadActivated(EditorEvent, ViewerEvent);
1265 }
1266
1267 return 0;
1268}
1269
1270bool CPluginBase::isEditorViewer()
1271{

Callers 4

ProcessEditorEventFunction · 0.80
ProcessEditorEventWFunction · 0.80
ProcessViewerEventFunction · 0.80
ProcessViewerEventWFunction · 0.80

Calls 1

OnMainThreadActivatedMethod · 0.45

Tested by

no test coverage detected