tesseract  5.0.0-alpha-619-ge9db
PGEventHandler Class Reference

#include <pgedit.h>

Inheritance diagram for PGEventHandler:
SVEventHandler

Public Member Functions

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

Detailed Description

Definition at line 34 of file pgedit.h.

Constructor & Destructor Documentation

◆ PGEventHandler()

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

Definition at line 36 of file pgedit.h.

36  : tess_(tess) {
37  }

Member Function Documentation

◆ Notify()

void 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 SVEventHandler.

Definition at line 276 of file pgedit.cpp.

276  {
277  char myval = '0';
278  if (event->type == SVET_POPUP) {
279  pe->Notify(event);
280  } // These are handled by ParamsEditor
281  else if (event->type == SVET_EXIT) { stillRunning = false; }
282  else if (event->type == SVET_MENU) {
283  if (strcmp(event->parameter, "true") == 0) { myval = 'T'; }
284  else if (strcmp(event->parameter, "false") == 0) { myval = 'F'; }
285  tess_->process_cmd_win_event(event->command_id, &myval);
286  }
287  else {
288  tess_->process_image_event(*event);
289  }
290 }

The documentation for this class was generated from the following files:
SVET_POPUP
Definition: scrollview.h:53
SVET_EXIT
Definition: scrollview.h:46
ParamsEditor::Notify
void Notify(const SVEvent *sve) override
Definition: paramsd.cpp:271
SVEvent::parameter
char * parameter
Definition: scrollview.h:65
tesseract::Tesseract::process_cmd_win_event
bool process_cmd_win_event(int32_t cmd_event, char *new_value)
Definition: pgedit.cpp:415
SVEvent::type
SVEventType type
Definition: scrollview.h:63
tesseract::Tesseract::process_image_event
void process_image_event(const SVEvent &event)
Definition: pgedit.cpp:587
SVEvent::command_id
int command_id
Definition: scrollview.h:70
SVET_MENU
Definition: scrollview.h:54