wgnuplib.h File Reference

#include <windows.h>

Include dependency graph for wgnuplib.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tagPRINT
struct  tagMW
struct  tagTW
struct  tagGW
struct  tagLS

Defines

#define EXPORT
#define MyGetProcAddress(strProc, Proc)   Proc
#define BUTTONMAX   20
#define SCI_DEFAULT_CHARSET   ANSI_CHARSET
#define MAXFONTNAME   80
#define SCILEX   "scilex.exe"
#define WSCILEX   "wscilex.exe"

Typedefs

typedef tagPRINT PRINT
typedef PRINTLP_PRINT
typedef tagMW MW
typedef MWLPMW
typedef tagTW TW
typedef TWLPTW
typedef tagGW GW
typedef GWLPGW
typedef tagLS LS

Functions

EXPORT void WINAPI TextMessage (void)
EXPORT void TextMessage1 (int)
EXPORT int WINAPI TextInit (LPTW lptw)
EXPORT void WINAPI TextClose (LPTW lptw)
EXPORT void WINAPI TextToCursor (LPTW lptw)
EXPORT int WINAPI TextKBHit (LPTW)
EXPORT int WINAPI TextGetCh (LPTW)
EXPORT int WINAPI TextGetChE (LPTW)
EXPORT LPSTR WINAPI TextGetS (LPTW lptw, LPSTR str, unsigned int size)
EXPORT int WINAPI TextPutCh (LPTW, BYTE)
EXPORT int WINAPI TextPutS (LPTW lptw, LPSTR str)
EXPORT void WINAPI TextGotoXY (LPTW lptw, int x, int y)
EXPORT int WINAPI TextWhereX (LPTW lptw)
EXPORT int WINAPI TextWhereY (LPTW lptw)
EXPORT void WINAPI TextCursorHeight (LPTW lptw, int height)
EXPORT void WINAPI TextClearEOL (LPTW lptw)
EXPORT void WINAPI TextClearEOS (LPTW lptw)
EXPORT void WINAPI TextInsertLine (LPTW lptw)
EXPORT void WINAPI TextDeleteLine (LPTW lptw)
EXPORT void WINAPI TextScrollReverse (LPTW lptw)
EXPORT void WINAPI TextAttr (LPTW lptw, BYTE attr)
EXPORT void WINAPI AboutBox (HWND hwnd)


Define Documentation

#define BUTTONMAX   20

Definition at line 64 of file wgnuplib.h.

Referenced by InitMWStruct(), and LoadMacros().

#define EXPORT

Definition at line 34 of file wgnuplib.h.

#define MAXFONTNAME   80

Definition at line 98 of file wgnuplib.h.

#define MyGetProcAddress ( strProc,
Proc   )     Proc

Get reference to functions if DLL

Definition at line 41 of file wgnuplib.h.

Referenced by CopyPrint(), DialogWindow(), ExportStyle(), ExposeChooseWindow(), ExposeMessageWindow(), ExposeMessageWindow1(), and LoadMacros().

#define SCI_DEFAULT_CHARSET   ANSI_CHARSET

Definition at line 96 of file wgnuplib.h.

Referenced by TextMakeFont().

#define SCILEX   "scilex.exe"

Definition at line 195 of file wgnuplib.h.

#define WSCILEX   "wscilex.exe"

Definition at line 196 of file wgnuplib.h.

Referenced by InitCheckBIN(), InitCheckCOS(), InitCheckCOSF(), InitCheckDEM(), InitCheckGRAPH(), InitCheckGRAPHB(), InitCheckSAV(), InitCheckSCE(), InitCheckSCI(), InitCheckTST(), UpdateBIN(), UpdateCOS(), UpdateCOSF(), UpdateDEM(), UpdateGRAPH(), UpdateGRAPHB(), UpdateSAV(), UpdateSCE(), UpdateSCI(), UpdateTST(), and Windows_Main().


Typedef Documentation

typedef struct tagGW GW

typedef PRINT* LP_PRINT

Definition at line 58 of file wgnuplib.h.

typedef GW* LPGW

Definition at line 193 of file wgnuplib.h.

typedef MW* LPMW

Definition at line 89 of file wgnuplib.h.

typedef TW* LPTW

