tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
31 #ifndef TESSERACT_VIEWER_SCROLLVIEW_H_
32 #define TESSERACT_VIEWER_SCROLLVIEW_H_
34 #ifndef OCR_SCROLLVIEW_H__
154 #ifndef GRAPHICS_DISABLED
159 ScrollView(
const char* name,
int x_pos,
int y_pos,
int x_size,
int y_size,
160 int x_canvas_size,
int y_canvas_size);
162 ScrollView(
const char* name,
int x_pos,
int y_pos,
int x_size,
int y_size,
163 int x_canvas_size,
int y_canvas_size,
bool y_axis_reversed);
165 ScrollView(
const char* name,
int x_pos,
int y_pos,
int x_size,
int y_size,
166 int x_canvas_size,
int y_canvas_size,
bool y_axis_reversed,
167 const char* server_name);
189 const char*
GetName() {
return window_name_; }
192 int GetId() {
return window_id_; }
202 void Image(
struct Pix* image,
int x_pos,
int y_pos);
220 void Pen(
int red,
int green,
int blue);
223 void Pen(
int red,
int green,
int blue,
int alpha);
229 void Brush(
int red,
int green,
int blue);
232 void Brush(
int red,
int green,
int blue,
int alpha);
238 bool bold,
bool italic,
bool underlined);
241 void Line(
int x1,
int y1,
int x2,
int y2);
248 void Rectangle(
int x1,
int y1,
int x2,
int y2);
252 void Ellipse(
int x,
int y,
int width,
int height);
255 void Text(
int x,
int y,
const char* mystring);
261 void Image(
const char* image,
int x_pos,
int y_pos);
269 void DrawTo(
int x,
int y);
302 void SendMsg(
const char* msg, ...);
319 void MenuItem(
const char* parent,
const char* name);
323 void MenuItem(
const char* parent,
const char* name,
int cmdEvent);
326 void MenuItem(
const char* parent,
const char* name,
327 int cmdEvent,
bool flagged);
331 void PopupItem(
const char* parent,
const char* name);
337 void PopupItem(
const char* parent,
const char* name,
338 int cmdEvent,
const char* value,
const char* desc);
346 void TransferBinaryImage(
struct Pix* image);
348 void TransferGrayImage(
struct Pix* image);
350 void Transfer32bppImage(
struct Pix* image);
353 void Initialize(
const char* name,
int x_pos,
int y_pos,
int x_size,
354 int y_size,
int x_canvas_size,
int y_canvas_size,
355 bool y_axis_reversed,
const char* server_name);
361 static void MessageReceiver();
364 void SetEvent(
SVEvent* svevent);
370 static SVNetwork* GetStream() {
return stream_; }
374 void StartEventHandler();
377 char* AddEscapeChars(
const char* input);
382 const char* window_name_;
388 bool y_axis_is_reversed_;
390 bool event_handler_ended_;
394 static int nr_created_windows_;
397 static int image_index_;
410 #endif // GRAPHICS_DISABLED
413 #endif // OCR_SCROLLVIEW_H__
414 #endif // TESSERACT_VIEWER_SCROLLVIEW_H_
static void SendRawMessage(const char *msg)
void AddMessage(const char *format,...)
void SetVisible(bool visible)
ScrollView(const char *name, int x_pos, int y_pos, int x_size, int y_size, int x_canvas_size, int y_canvas_size)
Calls Initialize with default argument for server_name_ & y_axis_reversed.
void MenuItem(const char *parent, const char *name)
void DrawTo(int x, int y)
void Image(struct Pix *image, int x_pos, int y_pos)
void ZoomToRectangle(int x1, int y1, int x2, int y2)
SVEvent * AwaitEventAnyWindow()
virtual ~SVEventHandler()
int TranslateYCoordinate(int y)
SVEvent & operator=(const SVEvent &)
void SendMsg(const char *msg,...)
Send a message to the server, attaching the window id.
SVEvent * AwaitEvent(SVEventType type)
void TextAttributes(const char *font, int pixel_size, bool bold, bool italic, bool underlined)
virtual void Notify(const SVEvent *sve)
void Line(int x1, int y1, int x2, int y2)
void AddEventHandler(SVEventHandler *listener)
Add an Event Listener to this ScrollView Window.
void SetCursor(int x, int y)
void Text(int x, int y, const char *mystring)
char * ShowInputDialog(const char *msg)
int ShowYesNoDialog(const char *msg)
void Ellipse(int x, int y, int width, int height)
void Rectangle(int x1, int y1, int x2, int y2)
void PopupItem(const char *parent, const char *name)