32 #ifndef TESSERACT_VIEWER_SCROLLVIEW_H_ 33 #define TESSERACT_VIEWER_SCROLLVIEW_H_ 35 #ifndef OCR_SCROLLVIEW_H__ 159 #ifndef GRAPHICS_DISABLED 165 int x_canvas_size,
int y_canvas_size);
168 int x_canvas_size,
int y_canvas_size,
bool y_axis_reversed);
171 int x_canvas_size,
int y_canvas_size,
bool y_axis_reversed,
172 const char* server_name);
187 SVEvent* AwaitEventAnyWindow();
194 const char*
GetName() {
return window_name_; }
207 void Image(
struct Pix* image,
int x_pos,
int y_pos);
210 static void Update();
222 void Pen(
Color color);
225 void Pen(
int red,
int green,
int blue);
228 void Pen(
int red,
int green,
int blue,
int alpha);
231 void Brush(
Color color);
234 void Brush(
int red,
int green,
int blue);
237 void Brush(
int red,
int green,
int blue,
int alpha);
242 void TextAttributes(
const char* font,
int pixel_size,
243 bool bold,
bool italic,
bool underlined);
246 void Line(
int x1,
int y1,
int x2,
int y2);
249 void Stroke(
float width);
253 void Rectangle(
int x1,
int y1,
int x2,
int y2);
257 void Ellipse(
int x,
int y,
int width,
int height);
260 void Text(
int x,
int y,
const char* mystring);
266 void Image(
const char* image,
int x_pos,
int y_pos);
269 void SetCursor(
int x,
int y);
274 void DrawTo(
int x,
int y);
277 void SetVisible(
bool visible);
280 void AlwaysOnTop(
bool b);
283 int ShowYesNoDialog(
const char* msg);
287 char* ShowInputDialog(
const char* msg);
290 void AddMessageBox();
294 void AddMessage(
const char* format, ...);
298 void ZoomToRectangle(
int x1,
int y1,
int x2,
int y2);
307 void SendMsg(
const char* msg, ...);
317 static void SendRawMessage(
const char* msg);
324 void MenuItem(
const char* parent,
const char* name);
328 void MenuItem(
const char* parent,
const char* name,
int cmdEvent);
331 void MenuItem(
const char* parent,
const char* name,
332 int cmdEvent,
bool flagged);
336 void PopupItem(
const char* parent,
const char* name);
342 void PopupItem(
const char* parent,
const char* name,
343 int cmdEvent,
const char* value,
const char* desc);
347 int TranslateYCoordinate(
int y);
351 void TransferBinaryImage(
struct Pix* image);
353 void TransferGrayImage(
struct Pix* image);
355 void Transfer32bppImage(
struct Pix* image);
358 void Initialize(
const char* name,
int x_pos,
int y_pos,
int x_size,
359 int y_size,
int x_canvas_size,
int y_canvas_size,
360 bool y_axis_reversed,
const char* server_name);
366 static void* MessageReceiver(
void* a);
369 void SetEvent(
SVEvent* svevent);
375 static SVNetwork* GetStream() {
return stream_; }
378 static void* StartEventHandler(
void* sv);
381 char* AddEscapeChars(
const char* input);
386 const char* window_name_;
392 bool y_axis_is_reversed_;
394 bool event_handler_ended_;
398 static int nr_created_windows_;
401 static int image_index_;
414 #endif // GRAPHICS_DISABLED 417 #endif // OCR_SCROLLVIEW_H__ 418 #endif // TESSERACT_VIEWER_SCROLLVIEW_H_
virtual ~SVEventHandler()
SVEvent & operator=(const SVEvent &)
virtual void Notify(const SVEvent *sve)