Definition at line 141 of file wgnuplib.h.

typedef struct tagLS LS

typedef struct tagMW MW

typedef struct tagPRINT PRINT

typedef struct tagTW TW


Function Documentation

EXPORT void WINAPI AboutBox ( HWND  hwnd  ) 

EXPORT void WINAPI TextAttr ( LPTW  lptw,
BYTE  attr 
)

Definition at line 1072 of file wtext.c.

References tagTW::Attr.

Referenced by user_putc(), and user_puts().

01073 {
01074   lptw->Attr = attr;
01075 }

Here is the caller graph for this function:

EXPORT void WINAPI TextClearEOL ( LPTW  lptw  ) 

Definition at line 965 of file wtext.c.

00966 {
00967 HDC hdc;
00968 int xpos, ypos;
00969 int from, len;
00970 POINT pt;
00971         pt.x = pt.y = 0;
00972         ClearMark(lptw, pt);
00973         from = lptw->CursorPos.y*lptw->ScreenSize.x + lptw->CursorPos.x;
00974         len = lptw->ScreenSize.x-lptw->CursorPos.x;
00975         _fmemset(lptw->ScreenBuffer + from, ' ', len);
00976         _fmemset(lptw->AttrBuffer + from, NOTEXT, len);
00977         xpos = lptw->CursorPos.x*lptw->CharSize.x - lptw->ScrollPos.x;
00978         ypos = lptw->CursorPos.y*lptw->CharSize.y - lptw->ScrollPos.y;
00979         hdc = GetDC(lptw->hWndText);
00980 
00981         SetTextColor(hdc, GetIhmTextColor());
00982         SetBkColor(hdc, GetIhmTextBackgroundColor());
00983         
00984         SelectObject(hdc, (lptw->hfont));
00985         TextOut(hdc,xpos,ypos,
00986                 (LPSTR)(lptw->ScreenBuffer + lptw->CursorPos.y*lptw->ScreenSize.x + 
00987                 lptw->CursorPos.x), lptw->ScreenSize.x-lptw->CursorPos.x);
00988         (void)ReleaseDC(lptw->hWndText,hdc);
00989 }

EXPORT void WINAPI TextClearEOS ( LPTW  lptw  ) 

Definition at line 993 of file wtext.c.

00994 {
00995   RECT rect;
00996   int from, len;
00997   POINT pt;
00998   pt.x = pt.y = 0;
00999   ClearMark (lptw, pt);
01000   from = lptw->CursorPos.y * lptw->ScreenSize.x + lptw->CursorPos.x;
01001   len = lptw->ScreenSize.x - lptw->CursorPos.x +
01002     (lptw->ScreenSize.y - lptw->CursorPos.y - 1) * lptw->ScreenSize.x;
01003   _fmemset(lptw->ScreenBuffer + from, ' ', len);
01004   _fmemset(lptw->AttrBuffer + from, NOTEXT, len);
01005   GetClientRect (lptw->hWndText, (LPRECT) & rect);
01006   InvalidateRect (lptw->hWndText, (LPRECT) & rect, 1);
01007   UpdateWindow (lptw->hWndText);
01008 }

EXPORT void WINAPI TextClose ( LPTW  lptw  ) 

Definition at line 295 of file wtext.c.

Referenced by CloseConsoleGUI().

00296 {
00297   HGLOBAL hglobal;
00298 
00299   /* close window */
00300   if (lptw->hWndParent)DestroyWindow (lptw->hWndParent);
00301   TextMessage ();
00302 
00303   hglobal = GlobalHandle (lptw->ScreenBuffer);
00304   if (hglobal)
00305     {
00306       GlobalUnlock (hglobal);
00307       GlobalFree (hglobal);
00308     }
00309   hglobal = GlobalHandle (lptw->AttrBuffer);
00310   if (hglobal)
00311     {
00312       GlobalUnlock (hglobal);
00313       GlobalFree (hglobal);
00314     }
00315   hglobal = GlobalHandle (lptw->KeyBuf);
00316   if (hglobal)
00317     {
00318       GlobalUnlock (hglobal);
00319       GlobalFree (hglobal);
00320     }
00321 
00322   if (lptw->lpmw)  CloseMacros (lptw);
00323   lptw->hWndParent = (HWND) NULL;
00324 }

