Tesseract
3.02
|
#include "mfcpch.h"
#include "errcode.h"
#include <assert.h>
#include <stdarg.h>
#include <time.h>
#include "memry.h"
#include "scrollview.h"
#include "params.h"
#include "callcpp.h"
#include "tprintf.h"
#include "host.h"
#include "unichar.h"
Go to the source code of this file.
Functions | |
void | cprintf (const char *format,...) |
ScrollView * | c_create_window (const char *name, inT16 xpos, inT16 ypos, inT16 xsize, inT16 ysize, double xmin, double xmax, double ymin, double ymax) |
void | c_line_color_index (void *win, C_COL index) |
void | c_move (void *win, double x, double y) |
void | c_draw (void *win, double x, double y) |
void | c_make_current (void *win) |
void | c_clear_window (void *win) |
char | window_wait (ScrollView *win) |
void | reverse32 (void *ptr) |
void | reverse16 (void *ptr) |
void c_clear_window | ( | void * | win | ) |
Definition at line 105 of file callcpp.cpp.
{ ScrollView* window = (ScrollView*) win; window->Clear(); }
ScrollView* c_create_window | ( | const char * | name, |
inT16 | xpos, | ||
inT16 | ypos, | ||
inT16 | xsize, | ||
inT16 | ysize, | ||
double | xmin, | ||
double | xmax, | ||
double | ymin, | ||
double | ymax | ||
) |
Definition at line 56 of file callcpp.cpp.
{ return new ScrollView(name, xpos, ypos, xsize, ysize, xmax - xmin, ymax - ymin, true); }
void c_draw | ( | void * | win, |
double | x, | ||
double | y | ||
) |
Definition at line 89 of file callcpp.cpp.
{ ScrollView* window = (ScrollView*) win; window->DrawTo((int) x, (int) y); }
void c_line_color_index | ( | void * | win, |
C_COL | index | ||
) |
Definition at line 71 of file callcpp.cpp.
{ // The colors are the same as the SV ones except that SV has COLOR:NONE --> offset of 1 ScrollView* window = (ScrollView*) win; window->Pen((ScrollView::Color) (index + 1)); }
void c_make_current | ( | void * | win | ) |
Definition at line 98 of file callcpp.cpp.
{ ScrollView* window = (ScrollView*) win; window->Update(); }
void c_move | ( | void * | win, |
double | x, | ||
double | y | ||
) |
Definition at line 80 of file callcpp.cpp.
{ ScrollView* window = (ScrollView*) win; window->SetCursor((int) x, (int) y); }
void cprintf | ( | const char * | format, |
... | |||
) |
Definition at line 41 of file callcpp.cpp.
{ va_list args; //variable args char msg[1000]; va_start(args, format); //variable list vsprintf(msg, format, args); //Format into msg va_end(args); tprintf ("%s", msg); }
void reverse16 | ( | void * | ptr | ) |
Definition at line 141 of file callcpp.cpp.
{ char tmp; char *cptr = (char *) ptr; tmp = *cptr; *cptr = *(cptr + 1); *(cptr + 1) = tmp; }
void reverse32 | ( | void * | ptr | ) |
Definition at line 128 of file callcpp.cpp.
{ char tmp; char *cptr = (char *) ptr; tmp = *cptr; *cptr = *(cptr + 3); *(cptr + 3) = tmp; tmp = *(cptr + 1); *(cptr + 1) = *(cptr + 2); *(cptr + 2) = tmp; }
char window_wait | ( | ScrollView * | win | ) |
Definition at line 112 of file callcpp.cpp.
{ SVEvent* ev; // Wait till an input or click event (all others are thrown away) char ret = '\0'; SVEventType ev_type = SVET_ANY; do { ev = win->AwaitEvent(SVET_ANY); ev_type = ev->type; if (ev_type == SVET_INPUT) ret = ev->parameter[0]; delete ev; } while (ev_type != SVET_INPUT && ev_type != SVET_CLICK); return ret; }