tesseract  4.0.0-1-g2a2b
PGEventHandler Class Reference

#include <pgedit.h>

Inheritance diagram for PGEventHandler:
SVEventHandler

Public Member Functions

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

Detailed Description

Definition at line 35 of file pgedit.h.

Constructor & Destructor Documentation

◆ PGEventHandler()

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

Definition at line 37 of file pgedit.h.

37  : tess_(tess) {
38  }

Member Function Documentation

◆ Notify()

void PGEventHandler::Notify ( const SVEvent event)
virtual

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 225 of file pgedit.cpp.

225  {
226  char myval = '0';
227  if (event->type == SVET_POPUP) {
228  pe->Notify(event);
229  } // These are handled by ParamsEditor
230  else if (event->type == SVET_EXIT) { stillRunning = false; }
231  else if (event->type == SVET_MENU) {
232  if (strcmp(event->parameter, "true") == 0) { myval = 'T'; }
233  else if (strcmp(event->parameter, "false") == 0) { myval = 'F'; }
234  tess_->process_cmd_win_event(event->command_id, &myval);
235  }
236  else {
237  tess_->process_image_event(*event);
238  }
239 }
void process_image_event(const SVEvent &event)
Definition: pgedit.cpp:559
void Notify(const SVEvent *sve)
Definition: paramsd.cpp:265
bool process_cmd_win_event(int32_t cmd_event, char *new_value)
Definition: pgedit.cpp:387
SVEventType type
Definition: scrollview.h:64
int command_id
Definition: scrollview.h:70
char * parameter
Definition: scrollview.h:71

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