Here is the caller graph for this function:

EXPORT void WINAPI TextCursorHeight ( LPTW  lptw,
int  height 
)

Definition at line 958 of file wtext.c.

00959 {
00960   lptw->CaretHeight = height;
00961   if (lptw->bFocus)
00962     CreateCaret (lptw->hWndText, 0, lptw->CharSize.x, 2 + lptw->CaretHeight);
00963 }

EXPORT void WINAPI TextDeleteLine ( LPTW  lptw  ) 

Definition at line 1030 of file wtext.c.

01031 {
01032   RECT rect;
01033   int from, to, len;
01034   POINT pt;
01035   pt.x = pt.y = 0;
01036   ClearMark (lptw, pt);
01037   to = lptw->CursorPos.y * lptw->ScreenSize.x,
01038     from = (lptw->CursorPos.y + 1) * lptw->ScreenSize.x;
01039   len = (lptw->ScreenSize.y - lptw->CursorPos.y - 1) * lptw->ScreenSize.x;
01040   _fmemmove(lptw->ScreenBuffer + to, lptw->ScreenBuffer + from, len);
01041   _fmemmove(lptw->AttrBuffer + to, lptw->AttrBuffer + from, len);
01042   from = lptw->ScreenSize.x * (lptw->ScreenSize.y - 1);
01043   _fmemset(lptw->ScreenBuffer + from, ' ', lptw->ScreenSize.x);
01044   _fmemset(lptw->AttrBuffer + from, NOTEXT, lptw->ScreenSize.x);
01045   GetClientRect (lptw->hWndText, (LPRECT) & rect);
01046   InvalidateRect (lptw->hWndText, (LPRECT) & rect, 1);
01047   UpdateWindow (lptw->hWndText);
01048   if (lptw->CursorFlag) TextToCursor (lptw);
01049 }

EXPORT int WINAPI TextGetCh ( LPTW   ) 

Definition at line 806 of file wtext.c.

Referenced by MyGetCh(), TextGetChE(), and xscimore().

00807 {
00808   int ch;
00809   
00810   lptw->bGetCh = TRUE;
00811   
00812   TextToCursor (lptw);
00813   
00814   if (lptw->bFocus)
00815     {
00816       SetCaretPos (lptw->CursorPos.x * lptw->CharSize.x - lptw->ScrollPos.x,
00817                    lptw->CursorPos.y * lptw->CharSize.y + lptw->CharAscent
00818                    - lptw->CaretHeight - lptw->ScrollPos.y);
00819       ShowCaret (lptw->hWndText);
00820     }
00821 
00832   do 
00833   {
00834     if ( (!GetThreadPasteRunning()) && (!WriteInKeyBuf) ) Sleep(1); 
00835     TextMessage();
00836   } while (!TextKBHit(lptw));
00837   
00838   ch = *lptw->KeyBufOut++;
00839   
00840   
00841   /* Interception de Ctrl+C */
00842   if (ch == (char)3) 
00843   {
00844         if ( HasAZoneTextSelected(lptw) )
00845           {
00846                 TextCopyClip(lptw);
00847                 SendCTRLandAKey(CTRLE);
00848                 return 1;
00849                 
00850           }
00851   }
00852   
00853   if (lptw->KeyBufOut - lptw->KeyBuf >= (int) lptw->KeyBufSize)   lptw->KeyBufOut = lptw->KeyBuf;       /* wrap around */
00854 
00855   if (lptw->bFocus)  HideCaret (lptw->hWndText);
00856   
00857   lptw->bGetCh = FALSE;
00858   return ch;
00859   
00860 }

Here is the caller graph for this function:

EXPORT int WINAPI TextGetChE ( LPTW   ) 

Definition at line 896 of file wtext.c.

Referenced by MyFRead(), and TextGetS().

00897 {
00898   int ch;
00899   ch = TextGetCh (lptw);
00900   TextPutCh (lptw, (BYTE) ch);
00901   return ch;
00902 }

Here is the caller graph for this function:

EXPORT LPSTR WINAPI TextGetS ( LPTW  lptw,
LPSTR  str,
unsigned int  size 
)

