tesseract  5.0.0
tesseract::PGEventHandler Class Reference

#include <pgedit.h>

Inheritance diagram for tesseract::PGEventHandler:
tesseract::SVEventHandler

Public Member Functions

 PGEventHandler (tesseract::Tesseract *tess)
 
void Notify (const SVEvent *sve) override
 
- Public Member Functions inherited from tesseract::SVEventHandler
virtual ~SVEventHandler ()
 

Detailed Description

Definition at line 35 of file pgedit.h.

Constructor & Destructor Documentation

◆ PGEventHandler()

tesseract::PGEventHandler::PGEventHandler ( tesseract::Tesseract tess)
inline

Definition at line 37 of file pgedit.h.

37 : tess_(tess) {}

Member Function Documentation

◆ Notify()

void tesseract::PGEventHandler::Notify ( const SVEvent event)
overridevirtual

notify()

Event handler that processes incoming events, either forwarding them to process_cmd_win_event or process_image_event.

Reimplemented from tesseract::SVEventHandler.

Definition at line 250 of file pgedit.cpp.

250  {
251  char myval = '0';
252  if (event->type == SVET_POPUP) {
253  pe->Notify(event);
254  } // These are handled by ParamsEditor
255  else if (event->type == SVET_EXIT) {
256  stillRunning = false;
257  } else if (event->type == SVET_MENU) {
258  if (strcmp(event->parameter, "true") == 0) {
259  myval = 'T';
260  } else if (strcmp(event->parameter, "false") == 0) {
261  myval = 'F';
262  }
263  tess_->process_cmd_win_event(event->command_id, &myval);
264  } else {
265  tess_->process_image_event(*event);
266  }
267 }
@ SVET_POPUP
Definition: scrollview.h:61
void Notify(const SVEvent *sve) override
Definition: paramsd.cpp:271
void process_image_event(const SVEvent &event)
Definition: pgedit.cpp:566
bool process_cmd_win_event(int32_t cmd_event, char *new_value)
Definition: pgedit.cpp:390

The documentation for this class was generated from the following files: