| 1231 | } |
| 1232 | |
| 1233 | int 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 | |
| 1270 | bool CPluginBase::isEditorViewer() |
| 1271 | { |
no test coverage detected