Definition at line 904 of file wtext.c.

Referenced by MyFGetS().

00905 {
00906   LPSTR next = str;
00907   
00908   while (--size > 0)
00909     {
00910       switch (*next = TextGetChE (lptw))
00911         {
00912         case EOF:
00913           *next = '\0';
00914           if (next == str)
00915             return (char *) NULL;
00916           return str;
00917         case '\n':
00918           *(next + 1) = '\0';
00919           return str;
00920         case 0x08:
00921         case 0x7f:
00922           if (next > str)
00923             --next;
00924           break;
00925         default:
00926           ++next;
00927         }
00928     }
00929   *next = '\0';
00930   return str;
00931 }

Here is the caller graph for this function:

EXPORT void WINAPI TextGotoXY ( LPTW  lptw,
int  x,
int  y 
)

Definition at line 942 of file wtext.c.

Referenced by ClearCommandWindow(), ClearLinesScreenConsole(), and xscimore().

00943 {
00944   lptw->CursorPos.x = x;
00945   lptw->CursorPos.y = y;
00946 }

Here is the caller graph for this function:

EXPORT int WINAPI TextInit ( LPTW  lptw  ) 

Definition at line 181 of file wtext.c.

Referenced by Windows_Main().

00182 {
00183   RECT rect;
00184   HMENU sysmenu;
00185   HGLOBAL hglobal;
00186   
00187   lptw->hWndParent=NULL;
00188   lptw->hWndText=NULL;
00189 
00190   ReadRegistryTxt (lptw);
00191   if (lptw->bSysColors) InitIhmDefaultColor();
00192 
00193   if (!lptw->hPrevInstance)    CreateTextClass (lptw);
00194 
00195   if (lptw->KeyBufSize == 0)    lptw->KeyBufSize = KeyBufferSize;
00196 
00197    /* Modified by D.Abdemouche 20/05/03 */
00198   if (lptw->ScreenSize.x < ScrollSize.x)  lptw->ScreenSize.x = ScrollSize.x;
00199   if (lptw->ScreenSize.y < ScrollSize.y)  lptw->ScreenSize.y = ScrollSize.y;
00200 
00201   lptw->CursorPos.x = lptw->CursorPos.y = 0;
00202   lptw->bFocus = FALSE;
00203   lptw->bGetCh = FALSE;
00204   lptw->CaretHeight = 0;
00205   if (!lptw->nCmdShow)
00206     lptw->nCmdShow = SW_SHOWNORMAL;
00207   if (!lptw->Attr)
00208     lptw->Attr = 0xf0;          /* black on white */
00209 
00210   hglobal = GlobalAlloc (GHND, lptw->ScreenSize.x * lptw->ScreenSize.y);
00211 
00212   /* sauvegarde de hglobal pour reallocation ultérieure */
00213   lptw->ScreenBuffer = (BYTE FAR *) GlobalLock (hglobal);
00214   if (lptw->ScreenBuffer == (BYTE FAR *) NULL)
00215     {
00216       MessageBox ((HWND) NULL, szNoMemory, (LPSTR) NULL, MB_ICONHAND | MB_SYSTEMMODAL);
00217       return (1);
00218     }
00219   _fmemset (lptw->ScreenBuffer, ' ', lptw->ScreenSize.x * lptw->ScreenSize.y);
00220   hglobal = GlobalAlloc (GHND, lptw->ScreenSize.x * lptw->ScreenSize.y);
00221   lptw->AttrBuffer = (BYTE FAR *) GlobalLock (hglobal);
00222   if (lptw->AttrBuffer == (BYTE FAR *) NULL)
00223     {
00224       MessageBox ((HWND) NULL, szNoMemory, (LPSTR) NULL, MB_ICONHAND | MB_SYSTEMMODAL);
00225       return (1);
00226     }
00227   _fmemset (lptw->AttrBuffer, NOTEXT, lptw->ScreenSize.x * lptw->ScreenSize.y);
00228   
00229   hglobal = GlobalAlloc (GHND, lptw->KeyBufSize);
00230     /* hglobal = GlobalAlloc (LHND, lptw->KeyBufSize); */
00231   /* Modification Allan CORNET LHND pour LocalAlloc et non pour GlobalAlloc*/
00232   lptw->KeyBuf = (BYTE FAR *) GlobalLock (hglobal);
00233   
00234   if (lptw->KeyBuf == (BYTE FAR *) NULL)
00235     {
00236       MessageBox ((HWND) NULL, szNoMemory, (LPSTR) NULL, MB_ICONHAND | MB_SYSTEMMODAL);
00237       return (1);
00238     }
00239   _fmemset (lptw->KeyBuf, ' ', lptw->KeyBufSize);  
00240   lptw->KeyBufIn = lptw->KeyBufOut = lptw->KeyBuf;
00241   
00242   
00243   lptw->hWndParent = CreateWindow (szParentClass, lptw->Title,
00244                                    WS_OVERLAPPEDWINDOW,
00245                                    lptw->Origin.x, lptw->Origin.y,
00246                                    lptw->Size.x, lptw->Size.y,
00247                                    NULL, NULL, lptw->hInstance, lptw);
00248 
00249   if (lptw->hWndParent == (HWND) NULL)
00250     {
00251       MessageBox ((HWND) NULL, MSG_ERROR54, (LPSTR) NULL, MB_ICONHAND | MB_SYSTEMMODAL);
00252       return (1);
00253     }
00254   ShowWindow (lptw->hWndParent, lptw->nCmdShow);
00255   GetClientRect (lptw->hWndParent, &rect);
00256 
00257   lptw->hWndText = CreateWindow (szTextClass, lptw->Title,
00258                                  WS_CHILD | WS_VSCROLL | WS_HSCROLL,
00259                                  0, lptw->ButtonHeight,
00260                                rect.right, rect.bottom - lptw->ButtonHeight,
00261                              lptw->hWndParent, NULL, lptw->hInstance, lptw);
00262                              
00263   if (lptw->hWndText == (HWND) NULL)
00264     {
00265       MessageBox ((HWND) NULL, MSG_ERROR55, (LPSTR) NULL, MB_ICONHAND | MB_SYSTEMMODAL);
00266       return (1);
00267     }
00268     
00269   OnRightClickMenu(lptw) ; 
00270  
00271   sysmenu = GetSystemMenu (lptw->hWndParent, 0);        /* get the sysmenu */
00272   AppendMenu (sysmenu, MF_SEPARATOR, 0, NULL);
00273   AppendMenu (sysmenu, MF_STRING, M_CONSOLE, MSG_SCIMSG56);
00274   AppendMenu (sysmenu, MF_SEPARATOR, 0, NULL);
00275   AppendMenu (sysmenu, MF_STRING, M_ABOUT, MSG_SCIMSG57);
00276 
00277   if (lptw->lpmw)    LoadMacros (lptw);
00278   ReLoadMenus(lptw);
00279 
00280   DisableMenus(lptw);
00281 
00282   ToolBarOnOff(lptw);
00283   DisableToolBar(lptw);
00284   OnRightClickMenu(lptw);
00285 
00286   ShowWindow (lptw->hWndText, SW_SHOWNORMAL);
00287   BringWindowToTop (lptw->hWndText);
00288   SetFocus (lptw->hWndText);
00289   TextMessage ();
00290   
00291   return (0);
00292 }

Here is the caller graph for this function:

EXPORT void WINAPI TextInsertLine ( LPTW  lptw  ) 

Definition at line 1010 of file wtext.c.

01011 {
01012   RECT rect;
01013   int from, to, len;
01014   POINT pt;
01015   pt.x = pt.y = 0;
01016   ClearMark (lptw, pt);
01017   from = lptw->CursorPos.y * lptw->ScreenSize.x,
01018     to = (lptw->CursorPos.y + 1) * lptw->ScreenSize.x;
01019   len = (lptw->ScreenSize.y - lptw->CursorPos.y - 1) * lptw->ScreenSize.x;
01020   _fmemmove(lptw->ScreenBuffer + to, lptw->ScreenBuffer + from, len);
01021   _fmemmove(lptw->AttrBuffer + to, lptw->AttrBuffer + from, len);
01022   _fmemset(lptw->ScreenBuffer + from, ' ', lptw->ScreenSize.x);
01023   _fmemset(lptw->AttrBuffer + from, NOTEXT, lptw->ScreenSize.x);
01024   GetClientRect (lptw->hWndText, (LPRECT) & rect);
01025   InvalidateRect (lptw->hWndText, (LPRECT) & rect, 1);
01026   UpdateWindow (lptw->hWndText);
01027   if (lptw->CursorFlag)    TextToCursor (lptw);
01028 }

EXPORT int WINAPI TextKBHit ( LPTW   ) 

Definition at line 795 of file wtext.c.

Referenced by CtrlCHit(), and TextGetCh().

00796 {
00797   return (lptw->KeyBufIn != lptw->KeyBufOut);
00798 }

Here is the caller graph for this function:

EXPORT void WINAPI TextMessage ( void   ) 

Definition at line 95 of file wtext.c.

Referenced by CloseConsoleGUI(), MyFPutC(), MyFPutS(), MyFRead(), MyFWrite(), TextClose(), TextGetCh(), TextInit(), and xscimore().

00096 {
00097   TextMessage1 (0);
00098   return;
00099 }

Here is the caller graph for this function:

EXPORT void TextMessage1 ( int   ) 

Definition at line 50 of file ScilabXloop.c.

References CtrlCHit(), flushTKEvents(), TclEventsLoop(), and textwin.

Referenced by ON_WND_GRAPH_WM_CLOSE(), ScilabDoOneEvent(), sxevents(), and TextMessage().

00051 {
00052   MSG msg;
00053 #ifdef WITH_TK
00054   flushTKEvents ();
00055 #endif
00056   while (PeekMessage (&msg, 0, 0, 0, PM_NOREMOVE))
00057     {
00058 #ifdef WITH_TK
00059       /* check for a tcl/tk event */
00060      if ( TclEventsLoop() ) continue ;
00061 #endif
00062       PeekMessage (&msg, 0, 0, 0, PM_REMOVE);
00063       TranslateMessage (&msg);
00064       DispatchMessage (&msg);
00065     }
00066   if (ctrlflag == 1) 
00067     {
00068       CtrlCHit (&textwin);
00069     }
00070 }

Here is the call graph for this function:

Here is the caller graph for this function:

EXPORT int WINAPI TextPutCh ( LPTW  ,
BYTE   
)

Definition at line 414 of file wtext.c.

Referenced by MyFWrite(), MyPutCh(), TextGetChE(), TextPutCh(), and TextPutStr().

00415 {
00416   int pos;
00417 
00418   switch (ch)
00419     {
00420     case '\r':
00421       lptw->CursorPos.x = 0;
00422       if (lptw->CursorFlag)
00423         TextToCursor (lptw);
00424       break;
00425     case '\n':
00426       NewLine (lptw);
00427       break;
00428     case 7:
00429       MessageBeep (MB_OK);
00430       if (lptw->CursorFlag)
00431         TextToCursor (lptw);
00432       break;
00433     case '\t':
00434       {
00435         int n;
00436         for (n = 8 - (lptw->CursorPos.x % 8); n > 0; n--)
00437           TextPutCh (lptw, ' ');
00438       }
00439       break;
00440     case 0x08:
00441     case 0x7f:
00442       lptw->CursorPos.x--;
00443       if (lptw->CursorPos.x < 0)
00444         {
00445           lptw->CursorPos.x = lptw->ScreenSize.x - 1;
00446           lptw->CursorPos.y--;
00447         }
00448       if (lptw->CursorPos.y < 0)
00449         lptw->CursorPos.y = 0;
00450       break;
00451     default:
00452         
00453       pos = lptw->CursorPos.y * lptw->ScreenSize.x + lptw->CursorPos.x;
00454       lptw->ScreenBuffer[pos] = ch;
00455       lptw->AttrBuffer[pos] = lptw->Attr;
00456       UpdateText (lptw, 1);
00457     }
00458   return ch;
00459 }

Here is the caller graph for this function:

EXPORT int WINAPI TextPutS ( LPTW  lptw,
LPSTR  str 
)

Definition at line 933 of file wtext.c.

Referenced by MyFPutS(), sciprint(), sciprint_l(), sciprint_nd(), and Scistring().

00934 {
00935   TextPutStr (lptw, str);
00936   return str[strlen (str) - 1];
00937 }

Here is the caller graph for this function:

EXPORT void WINAPI TextScrollReverse ( LPTW  lptw  ) 

Definition at line 1051 of file wtext.c.

01052 {
01053   RECT rect;
01054   int len = lptw->ScreenSize.x * (lptw->ScreenSize.y - 1);
01055   _fmemmove(lptw->ScreenBuffer+lptw->ScreenSize.x, lptw->ScreenBuffer, len);
01056   _fmemset(lptw->ScreenBuffer, ' ', lptw->ScreenSize.x);
01057   _fmemmove(lptw->AttrBuffer+lptw->ScreenSize.x, lptw->AttrBuffer, len);
01058   _fmemset(lptw->AttrBuffer, NOTEXT, lptw->ScreenSize.x);
01059   if (lptw->CursorPos.y)
01060     lptw->CursorPos.y--;
01061   ScrollWindow (lptw->hWndText, 0, +lptw->CharSize.y, NULL, NULL);
01062   GetClientRect (lptw->hWndText, (LPRECT) & rect);
01063   rect.top = lptw->ScreenSize.y * lptw->CharSize.y;
01064   if (rect.top < rect.bottom) InvalidateRect (lptw->hWndText, (LPRECT) & rect, 1);
01065   lptw->MarkBegin.y++;
01066   lptw->MarkEnd.y++;
01067   LimitMark (lptw, &lptw->MarkBegin);
01068   LimitMark (lptw, &lptw->MarkEnd);
01069   UpdateWindow (lptw->hWndText);
01070 }

EXPORT void WINAPI TextToCursor ( LPTW  lptw  ) 

Definition at line 327 of file wtext.c.

Referenced by NewLine(), TextDeleteLine(), TextGetCh(), TextInsertLine(), and TextPutCh().

00328 {
00329   int nXinc = 0;
00330   int nYinc = 0;
00331   int cxCursor;
00332   int cyCursor;
00333   cyCursor = lptw->CursorPos.y * lptw->CharSize.y;
00334   if ((cyCursor + lptw->CharSize.y > lptw->ScrollPos.y + lptw->ClientSize.y)
00335       || (cyCursor < lptw->ScrollPos.y))
00336     {
00337       nYinc = max (0, cyCursor + lptw->CharSize.y - lptw->ClientSize.y) - lptw->ScrollPos.y;
00338       nYinc = min (nYinc, lptw->ScrollMax.y - lptw->ScrollPos.y);
00339     }
00340   cxCursor = lptw->CursorPos.x * lptw->CharSize.x;
00341   if ((cxCursor + lptw->CharSize.x > lptw->ScrollPos.x + lptw->ClientSize.x)
00342       || (cxCursor < lptw->ScrollPos.x))
00343     {
00344       nXinc = max (0, cxCursor + lptw->CharSize.x - lptw->ClientSize.x / 2) - lptw->ScrollPos.x;
00345       nXinc = min (nXinc, lptw->ScrollMax.x - lptw->ScrollPos.x);
00346     }
00347   if (nYinc || nXinc)
00348     {
00349       lptw->ScrollPos.y += nYinc;
00350       lptw->ScrollPos.x += nXinc;
00351       ScrollWindow (lptw->hWndText, -nXinc, -nYinc, NULL, NULL);
00352       SetScrollPos (lptw->hWndText, SB_VERT, lptw->ScrollPos.y, TRUE);
00353 
00354       SetScrollPos (lptw->hWndText, SB_HORZ, lptw->ScrollPos.x, TRUE);
00355       UpdateWindow (lptw->hWndText);
00356     }
00357 }

Here is the caller graph for this function:

EXPORT int WINAPI TextWhereX ( LPTW  lptw  ) 

Definition at line 948 of file wtext.c.

00949 {
00950   return lptw->CursorPos.x;
00951 }

EXPORT int WINAPI TextWhereY ( LPTW  lptw  ) 

Definition at line 953 of file wtext.c.

Referenced by ON_WND_TEXT_WM_PAINT().

00954 {
00955   return lptw->CursorPos.y;
00956 }

Here is the caller graph for this function:


Generated on Sun Mar 4 15:58:50 2007 for Scilab [trunk] by  doxygen 1.5.1